⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 13, 2026

The ClassLoadingUtil class had two overloaded load methods that dispatch based on static types (ClassLoader vs Object), creating ambiguity when the Object parameter is actually a ClassLoader or null.

Changes

  • Renamed load(String className, Object context)loadFromContext(String className, Object context) to clarify it extracts the ClassLoader from the context object's defining loader
  • Updated call sites in example extensions (btrace-spark, btrace-hadoop) and documentation

Example

// Before: ambiguous which overload is called
Class<?> cls = ClassLoadingUtil.load("com.example.Class", someObject);

// After: intent is explicit
Class<?> cls = ClassLoadingUtil.loadFromContext("com.example.Class", someObject);

The load(String, ClassLoader) overload remains unchanged for direct ClassLoader usage.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copy link

@reviewabot reviewabot bot left a comment

Choose a reason for hiding this comment

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

Could not review PR. Too many requests in the last 5 minutes.
Max 1 pr 5 minutes. Last review was in btraceio/btrace at Tue, 13 Jan 2026 16:37:32 GMT.
Next review is available in approx 5 minutes.
Upgrade to a premium Reviewabot plan or contact us at [email protected] to request an exemption.

Copilot AI changed the title [WIP] WIP address feedback on provided-style extensions Rename ClassLoadingUtil.load(String, Object) to loadFromContext Jan 13, 2026
Copilot AI requested a review from jbachorik January 13, 2026 16:45
@jbachorik jbachorik marked this pull request as ready for review January 14, 2026 08:55
@jbachorik jbachorik merged commit cd3ef50 into jb/configurations Jan 14, 2026
@jbachorik jbachorik deleted the copilot/sub-pr-791-another-one branch January 14, 2026 08:55
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