forked from spotbugs/spotbugs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle polymorphic signatures when finding methods (spotbugs#3311)
* test: reproducer for issue spotbugs#3309 * fix: handle polymorphic methods when finding a method descriptor * doc: added changelog entry
- Loading branch information
Showing
7 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/Issue3309Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package edu.umd.cs.findbugs.detect; | ||
|
||
import edu.umd.cs.findbugs.AbstractIntegrationTest; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class Issue3309Test extends AbstractIntegrationTest { | ||
|
||
@Test | ||
void testIssue() { | ||
performAnalysis("ghIssues/Issue3309.class"); | ||
|
||
assertNoBugInClass("THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "Issue3309"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ghIssues; | ||
|
||
import java.lang.invoke.MethodHandle; | ||
|
||
public class Issue3309 { | ||
public Object newInstance(MethodHandle methodHandle, Object builder, Object cacheLoader, boolean async) throws Throwable { | ||
return methodHandle.invokeExact(builder, cacheLoader, async); | ||
} | ||
} |