[java] MissingOverrideRule: Avoid NoClassDefFoundError with incomplete classpath#1267
Conversation
oowekyala
left a comment
There was a problem hiding this comment.
This looks ok, but I wonder if the rule should not report a misconfiguration/ throw an exception in case of incomplete auxclasspath instead of going silent. The rule definitely needs a complete auxclasspath to run correctly
|
Yes, reporting the incomplete auxclasspath (or even the missing classes) would be nice. However, I did a quick try, and we could already add config errors like this: RuleContext context = (RuleContext) data;
context.getReport().addConfigError(new ConfigurationError(this, "missing class/method.."));It would be then for now just in this rule, that we would report this, but it would be a start... |
|
Yes, that is part of #194. The hard part however is telling the user which classes are missing, so they can easily fix it. For Also of note, we should avoid duplicate reports to avoid being noisy, so on this case we would have to know we reported the issue on a static and thread-safe manner (to avoid issues on multi-threaded analysis). I feel that's way beyond the scope of this PR, and definitely part of a larger task as described by #194 |
|
Yes, the "full" solution will definitely be #194 with a separate PR. |
|
Considering how we systematically find people complaining about warn logs they can't get rid of (Gradle users mostly), I'd be hesitant on doing that... We would have to be very careful with the wording... the missing class is related to |
No description provided.