qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1734973 - in /qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet: query/ConfiguredObjectQuery.java query/QueryException.java rest/QueryServlet.java
Date Mon, 14 Mar 2016 17:27:08 GMT
Author: rgodfrey
Date: Mon Mar 14 17:27:07 2016
New Revision: 1734973

URL: http://svn.apache.org/viewvc?rev=1734973&view=rev
Log:
QPID-6969 : Address some review comments from [~lorenz.quack]

Removed:
    qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/QueryException.java
Modified:
    qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/ConfiguredObjectQuery.java
    qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/QueryServlet.java

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/ConfiguredObjectQuery.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/ConfiguredObjectQuery.java?rev=1734973&r1=1734972&r2=1734973&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/ConfiguredObjectQuery.java
(original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/query/ConfiguredObjectQuery.java
Mon Mar 14 17:27:07 2016
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.qpid.filter.BooleanExpression;
 import org.apache.qpid.filter.Expression;
+import org.apache.qpid.filter.SelectorParsingException;
 import org.apache.qpid.server.model.ConfiguredObject;
 
 public final class ConfiguredObjectQuery
@@ -92,7 +93,7 @@ public final class ConfiguredObjectQuery
             }
             catch (ParseException | TokenMgrError e)
             {
-                throw new QueryException("Unable to parse select clause");
+                throw new SelectorParsingException("Unable to parse select clause");
             }
         }
         else
@@ -148,7 +149,7 @@ public final class ConfiguredObjectQuery
         }
         catch (ParseException | TokenMgrError e)
         {
-            throw new QueryException("Unable to parse where clause");
+            throw new SelectorParsingException("Unable to parse where clause");
         }
         return filteredObjects;
     }

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/QueryServlet.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/QueryServlet.java?rev=1734973&r1=1734972&r2=1734973&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/QueryServlet.java
(original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/QueryServlet.java
Mon Mar 14 17:27:07 2016
@@ -32,8 +32,8 @@ import javax.servlet.http.HttpServletRes
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.qpid.filter.SelectorParsingException;
 import org.apache.qpid.server.management.plugin.servlet.query.ConfiguredObjectQuery;
-import org.apache.qpid.server.management.plugin.servlet.query.QueryException;
 import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.Model;
 
@@ -62,7 +62,7 @@ public abstract class QueryServlet<X ext
     {
         String categoryName;
         X parent = getParent(request);
-        if( parent != null && ((categoryName = getRequestedCategory(request)) !=
null))
+        if (parent != null && ((categoryName = getRequestedCategory(request)) !=
null))
         {
             Model model = parent.getModel();
 
@@ -83,7 +83,7 @@ public abstract class QueryServlet<X ext
                     resultsObject.put("results", query.getResults());
                     sendJsonResponse(resultsObject, request, response);
                 }
-                catch(QueryException e)
+                catch (SelectorParsingException e)
                 {
                     sendJsonErrorResponse(request,
                                           response,
@@ -104,6 +104,7 @@ public abstract class QueryServlet<X ext
         {
             sendJsonErrorResponse(request, response, HttpServletResponse.SC_NOT_FOUND, "Invalid
path");
         }
+
     }
 
     abstract protected X getParent(final HttpServletRequest request);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message