Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2021-03-01 13:13:28 +0000
committerManoj Palat2021-03-01 13:13:28 +0000
commit60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c (patch)
tree90bbf190b010e2ee28951a9a383df773741a4e56
parent4a28a3e9e6e97eb0e42bf32716d56731b21959f1 (diff)
downloadeclipse.jdt.core-60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c.tar.gz
eclipse.jdt.core-60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c.tar.xz
eclipse.jdt.core-60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c.zip
Safety net for comment 5 Bug 571454 - [16] Order of compilation unitsY20210301-1000
leaves canonical constructor in incomplete state Change-Id: I91dee3efb840a48487fae039391ae18580842317 Signed-off-by: Manoj Palat <manpalat@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index 1971851515..391ccc8692 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -484,6 +484,9 @@ public class ExplicitConstructorCall extends Statement implements Invocation {
private boolean checkAndFlagExplicitConstructorCallInCanonicalConstructor(AbstractMethodDeclaration methodDecl, BlockScope scope) {
+ if (methodDecl.binding == null || methodDecl.binding.declaringClass == null
+ || !methodDecl.binding.declaringClass.isRecord())
+ return true;
boolean isInsideCCD = methodDecl instanceof CompactConstructorDeclaration;
if (this.accessMode != ExplicitConstructorCall.ImplicitSuper) {
if (isInsideCCD)

Back to the top