Skip to content

Commit

Permalink
Give up on -source 1.7 in order to run on JDK 21 easily
Browse files Browse the repository at this point in the history
  • Loading branch information
jtulach committed Dec 31, 2024
1 parent 30331ae commit 37a6fb8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '8', '11', '17', '21' ]
os: [ ubuntu-20.04 ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '8', '11', '17', '21' ]
os: [ macos-10.15 ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '8', '11', '17', '21' ]
os: [ windows-2019 ]

steps:
Expand Down
4 changes: 2 additions & 2 deletions boot/src/test/java/org/netbeans/html/boot/impl/Compile.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private Compile(String html, String code, String sl) throws IOException {
/** Performs compilation of given HTML page and associated Java code
*/
public static Compile create(String html, String code) throws IOException {
return create(html, code, "1.7");
return create(html, code, "8");
}
static Compile create(String html, String code, String sourceLevel) throws IOException {
return new Compile(html, code, sourceLevel);
Expand Down Expand Up @@ -210,7 +210,7 @@ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOExcept
}
};

ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", "1.7"), null, Arrays.asList(file)).call();
ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", sourceLevel), null, Arrays.asList(file)).call();

Map<String, byte[]> result = new HashMap<>();

Expand Down
4 changes: 2 additions & 2 deletions geo/src/test/java/org/netbeans/html/geo/impl/Compile.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private Compile(String html, String code, String sl) throws IOException {
/** Performs compilation of given HTML page and associated Java code
*/
public static Compile create(String html, String code) throws IOException {
return create(html, code, "1.7");
return create(html, code, "8");
}
static Compile create(String html, String code, String sourceLevel) throws IOException {
return new Compile(html, code, sourceLevel);
Expand Down Expand Up @@ -202,7 +202,7 @@ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOExcept
}
};

ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", "1.7"), null, Arrays.asList(file)).call();
ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", sourceLevel), null, Arrays.asList(file)).call();

Map<String, byte[]> result = new HashMap<String, byte[]>();

Expand Down
4 changes: 2 additions & 2 deletions json/src/test/java/net/java/html/json/Compile.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private Compile(String html, String code, String sl) throws IOException {
/** Performs compilation of given HTML page and associated Java code
*/
public static Compile create(String html, String code) throws IOException {
return create(html, code, "1.7");
return create(html, code, "8");
}
static Compile create(String html, String code, String sourceLevel) throws IOException {
return new Compile(html, code, sourceLevel);
Expand Down Expand Up @@ -225,7 +225,7 @@ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOExcept
}
};

ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", "1.7"), null, Arrays.asList(file)).call();
ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", sourceLevel), null, Arrays.asList(file)).call();

Map<String, byte[]> result = new HashMap<String, byte[]>();

Expand Down

0 comments on commit 37a6fb8

Please sign in to comment.