Compile to Java 17 bytecode (#2304)

Also fix a linter warning.
This commit is contained in:
Lai Jiang 2024-01-25 18:29:07 -05:00 committed by GitHub
parent 58ec0f826d
commit c0ac9bdba4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 15 deletions

View file

@ -33,7 +33,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '11' java-version: '17'
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View file

@ -382,16 +382,8 @@ subprojects {
apply from: "${rootDir.path}/java_common.gradle" apply from: "${rootDir.path}/java_common.gradle"
if (!rootProject.enableCrossReferencing.toBoolean()) { sourceCompatibility = JavaVersion.VERSION_17
compileJava { targetCompatibility = JavaVersion.VERSION_17
// TODO: Remove this once we migrate off of AppEngine.
options.release = 8
}
compileTestJava {
// TODO: Remove this once we migrate off of AppEngine.
options.release = 8
}
}
project.tasks.test.dependsOn runPresubmits project.tasks.test.dependsOn runPresubmits

View file

@ -87,7 +87,7 @@ PRESUBMITS = {
PresubmitCheck( PresubmitCheck(
r".*Copyright 20\d{2} The Nomulus Authors\. All Rights Reserved\.", r".*Copyright 20\d{2} The Nomulus Authors\. All Rights Reserved\.",
("java", "js", "soy", "sql", "py", "sh", "gradle", "ts"), { ("java", "js", "soy", "sql", "py", "sh", "gradle", "ts"), {
".git", "/build/", "/generated/", "/generated_tests/", ".git", "/build/", "/bin/generated-sources/", "/bin/generated-test-sources/",
"node_modules/", "LoggerConfig.java", "registrar_bin.", "node_modules/", "LoggerConfig.java", "registrar_bin.",
"registrar_dbg.", "google-java-format-diff.py", "registrar_dbg.", "google-java-format-diff.py",
"nomulus.golden.sql", "soyutils_usegoog.js", "javascript/checks.js" "nomulus.golden.sql", "soyutils_usegoog.js", "javascript/checks.js"

View file

@ -48,6 +48,10 @@ import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class) @ExtendWith(MockitoExtension.class)
public class UploadBsaUnavailableDomainsActionTest { public class UploadBsaUnavailableDomainsActionTest {
private static final String BUCKET = "domain-registry-bsa";
private static final String API_URL = "https://upload.test/bsa";
private final FakeClock clock = new FakeClock(DateTime.parse("2024-02-02T02:02:02Z")); private final FakeClock clock = new FakeClock(DateTime.parse("2024-02-02T02:02:02Z"));
@RegisterExtension @RegisterExtension
@ -62,9 +66,7 @@ public class UploadBsaUnavailableDomainsActionTest {
private final GcsUtils gcsUtils = new GcsUtils(LocalStorageHelper.getOptions()); private final GcsUtils gcsUtils = new GcsUtils(LocalStorageHelper.getOptions());
private final String BUCKET = "domain-registry-bsa";
private final String API_URL = "https://upload.test/bsa";
private final FakeResponse response = new FakeResponse(); private final FakeResponse response = new FakeResponse();

View file

@ -50,7 +50,7 @@ import javax.persistence.Converter;
/** Processor to generate {@link AttributeConverter} for {@code VKey} type. */ /** Processor to generate {@link AttributeConverter} for {@code VKey} type. */
@SupportedAnnotationTypes("google.registry.persistence.WithVKey") @SupportedAnnotationTypes("google.registry.persistence.WithVKey")
@SupportedSourceVersion(SourceVersion.RELEASE_8) @SupportedSourceVersion(SourceVersion.RELEASE_17)
public class VKeyProcessor extends AbstractProcessor { public class VKeyProcessor extends AbstractProcessor {
private static final String CONVERTER_CLASS_NAME_TEMP = "VKeyConverter_%s"; private static final String CONVERTER_CLASS_NAME_TEMP = "VKeyConverter_%s";