Skip to content

Commit a2978d1

Browse files
committed
Do not use Java 8 method.
1 parent c14ba96 commit a2978d1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberSubstitution.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,9 @@ public Resolution resolve(TypeDescription targetType,
22582258

22592259
boolean shift = ((target.getModifiers() & Opcodes.ACC_STATIC) == 0) && !(target instanceof MethodDescription && ((MethodDescription) target).isConstructor());
22602260
for (int index = 0; index < methodDescription.getParameters().size(); index++) {
2261-
Integer substitution = substitutions.getOrDefault(index + (shift ? 1 : 0), index + (shift ? 1 : 0));
2261+
int substitution = substitutions.containsKey(index + (shift ? 1 : 0))
2262+
? substitutions.get(index + (shift ? 1 : 0))
2263+
: index + (shift ? 1 : 0);
22622264
if (substitution >= parameters.size()) {
22632265
throw new IllegalStateException(target + " does not support an index " + substitution);
22642266
}

0 commit comments

Comments
 (0)