Skip to content

Commit

Permalink
Replace IntFunction<Integer> with IntUnaryOperator in FinalState (
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintNinja authored Oct 21, 2024
1 parent c89aba5 commit a81e5e4
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,19 @@ public int mergeWith(final int access) {
}

public enum FinalState {
LEAVE(i->i),
MAKEFINAL(i->i | Opcodes.ACC_FINAL),
REMOVEFINAL(i->i & ~Opcodes.ACC_FINAL),
CONFLICT(i->i);
private final IntFunction<Integer> function;
LEAVE(i -> i),
MAKEFINAL(i -> i | Opcodes.ACC_FINAL),
REMOVEFINAL(i -> i & ~Opcodes.ACC_FINAL),
CONFLICT(i -> i);

FinalState(final IntFunction<Integer> function) {
private final IntUnaryOperator function;

FinalState(final IntUnaryOperator function) {
this.function = function;
}

public int mergeWith(final int access) {
return function.apply(access);
return function.applyAsInt(access);
}
}

Expand Down

0 comments on commit a81e5e4

Please sign in to comment.