-
Notifications
You must be signed in to change notification settings - Fork 1k
add Nullaway to instrumentation API incubator #14459
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 Nullaway to instrumentation API incubator #14459
Conversation
c3c5f29
to
26e4e73
Compare
private final String loggingSpanIdKey; | ||
private final String loggingTraceFlagsKey; | ||
|
||
interface ValueProvider<T> { |
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.
simply adding @Nullable
to the generic arg didn't work
🔧 The result from spotlessApply was committed to the PR branch. |
@laurit please take a look |
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
...elemetry/instrumentation/api/incubator/instrumenter/internal/InstrumenterCustomizerImpl.java
Outdated
Show resolved
Hide resolved
private final String loggingSpanIdKey; | ||
private final String loggingTraceFlagsKey; | ||
|
||
interface ValueProvider<T> { |
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.
is this needed because the return type of java.util.function.Function is considered to be non-nullable?
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.
yes
53f0453
to
0bbe11c
Compare
abstract String getPath(); | ||
|
||
public boolean matches(Integer port, Supplier<String> pathSupplier) { | ||
public boolean matches(@Nullable Integer port, @Nullable Supplier<String> pathSupplier) { |
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.
it looks like null
is never passed in here (need to also remove @Nullable
from calling method param)
public boolean matches(@Nullable Integer port, @Nullable Supplier<String> pathSupplier) { | |
public boolean matches(@Nullable Integer port, Supplier<String> pathSupplier) { |
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.
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.
ah, I see, how about zeitlinger#7?
An option for less Nullable
🔧 The result from spotlessApply was committed to the PR branch. |
No description provided.