Browse Source

Minimal changes make IDEA 2023.2 work out-of-box

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.
tags/rel_3_30_0_ga
shifujun 5 months ago
parent
commit
9dbf9e030b

+ 2
- 2
pom.xml View File

<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version> <version>3.2</version>
<configuration> <configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
<testSource>11</testSource> <testSource>11</testSource>
<testTarget>11</testTarget> <testTarget>11</testTarget>
<testCompilerArgument>-parameters</testCompilerArgument> <testCompilerArgument>-parameters</testCompilerArgument>

+ 0
- 3
src/test/javassist/Bench.java View File

import javassist.compiler.*; import javassist.compiler.*;


public class Bench extends JvstTestRoot { public class Bench extends JvstTestRoot {
public Bench(String name) {
super(name);
}


public void testProceed() throws Exception { public void testProceed() throws Exception {
CtClass cc = sloader.get("test.BenchProceed"); CtClass cc = sloader.get("test.BenchProceed");

+ 0
- 3
src/test/javassist/JvstTest.java View File

java9 = javassist.bytecode.ClassFile.MAJOR_VERSION java9 = javassist.bytecode.ClassFile.MAJOR_VERSION
>= javassist.bytecode.ClassFile.JAVA_9; >= javassist.bytecode.ClassFile.JAVA_9;
} }
public JvstTest(String name) {
super(name);
}


public void testConfig() { public void testConfig() {
// is the value of PATH correct? // is the value of PATH correct?

+ 0
- 3
src/test/javassist/JvstTest2.java View File

@SuppressWarnings({"rawtypes","unused"}) @SuppressWarnings({"rawtypes","unused"})
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class JvstTest2 extends JvstTestRoot { public class JvstTest2 extends JvstTestRoot {
public JvstTest2(String name) {
super(name);
}


public void testInsertAt() throws Exception { public void testInsertAt() throws Exception {
CtClass cc = sloader.get("test2.InsertAt"); CtClass cc = sloader.get("test2.InsertAt");

+ 0
- 3
src/test/javassist/JvstTest3.java View File



@SuppressWarnings({"rawtypes","unchecked","unused"}) @SuppressWarnings({"rawtypes","unchecked","unused"})
public class JvstTest3 extends JvstTestRoot { public class JvstTest3 extends JvstTestRoot {
public JvstTest3(String name) {
super(name);
}


public void testAnnotation() throws Exception { public void testAnnotation() throws Exception {
CtClass cc = sloader.get("test3.AnnoTest"); CtClass cc = sloader.get("test3.AnnoTest");

+ 0
- 3
src/test/javassist/JvstTest4.java View File

@SuppressWarnings({"rawtypes","unchecked","unused"}) @SuppressWarnings({"rawtypes","unchecked","unused"})
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class JvstTest4 extends JvstTestRoot { public class JvstTest4 extends JvstTestRoot {
public JvstTest4(String name) {
super(name);
}


public void testInsertLocalVars() throws Exception { public void testInsertLocalVars() throws Exception {
CtClass cc = sloader.get("test4.LocalVars"); CtClass cc = sloader.get("test4.LocalVars");

+ 0
- 3
src/test/javassist/JvstTest5.java View File



@SuppressWarnings({"rawtypes","unchecked","unused"}) @SuppressWarnings({"rawtypes","unchecked","unused"})
public class JvstTest5 extends JvstTestRoot { public class JvstTest5 extends JvstTestRoot {
public JvstTest5(String name) {
super(name);
}


public void testDollarClassInStaticMethod() throws Exception { public void testDollarClassInStaticMethod() throws Exception {
CtClass cc = sloader.makeClass("test5.DollarClass"); CtClass cc = sloader.makeClass("test5.DollarClass");

+ 0
- 4
src/test/javassist/JvstTestRoot.java View File

ClassPool sloader, dloader; ClassPool sloader, dloader;
Loader cloader; Loader cloader;


public JvstTestRoot(String name) {
super(name);
}

protected void print(String msg) { protected void print(String msg) {
System.out.println(msg); System.out.println(msg);
} }

+ 0
- 3
src/test/javassist/bytecode/InsertGap0.java View File



@SuppressWarnings({"rawtypes","unchecked","unused"}) @SuppressWarnings({"rawtypes","unchecked","unused"})
public final class InsertGap0 extends JvstTestRoot { public final class InsertGap0 extends JvstTestRoot {
public InsertGap0(String name) {
super(name);
}


public void testExample() throws Throwable { public void testExample() throws Throwable {
ClassPool pool = ClassPool.getDefault(); ClassPool pool = ClassPool.getDefault();

Loading…
Cancel
Save