-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
bugjava8Issues related to making Java 8 the minimum supported versionIssues related to making Java 8 the minimum supported version
Description
Gson fails to build with Java 21, for two reasons:
-
The source/target level 7 is no longer supported:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project gson: Fatal error compiling: error: release version 7 not supported -> [Help 1] -
If the level is changed to 8, compiler warnings appear and break the build:
[INFO] ------------------------------------------------------------- [WARNING] COMPILATION WARNING : [INFO] ------------------------------------------------------------- [WARNING] gson/src/main/java/com/google/gson/internal/$Gson$Types.java:[500,24] non-transient instance field of a serializable class declared with a non-serializable type [WARNING] gson/src/main/java/com/google/gson/internal/$Gson$Types.java:[501,24] non-transient instance field of a serializable class declared with a non-serializable type [WARNING] gson/src/main/java/com/google/gson/internal/$Gson$Types.java:[502,26] non-transient instance field of a serializable class declared with an array having a non-serializable base component type java.lang.reflect.Type [WARNING] gson/src/main/java/com/google/gson/internal/$Gson$Types.java:[567,24] non-transient instance field of a serializable class declared with a non-serializable type [WARNING] gson/src/main/java/com/google/gson/internal/$Gson$Types.java:[601,24] non-transient instance field of a serializable class declared with a non-serializable type [WARNING] gson/src/main/java/com/google/gson/internal/$Gson$Types.java:[602,24] non-transient instance field of a serializable class declared with a non-serializable type [INFO] 6 warnings [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] gson/src/main/java/com/google/gson/internal/$Gson$Types.java: warnings found and -Werror specified [INFO] 1 error [INFO] -------------------------------------------------------------
Abhinavrajsrivastav
Metadata
Metadata
Assignees
Labels
bugjava8Issues related to making Java 8 the minimum supported versionIssues related to making Java 8 the minimum supported version