You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/11/26 13:38:15 UTC

svn commit: r1716619 - /qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ApiDocsServlet.java

Author: kwall
Date: Thu Nov 26 12:38:15 2015
New Revision: 1716619

URL: http://svn.apache.org/viewvc?rev=1716619&view=rev
Log:
QPID-6912: Avoid duplicates when list operations of types.

Modified:
    qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ApiDocsServlet.java

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ApiDocsServlet.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/ApiDocsServlet.java?rev=1716619&r1=1716618&r2=1716619&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ApiDocsServlet.java (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ApiDocsServlet.java Thu Nov 26 12:38:15 2015
@@ -315,11 +315,15 @@ public class ApiDocsServlet extends Abst
         writer.println("<a name=\"types\"><h2>Operations</h2></a>");
         writer.println("<h2>Common Operations</h2>");
 
-        writeOperationsTables(writer, _model.getTypeRegistry().getOperations(getConfiguredClass()).values());
+        Collection<ConfiguredObjectOperation<?>> categoryOperations =
+                _model.getTypeRegistry().getOperations(getConfiguredClass()).values();
+        writeOperationsTables(writer, categoryOperations);
         for(Class<? extends ConfiguredObject> type : _types)
         {
             String typeName = getTypeName(type);
-            final Collection<ConfiguredObjectOperation<?>> typeSpecificOperations = _model.getTypeRegistry().getOperations(type).values();
+            Set<ConfiguredObjectOperation<?>> typeSpecificOperations = new HashSet<>(_model.getTypeRegistry().getOperations(type).values());
+            typeSpecificOperations.removeAll(categoryOperations);
+
             if(!typeSpecificOperations.isEmpty() && type != getConfiguredClass())
             {
                 writer.println("<h2><span class=\"type\">"+typeName+"</span> Specific Operations</h2>");



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