Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:16
    cal101 opened #475
  • 09:15
    cal101 opened #474
  • 09:11
    cal101 opened #473
  • 09:09
    cal101 synchronize #462
  • Mar 01 19:41
    cal101 commented #462
  • Mar 01 19:19

    Fabrice-TIERCELIN on master

    update formatter configuration … (compare)

  • Mar 01 19:19
    Fabrice-TIERCELIN closed #471
  • Mar 01 18:29
    cal101 edited #472
  • Mar 01 18:26
    cal101 opened #472
  • Mar 01 17:58
    cal101 commented #470
  • Mar 01 17:57

    Fabrice-TIERCELIN on master

    New CleanUp: Merge inside if st… (compare)

  • Mar 01 17:56
    cal101 synchronize #471
  • Mar 01 17:53
    cal101 opened #471
  • Mar 01 05:02
    Fabrice-TIERCELIN commented #470
  • Mar 01 04:59

    Fabrice-TIERCELIN on master

    Restore formatting (compare)

  • Mar 01 04:52

    Fabrice-TIERCELIN on master

    add formatter configuration for… (compare)

  • Mar 01 04:52
    Fabrice-TIERCELIN closed #470
  • Feb 28 21:24
    cal101 opened #470
  • Feb 28 18:53
    Fabrice-TIERCELIN commented #469
  • Feb 28 18:33
    cal101 commented #469
Jean-Noël Rouvignac
@JnRouvignac
@Fabrice-TIERCELIN please do if you feel confident
be careful there are many corner cases here
methods (you can ignore parameters), fields, variables can be shadowed
etc.
This is pretty tough
maybe start small and provide a simple fix
then we'll take it forward from there
Jean-Noël Rouvignac
@JnRouvignac
@luiscruz I have looked at the PR and I have several problems with it
first of all mvn clean install fails
for the rest, maybe this is not the best medium here to explain them
last, reviewing PRs on github is not great IMO :(
but anyway we'll get through this
Jean-Noël Rouvignac
@JnRouvignac
What I mean is that there is more work needed before I can merge it
Luis Cruz
@luiscruz
Hi
I’ll see that now
Jean-Noël Rouvignac
@JnRouvignac
hello
I'll speak to you on hangout to avoid polluting this channel with remarks towards the PR
if you log in
:)
Luis Cruz
@luiscruz
are we talking about JnRouvignac/AutoRefactor#226?
Jean-Noël Rouvignac
@JnRouvignac
yes
Luis Cruz
@luiscruz
alright
we can speak on hangout
when are you available?
Jean-Noël Rouvignac
@JnRouvignac
let's chat now :)
no need to call IMO
Luis Cruz
@luiscruz
ok
Jean-Noël Rouvignac
@JnRouvignac
@cal101 nice job on the headless version of AutoRefactor!
cal
@cal101
Hi folks! @JnRouvignac @Fabrice-TIERCELIN
cal
@cal101
You may have noticed that I did some autorefactor related stuff lately. I am repeating an experiment executing bulk autorefactoring on a >16k classes legacy application to investigate the result. Autorefactorings are grouped. Execution is done via jenkins pipeline doing git commits between refactoring groups. The outcome is pushed and automatic testing is done. The line coverage is 43% so some semantic testing is done. @Fabrice-TIERCELIN fixed a lot of bugs lately and so i was able to enable most of the refactorings and the code compiles and all tests pass now.
cal
@cal101
Doing bulk refactorings and reviewing bulk results gives me a different view on the results of refactorings. Most improve quality some don't. Autorefactor plugin is like a closed app. Very useful even for beginners. Autorefactor cli is meant for the professional who needs some tweaking options. I will do obvious filters like excluding classes but I am reaching the point where i want to disable or tweak/disable parts of refactorings. I want to avoid forking and would like to discuss options to proceed.
Chakra Yadavalli
@chakrayadavalli
Hi @JnRouvignac I am working on a legacy code base that has tons of issues that need to refactored. I came across AutoRefactor and installed the eclipse plugin in 2020-06. However, refactorings are not working. I saw on GitHub project page that AutoRefactor is now being merged into Eclipse. Has that been done already? I could not find anything in the latest Eclipse IDE. Any help in getting this up and running would be great.
Cheikh Saadbouh
@cheikh-sadbouh

I have a legacy springMvc project and i want to refactor all the controllers to return ResponseEntity<T> object rather then returning Model object which is returned by default.

I am looking for a way to map functions in Map class to ResponseEntity<T> class .

I have seen people recommend to use Regular expression as a solution to refactor all the methods.

I need to know your opinion about implementing Regex as solution in terms of advantages / drawbacks for using regex in this scenario.

In addition it would be helpful if you can suggest other solutions.

please take a look at the attached code for more details.

return Model object to the view

@GetMapping("/getData")
    public String getData(Model model) {

        model.addAttribute("message", "springMvc");

        return "viewPage";
    }

return ResponseEntity object as a json format

@GetMapping("/getData")
    public ResponseEntity<Map<String,String>>  getData() {

        Map<String,String> map = new  HashMap<>();
        map.put("message", "springMvc");

        return  new ResponseEntity.Ok().body(map);
    }
cal
@cal101
@cheikh-sadbouh Regular expression could get challenging on that. But there is a middle ground between regular expressions and writing a refactoring plugin on your own.
  1. Intellij idea is able to to structural search and replace, it may be able to help.
  2. The tool "comby" (https://github.com/comby-tools/comby) allows structural rewrites that should be able to rewrite the code above
cal
@cal101
@Fabrice-TIERCELIN Moin Fabrice!
It's a fun hacking session :-)
Do you happen to know how to get an IJavaProject from a gradle nature?
cal
@cal101
Never mind, adding Java Nature via eclipse seems to be the way ...