|
|
@ -330,10 +330,11 @@ public class SyntheticAnalyzer implements Opcodes { |
|
|
|
public boolean checkConstructorAccess() { |
|
|
|
public boolean checkConstructorAccess() { |
|
|
|
ClassInfo clazzInfo = method.getClazzInfo(); |
|
|
|
ClassInfo clazzInfo = method.getClazzInfo(); |
|
|
|
BytecodeInfo bytecode = method.getBytecode(); |
|
|
|
BytecodeInfo bytecode = method.getBytecode(); |
|
|
|
|
|
|
|
String[] paramTypes |
|
|
|
|
|
|
|
= TypeSignature.getParameterTypes(method.getType()); |
|
|
|
Handler[] excHandlers = bytecode.getExceptionHandlers(); |
|
|
|
Handler[] excHandlers = bytecode.getExceptionHandlers(); |
|
|
|
if (excHandlers != null && excHandlers.length != 0) |
|
|
|
if (excHandlers != null && excHandlers.length != 0) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
Iterator iter = bytecode.getInstructions().iterator(); |
|
|
|
Iterator iter = bytecode.getInstructions().iterator(); |
|
|
|
|
|
|
|
|
|
|
|
Instruction instr = (Instruction) iter.next(); |
|
|
|
Instruction instr = (Instruction) iter.next(); |
|
|
@ -343,8 +344,7 @@ public class SyntheticAnalyzer implements Opcodes { |
|
|
|
|
|
|
|
|
|
|
|
if (instr.getLocalSlot() > slot |
|
|
|
if (instr.getLocalSlot() > slot |
|
|
|
&& unifyParam == -1 && params > 0 |
|
|
|
&& unifyParam == -1 && params > 0 |
|
|
|
&& TypeSignature.getParameterTypes(method.getType()) |
|
|
|
&& paramTypes[params - 1].charAt(0) == 'L') { |
|
|
|
[params - 1].charAt(0) == 'L') { |
|
|
|
|
|
|
|
unifyParam = params; |
|
|
|
unifyParam = params; |
|
|
|
params++; |
|
|
|
params++; |
|
|
|
slot++; |
|
|
|
slot++; |
|
|
@ -357,7 +357,12 @@ public class SyntheticAnalyzer implements Opcodes { |
|
|
|
|| instr.getOpcode() == opc_dload) ? 2 : 1; |
|
|
|
|| instr.getOpcode() == opc_dload) ? 2 : 1; |
|
|
|
instr = (Instruction) iter.next(); |
|
|
|
instr = (Instruction) iter.next(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (instr.getOpcode() == opc_invokespecial) { |
|
|
|
if (params > 0 && instr.getOpcode() == opc_invokespecial) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (unifyParam == -1 && params <= paramTypes.length |
|
|
|
|
|
|
|
&& paramTypes[params - 1].charAt(0) == 'L') |
|
|
|
|
|
|
|
unifyParam = params++; |
|
|
|
|
|
|
|
|
|
|
|
Reference ref = instr.getReference(); |
|
|
|
Reference ref = instr.getReference(); |
|
|
|
String refClazz = ref.getClazz().substring(1); |
|
|
|
String refClazz = ref.getClazz().substring(1); |
|
|
|
if (!(refClazz.substring(0, refClazz.length()-1) |
|
|
|
if (!(refClazz.substring(0, refClazz.length()-1) |
|
|
@ -371,6 +376,7 @@ public class SyntheticAnalyzer implements Opcodes { |
|
|
|
|| unifyParam == -1 |
|
|
|
|| unifyParam == -1 |
|
|
|
|| refType.getParameterTypes().length != params - 2) |
|
|
|
|| refType.getParameterTypes().length != params - 2) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
instr = (Instruction) iter.next(); |
|
|
|
instr = (Instruction) iter.next(); |
|
|
|
if (instr.getOpcode() != opc_return) |
|
|
|
if (instr.getOpcode() != opc_return) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|