I want to use BCEL to add/insert some if_instruction before a specific if_instruction which is in my method.
Here is my method:
public void printMax(int x , int y){
int max=x;
//////here is my desire position//////////
if(y>x)
max=y;
System.out.println(max);
}
To me the
if(x<y != y>x)
is the same asif(false)
so it would not succeed; so maybe you should useIF_ACMPNE
, but I don't know BCEL ...