1

There is a current project which has many lines of code and written for Java 6-7. I want to migrate it to Java 8 and use lambda expressions wherever I can.

How can i scan the project and report that an expression can be replaced with a lambda equivalent?

8
  • 8
    Why would you do that blindly? Lambda expressions are not a silver bullet; you use them only when they are the right tool for the job. Jan 20, 2017 at 13:44
  • I want to report them by a tool and replace it via lambda equivalent if it will result with a performance increase. I don't search for a tool which will automatically replace such code blocks.
    – kamaci
    Jan 20, 2017 at 13:45
  • 3
    I doubt that you would see any performance increase by merely converting things to lambda expressions. That said, the tool you're looking for is probably IntelliJ IDEA. Jan 20, 2017 at 13:47
  • You will not be just replacing things, you will have to do extensive refactoring. I guess. Jan 20, 2017 at 13:48
  • Yes, it will be a refactoring process. @RobertHarvey I know that lambdas are slower than the conventional loops etc. but you can get a performance increase if you use them when to use i.e. piping or parallel streaming.
    – kamaci
    Jan 20, 2017 at 13:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.