Skip to content

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

@pubiqq

Description

@pubiqq

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreIssues in jadx-core modulebug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions