Skip to content

Commit

Permalink
Make the build JDK 22-compatible
Browse files Browse the repository at this point in the history
And verify the build with JDK 22.0.2.
  • Loading branch information
Stephan202 committed Aug 10, 2024
1 parent 363b0c2 commit 26d0aeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-22.04 ]
jdk: [ 17.0.10, 21.0.2 ]
jdk: [ 17.0.10, 21.0.2, 22.0.2 ]
distribution: [ temurin ]
experimental: [ false ]
include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.sun.tools.javac.code.Symbol.PackageSymbol;
import com.sun.tools.javac.main.JavaCompiler;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.Name;
import java.io.IOException;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
Expand Down Expand Up @@ -137,10 +136,10 @@ private static String toPackageName(ClassSymbol symbol) {
return enclosingPackage == null ? "" : enclosingPackage.toString();
}

private static CharSequence toSimpleFlatName(ClassSymbol symbol) {
Name flatName = symbol.flatName();
private static String toSimpleFlatName(ClassSymbol symbol) {
String flatName = symbol.flatName().toString();
int lastDot = flatName.lastIndexOf((byte) '.');
return lastDot < 0 ? flatName : flatName.subSequence(lastDot + 1, flatName.length());
return lastDot < 0 ? flatName : flatName.substring(lastDot + 1);
}

private static void outputCodeTransformer(CodeTransformer codeTransformer, FileObject target)
Expand Down

0 comments on commit 26d0aeb

Please sign in to comment.