< prev index next >
src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java
Print this page
@@ -24,11 +24,10 @@
/**
* SWITCH - Branch depending on int value, generates either LOOKUPSWITCH or
* TABLESWITCH instruction, depending on whether the match values (int[]) can be
* sorted with no gaps between the numbers.
*
- * @version $Id$
*/
public final class SWITCH implements CompoundInstruction {
private int[] match;
private InstructionHandle[] targets;
@@ -104,11 +103,11 @@
*/
private void sort( final int l, final int r ) {
int i = l;
int j = r;
int h;
- final int m = match[(l + r) / 2];
+ final int m = match[(l + r) >>> 1];
InstructionHandle h2;
do {
while (match[i] < m) {
i++;
}
@@ -147,14 +146,14 @@
return true;
}
@Override
- public final InstructionList getInstructionList() {
+ public InstructionList getInstructionList() {
return new InstructionList(instruction);
}
- public final Instruction getInstruction() {
+ public Instruction getInstruction() {
return instruction;
}
}
< prev index next >