diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs1921/gh_spring_27761/JpaRepositoryDump.java | 7 | ||||
-rw-r--r-- | tests/bugs1921/gh_spring_27761/JpaRepository_bridge_first.jar | bin | 456 -> 0 bytes | |||
-rw-r--r-- | tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml | 7 |
3 files changed, 11 insertions, 3 deletions
diff --git a/tests/bugs1921/gh_spring_27761/JpaRepositoryDump.java b/tests/bugs1921/gh_spring_27761/JpaRepositoryDump.java index a007abe96..b70330bff 100644 --- a/tests/bugs1921/gh_spring_27761/JpaRepositoryDump.java +++ b/tests/bugs1921/gh_spring_27761/JpaRepositoryDump.java @@ -3,12 +3,15 @@ import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; +import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -class JpaRepositoryDump implements Opcodes { +public class JpaRepositoryDump implements Opcodes { public static void main(String[] args) throws IOException { - try (FileOutputStream outputStream = new FileOutputStream("JpaRepository.class")) { + // Write class file to test sandbox directory + String classFile = args[0] + File.separator + "JpaRepository.class"; + try (FileOutputStream outputStream = new FileOutputStream(classFile)) { outputStream.write(dump()); } } diff --git a/tests/bugs1921/gh_spring_27761/JpaRepository_bridge_first.jar b/tests/bugs1921/gh_spring_27761/JpaRepository_bridge_first.jar Binary files differdeleted file mode 100644 index 47aa5c053..000000000 --- a/tests/bugs1921/gh_spring_27761/JpaRepository_bridge_first.jar +++ /dev/null diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml index db47e073d..89c9b5f41 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml @@ -420,7 +420,12 @@ <!-- https://github.com/spring-projects/spring-framework/issues/27761 --> <ajc-test dir="bugs1921/gh_spring_27761" vm="8" title="do not match bridge methods"> - <compile files="RepositoryAspect.aj" inpath="JpaRepository_bridge_first.jar" options="-8"/> + <!-- (1) Use ASM to generate JpaRepository class with reordered methods --> + <compile files="JpaRepositoryDump.java" options="-8"/> + <run class="JpaRepositoryDump" options="$sandbox"/> + <file deletefile="JpaRepositoryDump.class"/> + <!-- (2) Use AJC to compile the remaining classes and run the test --> + <compile files="RepositoryAspect.aj" options="-8"/> <run class="RepositoryAspect"> <stdout> <line text="execution(List RepositoryImpl.saveAll(Iterable))"/> |