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

fix(java): avoid unexpected initialization of JacksonParser in Graal 22.2 #1709

Merged
merged 5 commits into from Oct 17, 2022

Conversation

mpeddada1
Copy link
Contributor

Running storage tests in GraalVM 22.2.0 results in:

Error: Classes that should be initialized at run time got initialized during image building:
com.fasterxml.jackson.core.JsonToken was unintentionally initialized at build time. com.google.api.client.json.jackson2.JacksonParser$1 caused initialization of this class with the following trace: 
	at com.fasterxml.jackson.core.JsonToken.<clinit>(JsonToken.java:31)
	at com.google.api.client.json.jackson2.JacksonParser$1.<clinit>(JacksonParser.java:121)

The root cause was the specification of com.google.api.client.json where we were initializing the whole package at build time. This PR initializes only the necessary classes at build time to resolve this.

@mpeddada1 mpeddada1 requested review from a team as code owners October 15, 2022 00:48
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the googleapis/java-storage API. labels Oct 15, 2022
@BenWhitehead BenWhitehead merged commit eca1a03 into main Oct 17, 2022
@BenWhitehead BenWhitehead deleted the graal-22.2 branch October 17, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants