Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
92f285b
New command-line argument `-Aonelinemsg`
mernst Feb 24, 2026
5c4401c
Undo a change
mernst Feb 24, 2026
12f17b6
Merge ../checker-framework-branch-master into onelinemsg
mernst Feb 24, 2026
6808d3a
Use result
mernst Feb 24, 2026
b7147a4
Retain change post-merge
mernst Feb 24, 2026
322c5a8
Catch exception
mernst Feb 24, 2026
e28e04d
Rename methods
mernst Feb 24, 2026
a971148
Make computation of set difference consistent
mernst Feb 24, 2026
0230737
Use the correct matcher
mernst Feb 24, 2026
fa098cb
Checkpoint
mernst Feb 24, 2026
2057491
Merge ../checker-framework-fork-mernst-branch-catch-exception into te…
mernst Feb 24, 2026
7244516
Change type
mernst Feb 25, 2026
951d412
Merge ../checker-framework-fork-mernst-branch-simplify-set-difference…
mernst Feb 25, 2026
808b9f0
Simplify
mernst Feb 25, 2026
43b18ee
Merge ../checker-framework-fork-mernst-branch-catch-exception into te…
mernst Feb 25, 2026
ea493e6
Fix client type
mernst Feb 25, 2026
fef29b4
Merge ../checker-framework-fork-mernst-branch-simplify-set-difference…
mernst Feb 25, 2026
6ff0405
Add to manual
mernst Feb 25, 2026
a56f122
Merge ../checker-framework-branch-master into onelinemsg
mernst Feb 25, 2026
5615267
Merge ../checker-framework-fork-mernst-branch-onelinemsg into test-er…
mernst Feb 25, 2026
324e3e4
Fix string indexing
mernst Feb 25, 2026
d933cba
Merge branch 'master' into rename-methods
mernst Feb 25, 2026
1301fc6
Merge branch 'master' into catch-exception
mernst Feb 25, 2026
41b61cc
Merge branch 'master' into onelinemsg
mernst Feb 25, 2026
1b5aeb9
Merge ../checker-framework-fork-mernst-branch-onelinemsg into test-er…
mernst Feb 25, 2026
285f449
Merge ../checker-framework-fork-mernst-branch-catch-exception into te…
mernst Feb 25, 2026
69ec91f
Fix indexing
mernst Feb 25, 2026
d5c813c
Accommodate different number of format specifiers
mernst Feb 25, 2026
19cab5d
Improve Optional Checker error messages
mernst Feb 25, 2026
87c695f
Merge ../checker-framework-branch-master into test-error-detail
mernst Feb 25, 2026
6e36b1f
The method argument to `Optional.map()` need not be pure
mernst Feb 25, 2026
de340c5
Improve diagnostic
mernst Feb 25, 2026
dd0406a
Move `messages.properties` file
mernst Feb 25, 2026
2b9bfc7
Basename, not absolute file name
mernst Feb 25, 2026
d29b166
Fixes
mernst Feb 25, 2026
8d557d4
Merge ../checker-framework-fork-mernst-branch-optional-checker-prefer…
mernst Feb 25, 2026
71e3896
Fixes
mernst Feb 25, 2026
97a6dd4
Fix
mernst Feb 25, 2026
22bdaad
Fix
mernst Feb 25, 2026
5d3cf63
Merge ../checker-framework-branch-master into catch-exception
mernst Feb 25, 2026
15d4132
Merge ../checker-framework-fork-mernst-branch-catch-exception into te…
mernst Feb 25, 2026
86eac5e
Merge ../checker-framework-branch-master into onelinemsg
mernst Feb 25, 2026
72a6f6c
Merge ../checker-framework-fork-mernst-branch-onelinemsg into test-er…
mernst Feb 25, 2026
a46f7b5
Merge ../checker-framework-branch-master into optional-checker-prefer
mernst Feb 25, 2026
04adba3
Merge ../checker-framework-fork-mernst-branch-optional-checker-prefer…
mernst Feb 25, 2026
a373498
Merge ../checker-framework-branch-master into invalidformatstring-dia…
mernst Feb 25, 2026
4c64951
Undo
mernst Feb 25, 2026
1023494
Merge ../checker-framework-fork-mernst-branch-invalidformatstring-dia…
mernst Feb 25, 2026
c08b5ad
`final`
mernst Feb 25, 2026
d2ed8d2
Fix number of arguments
mernst Feb 25, 2026
54263f5
Merge branch 'master' into onelinemsg
smillst Feb 25, 2026
74a0819
Merge ../checker-framework-fork-mernst-branch-onelinemsg into test-er…
mernst Feb 25, 2026
a8560f2
Merge ../checker-framework-fork-mernst-branch-optional-checker-prefer…
mernst Feb 25, 2026
2ffd340
Merge ../checker-framework-fork-mernst-branch-invalidformatstring-dia…
mernst Feb 25, 2026
414d907
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 25, 2026
7ce02f9
Move `messages.properties` file
mernst Feb 25, 2026
ecf6eea
Merge ../checker-framework-branch-master into move-messages-properties
mernst Feb 25, 2026
197afec
Merge ../checker-framework-fork-mernst-branch-move-messages-propertie…
mernst Feb 25, 2026
7f0f5c2
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 25, 2026
5940a7e
Pass correct number of arguments to `class.find.failed`
mernst Feb 25, 2026
07a0872
Merge ../checker-framework-branch-master into class-find-failed
mernst Feb 25, 2026
40cfc2b
Merge ../checker-framework-fork-mernst-branch-class-find-failed into …
mernst Feb 25, 2026
4f680cc
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 25, 2026
fc99811
Merge ../checker-framework-branch-master into rename-methods
mernst Feb 25, 2026
9039d8b
Merge ../checker-framework-fork-mernst-branch-rename-methods into tes…
mernst Feb 25, 2026
eaf6396
Merge ../checker-framework-branch-master into test-error-detail-pre
mernst Feb 25, 2026
57d67b1
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 25, 2026
0d69480
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 25, 2026
9c9827d
Merge ../checker-framework-branch-master into class-find-failed
mernst Feb 25, 2026
52cbc54
Undo a change
mernst Feb 25, 2026
60b2f9c
Merge ../checker-framework-fork-mernst-branch-class-find-failed into …
mernst Feb 25, 2026
57a27f2
Documentation tweak
mernst Feb 25, 2026
cea9180
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 25, 2026
c42ce9b
Merge branch 'master' into test-error-detail
mernst Feb 25, 2026
c5db942
Merge ../checker-framework-branch-master into test-error-detail-pre
mernst Feb 26, 2026
b4a1637
Merge ../checker-framework-fork-mernst-branch-test-error-detail-pre i…
mernst Feb 26, 2026
ce05b26
Remove duplication
mernst Feb 26, 2026
1fa8bf8
Fix
mernst Feb 26, 2026
39b22d1
Remove "omitParentheses" formal parameter
mernst Feb 27, 2026
b2a12ec
Javadoc
mernst Feb 27, 2026
0fdb42b
Surround error message keys in square brackets, not parentheses
mernst Feb 28, 2026
e6ce3ce
Substitutions in documentation and tests
mernst Mar 1, 2026
7ca1d2d
Fix comments
mernst Mar 1, 2026
6327336
More square brackets
mernst Mar 1, 2026
1da4b17
Remove `noMsgText` formal parameter
mernst Mar 1, 2026
e2aa3cf
Add diagnostics
mernst Mar 1, 2026
89aa8f8
Merge branch 'master' into print-error-key-in-brackets
smillst Mar 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* <pre>{@code
* public void useShiftIndex(@NonNegative int x) {
* // :: error: (argument)
* // :: error: [argument]
* Arrays.fill(array, end, end + x, null);
* shiftIndex(x);
* Arrays.fill(array, end, end + x, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* {@literal @}s int sec1 = 7 * UnitsTools.s;
* {@literal @}s int sec2 = triplePolyUnit(sec1);
*
* // :: error: (assignment)
* // :: error: [assignment]
* {@literal @}s int sec3 = triplePolyUnit(m1);
* }
* </code></pre>
Expand Down
2 changes: 1 addition & 1 deletion checker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ tasks.register("ainferTestCheckerGenerateAjava", Test) {
doLast {
copyNonannotatedToAnnotatedDirectory("ainfer-testchecker")

// AinferTestCheckerAjavaValidationTest fails with "warning: (purity.methodref)", whenever
// AinferTestCheckerAjavaValidationTest fails with "warning: [purity.methodref]", whenever
// there is a user-defined generic interface, and a variable of that type is assigned a
// method reference.
delete("tests/ainfer-testchecker/annotated/all-systems/java8/memberref/Issue946.java")
Expand Down
6 changes: 3 additions & 3 deletions checker/jtreg/multiplecheckers/NullnessInterning1.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NullnessInterning.java:19:14: compiler.warn.proc.messager: (assignment)
NullnessInterning.java:22:9: compiler.warn.proc.messager: (not.interned)
NullnessInterning.java:22:14: compiler.warn.proc.messager: (not.interned)
NullnessInterning.java:19:14: compiler.warn.proc.messager: [assignment]
NullnessInterning.java:22:9: compiler.warn.proc.messager: [not.interned]
NullnessInterning.java:22:14: compiler.warn.proc.messager: [not.interned]
3 warnings
4 changes: 2 additions & 2 deletions checker/jtreg/multiplecheckers/NullnessInterning2.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NullnessInterning.java:22:9: compiler.warn.proc.messager: (not.interned)
NullnessInterning.java:22:14: compiler.warn.proc.messager: (not.interned)
NullnessInterning.java:22:9: compiler.warn.proc.messager: [not.interned]
NullnessInterning.java:22:14: compiler.warn.proc.messager: [not.interned]
2 warnings
2 changes: 1 addition & 1 deletion checker/jtreg/multiplecheckers/NullnessInterning3.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NullnessInterning.java:19:14: compiler.warn.proc.messager: (assignment)
NullnessInterning.java:19:14: compiler.warn.proc.messager: [assignment]
1 warning
2 changes: 1 addition & 1 deletion checker/jtreg/nullness/issue1582/Foo.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Foo.java:15:18: compiler.err.proc.messager: (flowexpr.parse.error)
Foo.java:15:18: compiler.err.proc.messager: [flowexpr.parse.error]
1 error
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
JavaExpressionParseError.java:8:25: compiler.err.proc.messager: (flowexpr.parse.error.postcondition)
JavaExpressionParseError.java:8:25: compiler.err.proc.messager: [flowexpr.parse.error.postcondition]
1 error
2 changes: 1 addition & 1 deletion checker/jtreg/nullness/issue1929/Issue1929.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ String[] fails2(Collection<String> c) {

String[] fails3(Collection<String> c) {
// We don't determine field types from initialization expressions.
// :: error: (return)
// :: error: [return]
return c.toArray(EMPTY_STRING_ARRAY_3);
}
}
8 changes: 4 additions & 4 deletions checker/jtreg/nullness/issue1958/NPE2Test.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NPE2Test.java:3:39: compiler.err.proc.messager: (assignment)
NPE2Test.java:8:42: compiler.err.proc.messager: (assignment)
NPE2Test.java:13:42: compiler.err.proc.messager: (assignment)
NPE2Test.java:16:40: compiler.err.proc.messager: (assignment)
NPE2Test.java:3:39: compiler.err.proc.messager: [assignment]
NPE2Test.java:8:42: compiler.err.proc.messager: [assignment]
NPE2Test.java:13:42: compiler.err.proc.messager: [assignment]
NPE2Test.java:16:40: compiler.err.proc.messager: [assignment]
4 errors
4 changes: 2 additions & 2 deletions checker/jtreg/nullness/issue2173/View.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- compiler.warn.proc.messager: (invalid.annotation.location.bytecode)
- compiler.warn.proc.messager: (invalid.annotation.location.bytecode)
- compiler.warn.proc.messager: [invalid.annotation.location.bytecode]
- compiler.warn.proc.messager: [invalid.annotation.location.bytecode]
2 warnings
2 changes: 1 addition & 1 deletion checker/jtreg/nullness/issue820/AnonymousClass.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AnonymousClass.java:4:27: compiler.err.proc.messager: (assignment)
AnonymousClass.java:4:27: compiler.err.proc.messager: [assignment]
1 error
4 changes: 2 additions & 2 deletions checker/jtreg/nullness/issue820/Class1Class2-err.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Class1.java:29:22: compiler.err.proc.messager: (contracts.postcondition)
Class2.java:15:20: compiler.err.proc.messager: (contracts.precondition)
Class1.java:29:22: compiler.err.proc.messager: [contracts.postcondition]
Class2.java:15:20: compiler.err.proc.messager: [contracts.precondition]
2 errors
2 changes: 1 addition & 1 deletion checker/jtreg/nullness/issue820/Class1MinClass2Min-err.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Class2Min.java:6:25: compiler.err.proc.messager: (assignment)
Class2Min.java:6:25: compiler.err.proc.messager: [assignment]
1 error
4 changes: 2 additions & 2 deletions checker/jtreg/nullness/issue820/Class2Class1-err.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Class2.java:15:20: compiler.err.proc.messager: (contracts.precondition)
Class1.java:29:22: compiler.err.proc.messager: (contracts.postcondition)
Class2.java:15:20: compiler.err.proc.messager: [contracts.precondition]
Class1.java:29:22: compiler.err.proc.messager: [contracts.postcondition]
2 errors
4 changes: 2 additions & 2 deletions checker/jtreg/nullness/issue820/ErrorAnonymousClass.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Error.java:13:23: compiler.err.proc.messager: (assignment)
AnonymousClass.java:4:27: compiler.err.proc.messager: (assignment)
Error.java:13:23: compiler.err.proc.messager: [assignment]
AnonymousClass.java:4:27: compiler.err.proc.messager: [assignment]
2 errors
16 changes: 8 additions & 8 deletions checker/jtreg/nullness/issue824/Class2.out
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class2.java:14:39: compiler.err.proc.messager: (type.argument)
Class2.java:15:20: compiler.err.proc.messager: (type.argument)
Class2.java:15:45: compiler.err.proc.messager: (type.argument)
Class2.java:16:27: compiler.err.proc.messager: (type.arguments.not.inferred)
Class2.java:19:27: compiler.err.proc.messager: (type.arguments.not.inferred)
Class2.java:20:26: compiler.err.proc.messager: (argument)
Class2.java:24:14: compiler.err.proc.messager: (override.return)
Class2.java:25:33: compiler.err.proc.messager: (type.arguments.not.inferred)
Class2.java:14:39: compiler.err.proc.messager: [type.argument]
Class2.java:15:20: compiler.err.proc.messager: [type.argument]
Class2.java:15:45: compiler.err.proc.messager: [type.argument]
Class2.java:16:27: compiler.err.proc.messager: [type.arguments.not.inferred]
Class2.java:19:27: compiler.err.proc.messager: [type.arguments.not.inferred]
Class2.java:20:26: compiler.err.proc.messager: [argument]
Class2.java:24:14: compiler.err.proc.messager: [override.return]
Class2.java:25:33: compiler.err.proc.messager: [type.arguments.not.inferred]
8 errors
2 changes: 1 addition & 1 deletion checker/jtreg/nullness/preciseErrorMsg/Class1.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Class1.java:15:22: compiler.err.proc.messager: (flowexpr.parse.error)
Class1.java:15:22: compiler.err.proc.messager: [flowexpr.parse.error]
1 error
4 changes: 2 additions & 2 deletions checker/jtreg/rawtypes/RawTypeFail.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RawTypeFail.java:14:30: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.Map, java.util.Map<java.lang.String,java.lang.Object>
RawTypeFail.java:15:31: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.HashMap, java.util.Map<java.lang.String,java.lang.Object>
RawTypeFail.java:14:30: compiler.err.proc.messager: (assignment)
RawTypeFail.java:15:31: compiler.err.proc.messager: (assignment)
RawTypeFail.java:14:30: compiler.err.proc.messager: [assignment]
RawTypeFail.java:15:31: compiler.err.proc.messager: [assignment]
2 errors
2 warnings
4 changes: 2 additions & 2 deletions checker/jtreg/stubs/annotatedFor/WithStub.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
UseTest.java:18:18: compiler.err.proc.messager: (argument)
UseTest.java:19:18: compiler.err.proc.messager: (argument)
UseTest.java:18:18: compiler.err.proc.messager: [argument]
UseTest.java:19:18: compiler.err.proc.messager: [argument]
2 errors
2 changes: 1 addition & 1 deletion checker/jtreg/stubs/annotatedFor/WithoutStub.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
UseTest.java:18:18: compiler.err.proc.messager: (argument)
UseTest.java:18:18: compiler.err.proc.messager: [argument]
1 error
4 changes: 2 additions & 2 deletions checker/jtreg/stubs/annotatedFor/WithoutStubConservative.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
UseTest.java:18:18: compiler.err.proc.messager: (argument)
UseTest.java:20:37: compiler.err.proc.messager: (assignment)
UseTest.java:18:18: compiler.err.proc.messager: [argument]
UseTest.java:20:37: compiler.err.proc.messager: [assignment]
2 errors
2 changes: 1 addition & 1 deletion checker/jtreg/stubs/issue1456/WithStub.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Main.java:26:13: compiler.err.proc.messager: (type.arguments.not.inferred)
Main.java:26:13: compiler.err.proc.messager: [type.arguments.not.inferred]
1 error
14 changes: 7 additions & 7 deletions checker/jtreg/stubs/issue1456/WithoutStub.out
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Main.java:16:30: compiler.err.proc.messager: (assignment)
Main.java:17:42: compiler.err.proc.messager: (assignment)
Main.java:18:31: compiler.err.proc.messager: (assignment)
Main.java:19:31: compiler.err.proc.messager: (assignment)
Main.java:20:29: compiler.err.proc.messager: (assignment)
Main.java:21:43: compiler.err.proc.messager: (assignment)
Main.java:22:46: compiler.err.proc.messager: (assignment)
Main.java:16:30: compiler.err.proc.messager: [assignment]
Main.java:17:42: compiler.err.proc.messager: [assignment]
Main.java:18:31: compiler.err.proc.messager: [assignment]
Main.java:19:31: compiler.err.proc.messager: [assignment]
Main.java:20:29: compiler.err.proc.messager: [assignment]
Main.java:21:43: compiler.err.proc.messager: [assignment]
Main.java:22:46: compiler.err.proc.messager: [assignment]
7 errors
8 changes: 4 additions & 4 deletions checker/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ So the final test case would be:
public class MyNullnessTest {
void method() {
Object nullable = null;
// :: error: (dereference.of.nullable)
// :: error: [dereference.of.nullable]
nullable.toString();
}
}
Expand All @@ -163,7 +163,7 @@ You can indicate an expected warning (as opposed to error) by using
"warning:" instead of "error:", as in

```java
// :: warning: (nulltest.redundant)
// :: warning: [nulltest.redundant]
assert val != null;
```

Expand All @@ -173,7 +173,7 @@ a warning from the same line of code:

```java
@Regex String s1 = null;
// :: error: (assignment) :: warning: (cast.unsafe)
// :: error: [assignment] :: warning: [cast.unsafe]
@Regex(3) String s2 = (@Regex(2) String) s;
```

Expand All @@ -182,7 +182,7 @@ syntax, expected errors can be specified in a separate file using the .out
file extension. These files contain lines of the following format:

```output
:19: error: (dereference.of.nullable)
:19: error: [dereference.of.nullable]
```

The number between the colons is the line number of the expected error
Expand Down
8 changes: 4 additions & 4 deletions checker/tests/aggregate/NullnessAndRegex.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
import org.checkerframework.checker.regex.qual.Regex;

public class NullnessAndRegex {
// :: error: (assignment)
// :: error: [assignment]
@Regex String s1 = "De(mo";
// :: error: (assignment)
// :: error: [assignment]
Object f = null;
// :: error: (assignment)
// :: error: [assignment]
@Regex String s2 = "De(mo";

void localized(@Localized String s) {}

void method() {
// :: error: (argument)
// :: error: [argument]
localized("ldskjfldj"); // error
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public static void testThisInference(

public void compute5(
DependentTypesViewpointAdaptationTest this, DependentTypesViewpointAdaptationTest other) {
// :: warning: (assignment)
// :: warning: [assignment]
@SameLen("this") DependentTypesViewpointAdaptationTest myOther = other;
}

// Same as compute5, but without an explicit this parameter.
public void compute6(DependentTypesViewpointAdaptationTest other) {
// :: warning: (assignment)
// :: warning: [assignment]
@SameLen("this") DependentTypesViewpointAdaptationTest myOther = other;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

public class MonotonicNonNullInferenceTest {

// :: warning: (initialization.static.field.uninitialized)
// :: warning: [initialization.static.field.uninitialized]
static String staticString1;

// :: warning: (assignment)
// :: warning: [assignment]
static String staticString2 = null;

static String staticString3;

String instanceString1;

// :: warning: (assignment)
// :: warning: [assignment]
String instanceString2 = null;

String instanceString3;

static {
// :: warning: (assignment)
// :: warning: [assignment]
staticString3 = null;
}

// :: warning: (initialization.fields.uninitialized)
// :: warning: [initialization.fields.uninitialized]
MonotonicNonNullInferenceTest() {
String instanceString3 = "hello";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public class NullTypeVarTest {

// :: warning: (assignment)
// :: warning: [assignment]
private String indentString = null;

private List<String> indentStrings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public abstract class TwoCtorGenericAbstract<T extends Object> implements Set<T>
protected T value;

protected TwoCtorGenericAbstract() {
// :: warning: (assignment)
// :: warning: [assignment]
this.value = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public V merge(@NonNull V value) {
}

public V mergeNullable(@Nullable V value) {
// :: warning: (return)
// :: warning: [return]
return value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static class NonEmptyMustCallFinalField {
final Foo f; // expect owning annotation for this field

NonEmptyMustCallFinalField() {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
f = new Foo();
}

Expand All @@ -32,12 +32,12 @@ Foo getFieldOnSomePath() {
}

void testNotOwningOnFinal() {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
Foo f = getField();
}

void testNotOwningOnGetFieldOnSomePath() {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
Foo f = getFieldOnSomePath();
}

Expand All @@ -56,7 +56,7 @@ static class NonEmptyMustCallNonFinalField {
@SuppressWarnings("missing.creates.mustcall.for")
void initialyzeFoo() {
f.a();
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
f = new Foo();
}

Expand All @@ -73,12 +73,12 @@ Foo getFieldOnSomePath() {
}

void testNotOwningOnNonFinal() {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
Foo f = getField();
}

void testNotOwningOnGetFieldOnSomePath() {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
Foo f = getFieldOnSomePath();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ void a() {}

@InheritableMustCall("close")
private class ClassWithTwoOwningFields {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
final @Owning Foo foo1;
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
final @Owning Foo foo2;

public ClassWithTwoOwningFields(Foo f1, Foo f2) {
Expand All @@ -29,9 +29,9 @@ void close() {
}

void testTwoOwning() {
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
Foo f1 = new Foo();
// :: warning: (required.method.not.called)
// :: warning: [required.method.not.called]
Foo f2 = new Foo();

ClassWithTwoOwningFields ff = new ClassWithTwoOwningFields(f1, f2);
Expand Down
Loading