Skip to content

Commit e69c20e

Browse files
committed
Merge branch 'JDK-8364991' into JDK-8367499
2 parents 6963835 + 0ee6086 commit e69c20e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ private Set<PatternDescription> reduceNestedPatterns(Set<PatternDescription> pat
399399
continue NEXT_PATTERN;
400400
}
401401
} else if (rpOne.nested[i] instanceof RecordPattern nestedRPOne) {
402-
boolean foundMatchingReplaced = false;
403402
Set<PatternDescription> pendingReplacedPatterns = new HashSet<>(replaces.getOrDefault(rpOther.nested[i], Set.of()));
404403

405404
while (!pendingReplacedPatterns.isEmpty()) {
@@ -408,15 +407,12 @@ private Set<PatternDescription> reduceNestedPatterns(Set<PatternDescription> pat
408407
pendingReplacedPatterns.remove(currentReplaced);
409408

410409
if (nestedRPOne.equals(currentReplaced)) {
411-
foundMatchingReplaced = true;
412-
break;
410+
continue ACCEPT;
413411
}
414412

415413
pendingReplacedPatterns.addAll(replaces.getOrDefault(currentReplaced, Set.of()));
416414
}
417-
if (!foundMatchingReplaced) {
418-
continue NEXT_PATTERN;
419-
}
415+
continue NEXT_PATTERN;
420416
} else {
421417
continue NEXT_PATTERN;
422418
}

0 commit comments

Comments
 (0)