Repository navigation
[Issue 7402] Shaded jclouds to avoid gson conflict - #7435
Merged
Merged
Conversation
Contributor
Author
Contributor
Author
|
/pulsarbot run-failure-checks |
jiazhai
approved these changes
Jul 5, 2020
deltasquare4
pushed a commit
to pandio-com/pulsar
that referenced
this pull request
Jul 30, 2020
Fixes apache#7402 Currently, the GCS offload error is still existing. In jclouds `2.2.0` and `2.2.1`, it only shaded the package [`com.google.gson.internal`](https://github.com/apache/jclouds/blob/master/gson/gson-shaded/pom.xml#L70), and in the class [`org.jclouds.json.internal.NullFilteringTypeAdapterFactories`](https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NullFilteringTypeAdapterFactories.java#L319) the shaded class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` will be initialized by `com.google.gson.stream.JsonReader` which is in jclouds, the Pulsar include the same class `com.google.gson.stream.JsonReader` and when Pulsar broker start it will be loaded before jclouds's, so this will cause the `org.jclouds.json.gson.internal.JsonReaderInternalAccess` can't be initialized successfully, and occurs NPE. Shaded the jclouds to make the class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` could be initialized normally.
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
Fixes apache#7402 ### Motivation Currently, the GCS offload error is still existing. In jclouds `2.2.0` and `2.2.1`, it only shaded the package [`com.google.gson.internal`](https://github.com/apache/jclouds/blob/master/gson/gson-shaded/pom.xml#L70), and in the class [`org.jclouds.json.internal.NullFilteringTypeAdapterFactories`](https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NullFilteringTypeAdapterFactories.java#L319) the shaded class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` will be initialized by `com.google.gson.stream.JsonReader` which is in jclouds, the Pulsar include the same class `com.google.gson.stream.JsonReader` and when Pulsar broker start it will be loaded before jclouds's, so this will cause the `org.jclouds.json.gson.internal.JsonReaderInternalAccess` can't be initialized successfully, and occurs NPE. ### Modifications Shaded the jclouds to make the class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` could be initialized normally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7402
Motivation
Currently, the GCS offload error is still existing. In jclouds
2.2.0and2.2.1, it only shaded the packagecom.google.gson.internal, and in the classorg.jclouds.json.internal.NullFilteringTypeAdapterFactoriesthe shaded classorg.jclouds.json.gson.internal.JsonReaderInternalAccesswill be initialized bycom.google.gson.stream.JsonReaderwhich is in jclouds, the Pulsar include the same classcom.google.gson.stream.JsonReaderand when Pulsar broker start it will be loaded before jclouds's, so this will cause theorg.jclouds.json.gson.internal.JsonReaderInternalAccesscan't be initialized successfully, and occurs NPE.Modifications
Shaded the jclouds to make the class
org.jclouds.json.gson.internal.JsonReaderInternalAccesscould be initialized normally.Verifying this change
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation