-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
jadx-core/src/test/java/jadx/tests/integration/others/TestOverrideStaticMethod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package jadx.tests.integration.others; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import jadx.tests.api.IntegrationTest; | ||
|
||
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat; | ||
|
||
public class TestOverrideStaticMethod extends IntegrationTest { | ||
|
||
public static class TestCls { | ||
public static class BaseClass { | ||
public static int a() { | ||
return 1; | ||
} | ||
} | ||
|
||
public static class MyClass extends BaseClass { | ||
public static int a() { | ||
return 2; | ||
} | ||
} | ||
|
||
public void check() { | ||
assertThat(BaseClass.a()).isEqualTo(1); | ||
assertThat(MyClass.a()).isEqualTo(2); | ||
} | ||
} | ||
|
||
@Test | ||
public void test() { | ||
assertThat(getClassNode(TestCls.class)) | ||
.code() | ||
.doesNotContain("@Override"); | ||
} | ||
} |