immutable: Generated class uses @SuppressWarnings("unchecked") unnecessarily
bhamiltoncx opened this issue · 4 comments
bhamiltoncx commented
I'm testing the upgrade from 0.31-SNAPSHOT to 1.0 in the Buck repository.
We compile our code with ecj (the Eclipse Compiler for Java), and we found that the 1.0 release raises an error when compiling with ecj because the generated code uses @SuppressWarnings("unchecked") unnecessarily:
[javac] 1. ERROR in buck/build/immutables/com/facebook/buck/apple/ImmutableAppleSdkPaths.java (at line 18)
[javac] @SuppressWarnings({"all", "unchecked"})
[javac] ^^^^^^^^^^^
[javac] Unnecessary @SuppressWarnings("unchecked")
I'm guessing this can be removed from the generated code (at least in the way we're using it).
Here's the source file:
And here's the file it generates:
elucash commented
Wow, I, probably, "outsmarted" myself with those suppressions ). I also like to use zero-warning policy on builds, It's just Maven was silent on this. Need to be fixed
elucash commented
Released 1.0.1 where it should be fixed. Thanks!
bhamiltoncx commented
Looks good, confirmed fix!