asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Blow (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Fix QueryCancellationServlet use of e.getMessage()
Date Wed, 07 Jun 2017 16:43:21 GMT
Michael Blow has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1809

Change subject: Fix QueryCancellationServlet use of e.getMessage()
......................................................................

Fix QueryCancellationServlet use of e.getMessage()

Correct log message to not utilize getMessage() on arbitrary exceptions

Change-Id: I1f5e2172728d3bc4d0cc4a9990518adcd91ae76b
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/09/1809/1

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java
index 4405d29..bfec146 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java
@@ -72,9 +72,7 @@
             // response: OK
             response.setStatus(HttpResponseStatus.OK);
         } catch (Exception e) {
-            if (LOGGER.isLoggable(Level.WARNING)) {
-                LOGGER.log(Level.WARNING, e.getMessage(), e);
-            }
+            LOGGER.log(Level.WARNING, "unexpected exception thrown from cancel", e);
             // response: INTERNAL SERVER ERROR
             response.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
         }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1809
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f5e2172728d3bc4d0cc4a9990518adcd91ae76b
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mblow@apache.org>

Mime
View raw message