Open
Description
This is a side effect of not properly supporting INVOKEDYNAMIC instruction (issue #6): the snippet below generates "The following classes needed for SpotBugs analysis on project A were missing: run" warning on every analysis in Eclipse.
This is most likely same as issue spotbugs/discuss/issues/29.
public class Client {
public void errorOnLambda() {
Object o = getObject();
if (o != null) {
useRunnable(() -> toString());
}
o.hashCode();
}
public Object getObject() {
return null;
}
public void useRunnable(Runnable listener) {
}
}
While we still lacks the proper INVOKEDYNAMIC support, we should at least make sure we don't raise stupid warnings.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[WIP] trying to construct proper bytecode method from INDY on CP
[WIP] trying to construct proper bytecode method from INDY on CP
Don't use garbage method attributes from INVOKEDYNAMIC for XMethod
Don't call createXMethod(InvokeInstruction) with INVOKEDYNAMIC
Issue #527 fixed: updated CHANGELOG
Don't use garbage method attributes from INVOKEDYNAMIC for XMethod
Don't call createXMethod(InvokeInstruction) with INVOKEDYNAMIC
Issue #527 fixed: updated CHANGELOG
iloveeclipse commentedon Jan 21, 2018
Merged in 3.1 and master.
26 remaining items
slott commentedon Sep 1, 2022
Still happening on 5.0.10...
The following classes needed for analysis were missing:
java.rmi.Remote
java.util.Arrays$ArrayList
SpotBugs ended with exit code 3
CreeTar commentedon Nov 29, 2022
Using Java 11 still a problem, is there an celebration for this bugs 5th year anniversary? Off to 5 more years :)
delanym commentedon Apr 14, 2023
I only get this, i.e.
when I include findsecbugs
in-fke commentedon Apr 27, 2023
Still a Bug after more than five years.
SimSonic commentedon Jun 16, 2023
In my case list is bigger:
jdk 20
spotbugs 4.7.3.0
findsecbugs 1.12.0
Vampire commentedon Jun 26, 2023
It even got worse now, because it is reported once per report.
so if you have XML and HTML report configured, you get the message printed twice. :-(
victorwss commentedon Oct 5, 2023
@delanym I also only get this when using find-sec-bugs.
soloturn commentedon Nov 10, 2023
@JuditKnoll you happen to know what could be done here?
JuditKnoll commentedon Nov 13, 2023
@soloturn I'm sorry, I don't know. I haven't looked into this issue properly, but for me it looks like it may be a find-sec-bugs issue. I'm not really familiar how exactly SpotBugs and its plugins interacts with each other.
There was a workaround merged into find-sec-bugs recently (find-sec-bugs/find-sec-bugs#690), which is marked as "may solve this issue", but there was no new find-sec-bugs released since then.
victorherraiz commentedon Mar 20, 2024
Version 1.13.0, released almost a month ago, of find-sec-bugs does not solve the problem for me.
bdellegrazie commentedon Apr 5, 2024
Version 1.13.0 of find-sec-bugs doesn't solve this, even with the
-Dfindsecbugs.taint.workaroundvisitinvokedynamic=true
enabled or not, I see no difference.