misc
This commit is contained in:
@@ -37,7 +37,7 @@ public class Course {
|
||||
return newCourse().numberOfStudents(numberOfStudents.get() + 1).build();
|
||||
}
|
||||
|
||||
private CourseBuilder newCourse(){
|
||||
private CourseBuilder newCourse() {
|
||||
return Course.builder()
|
||||
.id(id)
|
||||
.title(title)
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Student {
|
||||
.build();
|
||||
}
|
||||
|
||||
private StudentBuilder newStudent(){
|
||||
private StudentBuilder newStudent() {
|
||||
return Student.builder()
|
||||
.id(id)
|
||||
.fullName(fullName)
|
||||
|
||||
@@ -54,10 +54,9 @@ public class RestPresenter implements RestPresenterOutputPort {
|
||||
final DelegatingServerHttpResponse httpOutputMessage =
|
||||
new DelegatingServerHttpResponse(new ServletServerHttpResponse(httpServletResponse));
|
||||
|
||||
if (t instanceof EntityDoesNotExistError){
|
||||
if (t instanceof EntityDoesNotExistError) {
|
||||
httpOutputMessage.setStatusCode(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
httpOutputMessage.setStatusCode(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.github.cleanddd.port.PersistenceOperationsOutputPort;
|
||||
import com.github.cleanddd.port.RestPresenterOutputPort;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import java.util.Map;
|
||||
|
||||
public class EnrollStudentUseCase implements EnrollStudentInputPort {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user