Skip to content

Commit 8ec5d67

Browse files
committed
fixes
1 parent 96acc27 commit 8ec5d67

File tree

31 files changed

+73
-71
lines changed

31 files changed

+73
-71
lines changed

custom-checks/src/main/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
package com.google.errorprone.bugpatterns.checkreturnvalue;
77

88
import com.google.errorprone.ErrorProneFlags;
9+
import com.google.errorprone.bugpatterns.WellKnownKeep;
910

1011
public final class CanIgnoreReturnValueSuggesterFactory {
1112

1213
// calls package private constructor of CanIgnoreReturnValueSuggester
1314
public static CanIgnoreReturnValueSuggester createCanIgnoreReturnValueSuggester(
14-
ErrorProneFlags errorProneFlags) {
15-
return new CanIgnoreReturnValueSuggester(errorProneFlags);
15+
ErrorProneFlags errorProneFlags, WellKnownKeep wellKnownKeep) {
16+
return new CanIgnoreReturnValueSuggester(errorProneFlags, wellKnownKeep);
1617
}
1718

1819
private CanIgnoreReturnValueSuggesterFactory() {}

custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelCanIgnoreReturnValueSuggester.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.google.errorprone.ErrorProneFlags;
1313
import com.google.errorprone.VisitorState;
1414
import com.google.errorprone.bugpatterns.BugChecker;
15+
import com.google.errorprone.bugpatterns.WellKnownKeep;
1516
import com.google.errorprone.bugpatterns.checkreturnvalue.CanIgnoreReturnValueSuggester;
1617
import com.google.errorprone.bugpatterns.checkreturnvalue.CanIgnoreReturnValueSuggesterFactory;
1718
import com.google.errorprone.matchers.Description;
@@ -33,9 +34,10 @@ public class OtelCanIgnoreReturnValueSuggester extends BugChecker
3334
private final CanIgnoreReturnValueSuggester delegate;
3435

3536
@Inject
36-
OtelCanIgnoreReturnValueSuggester(ErrorProneFlags errorProneFlags) {
37+
OtelCanIgnoreReturnValueSuggester(ErrorProneFlags errorProneFlags, WellKnownKeep wellKnownKeep) {
3738
delegate =
38-
CanIgnoreReturnValueSuggesterFactory.createCanIgnoreReturnValueSuggester(errorProneFlags);
39+
CanIgnoreReturnValueSuggesterFactory.createCanIgnoreReturnValueSuggester(
40+
errorProneFlags, wellKnownKeep);
3941
}
4042

4143
public OtelCanIgnoreReturnValueSuggester() {

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/ContextPropagationDebug.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ private static void debugContextPropagation(Context context) {
139139
}
140140

141141
private static class Propagation {
142-
public final String carrierClassName;
143-
public final StackTraceElement[] location;
142+
final String carrierClassName;
143+
final StackTraceElement[] location;
144144

145-
public Propagation(String carrierClassName, StackTraceElement[] location) {
145+
Propagation(String carrierClassName, StackTraceElement[] location) {
146146
this.carrierClassName = carrierClassName;
147147
this.location = location;
148148
}

instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaFlowWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public GraphStageLogic createLogic(Attributes attributes) {
7373
private class TracingLogic extends GraphStageLogic {
7474
private final Deque<TracingRequest> requests = new ArrayDeque<>();
7575

76-
public TracingLogic() {
76+
TracingLogic() {
7777
super(shape);
7878

7979
// server pulls response, pass response from user code to server

instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/TracingList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private Object writeReplace() {
8585
}
8686

8787
private static class CallerClass extends SecurityManager {
88-
public static final CallerClass INSTANCE = new CallerClass();
88+
static final CallerClass INSTANCE = new CallerClass();
8989

9090
@Override
9191
public Class<?>[] getClassContext() {

instrumentation/camel-2.20/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachecamel/ActiveContextManager.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,24 @@ private static class ContextWithScope {
8383
private final CamelRequest request;
8484
@Nullable private final Scope scope;
8585

86-
public ContextWithScope(
87-
ContextWithScope parent, Context context, CamelRequest request, Scope scope) {
86+
ContextWithScope(ContextWithScope parent, Context context, CamelRequest request, Scope scope) {
8887
this.parent = parent;
8988
this.context = context;
9089
this.request = request;
9190
this.scope = scope;
9291
}
9392

94-
public static ContextWithScope activate(
93+
static ContextWithScope activate(
9594
ContextWithScope parent, Context context, CamelRequest request) {
9695
Scope scope = context != null ? context.makeCurrent() : null;
9796
return new ContextWithScope(parent, context, request, scope);
9897
}
9998

100-
public ContextWithScope getParent() {
99+
ContextWithScope getParent() {
101100
return parent;
102101
}
103102

104-
public void deactivate(Exception exception) {
103+
void deactivate(Exception exception) {
105104
if (scope == null) {
106105
return;
107106
}

instrumentation/jaxws/jaxws-metro-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/metro/MetroServerSpanNameUpdater.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ private HttpServletRequestAdapter(Class<?> httpServletRequestClass)
132132
lookup.unreflect(httpServletRequestClass.getMethod("getPathInfo"));
133133
}
134134

135-
public boolean canHandle(Object httpServletRequest) {
135+
boolean canHandle(Object httpServletRequest) {
136136
return httpServletRequestClass.isInstance(httpServletRequest);
137137
}
138138

139-
public String getServletPath(Object httpServletRequest) {
139+
String getServletPath(Object httpServletRequest) {
140140
return invokeSafely(getServletPathMethodHandle, httpServletRequest);
141141
}
142142

143-
public String getPathInfo(Object httpServletRequest) {
143+
String getPathInfo(Object httpServletRequest) {
144144
return invokeSafely(getPathInfoMethodHandle, httpServletRequest);
145145
}
146146

instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/main/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/KafkaTelemetry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private class ProducerCallback implements Callback {
298298
private final Context context;
299299
private final KafkaProducerRequest request;
300300

301-
public ProducerCallback(
301+
ProducerCallback(
302302
Callback callback, Context parentContext, Context context, KafkaProducerRequest request) {
303303
this.callback = callback;
304304
this.parentContext = parentContext;

instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/OpenTelemetryTracing.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private static class OpenTelemetryTraceContext implements TraceContext {
125125
this.context = Context.current();
126126
}
127127

128-
public Context getSpanContext() {
128+
Context getSpanContext() {
129129
return context;
130130
}
131131
}
@@ -259,7 +259,7 @@ private void fillEndpoint(OpenTelemetryEndpoint endpoint) {
259259
// Added and called in 6.0+
260260
// @Override
261261
@CanIgnoreReturnValue
262-
@SuppressWarnings("UnusedMethod")
262+
@SuppressWarnings({"UnusedMethod", "EffectivelyPrivate"})
263263
public synchronized Tracer.Span start(RedisCommand<?, ?, ?> command) {
264264
start();
265265
long startNanos = System.nanoTime();

instrumentation/log4j/log4j-appender-2.17/library/src/main/java/io/opentelemetry/instrumentation/log4j/appender/v2_17/LogEventToReplay.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private static class MessageCopy implements Message {
184184
private final Object[] parameters;
185185
private final Throwable throwable;
186186

187-
public MessageCopy(Message message) {
187+
MessageCopy(Message message) {
188188
this.formattedMessage = message.getFormattedMessage();
189189
this.format = message.getFormat();
190190
this.parameters = message.getParameters();

0 commit comments

Comments
 (0)