Community
Participate
Working Groups
(In reply to Stephan Herrmann from bug 553453 comment #2) > Importing this project into build I20191120-1800 produces: > > java.lang.NullPointerException > at > org.eclipse.jdt.internal.compiler.lookup.Scope.getDeclarationModifiers(Scope. > java:2533) > at > org.eclipse.jdt.internal.compiler.ast.JavadocSingleTypeReference. > reportInvalidType(JavadocSingleTypeReference.java:114) > at > org.eclipse.jdt.internal.compiler.ast.JavadocSingleTypeReference. > internalResolveType(JavadocSingleTypeReference.java:94) > at > org.eclipse.jdt.internal.compiler.ast.TypeReference. > resolveType(TypeReference.java:629) > at > org.eclipse.jdt.internal.compiler.ast.TypeReference. > resolveType(TypeReference.java:625) > at > org.eclipse.jdt.internal.compiler.ast.TypeReference. > resolveType(TypeReference.java:621) > at > org.eclipse.jdt.internal.compiler.ast.Javadoc.resolveReference(Javadoc.java: > 403) > at org.eclipse.jdt.internal.compiler.ast.Javadoc.resolve(Javadoc.java:293) > at > org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration. > resolve(CompilationUnitDeclaration.java:645) > at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:1072) > at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:1114) > at > org.eclipse.jdt.internal.core.CompilationUnitProblemFinder. > process(CompilationUnitProblemFinder.java:280) > at > org.eclipse.jdt.internal.core.CompilationUnitProblemFinder. > process(CompilationUnitProblemFinder.java:346) > at > org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation. > makeConsistent(ReconcileWorkingCopyOperation.java:193) > at > org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation. > executeOperation(ReconcileWorkingCopyOperation.java:94) > at > org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java: > 736) > at > org.eclipse.jdt.internal.core.JavaModelOperation. > runOperation(JavaModelOperation.java:802) > at > org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java: > 1315) > at > org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy. > reconcile(JavaReconcilingStrategy.java:131) > at > org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy. > access$0(JavaReconcilingStrategy.java:113) > at > org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1. > run(JavaReconcilingStrategy.java:93) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) > at > org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy. > reconcile(JavaReconcilingStrategy.java:90) > at > org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy. > reconcile(JavaReconcilingStrategy.java:157) > at > org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy. > reconcile(CompositeReconcilingStrategy.java:94) > at > org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy. > reconcile(JavaCompositeReconcilingStrategy.java:107) > at > org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java: > 76) > at > org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread. > run(AbstractReconciler.java:210) NPE still happens in I20191125-1800 and is caused by the fix from bug 549855. It is an unhappy consequence of using a MethodScope as moduleDeclaration.scope, which has no referenceContext. I will have to check bug 517808 why it was introduced this way. Short term solution (RC1?): let Scope.getDeclarationModifiers() check if referenceContext is null (what then?). Mid term solution: introduce a new scope kind Scope.MODULE_SCOPE.
@Jeff, do you have a minute to look at this? The example project is attachment 280776 [details]
(In reply to Stephan Herrmann from comment #1) > @Jeff, do you have a minute to look at this? > > The example project is attachment 280776 [details] Looking at it
New Gerrit change created: https://git.eclipse.org/r/153425
(In reply to Stephan Herrmann from comment #1) > @Jeff, do you have a minute to look at this? > > The example project is attachment 280776 [details] Hi Stephan, I have posted a patch that checks for a ModuleDeclaration in getDeclarationModifiers() and simply returns the ModuleDeclaration.modifiers. It fixes the NPE. For the sake of expediency I posted to have gerrit run the tests rather than my local set-up. The CTRL+SHIFT+O removes the comments as it did in 4.13GA.
(In reply to Jeff Johnston from comment #4) > (In reply to Stephan Herrmann from comment #1) > > @Jeff, do you have a minute to look at this? > > > > The example project is attachment 280776 [details] > > Hi Stephan, I have posted a patch that checks for a ModuleDeclaration in > getDeclarationModifiers() and simply returns the > ModuleDeclaration.modifiers. It fixes the NPE. For the sake of expediency > I posted to have gerrit run the tests rather than my local set-up. The > CTRL+SHIFT+O removes the comments as it did in 4.13GA. Looks reasonable to me (at the given point in the cycle). Can we please have a project lead's +1 for RC1?
Please find my +2 in gerrit.
Gerrit change https://git.eclipse.org/r/153425 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=362b8a1d67b06933194e2e17a7048c92498007dc
>>Mid term solution: introduce a new scope kind Scope.MODULE_SCOPE. Created bug 553564
Thanks Jeff
Verified on Version: 2019-12 (4.14) Build id: I20191127-1800