-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(deps): update errorproneversion to v2.44.0 (minor) #15244
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
base: main
Are you sure you want to change the base?
Changes from all commits
e66d818
b5972b6
82c0acf
c5a8cdb
12de0ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,26 +20,25 @@ | |
| * at any time. | ||
| */ | ||
| public final class InstrumenterContext { | ||
| private static final ThreadLocal<InstrumenterContext> instrumenterContext = | ||
| new ThreadLocal<InstrumenterContext>() { | ||
| @Override | ||
| protected InstrumenterContext initialValue() { | ||
| return new InstrumenterContext(); | ||
| } | ||
| }; | ||
| private static final ThreadLocal<InstrumenterContext> instrumenterContext = new ThreadLocal<>(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an unrelated change. I think that in our api jars we shouldn't use subclasses of |
||
|
|
||
| private final Map<String, Object> map = new HashMap<>(); | ||
|
|
||
| private InstrumenterContext() {} | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| @SuppressWarnings("unchecked") // we expect the caller to use the same type for a given key | ||
| public static <T> T computeIfAbsent(String key, Function<String, T> function) { | ||
| return (T) get().computeIfAbsent(key, function); | ||
| } | ||
|
|
||
| // visible for testing | ||
| static Map<String, Object> get() { | ||
| return instrumenterContext.get().map; | ||
| InstrumenterContext context = instrumenterContext.get(); | ||
| if (context == null) { | ||
| context = new InstrumenterContext(); | ||
| instrumenterContext.set(context); | ||
| } | ||
| return context.map; | ||
| } | ||
|
|
||
| public static void reset() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
| import org.mockito.junit.jupiter.MockitoExtension; | ||
|
|
||
| @ExtendWith(MockitoExtension.class) | ||
| @SuppressWarnings("unchecked") | ||
| @SuppressWarnings("unchecked") // to allow mocking of generic HttpResponse | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this needed since in test? |
||
| class SupportedLibrariesAuditorTest { | ||
|
|
||
| @Test | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
| import org.mockito.junit.jupiter.MockitoExtension; | ||
|
|
||
| @ExtendWith(MockitoExtension.class) | ||
| @SuppressWarnings("unchecked") | ||
| @SuppressWarnings("unchecked") // to allow mocking of generic HttpResponse | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here |
||
| class SuppressionListAuditorTest { | ||
|
|
||
| @Test | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see what there is to gain from directly using the
LambdaMetafactory