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
Reduced code smell #3090
Reduced code smell #3090
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but I don't see any reason in rearrangement of modifiers, such changes only create a noise in the history. New order isn't better than old one.
Code in h2/src/tools
with exception for build
package also doesn't need any changes, because it's just a playground. This code isn't used anywhere.
@@ -881,7 +881,7 @@ static String getDataTypeRegistrationKey(DataType<?> dataType) { | |||
registerDataType(getKeyType()); | |||
} | |||
if (getValueType() == null) { | |||
setValueType((DataType<? super V>) new VersionedValueType<V,Object>(defaultDataType)); | |||
setValueType((DataType<? super V>) new VersionedValueType<>(defaultDataType)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this change cast also needs to be removed to avoid compiler warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but, I have rebuilt H2 with maven and I have not seen the warning.
Hi all modifications are code cleanup, not optimizations. I have run some static code analyzer that suggests some modification in order to reduce code smell and use standard code practice. These modifications don't improve the program, only allow to have a better code quality. For this reason, you can, obviously, reject all the push or keep only part of the push (for example the Unused local variable (S1481)). all the best |
I took some non-controversial peaces to master as part of #3210 |
I have clean up some code smell
I hope this may be useful for this project