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

Bump com.google.code.gson:gson from 2.10.1 to 2.11.0 #14220

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 20, 2024

Bumps com.google.code.gson:gson from 2.10.1 to 2.11.0.

Commits
  • 828a97b [maven-release-plugin] prepare release gson-parent-2.11.0
  • 93bc0f2 Skip signing graal-native-test module. (#2675)
  • b153ca1 [maven-release-plugin] rollback the release of gson-parent-2.11.0
  • 0e3d2aa [maven-release-plugin] prepare for next development iteration
  • 545b802 [maven-release-plugin] prepare release gson-parent-2.11.0
  • 8bfdbb4 Guarantee that JsonElement.toString() produces JSON (#2659)
  • 9008b09 Extend Troubleshooting Guide with some ProGuard / R8 information (#2656)
  • 05652c3 Document that other JVM languages are not fully supported (#2666)
  • 454a491 Improved Long-Double Number Policy (#2674)
  • 570d911 Bump the github-actions group with 4 updates (#2671)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.10.1 to 2.11.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](google/gson@gson-parent-2.10.1...gson-parent-2.11.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 20, 2024
@AlbumenJ AlbumenJ requested a review from CrazyHZM May 21, 2024 02:08
@AlbumenJ
Copy link
Member

@CrazyHZM PTAL

@AlbumenJ
Copy link
Member

@wcy666103 PTAL

@wcy666103
Copy link
Contributor

@wcy666103 PTAL

After my investigation, I found a logical bug, the specific error message is in:

Extensiondirector #testInheritanceAndScope() method, which is used to initialize fwExtensionDirector,

ExtensionDirector fwExtensionDirector =
new ExtensionDirector(null, ExtensionScope.FRAMEWORK, FrameworkModel.defaultModel());

However, only extensionDirector objects that pass ScopeModel#initialize() are fully context-aware objects,

protected void initialize() {
        synchronized (instLock) {
            this.extensionDirector =
                    new ExtensionDirector(parent != null ? parent.getExtensionDirector() : null, scope, this);
            this.extensionDirector.addExtensionPostProcessor(new ScopeModelAwareExtensionProcessor(this));
            this.beanFactory = new ScopeBeanFactory(parent != null ? parent.getBeanFactory() : null, extensionDirector);

            // Add Framework's ClassLoader by default
            ClassLoader dubboClassLoader = ScopeModel.class.getClassLoader();
            if (dubboClassLoader != null) {
                this.addClassLoader(dubboClassLoader);
            }
        }
    }

so the direct new approach has some properties that are null when used in practice, and this error exists in multiple branches.

So there are two ways to fix this:

  1. The developer determines if there are logic holes in the source code

  2. Modify the tese use case to:

ExtensionDirector fwExtensionDirector =
new ExtensionDirector(null, ExtensionScope.FRAMEWORK, FrameworkModel.defaultModel());
fwExtensionDirector.addExtensionPostProcessor(new ScopeModelAwareExtensionProcessor(FrameworkModel.defaultModel()));

or

ExtensionDirector fwExtensionDirector = FrameworkModel.defaultModel()
.getExtensionDirector();

Which form should I use?

@wcy666103
Copy link
Contributor

And also fix GsonUtilsTest in #14224

@AlbumenJ
Copy link
Member

@dependabot rebase

Copy link
Contributor Author

dependabot bot commented on behalf of github May 22, 2024

Looks like com.google.code.gson:gson is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this May 22, 2024
@dependabot dependabot bot deleted the dependabot/maven/com.google.code.gson-gson-2.11.0 branch May 22, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants