KEMBAR78
fix(java): avoid unexpected initialization of `JacksonParser` in Graal 22.2 by mpeddada1 · Pull Request #1709 · googleapis/java-storage · GitHub
Skip to content

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.

2 participants