Skip to content

Commit

Permalink
fix(json): add no-arg constructor and setters to KeyValue
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaron committed Oct 10, 2024
1 parent 9b2583b commit f796db5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/java/io/cryostat/agent/model/KeyValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
import java.util.Objects;

public class KeyValue {
private final String key;
private final String value;

private String key;
private String value;

KeyValue() {}

public KeyValue(String key, String value) {
this.key = Objects.requireNonNull(key);
Expand All @@ -34,6 +37,14 @@ public String getValue() {
return value;
}

void setKey(String key) {
this.key = key;
}

void setValue(String value) {
this.value = value;
}

@Override
public int hashCode() {
return Objects.hash(key, value);
Expand Down

0 comments on commit f796db5

Please sign in to comment.