style: 统一代码实现

This commit is contained in:
zhangxun 2025-06-28 21:08:49 +08:00 committed by Luke
parent 872865268b
commit f382b2bc54

View File

@ -40,7 +40,8 @@ public class S2BCommand implements Command {
@Override @Override
public int execute(String[] parts, int currentPC, OperandStack operandStack, public int execute(String[] parts, int currentPC, OperandStack operandStack,
LocalVariableStore localVariableStore, CallStack callStack) { LocalVariableStore localVariableStore, CallStack callStack) {
byte convertedValue = (byte) ((short) operandStack.pop()); short value = (short) operandStack.pop();
byte convertedValue = (byte) value;
operandStack.push(convertedValue); operandStack.push(convertedValue);
return currentPC + 1; return currentPC + 1;
} }