-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added Google error-prone to the build and resolved all warnings #239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
=======================================
Coverage 100% 100%
Complexity 1016 1016
=======================================
Files 90 90
Lines 1381 1381
Branches 141 141
=======================================
Hits 1381 1381
Continue to review full report at Codecov.
|
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.
😎
stepSize.compareTo(ZERO) > 0 && currentSize.compareTo(maxSize) > 0 || | ||
stepSize.compareTo(ZERO) < 0 && currentSize.compareTo(maxSize) < 0) { | ||
(stepSize.compareTo(ZERO) > 0 && currentSize.compareTo(maxSize) > 0) || | ||
(stepSize.compareTo(ZERO) < 0 && currentSize.compareTo(maxSize) < 0)) { |
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.
We have to say "we told you so", but... 😜 😊 👍
pom.xml
Outdated
<forceJavacCompilerUse>true</forceJavacCompilerUse> | ||
<!-- maven-compiler-plugin defaults to targeting Java 5, but our | ||
javac only supports >=6 --> | ||
<source>8</source> |
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.
This version is linked to the property 'maven.compiler.source', right? Maybe create a new property that is e.g. used by both?
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.
Good point! Those properties actually directly set the values for the plug-in (I think 😅), so I just removed both the source
and target
property setters there to see if they would use those: still works!
pom.xml
Outdated
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.3</version> |
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.
Move version to properties?
pom.xml
Outdated
<dependency> | ||
<groupId>org.codehaus.plexus</groupId> | ||
<artifactId>plexus-compiler-javac-errorprone</artifactId> | ||
<version>2.8.3</version> |
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.
Move version to properties?
pom.xml
Outdated
<dependency> | ||
<groupId>com.google.errorprone</groupId> | ||
<artifactId>error_prone_core</artifactId> | ||
<version>2.3.1</version> |
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.
Move version to properties? (Sorry, wilde dit in 1comment doen, maar kan de vorige blijkbaar niet meer editen...)
Resolves #237.
For a description of the resolved warnings, see the following:
http://errorprone.info/bugpattern/MissingOverride
http://errorprone.info/bugpattern/ReferenceEquality
http://errorprone.info/bugpattern/OperatorPrecedence
http://errorprone.info/bugpattern/DoubleBraceInitialization
http://errorprone.info/bugpattern/ClassCanBeStatic
http://errorprone.info/bugpattern/StringSplitter