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

Upgrade to Gson 2.8.4 #13054

Closed
wilkinsona opened this issue May 4, 2018 · 3 comments
Closed

Upgrade to Gson 2.8.4 #13054

wilkinsona opened this issue May 4, 2018 · 3 comments
Labels
type: dependency-upgrade A dependency upgrade
Milestone

Comments

@wilkinsona
Copy link
Member

No description provided.

@wilkinsona wilkinsona added this to the 1.5.13 milestone May 4, 2018
@wilkinsona wilkinsona added the type: dependency-upgrade A dependency upgrade label May 4, 2018
@wilkinsona
Copy link
Member Author

wilkinsona commented May 4, 2018

GSON 2.8.3 and 2.8.4 don't work on Java 9 on Debian due to a parsing failure when trying to determine the major Java version:

java.lang.ExceptionInInitializerError
	at com.google.gson.internal.reflect.ReflectionAccessor.<clinit>(ReflectionAccessor.java:36)
	at com.google.gson.internal.ConstructorConstructor.<init>(ConstructorConstructor.java:51)
	at com.google.gson.Gson.<init>(Gson.java:205)
	at com.google.gson.GsonBuilder.create(GsonBuilder.java:597)
	at org.springframework.boot.json.GsonJsonParser.<init>(GsonJsonParser.java:40)
	at org.springframework.boot.json.GsonJsonParserTests.getParser(GsonJsonParserTests.java:28)
	at org.springframework.boot.json.AbstractJsonParserTests.<init>(AbstractJsonParserTests.java:40)
	at org.springframework.boot.json.GsonJsonParserTests.<init>(GsonJsonParserTests.java:24)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
	at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
Caused by: java.lang.NumberFormatException: For input string: "9-Debian"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at com.google.gson.util.VersionUtils.determineMajorJavaVersion(VersionUtils.java:28)
	at com.google.gson.util.VersionUtils.<clinit>(VersionUtils.java:24)
	... 32 more

@wilkinsona wilkinsona reopened this May 4, 2018
@wilkinsona
Copy link
Member Author

wilkinsona commented May 4, 2018

I've reported the GSON issue here. I've also upgraded our CI to use a more up-to-date JDK 9 image just in case (and I think it's very unlikely) it's changed the format of the java.version property's value.

@wilkinsona
Copy link
Member Author

To my surprise, the JDK 9 upgrade has resolved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

No branches or pull requests

1 participant