java - Strange continue keyword usage -
i'm reviewing java code, , have run kind of thing second time now.
while (true) try { //some simple statements continue; try { thread.sleep(1000l); } catch (interruptedexception e) { samsetutils.logerror(this.logger, e.getmessage() + ".29"); } if (!samsetutils.blockingdistributorthread) { //some long , critical code here } } //several catch blocks follow
to understanding, critical code omitted, since continue statement executed , start iteration immediately. first marked similar situation bug, time raised suspicions, because it's part of supposedly working code that's being used commercially. snippet work somehow, in way i'm not aware of?
similar situation here:
while (true) try { //some simple statements if (notifications != null) { int = 0; continue; this.recivednotifies.add(notifications[i].getname()); i++; if (i >= notifications.length) { makecallback(); } } else { thread.sleep(2000l); } } catch (exception e) { //catch statements }
those snippets come decompiled code, , indeed decompiler getting confused. checked 1 , produced different, although crazy, results. help.
Comments
Post a Comment