]> source.dussan.org Git - javassist.git/commitdiff
Minimal changes make IDEA 2023.2 work out-of-box 470/head
authorshifujun <shifujun@foxmail.com>
Tue, 12 Dec 2023 06:10:23 +0000 (14:10 +0800)
committershifujun <shifujun@foxmail.com>
Tue, 12 Dec 2023 06:10:23 +0000 (14:10 +0800)
Correct maven-compiler-plugin JDK version for IDEA import Compiler bytecode version.

Remove JvstTestRoot's constructor, otherwise IDEA cannot show Run icon aside testMethod.
Another way is adding suite() static method to those classes.

Now we can clone and open project with IDEA 2023.2. Debug single test case with IDEA is very useful.

pom.xml
src/test/javassist/Bench.java
src/test/javassist/JvstTest.java
src/test/javassist/JvstTest2.java
src/test/javassist/JvstTest3.java
src/test/javassist/JvstTest4.java
src/test/javassist/JvstTest5.java
src/test/javassist/JvstTestRoot.java
src/test/javassist/bytecode/InsertGap0.java

diff --git a/pom.xml b/pom.xml
index a604e16649a5a7cf3378cf7971409cfc5ab4c66a..42106d56331693560cbb6308c75ed6e204aa7a05 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.2</version>
         <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
+          <source>11</source>
+          <target>11</target>
           <testSource>11</testSource>
           <testTarget>11</testTarget>
           <testCompilerArgument>-parameters</testCompilerArgument>
index b7b8b27e0fb1133ac32d5402d5443182e48226e4..1892b383b7d1f1d1298d68bd64907fcb94264dca 100644 (file)
@@ -5,9 +5,6 @@ import javassist.expr.*;
 import javassist.compiler.*;
 
 public class Bench extends JvstTestRoot {
-    public Bench(String name) {
-        super(name);
-    }
 
     public void testProceed() throws Exception {
         CtClass cc = sloader.get("test.BenchProceed");
index 3ed168272b32e352c0b22d4b7062f50f69e6297d..ecbf91f78c38c17199a4b7faf05e7acc1dd889ca 100644 (file)
@@ -20,9 +20,6 @@ public class JvstTest extends JvstTestRoot {
         java9 = javassist.bytecode.ClassFile.MAJOR_VERSION
                     >= javassist.bytecode.ClassFile.JAVA_9;
     }
-    public JvstTest(String name) {
-         super(name);
-    }
 
     public void testConfig() {
         // is the value of PATH correct?
index 5d01961d7346d2b2c1f09f83bcebb4b9df662efa..334282d56f31c547c3a15b462bdb37c8c8b40a3f 100644 (file)
@@ -14,9 +14,6 @@ import test2.DefineClassCapability;
 @SuppressWarnings({"rawtypes","unused"})
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class JvstTest2 extends JvstTestRoot {
-    public JvstTest2(String name) {
-         super(name);
-    }
 
     public void testInsertAt() throws Exception {
         CtClass cc = sloader.get("test2.InsertAt");
index c065170c770ee6441a6a357aa39c310ad8c00a51..2f9ffcd549c4bd6adac63f33b396470e61645130 100644 (file)
@@ -7,9 +7,6 @@ import test3.*;
 
 @SuppressWarnings({"rawtypes","unchecked","unused"})
 public class JvstTest3 extends JvstTestRoot {
-    public JvstTest3(String name) {
-         super(name);
-    }
 
     public void testAnnotation() throws Exception {
         CtClass cc = sloader.get("test3.AnnoTest");
index 259451b9935aea5e9fb38e70c34d5255a3127d65..e00c332a3ed08c1191ec70d24d567b994043f64f 100644 (file)
@@ -16,9 +16,6 @@ import javassist.expr.*;
 @SuppressWarnings({"rawtypes","unchecked","unused"})
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class JvstTest4 extends JvstTestRoot {
-    public JvstTest4(String name) {
-        super(name);
-    }
 
     public void testInsertLocalVars() throws Exception {
         CtClass cc = sloader.get("test4.LocalVars");
index 561181c3beb354481c2dc92b93ad8c1d69dd9444..dce27ab13d7b72bf84a635aa3c0d8a186eec1efa 100644 (file)
@@ -25,9 +25,6 @@ import junit.framework.Assert;
 
 @SuppressWarnings({"rawtypes","unchecked","unused"})
 public class JvstTest5 extends JvstTestRoot {
-    public JvstTest5(String name) {
-        super(name);
-    }
 
     public void testDollarClassInStaticMethod() throws Exception {
         CtClass cc = sloader.makeClass("test5.DollarClass");
index 69f4a6ae5c26e55e97eab13672c42ef044eb1beb..923af666fa94d914332effbaf9e431ed3d49a14e 100644 (file)
@@ -13,10 +13,6 @@ public class JvstTestRoot extends TestCase {
     ClassPool sloader, dloader;
     Loader cloader;
 
-    public JvstTestRoot(String name) {
-        super(name);
-    }
-
     protected void print(String msg) {
         System.out.println(msg);
     }
index 425f12d7d5e9be7f7b8da001ce9603b039bd1a5f..9e94e593b2731262c7b5234e21ef2c14b8a8c38d 100644 (file)
@@ -159,9 +159,6 @@ final class Gap0Example2 {
 
 @SuppressWarnings({"rawtypes","unchecked","unused"})
 public final class InsertGap0 extends JvstTestRoot {
-    public InsertGap0(String name) {
-        super(name);
-    }
 
     public void testExample() throws Throwable {
         ClassPool pool = ClassPool.getDefault();