@@ -250,7 +250,7 @@ public void arraySubtyping() {
250250 " @Nullable Integer[] x2 = nullableIntArr;" ,
251251 " // legal (covariant array subtypes)" ,
252252 " x2 = nonnullIntArr;" ,
253- " // BUG: Diagnostic contains: Cannot assign from type @Nullable Integer[] to type Integer[]" ,
253+ " // BUG: Diagnostic contains: Cannot assign from type @Nullable Integer [] to type Integer []" ,
254254 " x1 = nullableIntArr;" ,
255255 " }" ,
256256 "}" )
@@ -272,7 +272,7 @@ public void arraySubtypingWithNewExpression() {
272272 " @Nullable Integer[] x2 = new Integer[0];" ,
273273 " // legal" ,
274274 " x2 = new @Nullable Integer[0];" ,
275- " // BUG: Diagnostic contains: Cannot assign from type @Nullable Integer[] to type Integer[]" ,
275+ " // BUG: Diagnostic contains: Cannot assign from type @Nullable Integer [] to type Integer []" ,
276276 " x1 = new @Nullable Integer[0];" ,
277277 " }" ,
278278 "}" )
@@ -290,7 +290,7 @@ public void arraysAndGenerics() {
290290 "class Test {" ,
291291 " void foo(List<@Nullable Integer[]> l) {}" ,
292292 " void testPositive(List<Integer[]> p) {" ,
293- " // BUG: Diagnostic contains: Cannot pass parameter of type List<Integer[]>" ,
293+ " // BUG: Diagnostic contains: Cannot pass parameter of type List<Integer []>" ,
294294 " foo(p);" ,
295295 " }" ,
296296 " void testNegative(List<@Nullable Integer[]> p) {" ,
@@ -312,7 +312,7 @@ public void genericArraysReturnedAndPassed() {
312312 " static class Bar<T> {" ,
313313 " Foo<T>[] getFoosPositive() {" ,
314314 " @Nullable Foo<T>[] result = new Foo[0];" ,
315- " // BUG: Diagnostic contains: Cannot return expression of type @Nullable Foo<T>[] from method" ,
315+ " // BUG: Diagnostic contains: Cannot return expression of type @Nullable Foo<T> [] from method" ,
316316 " return result;" ,
317317 " }" ,
318318 " Foo<T>[] getFoosNegative() {" ,
@@ -321,7 +321,7 @@ public void genericArraysReturnedAndPassed() {
321321 " }" ,
322322 " void takeFoos(Foo<T>[] foos) {}" ,
323323 " void callTakeFoosPositive(@Nullable Foo<T>[] p) {" ,
324- " // BUG: Diagnostic contains: Cannot pass parameter of type @Nullable Foo<T>[]" ,
324+ " // BUG: Diagnostic contains: Cannot pass parameter of type @Nullable Foo<T> []" ,
325325 " takeFoos(p);" ,
326326 " }" ,
327327 " void callTakeFoosNegative(Foo<T>[] p) {" ,
@@ -331,9 +331,9 @@ public void genericArraysReturnedAndPassed() {
331331 " void callTakeFoosVarargsPositive(@Nullable Foo<T>[] p, Foo<T>[] p2) {" ,
332332 " // Under the hood, a @Nullable Foo<T>[][] is passed, which is not a subtype" ,
333333 " // of the formal parameter type Foo<T>[][]" ,
334- " // BUG: Diagnostic contains: Cannot pass parameter of type @Nullable Foo<T>[]" ,
334+ " // BUG: Diagnostic contains: Cannot pass parameter of type @Nullable Foo<T> []" ,
335335 " takeFoosVarargs(p);" ,
336- " // BUG: Diagnostic contains: Cannot pass parameter of type @Nullable Foo<T>[]" ,
336+ " // BUG: Diagnostic contains: Cannot pass parameter of type @Nullable Foo<T> []" ,
337337 " takeFoosVarargs(p2, p);" ,
338338 " }" ,
339339 " void callTakeFoosVarargsNegative(Foo<T>[] p) {" ,
@@ -367,7 +367,7 @@ public void overridesReturnType() {
367367 " @Override" ,
368368 " Integer[] foo() { return new Integer[0]; }" ,
369369 " @Override" ,
370- " // BUG: Diagnostic contains: Method returns @Nullable Integer[], but overridden method returns Integer[]" ,
370+ " // BUG: Diagnostic contains: Method returns @Nullable Integer [], but overridden method returns Integer []" ,
371371 " @Nullable Integer[] bar() { return new @Nullable Integer[0]; }" ,
372372 " }" ,
373373 "}" )
@@ -389,7 +389,7 @@ public void overridesParameterType() {
389389 " }" ,
390390 " class Sub extends Super {" ,
391391 " @Override" ,
392- " // BUG: Diagnostic contains: Parameter has type Integer[], but overridden method has parameter type @Nullable Integer[]" ,
392+ " // BUG: Diagnostic contains: Parameter has type Integer [], but overridden method has parameter type @Nullable Integer []" ,
393393 " void foo(Integer[] p) { }" ,
394394 " @Override" ,
395395 " void bar(@Nullable Integer[] p) { }" ,
@@ -407,7 +407,7 @@ public void ternaryOperator() {
407407 "import org.jspecify.annotations.Nullable;" ,
408408 "class Test {" ,
409409 " static Integer[] testPositive(Integer[] p, boolean t) {" ,
410- " // BUG: Diagnostic contains: Conditional expression must have type Integer[]" ,
410+ " // BUG: Diagnostic contains: Conditional expression must have type Integer []" ,
411411 " Integer[] t1 = t ? new Integer[0] : new @Nullable Integer[0];" ,
412412 " // BUG: Diagnostic contains: Conditional expression must have type" ,
413413 " return t ? new @Nullable Integer[0] : new @Nullable Integer[0];" ,
0 commit comments