Follow-up for record test build changes (#2207)

This commit is contained in:
Marcono1234 2022-09-28 08:02:15 +02:00 committed by GitHub
parent 441406cc78
commit 5253ddbde0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 5 deletions

View File

@ -247,7 +247,6 @@
<properties> <properties>
<maven.compiler.testRelease>17</maven.compiler.testRelease> <maven.compiler.testRelease>17</maven.compiler.testRelease>
<excludeTestCompilation></excludeTestCompilation> <excludeTestCompilation></excludeTestCompilation>
<extraLintSuppressions>,-exports,-missing-explicit-ctor,-removal</extraLintSuppressions>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>

View File

@ -118,6 +118,9 @@ import java.io.Writer;
// //
public abstract class TypeAdapter<T> { public abstract class TypeAdapter<T> {
public TypeAdapter() {
}
/** /**
* Writes one JSON value (an array, object, string, number, boolean or null) * Writes one JSON value (an array, object, string, number, boolean or null)
* for {@code value}. * for {@code value}.

View File

@ -27,7 +27,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4; import org.junit.runners.JUnit4;
@RunWith(JUnit4.class) @RunWith(JUnit4.class)
@Ignore @Ignore // Disabled until record support is added
public final class Java17RecordTest { public final class Java17RecordTest {
private final Gson gson = new Gson(); private final Gson gson = new Gson();

View File

@ -37,7 +37,7 @@ public class ReflectionAccessTest {
} }
@Test @Test
@SuppressWarnings("removal") // java.lang.SecurityManager @SuppressWarnings("removal") // java.lang.SecurityManager deprecation in Java 17
public void testRestrictiveSecurityManager() throws Exception { public void testRestrictiveSecurityManager() throws Exception {
// Must use separate class loader, otherwise permission is not checked, see Class.getDeclaredFields() // Must use separate class loader, otherwise permission is not checked, see Class.getDeclaredFields()
Class<?> clazz = loadClassWithDifferentClassLoader(ClassWithPrivateMembers.class); Class<?> clazz = loadClassWithDifferentClassLoader(ClassWithPrivateMembers.class);

View File

@ -22,7 +22,6 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>7</maven.compiler.release> <maven.compiler.release>7</maven.compiler.release>
<extraLintSuppressions></extraLintSuppressions>
</properties> </properties>
<scm> <scm>
@ -77,7 +76,7 @@
<compilerArgs> <compilerArgs>
<!-- Enable all warnings, except for ones which cause issues when building with newer JDKs, see also <!-- Enable all warnings, except for ones which cause issues when building with newer JDKs, see also
https://docs.oracle.com/en/java/javase/11/tools/javac.html --> https://docs.oracle.com/en/java/javase/11/tools/javac.html -->
<compilerArg>-Xlint:all,-options${extraLintSuppressions}</compilerArg> <compilerArg>-Xlint:all,-options</compilerArg>
</compilerArgs> </compilerArgs>
<jdkToolchain> <jdkToolchain>
<version>[11,)</version> <version>[11,)</version>
@ -92,6 +91,8 @@
<jdkToolchain> <jdkToolchain>
<version>[11,)</version> <version>[11,)</version>
</jdkToolchain> </jdkToolchain>
<!-- Specify newer JDK as target to allow linking to newer Java API, and to generate
module overview in Javadoc for Gson's module descriptor -->
<release>11</release> <release>11</release>
<!-- Exclude `missing` group because some tags have been omitted when they are redundant --> <!-- Exclude `missing` group because some tags have been omitted when they are redundant -->
<doclint>all,-missing</doclint> <doclint>all,-missing</doclint>