mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
Renaming checkTimeout, as suggested.
This commit is contained in:
parent
3a3fd48628
commit
ca43f533f7
@ -95,7 +95,7 @@ public class ExhaustivenessComputer {
|
|||||||
try {
|
try {
|
||||||
computedMaxBaseChecks = Long.parseLong(baseChecks);
|
computedMaxBaseChecks = Long.parseLong(baseChecks);
|
||||||
} catch (NumberFormatException _) {
|
} catch (NumberFormatException _) {
|
||||||
//ignore invalid values and use the default timeout
|
//ignore invalid values and use the default maximum number of checks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ public class ExhaustivenessComputer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isBpCovered(Type componentType, PatternDescription newNested) {
|
private boolean isBpCovered(Type componentType, PatternDescription newNested) {
|
||||||
checkTimeout();
|
reportCheck();
|
||||||
|
|
||||||
if (newNested instanceof BindingPattern bp) {
|
if (newNested instanceof BindingPattern bp) {
|
||||||
Type seltype = types.erasure(componentType);
|
Type seltype = types.erasure(componentType);
|
||||||
@ -688,7 +688,7 @@ public class ExhaustivenessComputer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void checkTimeout() {
|
protected void reportCheck() {
|
||||||
if (baseChecks != (-1) &&
|
if (baseChecks != (-1) &&
|
||||||
++baseChecks > maxBaseChecks) {
|
++baseChecks > maxBaseChecks) {
|
||||||
throw new TooManyChecksException(null);
|
throw new TooManyChecksException(null);
|
||||||
@ -1045,9 +1045,9 @@ public class ExhaustivenessComputer {
|
|||||||
|
|
||||||
reducedAdded.remove(current);
|
reducedAdded.remove(current);
|
||||||
|
|
||||||
Set<PatternDescription> combinedPatterns =
|
Set<PatternDescription> combinedPatterns =
|
||||||
Stream.concat(basePatterns.stream(),
|
Stream.concat(basePatterns.stream(),
|
||||||
replace(inMissingPatterns, toExpand, reducedAdded).stream())
|
replace(inMissingPatterns, toExpand, reducedAdded).stream())
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
if (computeCoverage(selectorType, combinedPatterns, PatternEquivalence.LOOSE).covered()) {
|
if (computeCoverage(selectorType, combinedPatterns, PatternEquivalence.LOOSE).covered()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user