Skip to content

Commit

Permalink
GROOVY-11136: no jdk7 Map#getOrDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Jul 26, 2023
1 parent d9ce850 commit 3e7da58
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ public static ClassNode correctToGenericsSpecRecurse(Map<String, ClassNode> gene
newgTypes[i] = fixed;
} else if (oldgType.isPlaceholder()) {
// correct "T"
newgTypes[i] = new GenericsType(genericsSpec.getOrDefault(oldgType.getName(), ClassHelper.OBJECT_TYPE));
ClassNode t = genericsSpec.get(oldgType.getName());
if (t == null) t = ClassHelper.OBJECT_TYPE;
newgTypes[i] = new GenericsType(t);
} else {
// correct "List<T>", etc.
newgTypes[i] = new GenericsType(correctToGenericsSpecRecurse(genericsSpec, correctToGenericsSpec(genericsSpec, oldgType), exclusions));
Expand Down

0 comments on commit 3e7da58

Please sign in to comment.