Some instructions may have a side effect
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
DIV, REM, NEWARRAY and ARRAYLENGTH instructions may have a side effect and should be added in SideEffectInstructionChecker class.
Here are some code samples that have side effect but are removed when doing code simplification:
int i = 1 / 0;
int i = 1 % 0;
Object[] o = null;
int i = o.length;
Object[] o = new Object[-1];
Thanks for the list of special cases. ProGuard now handles them, with -Doptimize.conservatively, in the upcoming version 5.0 beta1.