Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 8519767

Browse files
authored
SORMAS-Foundation#2976 Fix serialization issues with new UserConfig (SORMAS-Foundation#3362)
1 parent e5bb6ee commit 8519767

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

  • sormas-api/src/main/java/de/symeda/sormas/api/externaljournal

sormas-api/src/main/java/de/symeda/sormas/api/externaljournal/UserConfig.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@
1818

1919
package de.symeda.sormas.api.externaljournal;
2020

21+
import java.io.Serializable;
2122
import java.util.Objects;
2223

2324
/**
2425
* @author Alex Vidrean
2526
* @since 28-Oct-20
2627
*/
27-
public class UserConfig {
28+
public class UserConfig implements Serializable, Cloneable {
29+
30+
private static final long serialVersionUID = -8361731947523951907L;
2831

2932
private String username;
3033

@@ -60,4 +63,13 @@ public boolean equals(Object o) {
6063
public int hashCode() {
6164
return Objects.hash(username, password);
6265
}
66+
67+
@Override
68+
public UserConfig clone() {
69+
try {
70+
return (UserConfig) super.clone();
71+
} catch (CloneNotSupportedException e) {
72+
throw new RuntimeException("Clone failed", e);
73+
}
74+
}
6375
}

0 commit comments

Comments
 (0)