Skip to content

Commit 206a9e0

Browse files
committed
removing duplicateds
1 parent e74e325 commit 206a9e0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

modules/swagger-models/src/main/java/io/swagger/models/Operation.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,15 @@ public Map<String, Response> getResponses() {
217217
if (this.responses == null && responsesObject != null) {
218218
responses = new Responses();
219219
responses.putAll(responsesObject);
220-
return responses;
221220
}
222-
return responses;
221+
return responsesObject;
223222
}
224223

225224

226225
public Responses getResponsesObject() {
227226
if (responsesObject == null && responses != null) {
228227
responsesObject = new Responses();
229228
responsesObject.putAll(responses);
230-
return responsesObject;
231229
}
232230
return responsesObject;
233231
}
@@ -241,10 +239,6 @@ public void setResponsesObject(Responses responsesObject) {
241239
}
242240

243241
public void addResponse(String key, Response response) {
244-
if (responses == null) {
245-
responses = new LinkedHashMap<>();
246-
}
247-
responses.put(key, response);
248242
if (responsesObject == null) {
249243
responsesObject = new Responses();
250244
}

0 commit comments

Comments
 (0)