Skip to content

Commit a81e5e4

Browse files
authored
Replace IntFunction<Integer> with IntUnaryOperator in FinalState (#20)
1 parent c89aba5 commit a81e5e4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/main/java/net/minecraftforge/accesstransformer/AccessTransformer.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,19 @@ public int mergeWith(final int access) {
8484
}
8585

8686
public enum FinalState {
87-
LEAVE(i->i),
88-
MAKEFINAL(i->i | Opcodes.ACC_FINAL),
89-
REMOVEFINAL(i->i & ~Opcodes.ACC_FINAL),
90-
CONFLICT(i->i);
91-
private final IntFunction<Integer> function;
87+
LEAVE(i -> i),
88+
MAKEFINAL(i -> i | Opcodes.ACC_FINAL),
89+
REMOVEFINAL(i -> i & ~Opcodes.ACC_FINAL),
90+
CONFLICT(i -> i);
9291

93-
FinalState(final IntFunction<Integer> function) {
92+
private final IntUnaryOperator function;
93+
94+
FinalState(final IntUnaryOperator function) {
9495
this.function = function;
9596
}
9697

9798
public int mergeWith(final int access) {
98-
return function.apply(access);
99+
return function.applyAsInt(access);
99100
}
100101
}
101102

0 commit comments

Comments
 (0)