mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Add test for a module declaration made in a file named other than module-info.java
This triggers a weird corner case in our extractor, which used to throw a null pointer exception.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| module-info-wrong-name.java:0:0:0:0 | 2 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import java
|
||||
import semmle.code.java.Diagnostics
|
||||
|
||||
select any(Diagnostic d | not d.toString().matches("Not rewriting trap file for%"))
|
||||
@@ -0,0 +1,3 @@
|
||||
module module.with.wrong.name {
|
||||
exports somepkg;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --no-strict-javac-errors --javac-args -source 17 -target 17
|
||||
@@ -0,0 +1,5 @@
|
||||
package somepkg;
|
||||
|
||||
public class SomeClass {
|
||||
public static void someMethod() {}
|
||||
}
|
||||
Reference in New Issue
Block a user