Skip to content

Commit 8b1a2c5

Browse files
committed
Fix test.
1 parent 896e91e commit 8b1a2c5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

byte-buddy-dep/src/test/java/net/bytebuddy/asm/MemberSubstitutionChainWithAnnotationTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,8 @@ public void testHandle() throws Exception {
308308
.make()
309309
.load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER)
310310
.getLoaded();
311-
Object instance = type.getDeclaredConstructor(String.class).newInstance(FOO);
312-
assertThat(type.getDeclaredField(FOO).get(instance), is((Object) FOO));
313-
assertThat(type.getDeclaredMethod(RUN).invoke(instance), is((Object) (FOO + BAR)));
311+
Object instance = type.getDeclaredConstructor().newInstance();
312+
assertThat(type.getDeclaredMethod(RUN).invoke(instance), is((Object) FOO));
314313
}
315314

316315
@Test
@@ -937,12 +936,14 @@ public static String handle(
937936

938937
public static class HandleSample {
939938

939+
public String foo;
940+
940941
public static String foo() {
941942
return FOO;
942943
}
943944

944945
public String run() {
945-
return null;
946+
return foo;
946947
}
947948

948949
public static String handle(@MemberSubstitution.Handle(

0 commit comments

Comments
 (0)