camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1240376 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: CamelContext.java management/mbean/ManagedCamelContext.java
Date Fri, 03 Feb 2012 22:32:09 GMT
Author: bvahdat
Date: Fri Feb  3 22:32:08 2012
New Revision: 1240376

URL: http://svn.apache.org/viewvc?rev=1240376&view=rev
Log:
Corrected CamelContext.removeEndpoints() Javadoc & it's API usage by ManagedCamelContext.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=1240376&r1=1240375&r2=1240376&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java Fri Feb  3 22:32:08
2012
@@ -306,7 +306,7 @@ public interface CamelContext extends Su
      * Removes all endpoints with the given URI.
      *
      * @param pattern an uri or pattern to match
-     * @return a collection of endpoints removed or null if there are no endpoints for this
URI
+     * @return a collection of endpoints removed which could be empty if there are no endpoints
found for the given <tt>pattern</tt>
      * @throws Exception if at least one endpoint could not be stopped
      * @see org.apache.camel.util.EndpointHelper#matchEndpoint(String, String) for pattern
      */

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java?rev=1240376&r1=1240375&r2=1240376&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
Fri Feb  3 22:32:08 2012
@@ -318,11 +318,7 @@ public class ManagedCamelContext impleme
     public int removeEndpoints(String pattern) throws Exception {
         // endpoints is always removed from JMX if removed from context
         Collection<Endpoint> removed = context.removeEndpoints(pattern);
-        if (removed == null) {
-            return 0;
-        } else {
-            return removed.size();
-        }
+        return removed.size();
     }
 
 }



Mime
View raw message