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

[core] JADX WARN: Failed to find 'out' block for switch #2249

Closed
pubiqq opened this issue Aug 13, 2024 · 1 comment
Closed

[core] JADX WARN: Failed to find 'out' block for switch #2249

pubiqq opened this issue Aug 13, 2024 · 1 comment
Labels
bug Core Issues in jadx-core module

Comments

@pubiqq
Copy link
Contributor

pubiqq commented Aug 13, 2024

Relevant log output or stacktrace

JADX WARN: Failed to find 'out' block for switch in B:5:0x0014. Please report as an issue.

Provide sample and class/method full name

Test

package jadx.tests.integration.switches;

import org.junit.jupiter.api.Test;

import jadx.tests.api.IntegrationTest;
import jadx.tests.api.utils.assertj.JadxAssertions;

public class TestSwitchInLoop4 extends IntegrationTest {

  @SuppressWarnings("SwitchStatementWithTooFewBranches")
  public static class TestCls {

    private static boolean test(String s, int start) {
      boolean foundSeparator = false;

      for (int i = start; i < s.length(); i++) {
        char c = s.charAt(i);
        switch (c) {
          case '.':
            foundSeparator = true;
            break;
        }
        if (foundSeparator) {
          break;
        }
      }

      return foundSeparator;
    }
  }

  @Test
  public void test() {
    JadxAssertions.assertThat(getClassNode(TestCls.class))
        .code();
  }
}

Jadx version

1.5.0

Related

#2248, #2246, #2054, #826

@pubiqq pubiqq added bug Core Issues in jadx-core module labels Aug 13, 2024
@skylot
Copy link
Owner

skylot commented Sep 1, 2024

Fixed. Although, change mostly affect logic to handle 'continue' in switch cases inside loop. And there is only one test for such code, so the fix might introduce new regressions 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants