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

Upgrade FindBugs dependency to 2.0.1 #3

Closed
gaul opened this issue Sep 13, 2013 · 2 comments

Comments

@gaul
Copy link
Contributor

commented Sep 13, 2013

Presently the MutabilityDetector uses 1.3.9, which release in 2009, instead of 2.0.1, which released in 2012. MutabilityDetector will require some source changes for this:

[ERROR] /home/gaul/work/MutabilityDetector4FindBugs/src/main/java/org/mutabilitydetector/findbugs/IncorrectlyAppliedImmutableAnnotationDetector.java:[53,16] error: name clash: visitAnnotation(String,Map<String,Object>,boolean) in IncorrectlyAppliedImmutableAnnotationDetector and visitAnnotation(String,Map<String,ElementValue>,boolean) in AnnotationVisitor have the same erasure, yet neither overrides the other
[ERROR]
[ERROR] /home/gaul/work/MutabilityDetector4FindBugs/src/main/java/org/mutabilitydetector/findbugs/IncorrectlyAppliedImmutableAnnotationDetector.java:[54,13] error: no suitable method found for visitAnnotation(String,Map<String,Object>,boolean)
[ERROR]
[ERROR] method AnnotationVisitor.visitAnnotation(Annotations) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method AnnotationVisitor.visitAnnotation(String,Map<String,ElementValue>,boolean) is not applicable
[ERROR] (actual argument Map<String,Object> cannot be converted to Map<String,ElementValue> by method invocation conversion)
[ERROR] method PreorderVisitor.visitAnnotation(Annotations) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] /home/gaul/work/MutabilityDetector4FindBugs/src/main/java/org/mutabilitydetector/findbugs/IncorrectlyAppliedImmutableAnnotationDetector.java:[52,4] error: method does not override or implement a method from a supertype
@Grundlefleck

This comment has been minimized.

Copy link
Contributor

commented Sep 14, 2013

Ouch. Sorry for the inconvenience.

I would like to implement MutabilityDetector4FindBugs in a way that is compatible with both 1.3.9 and 2.0.0+ versions. If that turns out to be too costly I will likely drop support for 1.3.9 and go with 2.0.0 only, but am going to give it a shot.

In the meantime, are you able to use a patched version? No maven support yet I'm afraid, just a jar.

Thanks for reporting!
~ Graham

Jar download available from here: https://github.com/MutabilityDetector/MutabilityDetector4FindBugs/releases/download/temporary-findbugs2-support-0.1/MutabilityDetector4FindBugs-0.10-SNAPSHOT.jar

See also: https://github.com/MutabilityDetector/MutabilityDetector4FindBugs/releases/tag/temporary-findbugs2-support-0.1

@Grundlefleck

This comment has been minimized.

Copy link
Contributor

commented Sep 15, 2013

It was too tricky to support multiple FindBugs versions in a single jar -- you'll have to grab the right jar for your version of FindBugs. See the README for links/details.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.