We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b41bc84 commit 77dae05Copy full SHA for 77dae05
opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/state/InMemoryState.java
@@ -17,10 +17,16 @@ abstract class InMemoryState<T> implements State<T> {
17
private final AtomicReference<T> state = new AtomicReference<>();
18
19
public InMemoryState(T initialValue) {
20
+ if (initialValue == null) {
21
+ throw new IllegalArgumentException("The value must not be null");
22
+ }
23
state.set(initialValue);
24
}
25
26
public void set(T value) {
27
+ if (value == null) {
28
29
30
state.set(value);
31
32
0 commit comments