You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/12/11 17:09:20 UTC
svn commit: r725725 -
/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
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);