Skip to content

Commit

Permalink
Fix rewriting static methods when converting type to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Machine-Maker committed Sep 26, 2024
1 parent eb639db commit 52d8d55
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ allprojects {

repositories {
mavenCentral()
maven("https://repository.ow2.org/nexus/content/repositories/snapshots") {
mavenContent {
includeGroup("org.ow2.asm")
}
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
asm = "9.6"
asm = "9.8-SNAPSHOT"
junit = "5.11.1"
indra = "3.1.3"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class ClassToInterfaceTest {

@TransformerTest(value = "data.classes.ClassToInterfaceUser", copyFromClassReader = false /*required until asm merges https://gitlab.ow2.org/asm/asm/-/merge_requests/403*/)
@TransformerTest("data.classes.ClassToInterfaceUser")
void testWithNoReplacement(final TransformerCheck check) {
final RewriteRule rule = new ClassToInterfaceRule(
SomeAbstractClass.class.describeConstable().orElseThrow(),
Expand All @@ -18,7 +18,7 @@ void testWithNoReplacement(final TransformerCheck check) {
check.run(rule);
}

@TransformerTest(value = "data.classes.ClassToInterfaceRedirectUser", copyFromClassReader = false /*required until asm merges https://gitlab.ow2.org/asm/asm/-/merge_requests/403*/)
@TransformerTest("data.classes.ClassToInterfaceRedirectUser")
void testWithReplacement(final TransformerCheck check) {
final RewriteRule rule = new ClassToInterfaceRule(
SomeAbstractClass.class.describeConstable().orElseThrow(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class EnumToInterfaceTest {
private static final ClassDesc API_ENUM = desc(ApiEnum.class);
private static final ClassDesc API_ENUM_IMPL = desc(ApiEnumImpl.class);

@TransformerTest(value = "data.classes.EnumToInterfaceUser", copyFromClassReader = false)
@TransformerTest("data.classes.EnumToInterfaceUser")
void testEnumToInterface(final TransformerCheck check) {
final RewriteRule rule = new EnumToInterfaceRule(Map.of(API_ENUM, API_ENUM_IMPL));

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 52d8d55

Please sign in to comment.