Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a minor bug in while loop #1160

Merged
merged 1 commit into from
Apr 25, 2021
Merged

Conversation

busmaker
Copy link
Contributor

Recently, I found a mistake that I had made in all my code.
I had always thought that the continue (in code below) will go to the do statement and start a new round, but nope, according to the official Java documentation

The continue statement ... skips to the end of the innermost loop's body and evaluates the boolean expression that controls the loop.

So turns out the continue goes to the while (false) instead of do.

do {
 if (loop())
  continue;
} while (false);

I am very sorry for wrote such code to Jadx.

@skylot
Copy link
Owner

skylot commented Apr 25, 2021

So previously next port retry was broken and this patch fix that. Good 👍

@busmaker
Copy link
Contributor Author

So previously next port retry was broken and this patch fix that. Good 👍

Yes 👍

@lgtm-com
Copy link

lgtm-com bot commented Apr 25, 2021

This pull request fixes 1 alert when merging eaf254a into ca723c3 - view on LGTM.com

fixed alerts:

  • 1 for Continue statement that does not continue

@skylot skylot merged commit bfc343d into skylot:master Apr 25, 2021
@skylot
Copy link
Owner

skylot commented Apr 25, 2021

fixed alerts:
1 for Continue statement that does not continue

Looks like next time I will force to fix all LGTM alerts, because it is really useful 😂

@busmaker
Copy link
Contributor Author

fixed alerts:
1 for Continue statement that does not continue

Looks like next time I will force to fix all LGTM alerts, because it is really useful 😂

Yeah, I agree with you, I feel that now, and I caused all that alerts. 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants