Skip to content

Commit 6e03397

Browse files
committed
Patch for support content String
1 parent 714496d commit 6e03397

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

common/src/main/java/fr/epsilon/common/crd/EpsilonInstanceCRD.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public EInstance getInstance() {
5555
if (getStatus() != null) {
5656
String template = getStatus().getTemplate();
5757

58-
Object content = getStatus().getContent();
58+
String content = getStatus().getContent();
5959

6060
boolean hub = getStatus().isHub();
6161

common/src/main/java/fr/epsilon/common/crd/EpsilonInstanceCRDStatus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class EpsilonInstanceCRDStatus {
3434
private Boolean hub = null;
3535

3636
@SerializedName(SERIALIZED_NAME_CONTENT)
37-
private Object content = null;
37+
private String content = null;
3838

3939
@SerializedName(SERIALIZED_NAME_STATE)
4040
private EState state = null;
@@ -61,7 +61,7 @@ public Boolean isHub() {
6161
return hub;
6262
}
6363

64-
public Object getContent() {
64+
public String getContent() {
6565
return content;
6666
}
6767

common/src/main/java/fr/epsilon/common/instance/EInstance.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class EInstance {
99
private String name;
1010
private String template;
1111

12-
private Object content;
12+
private String content;
1313

1414
private boolean hub;
1515

@@ -21,7 +21,7 @@ public class EInstance {
2121

2222
private String ip;
2323

24-
public EInstance(String name, String template, Object content, boolean hub, EType type, EState state, int slots, int online_count, String ip) {
24+
public EInstance(String name, String template, String content, boolean hub, EType type, EState state, int slots, int online_count, String ip) {
2525
this.name = name;
2626
this.template = template;
2727

@@ -47,7 +47,7 @@ public String getTemplate() {
4747
}
4848

4949
public <T> T getContent(Class<T> classType) {
50-
return gson.fromJson(gson.toJson(content), classType);
50+
return gson.fromJson(content, classType);
5151
}
5252

5353
public boolean isHub() {

0 commit comments

Comments
 (0)