mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Do not manually throw NullPointerException
This commit is contained in:
parent
a6ab373079
commit
578d43f75c
1 changed files with 2 additions and 2 deletions
|
@ -27,6 +27,7 @@ import static bisq.daonode.web.jdk.handler.HandlerUtil.sendResponse;
|
|||
import static bisq.daonode.web.jdk.handler.HandlerUtil.toJson;
|
||||
import static bisq.daonode.web.jdk.handler.HandlerUtil.wrapErrorResponse;
|
||||
import static bisq.daonode.web.jdk.handler.ResourcePathElement.PROOFOFBURN;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
|
||||
|
||||
|
@ -49,8 +50,7 @@ public class RestHandler implements HttpHandler {
|
|||
@Override
|
||||
public void handle(HttpExchange httpExchange) throws IOException {
|
||||
try {
|
||||
if (httpExchange == null)
|
||||
throw new NullPointerException("HttpExchange cannot be null.");
|
||||
requireNonNull(httpExchange, "HttpExchange cannot be null.");
|
||||
|
||||
// Parse the request URI details here, and pass them to a new
|
||||
// sub handler instance.
|
||||
|
|
Loading…
Add table
Reference in a new issue