camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r725725 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
Date Thu, 11 Dec 2008 16:09:20 GMT
Author: davsclaus
Date: Thu Dec 11 08:09:19 2008
New Revision: 725725

URL: http://svn.apache.org/viewvc?rev=725725&view=rev
Log:
polished code

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java?rev=725725&r1=725724&r2=725725&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
Thu Dec 11 08:09:19 2008
@@ -36,6 +36,7 @@
     public static FileProcessStrategy createFileProcessStrategy(Map<String, Object>
params) {
 
         // We assume a value is present only if its value not null for String and 'true'
for boolean
+        boolean isNoop = params.get("noop") != null;
         boolean isDelete = params.get("delete") != null;
         boolean isLock = params.get("lock") != null;
         String moveNamePrefix = (String) params.get("moveNamePrefix");
@@ -47,7 +48,7 @@
         boolean move = moveNamePrefix != null || moveNamePostfix != null;
         boolean preMove = preMoveNamePrefix != null || preMoveNamePostfix != null;
 
-        if (params.containsKey("noop")) {
+        if (isNoop) {
             return new NoOpFileProcessStrategy(isLock);
         } else if (move || preMove) {
             RenameFileProcessStrategy strategy = new RenameFileProcessStrategy(isLock);



Mime
View raw message