Skip to content

Commit b3321ed

Browse files
committed
[#121] Increase baseline JDK for normal build to Java 11
1 parent 528496f commit b3321ed

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

jOOR/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-compiler-plugin</artifactId>
43-
<version>3.8.0</version>
43+
<version>3.10.1</version>
4444
<configuration>
4545
<fork>true</fork>
4646
<maxmem>512m</maxmem>
4747
<meminitial>256m</meminitial>
4848
<encoding>UTF-8</encoding>
4949

50-
<!-- [java-9] -->
51-
<release>9</release>
52-
<!-- [/java-9] -->
50+
<!-- [java-11] -->
51+
<release>11</release>
52+
<!-- [/java-11] -->
5353

54-
<source>9</source>
55-
<target>9</target>
54+
<source>11</source>
55+
<target>11</target>
5656
<debug>true</debug>
5757
<debuglevel>lines,vars,source</debuglevel>
5858
</configuration>

jOOR/src/main/java/module-info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/* [java-9] */
1+
/* [java-11] */
22
module org.jooq.joor {
33
requires static transitive java.compiler;
44

55
exports org.joor;
66
}
7-
/* [/java-9] */
7+
/* [/java-11] */

jOOR/src/main/java/org/joor/Compile.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static Class<?> compile(String className, String content, CompileOptions compile
112112
result = fileManager.loadAndReturnMainClass(className,
113113
(name, bytes) -> Reflect.on(cl).call("defineClass", name, bytes, 0, bytes.length).get());
114114
}
115-
/* [java-9] */
115+
/* [java-11] */
116116

117117
// Lookup.defineClass() has only been introduced in Java 9. It is
118118
// required to get private-access to interfaces in the class hierarchy
@@ -151,7 +151,7 @@ static Class<?> compile(String className, String content, CompileOptions compile
151151
(name, bytes) -> c.loadClass(name));
152152
}
153153
}
154-
/* [/java-9] */
154+
/* [/java-11] */
155155

156156
return result;
157157
}
@@ -164,7 +164,7 @@ static Class<?> compile(String className, String content, CompileOptions compile
164164
}
165165
}
166166

167-
/* [java-9] */
167+
/* [java-11] */
168168
static final class ByteArrayClassLoader extends ClassLoader {
169169
private final Map<String, byte[]> classes;
170170

@@ -184,7 +184,7 @@ protected Class<?> findClass(String name) throws ClassNotFoundException {
184184
return defineClass(name, bytes, 0, bytes.length);
185185
}
186186
}
187-
/* [/java-9] */
187+
/* [/java-11] */
188188

189189
static final class JavaFileObject extends SimpleJavaFileObject {
190190
final ByteArrayOutputStream os = new ByteArrayOutputStream();

jOOR/src/main/java/org/joor/Reflect.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,11 @@ public static <T extends AccessibleObject> T accessible(T accessible) {
291291
static {
292292
Constructor<MethodHandles.Lookup> result;
293293

294-
/* [java-9] */
294+
/* [java-11] */
295295
if (true)
296296
result = null;
297297
else
298-
/* [/java-9] */
298+
/* [/java-11] */
299299
try {
300300
try {
301301
Optional.class.getMethod("stream");
@@ -781,11 +781,11 @@ else if (length == 1 && name.startsWith("set")) {
781781
// Java 9 version
782782
if (CACHED_LOOKUP_CONSTRUCTOR == null) {
783783

784-
/* [java-9] */
784+
/* [java-11] */
785785
proxyLookup = MethodHandles
786786
.privateLookupIn(proxyType, MethodHandles.lookup())
787787
.in(proxyType);
788-
/* [/java-9] */
788+
/* [/java-11] */
789789

790790
// Java 9 version for Java 8 distribution (jOOQ Open Source Edition)
791791
if (proxyLookup == null)

jOOR/src/test/java/org/joor/test/CompileTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void testCompileWithClasspathDependency() throws Exception {
4747
assertEquals(new ArrayList<Object>(), v.validateTestClass(null));
4848
}
4949

50-
@Test /* [java-9] */ (expected = Throwable.class) // [#77] /* [/java-9] */
50+
@Test /* [java-11] */ (expected = Throwable.class) // [#77] /* [/java-11] */
5151
public void testCompileLocalInterfaceHierarchy() throws Exception {
5252
I i = Reflect.compile("org.joor.test.CompileTest1", "package org.joor.test; public class CompileTest1 implements org.joor.test.I {}").create().get();
5353
assertEquals("I.m()", i.m());
@@ -86,7 +86,7 @@ public void testCompileDifferentPackage() {
8686
assertEquals("Hello World!", supplier.get());
8787
}
8888

89-
@Test/* [java-9] */ (expected = Throwable.class) // [#76] /* [/java-9] */
89+
@Test/* [java-11] */ (expected = Throwable.class) // [#76] /* [/java-11] */
9090
public void testRecompileSameClassName() {
9191

9292
// The class loader will cache the class name by default, so a new content shouldn't affect the type
@@ -201,7 +201,7 @@ public void testClassLoadingOrder2() {
201201
assertEquals("p.B", d.getSuperclass().getName());
202202
}
203203

204-
/* [java-9] */
204+
/* [java-11] */
205205

206206
// This test seems to fail in Java 8. p.B doesn't correctly extend p.C
207207
@Test
@@ -224,7 +224,7 @@ public void testClassLoadingOrder3() {
224224
assertEquals("p.E", c.getInterfaces()[0].getInterfaces()[0].getName());
225225
}
226226

227-
/* [/java-9] */
227+
/* [/java-11] */
228228
}
229229

230230
interface I extends J {

jOOR/src/test/java/org/joor/test/ReflectTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*/
5656
public class ReflectTest {
5757

58-
static final boolean JDK9 = false /* [java-9] */ || true /* [/java-9] */;
58+
static final boolean JDK9 = false /* [java-11] */ || true /* [/java-11] */;
5959

6060
@Rule
6161
public final ExpectedException expectedException = ExpectedException.none();

0 commit comments

Comments
 (0)