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

Type inference for generic instance creation #2100

Merged
merged 7 commits into from Nov 25, 2019

Conversation

ullenius
Copy link
Contributor

@ullenius ullenius commented Nov 20, 2019

Type inference for generic instance creation.

  • Replacing redundant code <T> with <> for inferred type

This feature was added in Java 7 back in 2011 (!). The pom.xml explicitly specifies Java 7 so this does not break anything.

Minor refactoring:

  • Removing unused method parameter for private helper method
    GenericObjectPoolConfig poolConfig is passed to the method but never used

  • Declaring modifiers in recommended order (static final) 6fada2e

References: Oracle docs

@ullenius ullenius force-pushed the diamond-refactor branch 2 times, most recently from b9241d2 to 1e398c5 Compare November 20, 2019 18:37
The Java Language Specification and convention states that static ought to be
listed before the final modifier
(https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.1)
@gkorland gkorland added this to the 3.2.0 milestone Nov 25, 2019
@sazzad16
Copy link
Collaborator

@ullenius Are these all? Did you look for more codes similar to the changes you have made?

@ullenius
Copy link
Contributor Author

ullenius commented Nov 25, 2019

@ullenius Are these all? Did you look for more codes similar to the changes you have made?

@sazzad16 I added 3 more commits fixing similar stuff.

There are 2 more occurrences in ClusterScriptingCommandsTest that I did not change. And one in JedisTest.

I'm somewhat reluctant to modify the tests given that they fail to pass as it is.

@sazzad16
Copy link
Collaborator

@ullenius Let us know when you're done changing.

@ullenius
Copy link
Contributor Author

@ullenius Let us know when you're done changing.

@sazzad16 I'm done, thanks.

@sazzad16 sazzad16 merged commit 6ff843f into redis:master Nov 25, 2019
@gkorland gkorland mentioned this pull request Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants