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 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 added 3 commits Nov 20, 2019
* Replacing type parameters with <>
@ullenius ullenius force-pushed the ullenius:diamond-refactor branch 2 times, most recently from b9241d2 to 1e398c5 Nov 20, 2019
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)
@ullenius ullenius force-pushed the ullenius:diamond-refactor branch from 1e398c5 to 5f01d7b Nov 20, 2019
@gkorland gkorland added this to the 3.2.0 milestone Nov 25, 2019
@sazzad16

This comment has been minimized.

Copy link
Collaborator

sazzad16 commented Nov 25, 2019

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

@ullenius

This comment has been minimized.

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

This comment has been minimized.

Copy link
Collaborator

sazzad16 commented Nov 25, 2019

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

@ullenius

This comment has been minimized.

Copy link
Contributor Author

ullenius commented Nov 25, 2019

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

@sazzad16 I'm done, thanks.

@sazzad16 sazzad16 merged commit 6ff843f into xetorthio:master Nov 25, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.