camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r989026 - in /camel/trunk/components/camel-cache: pom.xml src/main/java/org/apache/camel/component/cache/CacheProducer.java src/main/java/org/apache/camel/processor/cache/CacheBasedXPathReplacer.java
Date Wed, 25 Aug 2010 11:51:26 GMT
Author: davsclaus
Date: Wed Aug 25 11:51:25 2010
New Revision: 989026

URL: http://svn.apache.org/viewvc?rev=989026&view=rev
Log:
CAMEL-3077: Fixed a potential NPE. Thanks to John Ellis for patch.

Modified:
    camel/trunk/components/camel-cache/pom.xml
    camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
    camel/trunk/components/camel-cache/src/main/java/org/apache/camel/processor/cache/CacheBasedXPathReplacer.java

Modified: camel/trunk/components/camel-cache/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cache/pom.xml?rev=989026&r1=989025&r2=989026&view=diff
==============================================================================
--- camel/trunk/components/camel-cache/pom.xml (original)
+++ camel/trunk/components/camel-cache/pom.xml Wed Aug 25 11:51:25 2010
@@ -126,17 +126,6 @@
           <target>1.5</target>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-clean-plugin</artifactId>
-        <configuration>
-          <filesets>
-            <fileset>
-              <directory>${basedir}/res</directory>
-            </fileset>
-          </filesets>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>

Modified: camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java?rev=989026&r1=989025&r2=989026&view=diff
==============================================================================
--- camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
(original)
+++ camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
Wed Aug 25 11:51:25 2010
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.component.cache;
 
 import java.io.InputStream;
@@ -132,7 +131,7 @@ public class CacheProducer extends Defau
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Quering an element with key " + key + " from the Cache");
             }
-            if (cache.isKeyInCache(key)) {
+            if (cache.isKeyInCache(key) && cache.get(key) != null) {
                 exchange.getIn().setHeader(CacheConstants.CACHE_ELEMENT_WAS_FOUND, true);
                 exchange.getIn().setBody(cache.get(key).getValue());
             } else {

Modified: camel/trunk/components/camel-cache/src/main/java/org/apache/camel/processor/cache/CacheBasedXPathReplacer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cache/src/main/java/org/apache/camel/processor/cache/CacheBasedXPathReplacer.java?rev=989026&r1=989025&r2=989026&view=diff
==============================================================================
--- camel/trunk/components/camel-cache/src/main/java/org/apache/camel/processor/cache/CacheBasedXPathReplacer.java
(original)
+++ camel/trunk/components/camel-cache/src/main/java/org/apache/camel/processor/cache/CacheBasedXPathReplacer.java
Wed Aug 25 11:51:25 2010
@@ -39,7 +39,6 @@ import org.apache.camel.util.IOHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-
 public class CacheBasedXPathReplacer extends CacheValidate implements Processor {
     private static final transient Log LOG = LogFactory.getLog(CacheBasedXPathReplacer.class);
     private String cacheName;



Mime
View raw message