Skip to content

Commit 139bd7a

Browse files
committed
Merge PR #404: [WIP] Update opamp-client module to follow style guide
2 parents b667d57 + 3bff64f commit 139bd7a

23 files changed

+28
-26
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/OpampClientBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
* <p>Builds an {@link OpampClient} instance.
3636
*/
37-
public final class OpampClientBuilder {
37+
public class OpampClientBuilder {
3838
private final Map<String, AnyValue> identifyingAttributes = new HashMap<>();
3939
private final Map<String, AnyValue> nonIdentifyingAttributes = new HashMap<>();
4040
private long capabilities = 0;

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/OkHttpSender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import okhttp3.RequestBody;
1919
import okio.BufferedSink;
2020

21-
public final class OkHttpSender implements HttpSender {
21+
public class OkHttpSender implements HttpSender {
2222
private final OkHttpClient client;
2323
private final String url;
2424

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/RetryAfterParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.util.Optional;
1414
import java.util.regex.Pattern;
1515

16-
public final class RetryAfterParser {
16+
public class RetryAfterParser {
1717
private final SystemTime systemTime;
1818
private static final Pattern SECONDS_PATTERN = Pattern.compile("\\d+");
1919
private static final Pattern DATE_PATTERN =

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/websocket/OkHttpWebSocket.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
package io.opentelemetry.opamp.client.internal.connectivity.websocket;
77

8-
import java.util.Objects;
8+
import static java.util.Objects.requireNonNull;
9+
910
import java.util.concurrent.atomic.AtomicReference;
1011
import javax.annotation.Nonnull;
1112
import javax.annotation.Nullable;
@@ -65,7 +66,7 @@ public void close(int code, @Nullable String reason) {
6566
}
6667

6768
private okhttp3.WebSocket getWebSocket() {
68-
return Objects.requireNonNull(webSocket.get());
69+
return requireNonNull(webSocket.get());
6970
}
7071

7172
private class ListenerAdapter extends WebSocketListener {

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/impl/OpampClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
4444
* any time.
4545
*/
46-
public final class OpampClientImpl
46+
public class OpampClientImpl
4747
implements OpampClient, ObservableState.Listener, RequestService.Callback, Supplier<Request> {
4848
private final RequestService requestService;
4949
private final AgentToServerAppenders appenders;

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/impl/OpampClientState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
1515
* any time.
1616
*/
17-
public final class OpampClientState {
17+
public class OpampClientState {
1818
public final State.RemoteConfigStatus remoteConfigStatus;
1919
public final State.SequenceNum sequenceNum;
2020
public final State.AgentDescription agentDescription;

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/impl/recipe/AgentToServerAppenders.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
2424
* any time.
2525
*/
26-
public final class AgentToServerAppenders {
26+
public class AgentToServerAppenders {
2727
public final AgentDescriptionAppender agentDescriptionAppender;
2828
public final EffectiveConfigAppender effectiveConfigAppender;
2929
public final RemoteConfigStatusAppender remoteConfigStatusAppender;

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/impl/recipe/RecipeManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
2020
* any time.
2121
*/
22-
public final class RecipeManager {
22+
public class RecipeManager {
2323
private final Object recipeLock = new Object();
2424
private final List<Field> constantFields;
2525
@Nullable private RequestRecipe previousRecipe = null;
@@ -50,7 +50,7 @@ public RecipeBuilder next() {
5050
}
5151
}
5252

53-
public final class RecipeBuilder {
53+
public class RecipeBuilder {
5454
private final Set<Field> fields = new HashSet<>();
5555

5656
@CanIgnoreReturnValue

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/impl/recipe/RequestRecipe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
1313
* any time.
1414
*/
15-
public final class RequestRecipe {
15+
public class RequestRecipe {
1616
private final Collection<Field> fields;
1717

1818
public RequestRecipe(Collection<Field> fields) {

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/impl/recipe/appenders/AgentDescriptionAppender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
1414
* any time.
1515
*/
16-
public final class AgentDescriptionAppender implements AgentToServerAppender {
16+
public class AgentDescriptionAppender implements AgentToServerAppender {
1717
private final Supplier<AgentDescription> data;
1818

1919
public static AgentDescriptionAppender create(Supplier<AgentDescription> data) {

0 commit comments

Comments
 (0)