mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Make the build JDK 22-compatible (#1277)
And verify the build with JDK 22.0.2.
This commit is contained in:
committed by
GitHub
parent
363b0c22c7
commit
fdf9bb5d25
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ]
|
os: [ ubuntu-22.04 ]
|
||||||
jdk: [ 17.0.10, 21.0.2 ]
|
jdk: [ 17.0.10, 21.0.2, 22.0.2 ]
|
||||||
distribution: [ temurin ]
|
distribution: [ temurin ]
|
||||||
experimental: [ false ]
|
experimental: [ false ]
|
||||||
include:
|
include:
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import com.sun.tools.javac.code.Symbol.ClassSymbol;
|
|||||||
import com.sun.tools.javac.code.Symbol.PackageSymbol;
|
import com.sun.tools.javac.code.Symbol.PackageSymbol;
|
||||||
import com.sun.tools.javac.main.JavaCompiler;
|
import com.sun.tools.javac.main.JavaCompiler;
|
||||||
import com.sun.tools.javac.util.Context;
|
import com.sun.tools.javac.util.Context;
|
||||||
import com.sun.tools.javac.util.Name;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectOutput;
|
import java.io.ObjectOutput;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
@@ -137,10 +136,10 @@ final class RefasterRuleCompilerTaskListener implements TaskListener {
|
|||||||
return enclosingPackage == null ? "" : enclosingPackage.toString();
|
return enclosingPackage == null ? "" : enclosingPackage.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CharSequence toSimpleFlatName(ClassSymbol symbol) {
|
private static String toSimpleFlatName(ClassSymbol symbol) {
|
||||||
Name flatName = symbol.flatName();
|
String flatName = symbol.flatName().toString();
|
||||||
int lastDot = flatName.lastIndexOf((byte) '.');
|
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)
|
private static void outputCodeTransformer(CodeTransformer codeTransformer, FileObject target)
|
||||||
|
|||||||
Reference in New Issue
Block a user