java - Unreachable statement from the Decompiler output -


I unconnected an APK file, then tried to compile it and received the "irreversible statement" compiler error, It should know that this is an Obfuscater move, or is the simulator failure? How is this possible? Used in fields and

and here is the decompiled method

  Public Zero onSensorChanged (SensorEvent paramSensorEvent) {float [] arrayOfFloat = paramSensorEvent.values; Switch (paramSensorEvent.sensor.getType ()) {} do {return; } While (this.aDegree == arrayOfFloat [0]); This.aDegree = arrayOfFloat [0]; Invalid (); }  

This is possible because unrecoverable statement is a useful compilation There is time error, no runtime check / barrier.

The code that you have been decompressed can basically be something like this:

  boolean debug = true; Do {if (debug) {return; }} While (this.aDegree == arrayOfFloat [0]);  

The compiler is smart enough to know that debug is always true and does not bother with a check in byte code (for efficiency).

Obviously my example is quite a lot, in fact it was probably more complex (though the end result is the same).


Comments