Lines 45-51
Link Here
|
45 |
// All specified tests which do not belong to the class are skipped... |
45 |
// All specified tests which do not belong to the class are skipped... |
46 |
static { |
46 |
static { |
47 |
// TESTS_NAMES = new String[] { "test127" }; |
47 |
// TESTS_NAMES = new String[] { "test127" }; |
48 |
// TESTS_NUMBERS = new int[] { 286 }; |
48 |
// TESTS_NUMBERS = new int[] { 287, 288 }; |
49 |
// TESTS_RANGE = new int[] { 249, -1 }; |
49 |
// TESTS_RANGE = new int[] { 249, -1 }; |
50 |
} |
50 |
} |
51 |
|
51 |
|
Lines 9518-9521
Link Here
|
9518 |
raiseDeprecationReduceInvalidJavadocSeverity, |
9518 |
raiseDeprecationReduceInvalidJavadocSeverity, |
9519 |
null); |
9519 |
null); |
9520 |
} |
9520 |
} |
|
|
9521 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304031 |
9522 |
public void test287() { |
9523 |
Map options = getCompilerOptions(); |
9524 |
options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR); |
9525 |
options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED); |
9526 |
this.runConformTest( |
9527 |
new String[] { |
9528 |
"X.java", |
9529 |
"import java.util.ArrayList;\n" + |
9530 |
"\n" + |
9531 |
"public class X {\n" + |
9532 |
" @SuppressWarnings(\"rawtypes\")\n" + |
9533 |
" void foo(ArrayList arg) {\n" + |
9534 |
" for (\n" + |
9535 |
" @SuppressWarnings(\"unchecked\")\n" + |
9536 |
" boolean a= arg.add(1), b= arg.add(1);\n" + |
9537 |
" Boolean.FALSE;\n" + |
9538 |
" ) {\n" + |
9539 |
" System.out.println(a && b);\n" + |
9540 |
" }\n" + |
9541 |
" }\n" + |
9542 |
"}", |
9543 |
}, |
9544 |
"", |
9545 |
null, |
9546 |
true, |
9547 |
null, |
9548 |
options, |
9549 |
null); |
9550 |
} |
9551 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304031 |
9552 |
public void test288() { |
9553 |
Map options = getCompilerOptions(); |
9554 |
options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR); |
9555 |
options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED); |
9556 |
this.runConformTest( |
9557 |
new String[] { |
9558 |
"X.java", |
9559 |
"import java.util.ArrayList;\n" + |
9560 |
"\n" + |
9561 |
"public class X {\n" + |
9562 |
" @SuppressWarnings(\"rawtypes\")\n" + |
9563 |
" ArrayList arg;\n" + |
9564 |
" @SuppressWarnings(\"unchecked\")\n" + |
9565 |
" boolean a= arg.add(1), b= arg.add(1);\n" + |
9566 |
"}", |
9567 |
}, |
9568 |
"", |
9569 |
null, |
9570 |
true, |
9571 |
null, |
9572 |
options, |
9573 |
null); |
9574 |
} |
9521 |
} |
9575 |
} |