Skip to content

Commit e48c5a5

Browse files
committed
Removed useless null check in eval endpoint
1 parent 85363a3 commit e48c5a5

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

JShellAPI/src/main/java/org/togetherjava/jshellapi/rest/JShellController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class JShellController {
2020
@PostMapping("/eval/{id}")
2121
public JShellResult eval(@PathVariable String id, @RequestBody String code) throws DockerException {
2222
validateId(id);
23-
if(code == null) throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Code is null");
2423
return service.session(id).eval(code).orElseThrow(() -> new ResponseStatusException(HttpStatus.CONFLICT, "An operation is already running"));
2524
}
2625
@PostMapping("/eval")

0 commit comments

Comments
 (0)