-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore ability to use unannotated stub file to override annotations …
…in bytecode (#3599)
- Loading branch information
Showing
6 changed files
with
70 additions
and
41 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
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,8 @@ | ||
.PHONY: all | ||
|
||
all: clean | ||
$(JAVAC) testpkg/Issue3597B.java | ||
$(JAVAC) -Astubs=issue3597.astub -processor Nullness -sourcepath : -cp . testpkg/Issue3597A.java | ||
|
||
clean: | ||
rm -f testpkg/*.class |
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,7 @@ | ||
package testpkg; | ||
|
||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
|
||
class Issue3597B { | ||
Object f(); | ||
} |
7 changes: 7 additions & 0 deletions
7
checker/tests/nullness-extra/issue3597/testpkg/Issue3597A.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,7 @@ | ||
package testpkg; | ||
|
||
class Issue3597A { | ||
void f() { | ||
System.err.println(new Issue3597B().f().toString()); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
checker/tests/nullness-extra/issue3597/testpkg/Issue3597B.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,9 @@ | ||
package testpkg; | ||
|
||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
|
||
class Issue3597B { | ||
@Nullable Object f() { | ||
return new Object(); | ||
} | ||
} |
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