Skip to content

Using same classloader to load classes#1527

Merged
fjtirado merged 1 commit into
open-workflow-specification:mainfrom
fjtirado:fix_reflection_utils_classloader
Jul 10, 2026
Merged

Using same classloader to load classes#1527
fjtirado merged 1 commit into
open-workflow-specification:mainfrom
fjtirado:fix_reflection_utils_classloader

Conversation

@fjtirado

Copy link
Copy Markdown
Collaborator

Priorizing ThreadContextClassLoader

Copilot AI review requested due to automatic review settings July 10, 2026 12:42
@fjtirado
fjtirado force-pushed the fix_reflection_utils_classloader branch from 6e2bd1e to cb52338 Compare July 10, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates ReflectionUtils to consistently prefer the current thread’s context ClassLoader (with fallbacks) when loading classes and when inferring MethodType from SerializedLambda, aiming to avoid classloading mismatches across environments.

Changes:

  • Refactors classloading logic into a shared getClassLoader() helper to prioritize ThreadContextClassLoader.
  • Updates loadClass(...) to use the shared loader selection.
  • Updates inferMethodType(SerializedLambda) to parse method descriptors using the same loader selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Priorizing ThreadContextClassLoader

Signed-off-by: fjtirado <ftirados@ibm.com>
Copilot AI review requested due to automatic review settings July 10, 2026 12:49
@fjtirado
fjtirado force-pushed the fix_reflection_utils_classloader branch from cb52338 to fdf4684 Compare July 10, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@fjtirado
fjtirado merged commit 51a3c7d into open-workflow-specification:main Jul 10, 2026
3 checks passed
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.

2 participants