Commit bb99dbfe authored by Eric Bruneton's avatar Eric Bruneton

Fix some 'code smells' found by SonarQube.

parent 50086136
Pipeline #1301 passed with stage
in 6 minutes and 30 seconds
......@@ -432,6 +432,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes
}
}
/** @deprecated */
@Deprecated
@Override
public void visitMethodInsn(
......@@ -564,9 +565,9 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes
if (isConstructor
&& !superClassConstructorCalled
&& !forwardJumpStackFrames.containsKey(handler)) {
List<Object> stackFrame = new ArrayList<Object>();
stackFrame.add(OTHER);
forwardJumpStackFrames.put(handler, stackFrame);
List<Object> handlerStackFrame = new ArrayList<Object>();
handlerStackFrame.add(OTHER);
forwardJumpStackFrames.put(handler, handlerStackFrame);
}
}
......
......@@ -1005,6 +1005,7 @@ public class InstructionAdapter extends MethodVisitor {
mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, descriptor);
}
/** @deprecated */
@Deprecated
public void invokevirtual(final String owner, final String name, final String descriptor) {
if (api >= Opcodes.ASM5) {
......@@ -1026,6 +1027,7 @@ public class InstructionAdapter extends MethodVisitor {
mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, owner, name, descriptor, isInterface);
}
/** @deprecated */
@Deprecated
public void invokespecial(final String owner, final String name, final String descriptor) {
if (api >= Opcodes.ASM5) {
......@@ -1047,6 +1049,7 @@ public class InstructionAdapter extends MethodVisitor {
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, owner, name, descriptor, isInterface);
}
/** @deprecated */
@Deprecated
public void invokestatic(final String owner, final String name, final String descriptor) {
if (api >= Opcodes.ASM5) {
......
......@@ -296,7 +296,9 @@ public class LocalVariablesSorter extends MethodVisitor {
* {@link MethodVisitor#visitFrame}, except that long and double types use two slots. The
* types for the current stack map frame must be updated in place in this array.
*/
protected void updateNewLocals(final Object[] newLocals) {}
protected void updateNewLocals(final Object[] newLocals) {
// The default implementation does nothing.
}
/**
* Notifies subclasses that a local variable has been added or remapped. The default
......@@ -305,7 +307,9 @@ public class LocalVariablesSorter extends MethodVisitor {
* @param local a local variable identifier, as returned by {@link #newLocal}.
* @param type the type of the value being stored in the local variable.
*/
protected void setLocalType(final int local, final Type type) {}
protected void setLocalType(final int local, final Type type) {
// The default implementation does nothing.
}
private void setFrameLocal(final int local, final Object type) {
int numLocals = remappedLocalTypes.length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment