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

Add detection of ThreadLocal.initialValue() calls #15

Merged
merged 1 commit into from
May 2, 2022

Conversation

spkrka
Copy link
Member

@spkrka spkrka commented May 2, 2022

No description provided.

@spkrka spkrka force-pushed the krka/threadlocal branch from 2ee1c8d to 6521418 Compare May 2, 2022 06:33
}

public static void acceptThreadLocalInitialValue() {
int n = threadLocalInitialValueConsumers.size();
Copy link
Member Author

Choose a reason for hiding this comment

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

Since this may be a frequent call, try to avoid allocation by doing the loop manually

Copy link
Collaborator

Choose a reason for hiding this comment

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

This might be better suited as a code comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will fix

@spkrka spkrka requested a review from protocol7 May 2, 2022 06:43

@Advice.OnMethodEnter
static void onEnter(
@Advice.This() final Object thisObject,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't look like you need any of these parameters

@spkrka spkrka force-pushed the krka/threadlocal branch from 6521418 to 4c2ae33 Compare May 2, 2022 06:50
@spkrka spkrka force-pushed the krka/threadlocal branch from 4c2ae33 to d38463a Compare May 2, 2022 06:52
@protocol7 protocol7 merged commit eaf668a into main May 2, 2022
@protocol7 protocol7 deleted the krka/threadlocal branch May 2, 2022 07:30
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