Lines 19-24
Link Here
|
19 |
* bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking |
19 |
* bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking |
20 |
* Jesper S Moller <jesper@selskabet.org> - Contributions for |
20 |
* Jesper S Moller <jesper@selskabet.org> - Contributions for |
21 |
* bug 378674 - "The method can be declared as static" is wrong |
21 |
* bug 378674 - "The method can be declared as static" is wrong |
|
|
22 |
* Till Brychcy - Contributions for |
23 |
* bug 413460 - NonNullByDefault is not inherited to Constructors when accessed via Class File |
22 |
******************************************************************************/ |
24 |
******************************************************************************/ |
23 |
package org.eclipse.jdt.internal.compiler.ast; |
25 |
package org.eclipse.jdt.internal.compiler.ast; |
24 |
|
26 |
|
Lines 28-37
Link Here
|
28 |
import org.eclipse.jdt.internal.compiler.codegen.Opcodes; |
30 |
import org.eclipse.jdt.internal.compiler.codegen.Opcodes; |
29 |
import org.eclipse.jdt.internal.compiler.flow.FlowContext; |
31 |
import org.eclipse.jdt.internal.compiler.flow.FlowContext; |
30 |
import org.eclipse.jdt.internal.compiler.flow.FlowInfo; |
32 |
import org.eclipse.jdt.internal.compiler.flow.FlowInfo; |
|
|
33 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
31 |
import org.eclipse.jdt.internal.compiler.impl.Constant; |
34 |
import org.eclipse.jdt.internal.compiler.impl.Constant; |
32 |
import org.eclipse.jdt.internal.compiler.lookup.Binding; |
35 |
import org.eclipse.jdt.internal.compiler.lookup.Binding; |
33 |
import org.eclipse.jdt.internal.compiler.lookup.BlockScope; |
36 |
import org.eclipse.jdt.internal.compiler.lookup.BlockScope; |
34 |
import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; |
37 |
import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; |
|
|
38 |
import org.eclipse.jdt.internal.compiler.lookup.ImplicitNullAnnotationVerifier; |
35 |
import org.eclipse.jdt.internal.compiler.lookup.LocalTypeBinding; |
39 |
import org.eclipse.jdt.internal.compiler.lookup.LocalTypeBinding; |
36 |
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; |
40 |
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; |
37 |
import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding; |
41 |
import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding; |
Lines 264-270
Link Here
|
264 |
if (this.anonymousType == null && this.enclosingInstance == null) { |
268 |
if (this.anonymousType == null && this.enclosingInstance == null) { |
265 |
return super.resolveType(scope); |
269 |
return super.resolveType(scope); |
266 |
} |
270 |
} |
267 |
|
271 |
TypeBinding result=resolveTypeForQualifiedAllocationExpression(scope); |
|
|
272 |
if(result != null) { |
273 |
final CompilerOptions compilerOptions = scope.compilerOptions(); |
274 |
if (compilerOptions.isAnnotationBasedNullAnalysisEnabled && (this.binding.tagBits & TagBits.IsNullnessKnown) == 0) { |
275 |
new ImplicitNullAnnotationVerifier(compilerOptions.inheritNullAnnotations) |
276 |
.checkImplicitNullAnnotations(this.binding, null/*srcMethod*/, false, scope); |
277 |
} |
278 |
} |
279 |
return result; |
280 |
} |
281 |
|
282 |
private TypeBinding resolveTypeForQualifiedAllocationExpression(BlockScope scope) { |
268 |
// Propagate the type checking to the arguments, and checks if the constructor is defined. |
283 |
// Propagate the type checking to the arguments, and checks if the constructor is defined. |
269 |
// ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt |
284 |
// ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt |
270 |
// ClassInstanceCreationExpression ::= Name '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt |
285 |
// ClassInstanceCreationExpression ::= Name '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt |