Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up for record test build changes #2207

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion gson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@
<properties>
<maven.compiler.testRelease>17</maven.compiler.testRelease>
<excludeTestCompilation></excludeTestCompilation>
<extraLintSuppressions>,-exports,-missing-explicit-ctor,-removal</extraLintSuppressions>
</properties>
</profile>
</profiles>
Expand Down
3 changes: 3 additions & 0 deletions gson/src/main/java/com/google/gson/TypeAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
//
public abstract class TypeAdapter<T> {

public TypeAdapter() {
}

/**
* Writes one JSON value (an array, object, string, number, boolean or null)
* for {@code value}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
@Ignore
@Ignore // Disabled until record support is added
public final class Java17RecordTest {
private final Gson gson = new Gson();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static Class<?> loadClassWithDifferentClassLoader(Class<?> c) throws Exc
}

@Test
@SuppressWarnings("removal") // java.lang.SecurityManager
@SuppressWarnings("removal") // java.lang.SecurityManager deprecation in Java 17
public void testRestrictiveSecurityManager() throws Exception {
// Must use separate class loader, otherwise permission is not checked, see Class.getDeclaredFields()
Class<?> clazz = loadClassWithDifferentClassLoader(ClassWithPrivateMembers.class);
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>7</maven.compiler.release>
<extraLintSuppressions></extraLintSuppressions>
</properties>

<scm>
Expand Down Expand Up @@ -77,7 +76,7 @@
<compilerArgs>
<!-- 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 -->
<compilerArg>-Xlint:all,-options${extraLintSuppressions}</compilerArg>
<compilerArg>-Xlint:all,-options</compilerArg>
</compilerArgs>
<jdkToolchain>
<version>[11,)</version>
Expand All @@ -92,6 +91,8 @@
<jdkToolchain>
<version>[11,)</version>
</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>
<!-- Exclude `missing` group because some tags have been omitted when they are redundant -->
<doclint>all,-missing</doclint>
Expand Down