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)
@@ -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);
