camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1330789 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/component/file/ components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/ components/camel-jcr/src/test/java/org/apache/camel/component/jcr/ components/c...
Date Thu, 26 Apr 2012 11:42:10 GMT
Author: bvahdat
Date: Thu Apr 26 11:42:09 2012
New Revision: 1330789

URL: http://svn.apache.org/viewvc?rev=1330789&view=rev
Log:
Polished.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java
    camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
    camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrProducerTest.java
    camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperUtils.java
    camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ChildrenChangedOperation.java
    camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/DataChangedOperation.java
    camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/SetDataOperation.java
    camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ZooKeeperOperation.java
    camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZookeeperProducerTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
Thu Apr 26 11:42:09 2012
@@ -187,7 +187,7 @@ public class FileOperations implements G
                 // if no charset, then we can try using file directly (optimized)
                 Object body = exchange.getIn().getBody();
                 if (body instanceof WrappedFile) {
-                    body = ((WrappedFile) body).getFile();
+                    body = ((WrappedFile<?>) body).getFile();
                 }
                 if (body instanceof File) {
                     source = (File) body;

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
Thu Apr 26 11:42:09 2012
@@ -25,7 +25,6 @@ import org.apache.camel.Expression;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.camel.spi.Language;
-import org.apache.camel.util.ExchangeHelper;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.LRUCache;
 import org.apache.camel.util.ObjectHelper;

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java
(original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java
Thu Apr 26 11:42:09 2012
@@ -20,7 +20,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.ServicePoolAware;
 import org.apache.camel.component.file.GenericFileOperationFailedException;
 import org.apache.camel.component.file.GenericFileProducer;
-import org.apache.camel.util.ExchangeHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
 

Modified: camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
(original)
+++ camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
Thu Apr 26 11:42:09 2012
@@ -42,8 +42,6 @@ public class JcrConsumerTest extends Jcr
     private String absPath = "/home/test";
     private int eventTypes = Event.NODE_ADDED;
     private boolean deep = true;
-    private String uuids;
-    private String nodeTypeNames;
     private boolean noLocal;
 
     @Test
@@ -94,12 +92,9 @@ public class JcrConsumerTest extends Jcr
         assertNotNull(eventIterator);
         assertEquals(1, eventIterator.getSize());
 
-        Object body = message.getBody();
-        assertTrue(body instanceof List);
-        @SuppressWarnings("unchecked")
-        List<Event> eventList = (List<Event>)body;
+        List<?> eventList = message.getBody(List.class);
         assertEquals(1, eventList.size());
-        Event event = eventList.get(0);
+        Event event = (Event) eventList.get(0);
         assertEquals(Event.NODE_ADDED, event.getType());
         assertNotNull(event.getPath());
         assertTrue(event.getPath().startsWith(absPath));

Modified: camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrProducerTest.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrProducerTest.java
(original)
+++ camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrProducerTest.java
Thu Apr 26 11:42:09 2012
@@ -17,7 +17,6 @@
 package org.apache.camel.component.jcr;
 
 import javax.jcr.Node;
-import javax.jcr.Repository;
 import javax.jcr.Session;
 import javax.jcr.SimpleCredentials;
 

Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperUtils.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperUtils.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperUtils.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperUtils.java
Thu Apr 26 11:42:09 2012
@@ -106,7 +106,7 @@ public final class ZooKeeperUtils {
         return value;
     }
 
-    public static WatchedEvent getWatchedEvent(ZooKeeperOperation zooKeeperOperation) {
+    public static WatchedEvent getWatchedEvent(ZooKeeperOperation<?> zooKeeperOperation)
{
         WatchedEvent watchedEvent = null;
         if (zooKeeperOperation instanceof WatchedEventProvider) {
             watchedEvent = ((WatchedEventProvider)zooKeeperOperation).getWatchedEvent();
@@ -114,7 +114,7 @@ public final class ZooKeeperUtils {
         return watchedEvent;
     }
 
-    public static boolean hasWatchedEvent(ZooKeeperOperation zooKeeperOperation) {
+    public static boolean hasWatchedEvent(ZooKeeperOperation<?> zooKeeperOperation)
{
         return getWatchedEvent(zooKeeperOperation) != null;
     }
 }

Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ChildrenChangedOperation.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ChildrenChangedOperation.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ChildrenChangedOperation.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ChildrenChangedOperation.java
Thu Apr 26 11:42:09 2012
@@ -55,8 +55,7 @@ public class ChildrenChangedOperation ex
     }
 
     @Override
-    @SuppressWarnings("rawtypes")
-    public ZooKeeperOperation createCopy() throws Exception {
+    public ZooKeeperOperation<?> createCopy() throws Exception {
         ChildrenChangedOperation copy = (ChildrenChangedOperation) super.createCopy();
         copy.getChangedListing = getChangedListing;
         return copy;

Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/DataChangedOperation.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/DataChangedOperation.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/DataChangedOperation.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/DataChangedOperation.java
Thu Apr 26 11:42:09 2012
@@ -65,7 +65,7 @@ public class DataChangedOperation extend
     }
 
     @Override
-    public ZooKeeperOperation createCopy() throws Exception {
+    public ZooKeeperOperation<?> createCopy() throws Exception {
         return getClass().getConstructor(CONSTRUCTOR_ARGS).newInstance(new Object[] {connection,
node, getChangedData, sendEmptyMessageOnDelete});
     }
 }

Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/SetDataOperation.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/SetDataOperation.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/SetDataOperation.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/SetDataOperation.java
Thu Apr 26 11:42:09 2012
@@ -59,8 +59,7 @@ public class SetDataOperation extends Zo
     }
 
     @Override
-    @SuppressWarnings("rawtypes")
-    public ZooKeeperOperation createCopy() throws Exception {
+    public ZooKeeperOperation<?> createCopy() throws Exception {
         SetDataOperation copy = (SetDataOperation) super.createCopy();
         copy.version = -1; // set the version to -1 for 'any version'
         return copy;

Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ZooKeeperOperation.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ZooKeeperOperation.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ZooKeeperOperation.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/ZooKeeperOperation.java
Thu Apr 26 11:42:09 2012
@@ -31,12 +31,11 @@ import org.slf4j.LoggerFactory;
  * ZooKeeper API instructions and callbacks into callable and composable operation
  * objects.
  */
-@SuppressWarnings("rawtypes")
 public abstract class ZooKeeperOperation<ResultType> {
 
     protected static final transient Logger LOG = LoggerFactory.getLogger(ZooKeeperOperation.class);
 
-    protected static final Class[] CONSTRUCTOR_ARGS = {ZooKeeper.class, String.class};
+    protected static final Class<?>[] CONSTRUCTOR_ARGS = {ZooKeeper.class, String.class};
 
     protected String node;
 
@@ -104,7 +103,7 @@ public abstract class ZooKeeperOperation
     }
 
     // TODO slightly different to a clone as it uses the constructor
-    public ZooKeeperOperation createCopy() throws Exception {
+    public ZooKeeperOperation<?> createCopy() throws Exception {
         return getClass().getConstructor(CONSTRUCTOR_ARGS).newInstance(new Object[] {connection,
node});
     }
 }

Modified: camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZookeeperProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZookeeperProducerTest.java?rev=1330789&r1=1330788&r2=1330789&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZookeeperProducerTest.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZookeeperProducerTest.java
Thu Apr 26 11:42:09 2012
@@ -107,7 +107,6 @@ public class ZookeeperProducerTest exten
 
     @Test
     public void setUsingCreateModeFromHeader() throws Exception {
-
         client.createPersistent("/modes-test", "parent for modes");
         for (CreateMode mode : CreateMode.values()) {
             Exchange exchange = createExchangeWithBody(testPayload);
@@ -136,9 +135,7 @@ public class ZookeeperProducerTest exten
     }
 
     @Test
-    @SuppressWarnings("unchecked")
     public void setAndGetListing() throws Exception {
-
         client.createPersistent("/set-listing", "parent for set and list test");
 
         Exchange exchange = createExchangeWithBody(testPayload);
@@ -152,7 +149,6 @@ public class ZookeeperProducerTest exten
 
     @Test
     public void testZookeeperMessage() throws Exception {
-
         MockEndpoint mock = getMockEndpoint("mock:consumed-from-node");
         mock.expectedMessageCount(1);
 



Mime
View raw message