mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
ASTGen: getSimpleNameAt - return null if nothing not found
This commit is contained in:
@@ -995,7 +995,8 @@ public class ASTGenerator {
|
||||
int maxIndex = IntStream.range(0, simpleNames.size())
|
||||
.filter(i -> coverages[i] >= 0)
|
||||
.reduce((i, j) -> coverages[i] > coverages[j] ? i : j)
|
||||
.orElse(0);
|
||||
.orElse(-1);
|
||||
if (maxIndex == -1) return null;
|
||||
result = simpleNames.get(maxIndex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user