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

gson-2.10.1 failed with jdk:21 (test phase): "Tests run: 1231, Failures: 8" #2530

Closed
4 tasks
vaukai opened this issue Nov 6, 2023 · 7 comments
Closed
4 tasks

Comments

@vaukai
Copy link

vaukai commented Nov 6, 2023

Downstream bug report: https://bugs.gentoo.org/916491

�[32m * �[39;49;00mPackage:    dev-java/gson-2.10.1:2.6
�[32m * �[39;49;00mRepository: gentoo
�[32m * �[39;49;00mMaintainer: java@gentoo.org
�[32m * �[39;49;00mUSE:        abi_x86_64 amd64 doc elibc_glibc kernel_linux source test
�[32m * �[39;49;00mFEATURES:   network-sandbox preserve-libs sandbox test userpriv usersandbox
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-pkg-2.eclass
debug: inherit: java-pkg-2 -> /var/db/repos/gentoo/eclass/java-pkg-2.eclass
debug: *** Multiple Inheritance (Level: 2)
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: inherit: java-utils-2 -> /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: EXPORT_FUNCTIONS: pkg_setup -> java-pkg-2_pkg_setup
debug: EXPORT_FUNCTIONS: src_prepare -> java-pkg-2_src_prepare
debug: EXPORT_FUNCTIONS: src_compile -> java-pkg-2_src_compile
debug: EXPORT_FUNCTIONS: pkg_preinst -> java-pkg-2_pkg_preinst
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-pkg-simple.eclass
debug: inherit: java-pkg-simple -> /var/db/repos/gentoo/eclass/java-pkg-simple.eclass
debug: *** Multiple Inheritance (Level: 2)
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: inherit: java-utils-2 -> /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: EXPORT_FUNCTIONS: src_compile -> java-pkg-simple_src_compile
debug: EXPORT_FUNCTIONS: src_install -> java-pkg-simple_src_install
debug: EXPORT_FUNCTIONS: src_test -> java-pkg-simple_src_test
debug: java-pkg_init: entering function, parameters: 
debug: java-pkg_switch-vm: entering function, parameters: 
debug: java-pkg_needs-vm: entering function, parameters: 
debug: depend-java-query:  NV_DEPEND:	>=virtual/jdk-17:* >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) test? (  dev-java/junit:4 )
debug: Using: openjdk-21
debug: java-pkg_setup-vm: entering function, parameters: 
debug: java-pkg_get-vm-vendor: entering function, parameters: 
debug: java-pkg_javac-args: entering function, parameters: 
debug: want source: 1.8
debug: want target: 1.8
debug: java-pkg_append_: entering function, parameters: LD_LIBRARY_PATH /usr/lib64/openjdk-21/lib/:/usr/lib64/openjdk-21/lib/server/
 �[32m*�[0m Using: openjdk-21
>>> Unpacking source...
>>> Unpacking gson-parent-2.10.1.tar.gz to /var/tmp/portage/dev-java/gson-2.10.1/work
>>> Source unpacked in /var/tmp/portage/dev-java/gson-2.10.1/work
>>> Preparing source in /var/tmp/portage/dev-java/gson-2.10.1/work/gson-gson-parent-2.10.1/gson ...
Searching for bundled jars:
None found.
Searching for bundled classes (no output if none found):
Search done.
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-java/gson-2.10.1/work/gson-gson-parent-2.10.1/gson ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-java/gson-2.10.1/work/gson-gson-parent-2.10.1/gson ...
debug: java-pkg_gen-cp: entering function, parameters: JAVA_GENTOO_CLASSPATH
debug: java-pkg-simple_getclasspath: entering function, parameters: 
debug: java-pkg_getjars: entering function, parameters: --build-only --with-dependencies junit-4
debug: junit-4:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar
debug: java-pkg_ensure-dep: entering function, parameters: build junit-4
debug: Matching against: /junit(-4(-[^:]+)?:0|(-[^:]+)?:4)\b
debug: java-pkg_record-jar_: entering function, parameters: --build-only junit-4
debug: CLASSPATH=/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar
debug: java-pkg-simple_prepend_resources: entering function, parameters: target/classes
debug: ejavac: entering function, parameters: -d target/classes -encoding UTF-8 -classpath /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar @sources.lst
debug: java-pkg_get-javac: entering function, parameters: 
debug: java-pkg_init-compiler_: entering function, parameters: 
debug: Read "" from /etc/java-config-2/build/compilers.conf
debug: java-pkg_javac-args: entering function, parameters: 
debug: want source: 1.8
debug: want target: 1.8
 �[32m*�[0m Verbose logging for "ejavac" function
 �[32m*�[0m Compiler executable: javac
 �[32m*�[0m Extra arguments: -source 1.8 -target 1.8
 �[32m*�[0m Complete command:
 �[32m*�[0m javac -source 1.8 -target 1.8 -d target/classes -encoding UTF-8 -classpath /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar @sources.lst
javac -source 1.8 -target 1.8 -d target/classes -encoding UTF-8 -classpath /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar @sources.lst
warning: [options] bootstrap class path not set in conjunction with -source 8
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
src/main/java/com/google/gson/internal/bind/TypeAdapters.java:44: warning: [removal] AccessController in java.security has been deprecated and marked for removal
import java.security.AccessController;
                    ^
src/main/java/com/google/gson/internal/bind/TypeAdapters.java:869: warning: [removal] AccessController in java.security has been deprecated and marked for removal
        Field[] constantFields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
                                 ^
Note: src/main/java/com/google/gson/internal/bind/TypeAdapters.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 warnings
debug: java-pkg_is-vm-version-ge: entering function, parameters: 9
debug: java-pkg_get-vm-version: entering function, parameters: 
debug: Detected a JDK(21) >= 9
debug: ejavac: entering function, parameters: -d target/classes -encoding UTF-8 --module-path /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar --module-version 2.10.1 src/main/java/module-info.java
debug: java-pkg_get-javac: entering function, parameters: 
debug: java-pkg_init-compiler_: entering function, parameters: 
debug: Read "" from /etc/java-config-2/build/compilers.conf
debug: java-pkg_javac-args: entering function, parameters: 
debug: want source: 9
debug: want target: 9
 �[32m*�[0m Verbose logging for "ejavac" function
 �[32m*�[0m Compiler executable: javac
 �[32m*�[0m Extra arguments: -source 9 -target 9
 �[32m*�[0m Complete command:
 �[32m*�[0m javac -source 9 -target 9 -d target/classes -encoding UTF-8 --module-path /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar --module-version 2.10.1 src/main/java/module-info.java
javac -source 9 -target 9 -d target/classes -encoding UTF-8 --module-path /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar --module-version 2.10.1 src/main/java/module-info.java
warning: [options] system modules path not set in conjunction with -source 9
1 warning
debug: ejavadoc: entering function, parameters: -d target/api -encoding UTF-8 -docencoding UTF-8 -charset UTF-8 -classpath /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar -quiet @sources.lst
debug: java-pkg_is-vm-version-ge: entering function, parameters: 1.8
debug: java-pkg_get-vm-version: entering function, parameters: 
debug: Detected a JDK(21) >= 1.8
 �[32m*�[0m Verbose logging for "ejavadoc" function
 �[32m*�[0m Javadoc executable: javadoc
 �[32m*�[0m Extra arguments: -Xdoclint:none
 �[32m*�[0m Complete command:
 �[32m*�[0m javadoc -Xdoclint:none -d target/api -encoding UTF-8 -docencoding UTF-8 -charset UTF-8 -classpath /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar -quiet @sources.lst
javadoc -Xdoclint:none -d target/api -encoding UTF-8 -docencoding UTF-8 -charset UTF-8 -classpath /usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar -quiet @sources.lst
>>> Source compiled.
>>> Test phase: dev-java/gson-2.10.1
debug: java-pkg-simple_getclasspath: entering function, parameters: 
debug: java-pkg_getjars: entering function, parameters: --build-only --with-dependencies junit-4
debug: junit-4:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar
debug: java-pkg_ensure-dep: entering function, parameters: build junit-4
debug: Matching against: /junit(-4(-[^:]+)?:0|(-[^:]+)?:4)\b
debug: java-pkg_record-jar_: entering function, parameters: --build-only junit-4
debug: CLASSPATH=target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar
debug: java-pkg-simple_prepend_resources: entering function, parameters: target/test-classes src/test/resources
debug: ejavac: entering function, parameters: -d target/test-classes -encoding UTF-8 -classpath target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar @test_sources.lst
debug: java-pkg_get-javac: entering function, parameters: 
debug: java-pkg_init-compiler_: entering function, parameters: 
debug: Read "" from /etc/java-config-2/build/compilers.conf
debug: java-pkg_javac-args: entering function, parameters: 
debug: want source: 1.8
debug: want target: 1.8
 �[32m*�[0m Verbose logging for "ejavac" function
 �[32m*�[0m Compiler executable: javac
 �[32m*�[0m Extra arguments: -source 1.8 -target 1.8
 �[32m*�[0m Complete command:
 �[32m*�[0m javac -source 1.8 -target 1.8 -d target/test-classes -encoding UTF-8 -classpath target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar @test_sources.lst
javac -source 1.8 -target 1.8 -d target/test-classes -encoding UTF-8 -classpath target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar @test_sources.lst
warning: [options] bootstrap class path not set in conjunction with -source 8
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 warnings
debug: ejunit4: entering function, parameters: -classpath target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar com.google.gson.CommentsTest com.google.gson.DefaultInetAddressTypeAdapterTest com.google.gson.DefaultMapJsonSerializerTest com.google.gson.ExposeAnnotationExclusionStrategyTest com.google.gson.FieldAttributesTest com.google.gson.FieldNamingPolicyTest com.google.gson.GenericArrayTypeTest com.google.gson.GsonBuilderTest com.google.gson.GsonTest com.google.gson.GsonTypeAdapterTest com.google.gson.InnerClassExclusionStrategyTest com.google.gson.JavaSerializationTest com.google.gson.JsonArrayAsListTest com.google.gson.JsonArrayTest com.google.gson.JsonNullTest com.google.gson.JsonObjectAsMapTest com.google.gson.JsonObjectTest com.google.gson.JsonParserParameterizedTest com.google.gson.JsonParserTest com.google.gson.JsonPrimitiveTest com.google.gson.JsonStreamParserTest com.google.gson.LongSerializationPolicyTest com.google.gson.MixedStreamTest com.google.gson.ObjectTypeAdapterParameterizedTest com.google.gson.ObjectTypeAdapterTest com.google.gson.OverrideCoreTypeAdaptersTest com.google.gson.ParameterizedTypeTest com.google.gson.ToNumberPolicyTest com.google.gson.TypeAdapterTest com.google.gson.VersionExclusionStrategyTest com.google.gson.functional.ArrayTest com.google.gson.functional.CircularReferenceTest com.google.gson.functional.CollectionTest com.google.gson.functional.ConcurrencyTest com.google.gson.functional.CustomDeserializerTest com.google.gson.functional.CustomSerializerTest com.google.gson.functional.CustomTypeAdaptersTest com.google.gson.functional.DefaultTypeAdaptersTest com.google.gson.functional.DelegateTypeAdapterTest com.google.gson.functional.EnumTest com.google.gson.functional.EscapingTest com.google.gson.functional.ExclusionStrategyFunctionalTest com.google.gson.functional.ExposeFieldsTest com.google.gson.functional.FieldExclusionTest com.google.gson.functional.FieldNamingTest com.google.gson.functional.GsonVersionDiagnosticsTest com.google.gson.functional.InheritanceTest com.google.gson.functional.InstanceCreatorTest com.google.gson.functional.InterfaceTest com.google.gson.functional.InternationalizationTest com.google.gson.functional.JavaUtilConcurrentAtomicTest com.google.gson.functional.JavaUtilTest com.google.gson.functional.JsonAdapterAnnotationOnClassesTest com.google.gson.functional.JsonAdapterAnnotationOnFieldsTest com.google.gson.functional.JsonAdapterSerializerDeserializerTest com.google.gson.functional.JsonParserTest com.google.gson.functional.JsonTreeTest com.google.gson.functional.LeniencyTest com.google.gson.functional.MapAsArrayTypeAdapterTest com.google.gson.functional.MapTest com.google.gson.functional.MoreSpecificTypeSerializationTest com.google.gson.functional.NamingPolicyTest com.google.gson.functional.NullObjectAndFieldTest com.google.gson.functional.ObjectTest com.google.gson.functional.ParameterizedTypesTest com.google.gson.functional.PrettyPrintingTest com.google.gson.functional.PrimitiveCharacterTest com.google.gson.functional.PrimitiveTest com.google.gson.functional.PrintFormattingTest com.google.gson.functional.RawSerializationTest com.google.gson.functional.ReadersWritersTest com.google.gson.functional.ReflectionAccessFilterTest com.google.gson.functional.ReflectionAccessTest com.google.gson.functional.ReusedTypeVariablesFullyResolveTest com.google.gson.functional.RuntimeTypeAdapterFactoryFunctionalTest com.google.gson.functional.SecurityTest com.google.gson.functional.SerializedNameTest com.google.gson.functional.StreamingTypeAdaptersTest com.google.gson.functional.StringTest com.google.gson.functional.ToNumberPolicyFunctionalTest com.google.gson.functional.TreeTypeAdaptersTest com.google.gson.functional.TypeAdapterPrecedenceTest com.google.gson.functional.TypeAdapterRuntimeTypeWrapperTest com.google.gson.functional.TypeHierarchyAdapterTest com.google.gson.functional.TypeVariableTest com.google.gson.functional.UncategorizedTest com.google.gson.functional.VersioningTest com.google.gson.internal.ConstructorConstructorTest com.google.gson.internal.GsonBuildConfigTest com.google.gson.internal.GsonTypesTest com.google.gson.internal.JavaVersionTest com.google.gson.internal.LazilyParsedNumberTest com.google.gson.internal.LinkedTreeMapTest com.google.gson.internal.StreamsTest com.google.gson.internal.UnsafeAllocatorInstantiationTest com.google.gson.internal.bind.DefaultDateTypeAdapterTest com.google.gson.internal.bind.Java17ReflectiveTypeAdapterFactoryTest com.google.gson.internal.bind.JsonElementReaderTest com.google.gson.internal.bind.JsonTreeReaderTest com.google.gson.internal.bind.JsonTreeWriterTest com.google.gson.internal.bind.RecursiveTypesResolveTest com.google.gson.internal.bind.util.ISO8601UtilsTest com.google.gson.internal.reflect.Java17ReflectionHelperTest com.google.gson.internal.sql.SqlTypesGsonTest com.google.gson.internal.sql.SqlTypesSupportTest com.google.gson.metrics.PerformanceTest com.google.gson.reflect.TypeTokenTest com.google.gson.regression.JsonAdapterNullSafeTest com.google.gson.stream.JsonReaderPathTest com.google.gson.stream.JsonReaderTest com.google.gson.stream.JsonWriterTest
debug: ejunit_: entering function, parameters: junit-4 -classpath target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar com.google.gson.CommentsTest com.google.gson.DefaultInetAddressTypeAdapterTest com.google.gson.DefaultMapJsonSerializerTest com.google.gson.ExposeAnnotationExclusionStrategyTest com.google.gson.FieldAttributesTest com.google.gson.FieldNamingPolicyTest com.google.gson.GenericArrayTypeTest com.google.gson.GsonBuilderTest com.google.gson.GsonTest com.google.gson.GsonTypeAdapterTest com.google.gson.InnerClassExclusionStrategyTest com.google.gson.JavaSerializationTest com.google.gson.JsonArrayAsListTest com.google.gson.JsonArrayTest com.google.gson.JsonNullTest com.google.gson.JsonObjectAsMapTest com.google.gson.JsonObjectTest com.google.gson.JsonParserParameterizedTest com.google.gson.JsonParserTest com.google.gson.JsonPrimitiveTest com.google.gson.JsonStreamParserTest com.google.gson.LongSerializationPolicyTest com.google.gson.MixedStreamTest com.google.gson.ObjectTypeAdapterParameterizedTest com.google.gson.ObjectTypeAdapterTest com.google.gson.OverrideCoreTypeAdaptersTest com.google.gson.ParameterizedTypeTest com.google.gson.ToNumberPolicyTest com.google.gson.TypeAdapterTest com.google.gson.VersionExclusionStrategyTest com.google.gson.functional.ArrayTest com.google.gson.functional.CircularReferenceTest com.google.gson.functional.CollectionTest com.google.gson.functional.ConcurrencyTest com.google.gson.functional.CustomDeserializerTest com.google.gson.functional.CustomSerializerTest com.google.gson.functional.CustomTypeAdaptersTest com.google.gson.functional.DefaultTypeAdaptersTest com.google.gson.functional.DelegateTypeAdapterTest com.google.gson.functional.EnumTest com.google.gson.functional.EscapingTest com.google.gson.functional.ExclusionStrategyFunctionalTest com.google.gson.functional.ExposeFieldsTest com.google.gson.functional.FieldExclusionTest com.google.gson.functional.FieldNamingTest com.google.gson.functional.GsonVersionDiagnosticsTest com.google.gson.functional.InheritanceTest com.google.gson.functional.InstanceCreatorTest com.google.gson.functional.InterfaceTest com.google.gson.functional.InternationalizationTest com.google.gson.functional.JavaUtilConcurrentAtomicTest com.google.gson.functional.JavaUtilTest com.google.gson.functional.JsonAdapterAnnotationOnClassesTest com.google.gson.functional.JsonAdapterAnnotationOnFieldsTest com.google.gson.functional.JsonAdapterSerializerDeserializerTest com.google.gson.functional.JsonParserTest com.google.gson.functional.JsonTreeTest com.google.gson.functional.LeniencyTest com.google.gson.functional.MapAsArrayTypeAdapterTest com.google.gson.functional.MapTest com.google.gson.functional.MoreSpecificTypeSerializationTest com.google.gson.functional.NamingPolicyTest com.google.gson.functional.NullObjectAndFieldTest com.google.gson.functional.ObjectTest com.google.gson.functional.ParameterizedTypesTest com.google.gson.functional.PrettyPrintingTest com.google.gson.functional.PrimitiveCharacterTest com.google.gson.functional.PrimitiveTest com.google.gson.functional.PrintFormattingTest com.google.gson.functional.RawSerializationTest com.google.gson.functional.ReadersWritersTest com.google.gson.functional.ReflectionAccessFilterTest com.google.gson.functional.ReflectionAccessTest com.google.gson.functional.ReusedTypeVariablesFullyResolveTest com.google.gson.functional.RuntimeTypeAdapterFactoryFunctionalTest com.google.gson.functional.SecurityTest com.google.gson.functional.SerializedNameTest com.google.gson.functional.StreamingTypeAdaptersTest com.google.gson.functional.StringTest com.google.gson.functional.ToNumberPolicyFunctionalTest com.google.gson.functional.TreeTypeAdaptersTest com.google.gson.functional.TypeAdapterPrecedenceTest com.google.gson.functional.TypeAdapterRuntimeTypeWrapperTest com.google.gson.functional.TypeHierarchyAdapterTest com.google.gson.functional.TypeVariableTest com.google.gson.functional.UncategorizedTest com.google.gson.functional.VersioningTest com.google.gson.internal.ConstructorConstructorTest com.google.gson.internal.GsonBuildConfigTest com.google.gson.internal.GsonTypesTest com.google.gson.internal.JavaVersionTest com.google.gson.internal.LazilyParsedNumberTest com.google.gson.internal.LinkedTreeMapTest com.google.gson.internal.StreamsTest com.google.gson.internal.UnsafeAllocatorInstantiationTest com.google.gson.internal.bind.DefaultDateTypeAdapterTest com.google.gson.internal.bind.Java17ReflectiveTypeAdapterFactoryTest com.google.gson.internal.bind.JsonElementReaderTest com.google.gson.internal.bind.JsonTreeReaderTest com.google.gson.internal.bind.JsonTreeWriterTest com.google.gson.internal.bind.RecursiveTypesResolveTest com.google.gson.internal.bind.util.ISO8601UtilsTest com.google.gson.internal.reflect.Java17ReflectionHelperTest com.google.gson.internal.sql.SqlTypesGsonTest com.google.gson.internal.sql.SqlTypesSupportTest com.google.gson.metrics.PerformanceTest com.google.gson.reflect.TypeTokenTest com.google.gson.regression.JsonAdapterNullSafeTest com.google.gson.stream.JsonReaderPathTest com.google.gson.stream.JsonReaderTest com.google.gson.stream.JsonWriterTest
debug: java-pkg_getjars: entering function, parameters: --with-dependencies junit-4
debug: junit-4:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar
debug: java-pkg_ensure-dep: entering function, parameters: build junit-4
debug: Matching against: /junit(-4(-[^:]+)?:0|(-[^:]+)?:4)\b
debug: java-pkg_record-jar_: entering function, parameters: --build-only junit-4
debug: Calling: java -cp
debug: target/test-classes:gson.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar:/usr/share/junit-4/lib/junit.jar:/usr/share/hamcrest-core-1.3/lib/hamcrest-core.jar
debug: -Djava.io.tmpdir=/var/tmp/portage/dev-java/gson-2.10.1/temp
debug: -Djava.awt.headless=true
debug: org.junit.runner.JUnitCore
debug: com.google.gson.CommentsTest
debug: com.google.gson.DefaultInetAddressTypeAdapterTest
debug: com.google.gson.DefaultMapJsonSerializerTest
debug: com.google.gson.ExposeAnnotationExclusionStrategyTest
debug: com.google.gson.FieldAttributesTest
debug: com.google.gson.FieldNamingPolicyTest
debug: com.google.gson.GenericArrayTypeTest
debug: com.google.gson.GsonBuilderTest
debug: com.google.gson.GsonTest
debug: com.google.gson.GsonTypeAdapterTest
debug: com.google.gson.InnerClassExclusionStrategyTest
debug: com.google.gson.JavaSerializationTest
debug: com.google.gson.JsonArrayAsListTest
debug: com.google.gson.JsonArrayTest
debug: com.google.gson.JsonNullTest
debug: com.google.gson.JsonObjectAsMapTest
debug: com.google.gson.JsonObjectTest
debug: com.google.gson.JsonParserParameterizedTest
debug: com.google.gson.JsonParserTest
debug: com.google.gson.JsonPrimitiveTest
debug: com.google.gson.JsonStreamParserTest
debug: com.google.gson.LongSerializationPolicyTest
debug: com.google.gson.MixedStreamTest
debug: com.google.gson.ObjectTypeAdapterParameterizedTest
debug: com.google.gson.ObjectTypeAdapterTest
debug: com.google.gson.OverrideCoreTypeAdaptersTest
debug: com.google.gson.ParameterizedTypeTest
debug: com.google.gson.ToNumberPolicyTest
debug: com.google.gson.TypeAdapterTest
debug: com.google.gson.VersionExclusionStrategyTest
debug: com.google.gson.functional.ArrayTest
debug: com.google.gson.functional.CircularReferenceTest
debug: com.google.gson.functional.CollectionTest
debug: com.google.gson.functional.ConcurrencyTest
debug: com.google.gson.functional.CustomDeserializerTest
debug: com.google.gson.functional.CustomSerializerTest
debug: com.google.gson.functional.CustomTypeAdaptersTest
debug: com.google.gson.functional.DefaultTypeAdaptersTest
debug: com.google.gson.functional.DelegateTypeAdapterTest
debug: com.google.gson.functional.EnumTest
debug: com.google.gson.functional.EscapingTest
debug: com.google.gson.functional.ExclusionStrategyFunctionalTest
debug: com.google.gson.functional.ExposeFieldsTest
debug: com.google.gson.functional.FieldExclusionTest
debug: com.google.gson.functional.FieldNamingTest
debug: com.google.gson.functional.GsonVersionDiagnosticsTest
debug: com.google.gson.functional.InheritanceTest
debug: com.google.gson.functional.InstanceCreatorTest
debug: com.google.gson.functional.InterfaceTest
debug: com.google.gson.functional.InternationalizationTest
debug: com.google.gson.functional.JavaUtilConcurrentAtomicTest
debug: com.google.gson.functional.JavaUtilTest
debug: com.google.gson.functional.JsonAdapterAnnotationOnClassesTest
debug: com.google.gson.functional.JsonAdapterAnnotationOnFieldsTest
debug: com.google.gson.functional.JsonAdapterSerializerDeserializerTest
debug: com.google.gson.functional.JsonParserTest
debug: com.google.gson.functional.JsonTreeTest
debug: com.google.gson.functional.LeniencyTest
debug: com.google.gson.functional.MapAsArrayTypeAdapterTest
debug: com.google.gson.functional.MapTest
debug: com.google.gson.functional.MoreSpecificTypeSerializationTest
debug: com.google.gson.functional.NamingPolicyTest
debug: com.google.gson.functional.NullObjectAndFieldTest
debug: com.google.gson.functional.ObjectTest
debug: com.google.gson.functional.ParameterizedTypesTest
debug: com.google.gson.functional.PrettyPrintingTest
debug: com.google.gson.functional.PrimitiveCharacterTest
debug: com.google.gson.functional.PrimitiveTest
debug: com.google.gson.functional.PrintFormattingTest
debug: com.google.gson.functional.RawSerializationTest
debug: com.google.gson.functional.ReadersWritersTest
debug: com.google.gson.functional.ReflectionAccessFilterTest
debug: com.google.gson.functional.ReflectionAccessTest
debug: com.google.gson.functional.ReusedTypeVariablesFullyResolveTest
debug: com.google.gson.functional.RuntimeTypeAdapterFactoryFunctionalTest
debug: com.google.gson.functional.SecurityTest
debug: com.google.gson.functional.SerializedNameTest
debug: com.google.gson.functional.StreamingTypeAdaptersTest
debug: com.google.gson.functional.StringTest
debug: com.google.gson.functional.ToNumberPolicyFunctionalTest
debug: com.google.gson.functional.TreeTypeAdaptersTest
debug: com.google.gson.functional.TypeAdapterPrecedenceTest
debug: com.google.gson.functional.TypeAdapterRuntimeTypeWrapperTest
debug: com.google.gson.functional.TypeHierarchyAdapterTest
debug: com.google.gson.functional.TypeVariableTest
debug: com.google.gson.functional.UncategorizedTest
debug: com.google.gson.functional.VersioningTest
debug: com.google.gson.internal.ConstructorConstructorTest
debug: com.google.gson.internal.GsonBuildConfigTest
debug: com.google.gson.internal.GsonTypesTest
debug: com.google.gson.internal.JavaVersionTest
debug: com.google.gson.internal.LazilyParsedNumberTest
debug: com.google.gson.internal.LinkedTreeMapTest
debug: com.google.gson.internal.StreamsTest
debug: com.google.gson.internal.UnsafeAllocatorInstantiationTest
debug: com.google.gson.internal.bind.DefaultDateTypeAdapterTest
debug: com.google.gson.internal.bind.Java17ReflectiveTypeAdapterFactoryTest
debug: com.google.gson.internal.bind.JsonElementReaderTest
debug: com.google.gson.internal.bind.JsonTreeReaderTest
debug: com.google.gson.internal.bind.JsonTreeWriterTest
debug: com.google.gson.internal.bind.RecursiveTypesResolveTest
debug: com.google.gson.internal.bind.util.ISO8601UtilsTest
debug: com.google.gson.internal.reflect.Java17ReflectionHelperTest
debug: com.google.gson.internal.sql.SqlTypesGsonTest
debug: com.google.gson.internal.sql.SqlTypesSupportTest
debug: com.google.gson.metrics.PerformanceTest
debug: com.google.gson.reflect.TypeTokenTest
debug: com.google.gson.regression.JsonAdapterNullSafeTest
debug: com.google.gson.stream.JsonReaderPathTest
debug: com.google.gson.stream.JsonReaderTest
debug: com.google.gson.stream.JsonWriterTest
JUnit version 4.13.2-SNAPSHOT
........................................................................................................................................................................................................................................................................................................I.......I...............................E..E..............................................................................................................................................................I......................................................................................................................................E.................................................................................................................................................................................E..................................................................................................................................E...E..E............................................................................E..III.IIIIIIII............................................................I.................I..............................I..............................I...........................................................................
Time: 1.266
There were 8 failures:
1) testDefaultDateSerializationUsingBuilder(com.google.gson.functional.DefaultTypeAdaptersTest)
org.junit.ComparisonFailure: expected:<...p 11, 2011, 10:55:03[ ]PM"> but was:<...p 11, 2011, 10:55:03[ ]PM">
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.functional.DefaultTypeAdaptersTest.testDefaultDateSerializationUsingBuilder(DefaultTypeAdaptersTest.java:421)
2) testDefaultDateSerialization(com.google.gson.functional.DefaultTypeAdaptersTest)
org.junit.ComparisonFailure: expected:<...p 11, 2011, 10:55:03[ ]PM"> but was:<...p 11, 2011, 10:55:03[ ]PM">
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.functional.DefaultTypeAdaptersTest.testDefaultDateSerialization(DefaultTypeAdaptersTest.java:385)
3) testDateAsMapObjectField(com.google.gson.functional.ObjectTest)
org.junit.ComparisonFailure: expected:<...ec 31, 1969, 4:00:00[ ]PM"}}> but was:<...ec 31, 1969, 4:00:00[ ]PM"}}>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.functional.ObjectTest.testDateAsMapObjectField(ObjectTest.java:579)
4) testRestrictiveSecurityManager(com.google.gson.functional.ReflectionAccessTest)
java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:429)
	at com.google.gson.functional.ReflectionAccessTest.testRestrictiveSecurityManager(ReflectionAccessTest.java:59)
5) testFormattingInEnUs(com.google.gson.internal.bind.DefaultDateTypeAdapterTest)
org.junit.ComparisonFailure: expected:<...an 1, 1970, 12:00:00[ ]AM"> but was:<...an 1, 1970, 12:00:00[ ]AM">
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.assertFormatted(DefaultDateTypeAdapterTest.java:227)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.assertFormattingAlwaysEmitsUsLocale(DefaultDateTypeAdapterTest.java:64)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.testFormattingInEnUs(DefaultDateTypeAdapterTest.java:47)
6) testFormattingInFr(com.google.gson.internal.bind.DefaultDateTypeAdapterTest)
org.junit.ComparisonFailure: expected:<...an 1, 1970, 12:00:00[ ]AM"> but was:<...an 1, 1970, 12:00:00[ ]AM">
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.assertFormatted(DefaultDateTypeAdapterTest.java:227)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.assertFormattingAlwaysEmitsUsLocale(DefaultDateTypeAdapterTest.java:64)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.testFormattingInFr(DefaultDateTypeAdapterTest.java:52)
7) testFormatUsesDefaultTimezone(com.google.gson.internal.bind.DefaultDateTypeAdapterTest)
org.junit.ComparisonFailure: expected:<...ec 31, 1969, 4:00:00[ ]PM"> but was:<...ec 31, 1969, 4:00:00[ ]PM">
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.assertFormatted(DefaultDateTypeAdapterTest.java:227)
	at com.google.gson.internal.bind.DefaultDateTypeAdapterTest.testFormatUsesDefaultTimezone(DefaultDateTypeAdapterTest.java:154)
8) testDefaultSqlTimestampSerialization(com.google.gson.internal.sql.SqlTypesGsonTest)
org.junit.ComparisonFailure: expected:<...Dec 3, 2009, 1:18:02[ ]PM"> but was:<...Dec 3, 2009, 1:18:02[ ]PM">
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at com.google.gson.internal.sql.SqlTypesGsonTest.testDefaultSqlTimestampSerialization(SqlTypesGsonTest.java:101)

FAILURES!!!
Tests run: 1231,  Failures: 8

Gson version

Java / Android version

Used tools

  • Maven; version:
  • Gradle; version:
  • ProGuard (attach the configuration file please); version:
  • ...

Description

Expected behavior

Actual behavior

Reproduction steps

  1. ...
  2. ...

Exception stack trace


@vaukai vaukai added the bug label Nov 6, 2023
@eamonnmcmanus
Copy link
Member

Thanks for reporting this! It's those wretched date formats again, of course. I think this should be straightforward to fix, though there's a broader issue that needs to be addressed somehow. (See #2472 and related issues.)

We should also add JDK 21 to the CI, perhaps replacing JDK 17, or in addition to it.

@eamonnmcmanus
Copy link
Member

I'm a little puzzled as to exactly what is being built here. If I try mvn test with JDK 21, I immediately get a failure telling me error: release version 7 not supported. Which indeed is true, as javac --release 7 will confirm. So I guess the Gentoo build is using a somewhat modified pom.xml. Do we know where that is? I would like to see what else is modified.

@vaukai
Copy link
Author

vaukai commented Nov 6, 2023

I'm a little puzzled as to exactly what is being built here. If I try mvn test with JDK 21, I immediately get a failure telling me error: release version 7 not supported. Which indeed is true, as javac --release 7 will confirm. So I guess the Gentoo build is using a somewhat modified pom.xml. Do we know where that is? I would like to see what else is modified.

Gentoo does not use pom.xml at all but has it translated into ebuild using functions and variables mainly from java-pkg-simple.eclass.

@Marcono1234
Copy link
Collaborator

Marcono1234 commented Nov 6, 2023

This issue relates to or duplicates #2501 to some extent

@eamonnmcmanus, should we keep this issue here open anyways or close it as duplicate and track any build issues in the other GitHub issue? Though I don't think I saw these date format changes in #2501; maybe the CLDR data was updated in a more recent JDK 21 build since then (?).

@Marcono1234
Copy link
Collaborator

@vaukai, could you please check if you can build the latest Gson code successfully using JDK 21?
The pull request #2552 should have fixed any remaining issues, and the GitHub workflow and also my local builds work successfully with JDK 21. The only limitation is that the Maven build intentionally has to be run with -Denforcer.fail=false (see the PR for more details), but since you are not using Maven, that should not matter.

If I understand the build log you provided correctly, you are building the Gson source code of version 2.10.1, and not the latest code from the main branch. That would explain the test failures you are seeing, which should have been fixed by #2450 already.

@vaukai
Copy link
Author

vaukai commented Dec 27, 2023

If I understand the build log you provided correctly, you are building the Gson source code of version 2.10.1, and not the latest code from the main branch. That would explain the test failures you are seeing, which should have been fixed by #2450 already.

Version 2.10.2_pre20231128 of dev-java/gson builds from commit b17b1a0e98dcaf4b61823e1f0c29dda44c0ea3d5 and it builds fine with java 17 and java 21.

@Marcono1234
Copy link
Collaborator

Thanks for the confirmation!
I am going to close this issue here then. #2501 is still open which is specifically about the Maven build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants