summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-04-13 17:21:42 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2021-04-13 17:22:48 +0200
commit396a45f892c989ce65bfcc04a6e8da26742a0caf (patch)
tree5363cf0cc6ccc868166b86529219f51995aba480 /container-core
parent5d99eeefabb8ff58e0b6125cccb1430a521b5390 (diff)
Rename class to follow convention of similar exception types
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/restapi/RestApiException.java10
-rw-r--r--container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java2
2 files changed, 6 insertions, 6 deletions
diff --git a/container-core/src/main/java/com/yahoo/restapi/RestApiException.java b/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
index da853f91402..d9da320499f 100644
--- a/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
+++ b/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
@@ -40,11 +40,11 @@ public class RestApiException extends RuntimeException {
public int statusCode() { return statusCode; }
public HttpResponse response() { return response; }
- public static class NotFoundException extends RestApiException {
- public NotFoundException() { this(null, null); }
- public NotFoundException(Throwable cause) { this(cause.getMessage(), cause); }
- public NotFoundException(String message) { this(message, null); }
- public NotFoundException(String message, Throwable cause) { super(ErrorResponse::notFoundError, message, cause); }
+ public static class NotFound extends RestApiException {
+ public NotFound() { this(null, null); }
+ public NotFound(Throwable cause) { this(cause.getMessage(), cause); }
+ public NotFound(String message) { this(message, null); }
+ public NotFound(String message, Throwable cause) { super(ErrorResponse::notFoundError, message, cause); }
}
public static class MethodNotAllowed extends RestApiException {
diff --git a/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java b/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java
index 084aa01ec40..8ba94f9aca9 100644
--- a/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java
+++ b/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java
@@ -144,7 +144,7 @@ class RestApiImpl implements RestApi {
private static Route createDefaultRoute() {
RouteBuilder routeBuilder = new RouteBuilderImpl("{*}")
.defaultHandler(context -> {
- throw new RestApiException.NotFoundException();
+ throw new RestApiException.NotFound();
});
return ((RouteBuilderImpl)routeBuilder).build();
}