Skip to content

Commit 386a56b

Browse files
committed
Release 2.1.2
1 parent 191eb07 commit 386a56b

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

api/src/main/java/fr/epsilon/api/instance/EInstanceModule.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ public abstract class EInstanceModule {
3838
* Open instance with template name
3939
*
4040
* @param template Template name
41-
* @return Instance or null if not opened
41+
* @return Instance name or null if not opened
4242
*/
43-
public abstract EInstance openInstance(String template);
43+
public abstract String openInstance(String template);
4444

4545
/**
4646
* Open instance with template name
4747
*
4848
* @param template Template name
4949
* @param content Content field of instance
50-
* @return Instance or null if not opened
50+
* @return Instance name or null if not opened
5151
*/
52-
public abstract <T> EInstance openInstance(String template, T content);
52+
public abstract <T> String openInstance(String template, T content);
5353

5454
/**
5555
* Close instance

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
allprojects {
22
group 'fr.epsilon'
3-
version '2.1.1'
3+
version '2.1.2'
44
}
55

66
buildscript {

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ public CompletableFuture<? extends Instance[]> getInstances(EType type) {
9393
}
9494

9595
@Override
96-
public EInstance openInstance(String template) {
96+
public String openInstance(String template) {
9797
return openInstance(template, new Object());
9898
}
9999

100100
@Override
101-
public <T> EInstance openInstance(String template, T content) {
101+
public <T> String openInstance(String template, T content) {
102102
MediaType media = MediaType.parse("application/json; charset=utf-8");
103103
RequestBody body = RequestBody.create(gson.toJson(content), media);
104104

@@ -109,16 +109,15 @@ public <T> EInstance openInstance(String template, T content) {
109109

110110
try {
111111
Response response = okHttp.newCall(request).execute();
112-
boolean successful = response.isSuccessful();
113112

114113
ResponseBody bodyResponse = response.body();
115114

116115
assert bodyResponse != null;
117-
Instance instance = gson.fromJson(bodyResponse.string(), Instance.class);
116+
String instanceName = bodyResponse.string();
118117

119118
response.close();
120119

121-
return instance;
120+
return instanceName;
122121
} catch (IOException e) {
123122
e.printStackTrace();
124123
}

0 commit comments

Comments
 (0)