Lines 486-492
Link Here
|
486 |
"Type mismatch: required \'@NonNull Object\' but the provided value is null\n" + |
486 |
"Type mismatch: required \'@NonNull Object\' but the provided value is null\n" + |
487 |
"----------\n" /* compiler output */); |
487 |
"----------\n" /* compiler output */); |
488 |
} |
488 |
} |
489 |
//null is passed to a non-null parameter in a qualified allocation expression, generic constructor, target class read from .class |
489 |
// null is passed to a non-null parameter in a qualified allocation expression, generic constructor, target class read from .class |
490 |
public void test_nonnull_parameter_012() { |
490 |
public void test_nonnull_parameter_012() { |
491 |
Map customOptions = getCompilerOptions(); |
491 |
Map customOptions = getCompilerOptions(); |
492 |
customOptions.put(JavaCore.COMPILER_PB_NULL_SPECIFICATION_INSUFFICIENT_INFO, JavaCore.ERROR); |
492 |
customOptions.put(JavaCore.COMPILER_PB_NULL_SPECIFICATION_INSUFFICIENT_INFO, JavaCore.ERROR); |
Lines 2390-2393
Link Here
|
2390 |
}, |
2390 |
}, |
2391 |
""); |
2391 |
""); |
2392 |
} |
2392 |
} |
|
|
2393 |
// test analysis disablement, binary type contains annotation |
2394 |
public void test_disabled_1() { |
2395 |
Map customOptions = getCompilerOptions(); |
2396 |
customOptions.put(JavaCore.COMPILER_PB_NULL_SPECIFICATION_INSUFFICIENT_INFO, JavaCore.ERROR); |
2397 |
runConformTestWithLibs( |
2398 |
new String[] { |
2399 |
"ContainingInner2.java", |
2400 |
"public class ContainingInner2 {\n" + |
2401 |
" public ContainingInner2 (@org.eclipse.jdt.annotation.NonNull Object o) {\n" + |
2402 |
" }\n" + |
2403 |
" public class Inner {\n" + |
2404 |
" public <T> Inner (@org.eclipse.jdt.annotation.NonNull T o) {\n" + |
2405 |
" }\n" + |
2406 |
" }\n" + |
2407 |
"}\n", |
2408 |
}, |
2409 |
null /*customOptions*/, |
2410 |
""); |
2411 |
customOptions.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.DISABLED); |
2412 |
runConformTestWithLibs( |
2413 |
false, // flush directory |
2414 |
new String[] { |
2415 |
"X.java", |
2416 |
"public class X {\n" + |
2417 |
" void create() {\n" + |
2418 |
" ContainingInner2 container = new ContainingInner2(null);\n" + |
2419 |
" ContainingInner2.Inner inner = container.new Inner(null);\n" + |
2420 |
" }\n" + |
2421 |
"}\n"}, |
2422 |
customOptions, |
2423 |
"" /* compiler output */); |
2424 |
} |
2393 |
} |
2425 |
} |