Skip to content

Commit e92dbcc

Browse files
nguyennamthaipivovarit
authored andcommitted
Refactors Apache CXF JAXRS implementation (eugenp#748)
1 parent 08c9791 commit e92dbcc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • apache-cxf/cxf-jaxrs-implementation/src/main/java/com/baeldung/cxf/jaxrs/implementation

apache-cxf/cxf-jaxrs-implementation/src/main/java/com/baeldung/cxf/jaxrs/implementation/Course.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,11 @@ public Response postStudent(Student student) {
6161
@Path("{studentOrder}")
6262
public Response deleteStudent(@PathParam("studentOrder") int studentOrder) {
6363
Student student = students.get(studentOrder);
64-
Response response;
6564
if (student != null) {
6665
students.remove(studentOrder);
67-
response = Response.ok().build();
66+
return Response.ok().build();
6867
} else {
69-
response = Response.notModified().build();
68+
return Response.notModified().build();
7069
}
71-
return response;
7270
}
7371
}

0 commit comments

Comments
 (0)