Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x: [Java 8] Use diamond <> where possible in unit tests. #6767

Closed
akarnokd opened this issue Dec 17, 2019 · 2 comments
Closed

3.x: [Java 8] Use diamond <> where possible in unit tests. #6767

akarnokd opened this issue Dec 17, 2019 · 2 comments
Labels

Comments

@akarnokd
Copy link
Member

The upgrade to Java 8 caused more than 4,000 locations to report as diamond capable, including regular classes and tests.

In the first round, fix the unit test files, but beware:

  • Do not change the non-test files yet. (Avoid conflict with other cleanups and Java 8 additions.)
  • Do not change the existing tests' functional interface usages to lambdas. (Undoing lambdaification is extremely painful because tools guess the inner class types wrong almost always.)
  • On a rare occasion, the warning is wrong in the IDE and breaks the Gradle compilation with javac.

I'd appreciate this to be split between several PRs or ~100 file changes per PR tops to still be able to review them on GitHub.

@dvolkovv
Copy link
Contributor

dvolkovv commented Dec 22, 2019

Hello! I've made several PR's with ~100 file changes in each, more detailed information is in PR's.

@akarnokd
Copy link
Member Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants