diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-01-06 08:09:33 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-01-06 08:17:09 +0000 |
commit | 63fe954a9408cb06fec6cb5d62a699b3d06912b2 (patch) | |
tree | 78aaf6d380d5e976f32b7eabcfb38cd92131deeb /vespaclient-container-plugin | |
parent | d1a4bc1c0a57807c8d1a3be56d244de2c2464026 (diff) |
handle switch fallthrough
* rewrite one switch fallthrough where it made more sense to
handle the cases separately
* suppress one switch fallthrough (it was clearly commented)
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r-- | vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java index 3eac4ff5c5d..3e9d0a7afc8 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java @@ -1022,11 +1022,13 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler { case TIMEOUT: jsonResponse.commit(Response.Status.GATEWAY_TIMEOUT); break; - default: - log.log(WARNING, "Unexpected document API operation outcome '" + response.outcome() + "'"); case ERROR: log.log(FINE, () -> "Exception performing document operation: " + response.getTextMessage()); jsonResponse.commit(Response.Status.BAD_GATEWAY); + break; + default: + log.log(WARNING, "Unexpected document API operation outcome '" + response.outcome() + "' " + response.getTextMessage()); + jsonResponse.commit(Response.Status.BAD_GATEWAY); } } } @@ -1248,6 +1250,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler { visit(request, parameters, false, handler, new VisitCallback() { }); } + @SuppressWarnings("fallthrough") private void visit(HttpRequest request, VisitorParameters parameters, boolean streaming, ResponseHandler handler, VisitCallback callback) { try { JsonResponse response = JsonResponse.create(request, handler); |