You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/09/19 12:33:34 UTC

svn commit: r697039 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel: processor/interceptor/DelayInterceptor.java processor/interceptor/Delayer.java util/ResolverUtil.java

Author: ningjiang
Date: Fri Sep 19 03:33:34 2008
New Revision: 697039

URL: http://svn.apache.org/viewvc?rev=697039&view=rev
Log:
CAMEL-921 skip the bundle URL for the non-osgi classloader. Also add the ASF headers for Delayer and DelayerInterceptor

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/DelayInterceptor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/Delayer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/DelayInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/DelayInterceptor.java?rev=697039&r1=697038&r2=697039&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/DelayInterceptor.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/DelayInterceptor.java Fri Sep 19 03:33:34 2008
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.processor.interceptor;
 
 import org.apache.camel.Exchange;

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/Delayer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/Delayer.java?rev=697039&r1=697038&r2=697039&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/Delayer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/Delayer.java Fri Sep 19 03:33:34 2008
@@ -1,12 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.processor.interceptor;
 
 import java.util.List;
 
-import org.apache.camel.spi.InterceptStrategy;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Processor;
-import org.apache.camel.model.ProcessorType;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.model.ProcessorType;
+import org.apache.camel.spi.InterceptStrategy;
 
 /**
  * An interceptor strategy for delaying routes.

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java?rev=697039&r1=697038&r2=697039&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java Fri Sep 19 03:33:34 2008
@@ -382,7 +382,7 @@
                 }
 
                 // osgi bundles should be skipped
-                if (urlPath.startsWith("bundle:")) {
+                if (url.toString().startsWith("bundle:") || urlPath.startsWith("bundle:")) {
                     LOG.trace("It's a virtual osgi bundle, skipping");
                     continue;
                 }
@@ -471,7 +471,7 @@
                     }
                     Enumeration<URL> paths = bd.findEntries("/" + packageName, "*.class", true);
                     while (paths != null && paths.hasMoreElements()) {
-                        URL path = paths.nextElement();
+                        URL path = paths.nextElement();                        
                         urls.add(path.getPath().substring(1));
                     }
                 }