servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tt...@apache.org
Subject svn commit: r527473 - /incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java
Date Wed, 11 Apr 2007 12:36:35 GMT
Author: tterm
Date: Wed Apr 11 05:36:32 2007
New Revision: 527473

URL: http://svn.apache.org/viewvc?view=rev&rev=527473
Log:
SM-931 PMD/CheckStyle errors for servicemix-eip

Modified:
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java?view=diff&rev=527473&r1=527472&r2=527473
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java
Wed Apr 11 05:36:32 2007
@@ -16,18 +16,18 @@
  */
 package org.apache.servicemix.eip.support;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import javax.jbi.messaging.MessageExchange;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.DefaultResourceLoader;
 import org.springframework.beans.factory.InitializingBean;
+import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.core.io.Resource;
+
 
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.NormalizedMessage;
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
 
 /**
  * switch (on/off) predicate based on a property that can come from
@@ -45,22 +45,22 @@
  */
 public class SwitchPredicate implements InitializingBean, Predicate {
 
-    private static final Log log = LogFactory.getLog(SwitchPredicate.class);
+    private static Log log = LogFactory.getLog(SwitchPredicate.class);
 
     // property resource optionally
     private Resource propertyResource;
 
     // use property from exchange
-    private boolean fromExchange = false;
+    private boolean fromExchange;
 
     // property name
     private String propertyName = "on";
 
     private Boolean on = Boolean.FALSE;
 
-    private File propertyFile = null;
+    private File propertyFile;
 
-    private boolean dirty = false;
+    private boolean dirty;
 
     public void afterPropertiesSet() throws Exception {
         try {
@@ -93,7 +93,7 @@
     }
 
     public void setOn(boolean status) {
-        on = new Boolean(status);
+        on = Boolean.valueOf(status);
     }
 
     public String getPropertyName() {
@@ -152,7 +152,6 @@
         if (fromExchange) {
             // property comes from exchange
             try {
-                NormalizedMessage in = exchange.getMessage("in");
                 Object value = exchange.getProperty(propertyName);
                 if (value != null) {
                     match = Boolean.valueOf(value.toString());



Mime
View raw message