Skip to content

GH-3875: Initialize ClassUtils as early as possible #3876

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

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

artembilan
Copy link
Member

Fixes #3875

The class static variables and initialization block are performed on first class access.

  • Add "fake" ClassUtils.resolvePrimitiveType(Integer.class) call to the IntegrationRegistrar
    to trigger ClassUtils initialization with the current Spring ClassLoader

Cherry-pick to 5.5.x

Fixes spring-projects#3875

The class `static` variables and initialization block are performed on first class access.

* Add "fake" `ClassUtils.resolvePrimitiveType(Integer.class)` call to the `IntegrationRegistrar`
to trigger `ClassUtils` initialization with the current Spring `ClassLoader`

**Cherry-pick to `5.5.x`**
@garyrussell garyrussell merged commit c1dbb02 into spring-projects:main Aug 17, 2022
@garyrussell
Copy link
Contributor

...and cherry-picked as b7710fc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NoClassDefFoundError for org.springframework.integration.util.ClassUtils if first called from JMX
2 participants