-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix errorpone warnings #2399
Fix errorpone warnings #2399
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.
I noticed that @joschi created a remove guava branch, so maybe we should remove the guava usage?
Ah interesting. I'm not sure who to appease in this situation. Using |
The link provided in the original post provides this alternative:
For my own knowledge, what is the advantage of removing Guava? |
@isaki-x Less direct dependencies is better, I believe. |
@isaki-x There have been regular questions about the removal of Guava from Dropwizard on the mailing list and on GitHub, as they have (or had, since https://groups.google.com/forum/#!msg/guava-discuss/rX-QXo-67ZU/gLEvfV4CAwAJ) been breaking backward compatibility quite often. That imposed problems to people using Dropwizard to implement a Spark application, for example. With the removal of Guava, this use case would be easier to implement, and with Java 8, there's not too much convenience Guava brings to the table and most changes are pretty mechanical. I'll open a PR for discussing the removal of Guava from Dropwizard 2.x shortly. |
@joschi Thanks for the info! I tend to avoid most of the convenience functions in Guava, but I personally am a fan of Guava's multi maps, tables, and immutable collections. If you aren't using those things, I can see why eliminating such a dependency is ideal. And as @alex-shpak has mentioned, fewer direct dependencies can be a very good thing. |
Problem:
Errorprone warnings during builds are irksome.
Solution:
Fix the errors:
TypeParameterUnusedInFormals
) as they are part of our public API and I don't think we're changing that nowPrintStream
) to a function returning that printstream (stdout or stderr)Splitter
instead ofString.split
in theByteRange
andAssetServlet
classesJerseyClientIntegrationTest.java
test, so I collected them asCompletableFutures
using jersey rx client (which is backwards incompatible in 2.27, but I can take care of that 👌 ) -- and thus queried for successful completion.Result:
No more errorprone warnings! No behavior should be changed.