You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2012/01/14 01:13:16 UTC
svn commit: r1231420 [2/4] - in /camel/trunk:
camel-core/src/main/java/org/apache/camel/builder/
camel-core/src/main/java/org/apache/camel/component/bean/
camel-core/src/main/java/org/apache/camel/component/mock/
camel-core/src/main/java/org/apache/cam...
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java Sat Jan 14 00:13:10 2012
@@ -58,9 +58,9 @@ public class BeanLanguageInvalidOGNLTest
public static class MyReallyCoolBean {
- private Map map = new LinkedHashMap();
+ private Map<?, ?> map = new LinkedHashMap<Object, Object>();
- public Map getOther() {
+ public Map<?, ?> getOther() {
return map;
}
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleOgnlMapIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleOgnlMapIssueTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleOgnlMapIssueTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleOgnlMapIssueTest.java Sat Jan 14 00:13:10 2012
@@ -67,13 +67,13 @@ public class SimpleOgnlMapIssueTest exte
}
public static final class MyObjectMessage {
- private Map property;
+ private Map<Object, Object> property;
public MyObjectMessage() {
- this.property = new HashMap();
+ this.property = new HashMap<Object, Object>();
}
- public Map getProperty() {
+ public Map<Object, Object> getProperty() {
return property;
}
}
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java Sat Jan 14 00:13:10 2012
@@ -65,7 +65,7 @@ public class IdempotentConsumerTest exte
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- IdempotentRepository repo = MemoryIdempotentRepository.memoryIdempotentRepository(200);
+ IdempotentRepository<String> repo = MemoryIdempotentRepository.memoryIdempotentRepository(200);
from("direct:start")
.idempotentConsumer(header("messageId")).messageIdRepository(repo).skipDuplicate(false)
@@ -96,7 +96,7 @@ public class IdempotentConsumerTest exte
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- IdempotentRepository repo = MemoryIdempotentRepository.memoryIdempotentRepository(200);
+ IdempotentRepository<String> repo = MemoryIdempotentRepository.memoryIdempotentRepository(200);
// START SNIPPET: e1
from("direct:start")
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SortExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SortExpressionTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SortExpressionTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SortExpressionTest.java Sat Jan 14 00:13:10 2012
@@ -34,7 +34,7 @@ public class SortExpressionTest extends
assertMockEndpointsSatisfied();
- List list = mock.getExchanges().get(0).getIn().getBody(List.class);
+ List<?> list = mock.getExchanges().get(0).getIn().getBody(List.class);
assertEquals("Claus", list.get(0));
assertEquals("Hadrian", list.get(1));
assertEquals("William", list.get(2));
@@ -48,7 +48,7 @@ public class SortExpressionTest extends
assertMockEndpointsSatisfied();
- List list = mock.getExchanges().get(0).getIn().getBody(List.class);
+ List<?> list = mock.getExchanges().get(0).getIn().getBody(List.class);
assertEquals("William", list.get(0));
assertEquals("Hadrian", list.get(1));
assertEquals("Claus", list.get(2));
@@ -69,7 +69,7 @@ public class SortExpressionTest extends
}
// START SNIPPET: e3
- public static class MyReverseComparator implements Comparator {
+ public static class MyReverseComparator implements Comparator<Object> {
// must have default constructor when used by spring bean testing
public MyReverseComparator() {
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java Sat Jan 14 00:13:10 2012
@@ -221,8 +221,8 @@ public class SplitterTest extends Contex
resultEndpoint.expectedMessageCount(4);
resultEndpoint.expectedBodiesReceived("A", "B", "C", "D");
final List<String> data = Arrays.asList("A", "B", "C", "D");
- Iterable itb = new Iterable() {
- public Iterator iterator() {
+ Iterable<String> itb = new Iterable<String>() {
+ public Iterator<String> iterator() {
return data.iterator();
}
};
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java Sat Jan 14 00:13:10 2012
@@ -52,7 +52,7 @@ public class AlbertoAggregatorTest exten
karamazovBrothers.add("Alexei");
karamazovBrothers.add("Dimitri");
- Map<String, List> allBrothers = new HashMap<String, List>();
+ Map<String, List<String>> allBrothers = new HashMap<String, List<String>>();
allBrothers.put("Marx", marxBrothers);
allBrothers.put("Karamazov", karamazovBrothers);
@@ -100,11 +100,11 @@ public class AlbertoAggregatorTest exten
Exchange answer = newExchange;
if (oldExchange != null) {
- Map<String, List> brothers = oldExchange.getIn().getBody(Map.class);
+ Map<String, List<?>> brothers = oldExchange.getIn().getBody(Map.class);
brothers.put(newExchange.getIn().getHeader(SURNAME_HEADER, String.class), newExchange.getIn().getBody(List.class));
answer = oldExchange;
} else {
- Map<String, List> brothers = new HashMap<String, List>();
+ Map<String, List<?>> brothers = new HashMap<String, List<?>>();
brothers.put(newExchange.getIn().getHeader(SURNAME_HEADER, String.class), newExchange.getIn().getBody(List.class));
newExchange.getIn().setBody(brothers);
}
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java Sat Jan 14 00:13:10 2012
@@ -32,7 +32,7 @@ public class DefaultTimeoutMapTest exten
private ScheduledExecutorService executor = new ScheduledThreadPoolExecutor(1);
public void testDefaultTimeoutMap() {
- DefaultTimeoutMap map = new DefaultTimeoutMap(executor);
+ DefaultTimeoutMap<?, ?> map = new DefaultTimeoutMap<Object, Object>(executor);
assertTrue(map.currentTime() > 0);
assertEquals(0, map.size());
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/AnotherExampleBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/AnotherExampleBean.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/AnotherExampleBean.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/AnotherExampleBean.java Sat Jan 14 00:13:10 2012
@@ -27,7 +27,7 @@ public class AnotherExampleBean {
private String name;
private double price;
private Date date;
- private Collection children;
+ private Collection<?> children;
private Boolean goldCustomer;
private boolean little;
@@ -67,11 +67,11 @@ public class AnotherExampleBean {
this.date = date;
}
- public Collection getChildren() {
+ public Collection<?> getChildren() {
return children;
}
- public void setChildren(Collection children) {
+ public void setChildren(Collection<?> children) {
this.children = children;
}
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java Sat Jan 14 00:13:10 2012
@@ -229,7 +229,7 @@ public class CaseInsensitiveMapTest exte
map.put("BAR", 123);
map.put("baZ", "beer");
- Set keys = map.keySet();
+ Set<String> keys = map.keySet();
// we should be able to lookup no matter what case
assertTrue(keys.contains("Foo"));
@@ -276,14 +276,14 @@ public class CaseInsensitiveMapTest exte
map.put("BAR", "123");
map.put("baZ", "Beer");
- Iterator it = map.values().iterator();
+ Iterator<Object> it = map.values().iterator();
// should be String values
assertEquals("String", it.next().getClass().getSimpleName());
assertEquals("String", it.next().getClass().getSimpleName());
assertEquals("String", it.next().getClass().getSimpleName());
- Collection values = map.values();
+ Collection<Object> values = map.values();
assertEquals(3, values.size());
assertTrue(values.contains("cheese"));
assertTrue(values.contains("123"));
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java Sat Jan 14 00:13:10 2012
@@ -53,7 +53,7 @@ public class ExchangeHelperTest extends
public void testPropertyOfIncompatibleType() throws Exception {
try {
- List value = ExchangeHelper.getMandatoryProperty(exchange, "foo", List.class);
+ List<?> value = ExchangeHelper.getMandatoryProperty(exchange, "foo", List.class);
fail("Should have failed but got: " + value);
} catch (NoSuchPropertyException e) {
assertEquals("foo", e.getPropertyName());
@@ -72,7 +72,7 @@ public class ExchangeHelperTest extends
public void testHeaderOfIncompatibleType() throws Exception {
exchange.getIn().setHeader("foo", 123);
try {
- List value = ExchangeHelper.getMandatoryHeader(exchange, "foo", List.class);
+ List<?> value = ExchangeHelper.getMandatoryHeader(exchange, "foo", List.class);
fail("Should have failed but got: " + value);
} catch (NoSuchHeaderException e) {
assertEquals("foo", e.getHeaderName());
@@ -135,7 +135,7 @@ public class ExchangeHelperTest extends
exchange.getOut().setBody("bar");
exchange.getOut().setHeader("quote", "Camel rocks");
- Map map = ExchangeHelper.createVariableMap(exchange);
+ Map<?, ?> map = ExchangeHelper.createVariableMap(exchange);
assertEquals(8, map.size());
assertSame(exchange, map.get("exchange"));
@@ -154,7 +154,7 @@ public class ExchangeHelperTest extends
exchange.getIn().setHeader("quote", "Camel rocks");
assertFalse(exchange.hasOut());
- Map map = ExchangeHelper.createVariableMap(exchange);
+ Map<?, ?> map = ExchangeHelper.createVariableMap(exchange);
// there should still be 8 in the map
assertEquals(8, map.size());
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/KeyValueHolderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/KeyValueHolderTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/KeyValueHolderTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/KeyValueHolderTest.java Sat Jan 14 00:13:10 2012
@@ -23,20 +23,19 @@ import junit.framework.TestCase;
*/
public class KeyValueHolderTest extends TestCase {
- @SuppressWarnings("unchecked")
public void testKeyValueHolder() {
- KeyValueHolder foo = new KeyValueHolder("foo", 123);
+ KeyValueHolder<String, Integer> foo = new KeyValueHolder<String, Integer>("foo", 123);
assertEquals("foo", foo.getKey());
- assertEquals(123, foo.getValue());
+ assertEquals(123, foo.getValue().intValue());
- KeyValueHolder bar = new KeyValueHolder("bar", 456);
+ KeyValueHolder<String, Integer> bar = new KeyValueHolder<String, Integer>("bar", 456);
assertFalse("Should not be equals", foo.equals(bar));
assertNotSame(foo.hashCode(), bar.hashCode());
- KeyValueHolder bar2 = new KeyValueHolder("bar", 456);
+ KeyValueHolder<String, Integer> bar2 = new KeyValueHolder<String, Integer>("bar", 456);
assertTrue("Should be equals", bar.equals(bar2));
assertEquals("foo -> 123", foo.toString());
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java Sat Jan 14 00:13:10 2012
@@ -103,7 +103,7 @@ public class URISupportTest extends Cont
public void testCreateRemaingURI() throws Exception {
URI original = new URI("http://camel.apache.org");
- Map<Object, Object> param = new HashMap<Object, Object>();
+ Map<String, Object> param = new HashMap<String, Object>();
param.put("foo", "123");
URI newUri = URISupport.createRemainingURI(original, param);
assertNotNull(newUri);
@@ -144,7 +144,7 @@ public class URISupportTest extends Cont
String uri = "http://localhost:23271/myapp/mytest?columns=name%2Ctotalsens%2Cupsens&username=apiuser";
// these are the parameters which is tricky to encode
- Map<Object, Object> map = new LinkedHashMap<Object, Object>();
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
map.put("foo", "abc def");
map.put("bar", "123,456");
map.put("name", "S\u00F8ren"); // danish letter
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/jndi/JndiTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/jndi/JndiTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/jndi/JndiTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/jndi/JndiTest.java Sat Jan 14 00:13:10 2012
@@ -32,13 +32,12 @@ import org.apache.camel.TestSupport;
public class JndiTest extends TestSupport {
protected Context context;
- @SuppressWarnings("unchecked")
public static Context createInitialContext() throws Exception {
InputStream in = JndiTest.class.getClassLoader().getResourceAsStream("jndi-example.properties");
assertNotNull("Cannot find jndi-example.properties on the classpath!", in);
Properties properties = new Properties();
properties.load(in);
- return new InitialContext(new Hashtable(properties));
+ return new InitialContext(new Hashtable<Object, Object>(properties));
}
Modified: camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java (original)
+++ camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java Sat Jan 14 00:13:10 2012
@@ -27,7 +27,6 @@ import com.ning.http.client.filter.Respo
import org.apache.camel.Endpoint;
import org.apache.camel.impl.HeaderFilterStrategyComponent;
-import org.apache.camel.util.CastUtils;
import org.apache.camel.util.IntrospectionSupport;
import org.apache.camel.util.URISupport;
import org.apache.camel.util.jsse.SSLContextParameters;
@@ -90,7 +89,7 @@ public class AhcComponent extends Header
}
// restructure uri to be based on the parameters left as we don't want to include the Camel internal options
- URI httpUri = URISupport.createRemainingURI(new URI(addressUri), CastUtils.cast(parameters));
+ URI httpUri = URISupport.createRemainingURI(new URI(addressUri), parameters);
endpoint.setHttpUri(httpUri);
return endpoint;
Modified: camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java (original)
+++ camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java Sat Jan 14 00:13:10 2012
@@ -22,7 +22,6 @@ import java.util.Map;
import org.apache.camel.Endpoint;
import org.apache.camel.component.feed.FeedComponent;
import org.apache.camel.component.feed.FeedEndpoint;
-import org.apache.camel.util.CastUtils;
import org.apache.camel.util.URISupport;
/**
@@ -51,8 +50,7 @@ public class AtomComponent extends FeedC
// for the http feed
String feedUri;
if (!parameters.isEmpty()) {
- Map<Object, Object> params = CastUtils.cast(parameters);
- URI remainingUri = URISupport.createRemainingURI(new URI(remaining), params);
+ URI remainingUri = URISupport.createRemainingURI(new URI(remaining), parameters);
feedUri = remainingUri.toString();
} else {
feedUri = remaining;
Modified: camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java (original)
+++ camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java Sat Jan 14 00:13:10 2012
@@ -28,6 +28,7 @@ import org.apache.camel.Processor;
public abstract class FeedEntryPollingConsumer extends FeedPollingConsumer {
protected int entryIndex;
protected EntryFilter entryFilter;
+ @SuppressWarnings("rawtypes")
protected List list;
protected boolean throttleEntries;
protected Object feed;
Modified: camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java (original)
+++ camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java Sat Jan 14 00:13:10 2012
@@ -47,7 +47,7 @@ public class AtomPollingConsumerTest ext
Feed feed = in.getHeader(AtomConstants.ATOM_FEED, Feed.class);
assertEquals("James Strachan", feed.getAuthor().getName());
- List entries = in.getBody(List.class);
+ List<?> entries = in.getBody(List.class);
assertEquals(7, entries.size());
}
Modified: camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java (original)
+++ camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java Sat Jan 14 00:13:10 2012
@@ -103,11 +103,10 @@ public class ActivityMonitorEngine exten
}
}
- @SuppressWarnings("unchecked")
protected void fireExpiredEvent(final ActivityState activityState) {
LOG.debug("Trying to fire expiration of: {}", activityState);
- template.execute(new JpaCallback() {
+ template.execute(new JpaCallback<Object>() {
public Object doInJpa(EntityManager entityManager) throws PersistenceException {
// let's try locking the object first
if (isUseLocking()) {
Modified: camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractFactory.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractFactory.java (original)
+++ camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractFactory.java Sat Jan 14 00:13:10 2012
@@ -197,7 +197,7 @@ public abstract class BindyAbstractFacto
/**
* Format the object into a string according to the format rue defined
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public String formatString(Format format, Object value) throws Exception {
String strValue = "";
Modified: camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java (original)
+++ camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java Sat Jan 14 00:13:10 2012
@@ -77,7 +77,7 @@ public class BindyCsvDataFormat extends
// the body is not a prepared list so help a bit here and create one for us
if (exchange.getContext().getTypeConverter().convertTo(List.class, body) == null) {
models = new ArrayList<Map<String, Object>>();
- Iterator it = ObjectHelper.createIterator(body);
+ Iterator<Object> it = ObjectHelper.createIterator(body);
while (it.hasNext()) {
Object model = it.next();
String name = model.getClass().getName();
Modified: camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/fixed/BindyFixedLengthDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/fixed/BindyFixedLengthDataFormat.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/fixed/BindyFixedLengthDataFormat.java (original)
+++ camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/fixed/BindyFixedLengthDataFormat.java Sat Jan 14 00:13:10 2012
@@ -67,7 +67,7 @@ public class BindyFixedLengthDataFormat
// the body is not a prepared list so help a bit here and create one for us
if (exchange.getContext().getTypeConverter().convertTo(List.class, body) == null) {
models = new ArrayList<Map<String, Object>>();
- Iterator it = ObjectHelper.createIterator(body);
+ Iterator<?> it = ObjectHelper.createIterator(body);
while (it.hasNext()) {
Object model = it.next();
String name = model.getClass().getName();
Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyCsvBigFileUnmarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyCsvBigFileUnmarshallTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyCsvBigFileUnmarshallTest.java (original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyCsvBigFileUnmarshallTest.java Sat Jan 14 00:13:10 2012
@@ -46,7 +46,7 @@ public class BindyCsvBigFileUnmarshallTe
protected void assertCountRecords() {
Exchange exchange = resultEndpoint.getExchanges().get(0);
- List models = exchange.getIn().getBody(List.class);
+ List<?> models = exchange.getIn().getBody(List.class);
assertEquals(10000, models.size());
}
Modified: camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java (original)
+++ camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java Sat Jan 14 00:13:10 2012
@@ -118,7 +118,7 @@ public class CamelContextFactoryBean ext
@XmlElement(name = "export", type = CamelServiceExporterDefinition.class, required = false),
@XmlElement(name = "errorHandler", type = CamelErrorHandlerFactoryBean.class, required = false)
})
- private List beans;
+ private List<?> beans;
@XmlElement(name = "routeBuilder", required = false)
private List<RouteBuilderDefinition> builderRefs = new ArrayList<RouteBuilderDefinition>();
@XmlElement(name = "routeContextRef", required = false)
Modified: camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextPublisher.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextPublisher.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextPublisher.java (original)
+++ camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiCamelContextPublisher.java Sat Jan 14 00:13:10 2012
@@ -88,7 +88,7 @@ public class OsgiCamelContextPublisher e
}
public static Version getBundleVersion(Bundle bundle) {
- Dictionary headers = bundle.getHeaders();
+ Dictionary<?, ?> headers = bundle.getHeaders();
String version = (String) headers.get(Constants.BUNDLE_VERSION);
return (version != null) ? Version.parseVersion(version) : Version.emptyVersion;
}
Modified: camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiEventAdminNotifier.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiEventAdminNotifier.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiEventAdminNotifier.java (original)
+++ camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiEventAdminNotifier.java Sat Jan 14 00:13:10 2012
@@ -139,7 +139,7 @@ public class OsgiEventAdminNotifier exte
}
public static Version getBundleVersion(Bundle bundle) {
- Dictionary headers = bundle.getHeaders();
+ Dictionary<?, ?> headers = bundle.getHeaders();
String version = (String)headers.get(Constants.BUNDLE_VERSION);
return (version != null) ? Version.parseVersion(version) : Version.emptyVersion;
}
Modified: camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/other/MyOtherTypeConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/other/MyOtherTypeConverter.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/other/MyOtherTypeConverter.java (original)
+++ camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/other/MyOtherTypeConverter.java Sat Jan 14 00:13:10 2012
@@ -56,7 +56,7 @@ public final class MyOtherTypeConverter
public static Object convertTo(Class<?> type, Exchange exchange, Object value, TypeConverterRegistry registry) {
// use a fallback type converter so we can convert the embedded body if the value is GenericFile
if (GenericFile.class.isAssignableFrom(value.getClass())) {
- GenericFile file = (GenericFile) value;
+ GenericFile<?> file = (GenericFile<?>) value;
Class<?> from = file.getBody().getClass();
// maybe from is already the type we want
Modified: camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/test/MyTypeConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/test/MyTypeConverter.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/test/MyTypeConverter.java (original)
+++ camel/trunk/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/test/MyTypeConverter.java Sat Jan 14 00:13:10 2012
@@ -56,7 +56,7 @@ public final class MyTypeConverter {
public static Object convertTo(Class<?> type, Exchange exchange, Object value, TypeConverterRegistry registry) {
// use a fallback type converter so we can convert the embedded body if the value is GenericFile
if (GenericFile.class.isAssignableFrom(value.getClass())) {
- GenericFile file = (GenericFile) value;
+ GenericFile<?> file = (GenericFile<?>) value;
Class<?> from = file.getBody().getClass();
// maybe from is already the type we want
Modified: camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelConsumerTemplateFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelConsumerTemplateFactoryBean.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelConsumerTemplateFactoryBean.java (original)
+++ camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelConsumerTemplateFactoryBean.java Sat Jan 14 00:13:10 2012
@@ -52,8 +52,8 @@ public abstract class AbstractCamelConsu
return template;
}
- public Class<DefaultConsumerTemplate> getObjectType() {
- return DefaultConsumerTemplate.class;
+ public Class<ConsumerTemplate> getObjectType() {
+ return ConsumerTemplate.class;
}
public void destroy() throws Exception {
Modified: camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java (original)
+++ camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java Sat Jan 14 00:13:10 2012
@@ -64,14 +64,14 @@ public class CsvDataFormat implements Da
csv.setWriter(out);
try {
- List list = ExchangeHelper.convertToType(exchange, List.class, object);
+ List<?> list = ExchangeHelper.convertToType(exchange, List.class, object);
if (list != null) {
for (Object child : list) {
- Map row = ExchangeHelper.convertToMandatoryType(exchange, Map.class, child);
+ Map<?, ?> row = ExchangeHelper.convertToMandatoryType(exchange, Map.class, child);
doMarshalRecord(exchange, row, out, csv);
}
} else {
- Map row = ExchangeHelper.convertToMandatoryType(exchange, Map.class, object);
+ Map<?, ?> row = ExchangeHelper.convertToMandatoryType(exchange, Map.class, object);
doMarshalRecord(exchange, row, out, csv);
}
} finally {
@@ -79,10 +79,10 @@ public class CsvDataFormat implements Da
}
}
- private void doMarshalRecord(Exchange exchange, Map row, Writer out, CSVWriter csv) throws Exception {
+ private void doMarshalRecord(Exchange exchange, Map<?, ?> row, Writer out, CSVWriter csv) throws Exception {
if (autogenColumns) {
// no specific config has been set so lets add fields
- Set set = row.keySet();
+ Set<?> set = row.keySet();
updateFieldsInConfig(set, exchange);
}
csv.writeRecord(row);
Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/WSDLServiceConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/WSDLServiceConfiguration.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/WSDLServiceConfiguration.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/WSDLServiceConfiguration.java Sat Jan 14 00:13:10 2012
@@ -61,7 +61,7 @@ public class WSDLServiceConfiguration ex
if (services.size() > 1) {
throw new IllegalArgumentException("service name must be specified, there is more than one service in the WSDL" + serviceFactoryBean.getWsdlURL());
}
- serviceQName = (QName)services.keySet().iterator().next();
+ serviceQName = services.keySet().iterator().next();
}
return serviceQName;
}
@@ -84,7 +84,7 @@ public class WSDLServiceConfiguration ex
+ serviceFactoryBean.getServiceQName()
+ " of the WSDL" + serviceFactoryBean.getWsdlURL());
}
- endpointQName = new QName(service.getQName().getNamespaceURI(), (String)ports.keySet().iterator().next());
+ endpointQName = new QName(service.getQName().getNamespaceURI(), ports.keySet().iterator().next());
}
return endpointQName;
Modified: camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminProducer.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminProducer.java (original)
+++ camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminProducer.java Sat Jan 14 00:13:10 2012
@@ -89,19 +89,18 @@ public class EventAdminProducer extends
Event event = context.getTypeConverter().convertTo(Event.class, exchange, in.getBody());
if (event == null) {
String topic = getTopic(exchange);
- Dictionary props = getProperties(exchange);
+ Dictionary<?, ?> props = getProperties(exchange);
event = new Event(topic, props);
}
return event;
}
- protected Dictionary getProperties(Exchange exchange) {
+ protected Dictionary<?, ?> getProperties(Exchange exchange) {
Message in = exchange.getIn();
CamelContext context = endpoint.getCamelContext();
- Map map = context.getTypeConverter().convertTo(Map.class, exchange, in.getBody());
+ Map<?, ?> map = context.getTypeConverter().convertTo(Map.class, exchange, in.getBody());
Dictionary<String, Object> dict = new Hashtable<String, Object>();
- for (Object object : map.entrySet()) {
- Entry entry = (Entry) object;
+ for (Entry<?, ?> entry : map.entrySet()) {
String keyString = CamelContextHelper.convertTo(context, String.class, entry.getKey());
if (keyString != null) {
Object val = entry.getValue();
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java Sat Jan 14 00:13:10 2012
@@ -137,7 +137,7 @@ public class FtpOperations implements Re
// must set soTimeout after connect
if (endpoint instanceof FtpEndpoint) {
- FtpEndpoint ftpEndpoint = (FtpEndpoint) endpoint;
+ FtpEndpoint<?> ftpEndpoint = (FtpEndpoint<?>) endpoint;
if (ftpEndpoint.getSoTimeout() > 0) {
log.trace("Using SoTimeout=" + ftpEndpoint.getSoTimeout());
try {
@@ -169,7 +169,7 @@ public class FtpOperations implements Re
// site commands
if (endpoint.getConfiguration().getSiteCommand() != null) {
// commands can be separated using new line
- Iterator it = ObjectHelper.createIterator(endpoint.getConfiguration().getSiteCommand(), "\n");
+ Iterator<?> it = ObjectHelper.createIterator(endpoint.getConfiguration().getSiteCommand(), "\n");
while (it.hasNext()) {
Object next = it.next();
String command = endpoint.getCamelContext().getTypeConverter().convertTo(String.class, next);
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFile.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFile.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFile.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFile.java Sat Jan 14 00:13:10 2012
@@ -65,9 +65,9 @@ public class RemoteFile<T> extends Gener
}
@Override
- public void copyFromPopulateAdditional(GenericFile source, GenericFile result) {
- RemoteFile remoteSource = (RemoteFile) source;
- RemoteFile remoteResult = (RemoteFile) result;
+ public void copyFromPopulateAdditional(GenericFile<T> source, GenericFile<T> result) {
+ RemoteFile<?> remoteSource = (RemoteFile<?>) source;
+ RemoteFile<?> remoteResult = (RemoteFile<?>) result;
remoteResult.setHostname(remoteSource.getHostname());
}
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java Sat Jan 14 00:13:10 2012
@@ -65,7 +65,7 @@ public class SftpOperations implements R
public interface ExtendedUserInfo extends UserInfo, UIKeyboardInteractive {
}
- public void setEndpoint(GenericFileEndpoint endpoint) {
+ public void setEndpoint(GenericFileEndpoint<ChannelSftp.LsEntry> endpoint) {
this.endpoint = (SftpEndpoint) endpoint;
}
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpProcessStrategyFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpProcessStrategyFactory.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpProcessStrategyFactory.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpProcessStrategyFactory.java Sat Jan 14 00:13:10 2012
@@ -28,6 +28,7 @@ import org.apache.camel.component.file.s
import org.apache.camel.component.file.strategy.GenericFileRenameExclusiveReadLockStrategy;
import org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy;
import org.apache.camel.util.ObjectHelper;
+import org.apache.commons.net.ftp.FTPFile;
public final class FtpProcessStrategyFactory {
@@ -90,7 +91,7 @@ public final class FtpProcessStrategyFac
}
@SuppressWarnings("unchecked")
- private static <FTPFile> GenericFileExclusiveReadLockStrategy<FTPFile> getExclusiveReadLockStrategy(Map<String, Object> params) {
+ private static GenericFileExclusiveReadLockStrategy<FTPFile> getExclusiveReadLockStrategy(Map<String, Object> params) {
GenericFileExclusiveReadLockStrategy<FTPFile> strategy = (GenericFileExclusiveReadLockStrategy<FTPFile>) params.get("exclusiveReadLockStrategy");
if (strategy != null) {
return strategy;
@@ -109,7 +110,7 @@ public final class FtpProcessStrategyFac
}
return readLockStrategy;
} else if ("changed".equals(readLock)) {
- GenericFileExclusiveReadLockStrategy readLockStrategy = new FtpChangedExclusiveReadLockStrategy();
+ GenericFileExclusiveReadLockStrategy<FTPFile> readLockStrategy = new FtpChangedExclusiveReadLockStrategy();
Long timeout = (Long) params.get("readLockTimeout");
if (timeout != null) {
readLockStrategy.setTimeout(timeout);
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpProcessStrategyFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpProcessStrategyFactory.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpProcessStrategyFactory.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpProcessStrategyFactory.java Sat Jan 14 00:13:10 2012
@@ -89,7 +89,7 @@ public final class SftpProcessStrategyFa
}
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
private static <LsEntry> GenericFileExclusiveReadLockStrategy<LsEntry> getExclusiveReadLockStrategy(Map<String, Object> params) {
GenericFileExclusiveReadLockStrategy<LsEntry> strategy = (GenericFileExclusiveReadLockStrategy<LsEntry>) params.get("exclusiveReadLockStrategy");
if (strategy != null) {
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpFilterTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpFilterTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpFilterTest.java Sat Jan 14 00:13:10 2012
@@ -35,7 +35,7 @@ public class FromFtpFilterTest extends F
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
- jndi.bind("myFilter", new MyFileFilter());
+ jndi.bind("myFilter", new MyFileFilter<Object>());
return jndi;
}
@@ -72,8 +72,8 @@ public class FromFtpFilterTest extends F
}
// START SNIPPET: e1
- public class MyFileFilter implements GenericFileFilter {
- public boolean accept(GenericFile file) {
+ public class MyFileFilter<T> implements GenericFileFilter<T> {
+ public boolean accept(GenericFile<T> file) {
// we don't accept any files starting with skip in the name
return !file.getFileName().startsWith("skip");
}
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRemoteFileFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRemoteFileFilterTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRemoteFileFilterTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRemoteFileFilterTest.java Sat Jan 14 00:13:10 2012
@@ -36,7 +36,7 @@ public class FromFtpRemoteFileFilterTest
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
- jndi.bind("myFilter", new MyFileFilter());
+ jndi.bind("myFilter", new MyFileFilter<Object>());
return jndi;
}
@@ -79,9 +79,9 @@ public class FromFtpRemoteFileFilterTest
}
// START SNIPPET: e1
- public class MyFileFilter implements GenericFileFilter {
+ public class MyFileFilter<T> implements GenericFileFilter<T> {
- public boolean accept(GenericFile file) {
+ public boolean accept(GenericFile<T> file) {
// we only want report files
return file.getFileName().startsWith("report");
}
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpBrowsableEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpBrowsableEndpointTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpBrowsableEndpointTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpBrowsableEndpointTest.java Sat Jan 14 00:13:10 2012
@@ -55,13 +55,12 @@ public class FtpBrowsableEndpointTest ex
public void testBrowsableOneFile() throws Exception {
template.sendBodyAndHeader(getFtpUrl(), "A", Exchange.FILE_NAME, "a.txt");
- FtpEndpoint endpoint = context.getEndpoint(getFtpUrl(), FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint(getFtpUrl(), FtpEndpoint.class);
assertNotNull(endpoint);
MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();
assertEquals(0, repo.getCacheSize());
- @SuppressWarnings("unchecked")
List<Exchange> list = endpoint.getExchanges();
assertNotNull(list);
assertEquals(1, list.size());
@@ -81,13 +80,12 @@ public class FtpBrowsableEndpointTest ex
template.sendBodyAndHeader(getFtpUrl(), "A", Exchange.FILE_NAME, "a.txt");
template.sendBodyAndHeader(getFtpUrl(), "B", Exchange.FILE_NAME, "b.txt");
- FtpEndpoint endpoint = context.getEndpoint(getFtpUrl() + "&sortBy=file:name", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint(getFtpUrl() + "&sortBy=file:name", FtpEndpoint.class);
assertNotNull(endpoint);
MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();
assertEquals(0, repo.getCacheSize());
- @SuppressWarnings("unchecked")
List<Exchange> list = endpoint.getExchanges();
assertNotNull(list);
assertEquals(2, list.size());
@@ -111,13 +109,12 @@ public class FtpBrowsableEndpointTest ex
template.sendBodyAndHeader(getFtpUrl(), "B", Exchange.FILE_NAME, "foo/b.txt");
template.sendBodyAndHeader(getFtpUrl(), "C", Exchange.FILE_NAME, "bar/c.txt");
- FtpEndpoint endpoint = context.getEndpoint(getFtpUrl() + "&recursive=true&sortBy=file:name", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint(getFtpUrl() + "&recursive=true&sortBy=file:name", FtpEndpoint.class);
assertNotNull(endpoint);
MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();
assertEquals(0, repo.getCacheSize());
- @SuppressWarnings("unchecked")
List<Exchange> list = endpoint.getExchanges();
assertNotNull(list);
assertEquals(3, list.size());
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/UriConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/UriConfigurationTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/UriConfigurationTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/UriConfigurationTest.java Sat Jan 14 00:13:10 2012
@@ -28,7 +28,7 @@ public class UriConfigurationTest extend
@Test
public void testFtpConfigurationDefaults() {
- FtpEndpoint endpoint = context.getEndpoint("ftp://hostname", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://hostname", FtpEndpoint.class);
RemoteFileConfiguration config = endpoint.getConfiguration();
assertEquals("ftp", config.getProtocol());
@@ -87,7 +87,7 @@ public class UriConfigurationTest extend
@Test
public void testFtpExplicitConfiguration() {
- FtpEndpoint endpoint = context.getEndpoint("ftp://user@hostname:1021/some/file?password=secret&binary=true", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://user@hostname:1021/some/file?password=secret&binary=true", FtpEndpoint.class);
RemoteFileConfiguration config = endpoint.getConfiguration();
assertEquals("ftp", config.getProtocol());
@@ -162,7 +162,7 @@ public class UriConfigurationTest extend
}
private void assertRemoteFileEndpointFile(String endpointUri, String expectedFile) {
- RemoteFileEndpoint endpoint = resolveMandatoryEndpoint(context, endpointUri, RemoteFileEndpoint.class);
+ RemoteFileEndpoint<?> endpoint = resolveMandatoryEndpoint(context, endpointUri, RemoteFileEndpoint.class);
assertNotNull("Could not find endpoint: " + endpointUri, endpoint);
String file = endpoint.getConfiguration().getDirectory();
@@ -185,7 +185,7 @@ public class UriConfigurationTest extend
@Test
public void testPasswordInContextPathConfiguration() {
- FtpEndpoint endpoint = context.getEndpoint("ftp://user:secret@hostname:1021/some/file", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://user:secret@hostname:1021/some/file", FtpEndpoint.class);
RemoteFileConfiguration config = endpoint.getConfiguration();
assertEquals("ftp", config.getProtocol());
@@ -197,7 +197,7 @@ public class UriConfigurationTest extend
@Test
public void testStartingDirectoryWithDot() throws Exception {
- FtpEndpoint endpoint = context.getEndpoint("ftp://user@hostname?password=secret", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://user@hostname?password=secret", FtpEndpoint.class);
FtpConfiguration config = endpoint.getConfiguration();
config.setHost("somewhere");
config.setDirectory("temp.dir");
@@ -210,7 +210,7 @@ public class UriConfigurationTest extend
@Test
public void testPathSeparatorAuto() {
- FtpEndpoint endpoint = context.getEndpoint("ftp://hostname/foo/bar?separator=Auto", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://hostname/foo/bar?separator=Auto", FtpEndpoint.class);
RemoteFileConfiguration config = endpoint.getConfiguration();
assertEquals("ftp", config.getProtocol());
@@ -224,7 +224,7 @@ public class UriConfigurationTest extend
@Test
public void testPathSeparatorUnix() {
- FtpEndpoint endpoint = context.getEndpoint("ftp://hostname/foo/bar?separator=UNIX", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://hostname/foo/bar?separator=UNIX", FtpEndpoint.class);
RemoteFileConfiguration config = endpoint.getConfiguration();
assertEquals("ftp", config.getProtocol());
@@ -238,7 +238,7 @@ public class UriConfigurationTest extend
@Test
public void testPathSeparatorWindows() {
- FtpEndpoint endpoint = context.getEndpoint("ftp://hostname/foo/bar?separator=Windows", FtpEndpoint.class);
+ FtpEndpoint<?> endpoint = context.getEndpoint("ftp://hostname/foo/bar?separator=Windows", FtpEndpoint.class);
RemoteFileConfiguration config = endpoint.getConfiguration();
assertEquals("ftp", config.getProtocol());
Modified: camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java (original)
+++ camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java Sat Jan 14 00:13:10 2012
@@ -19,6 +19,12 @@ package org.apache.camel.component.gae.h
import java.net.URI;
import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.google.appengine.api.urlfetch.HTTPRequest;
+import com.google.appengine.api.urlfetch.HTTPResponse;
+
import org.apache.camel.Endpoint;
import org.apache.camel.component.gae.bind.InboundBinding;
import org.apache.camel.component.gae.bind.OutboundBinding;
@@ -43,9 +49,9 @@ public class GHttpComponent extends Serv
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
boolean throwException = getAndRemoveParameter(parameters, "throwExceptionOnFailure", Boolean.class, true);
boolean bridgeEndpoint = getAndRemoveParameter(parameters, "bridgeEndpoint", Boolean.class, true);
- OutboundBinding outboundBinding = resolveAndRemoveReferenceParameter(
+ OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> outboundBinding = resolveAndRemoveReferenceParameter(
parameters, "outboundBindingRef", OutboundBinding.class, new GHttpBinding());
- InboundBinding inboundBinding = resolveAndRemoveReferenceParameter(
+ InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding = resolveAndRemoveReferenceParameter(
parameters, "inboundBindingRef", InboundBinding.class, new GHttpBinding());
GHttpEndpoint endpoint = (GHttpEndpoint)super.createEndpoint(uri, remaining, parameters);
endpoint.setThrowExceptionOnFailure(throwException);
Modified: camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java (original)
+++ camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java Sat Jan 14 00:13:10 2012
@@ -83,7 +83,6 @@ public class GHttpEndpoint extends Servl
* decoded query string. Replaces the query part of
* <code>uri</code> if not <code>null</code>.
*/
- @SuppressWarnings("unchecked")
static URL getEndpointUrl(String uri, String query) throws Exception {
Map<String, Object> parameters = null;
URI uriObj = new URI(uri);
@@ -97,7 +96,7 @@ public class GHttpEndpoint extends Servl
} else { // ghttp or anything else
uriObj = new URI(HTTP_SCHEME + ":" + uriObj.getRawSchemeSpecificPart());
}
- return URISupport.createRemainingURI(uriObj, (Map)parameters).toURL();
+ return URISupport.createRemainingURI(uriObj, parameters).toURL();
}
public URL getEndpointUrl() throws Exception {
Modified: camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java (original)
+++ camel/trunk/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java Sat Jan 14 00:13:10 2012
@@ -19,7 +19,11 @@ package org.apache.camel.component.gae.t
import java.net.URI;
import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
import com.google.appengine.api.taskqueue.QueueFactory;
+import com.google.appengine.api.taskqueue.TaskOptions;
import org.apache.camel.Endpoint;
import org.apache.camel.component.gae.bind.InboundBinding;
@@ -46,9 +50,9 @@ public class GTaskComponent extends Serv
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
String workerRoot = getAndRemoveParameter(
parameters, "workerRoot", String.class, "worker");
- OutboundBinding outboundBinding = resolveAndRemoveReferenceParameter(
+ OutboundBinding<GTaskEndpoint, TaskOptions, Void> outboundBinding = resolveAndRemoveReferenceParameter(
parameters, "outboundBindingRef", OutboundBinding.class, new GTaskBinding());
- InboundBinding inboundBinding = resolveAndRemoveReferenceParameter(
+ InboundBinding<GTaskEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding = resolveAndRemoveReferenceParameter(
parameters, "inboundBindingRef", InboundBinding.class, new GTaskBinding());
GTaskEndpointInfo info = new GTaskEndpointInfo(uri, remaining);
GTaskEndpoint endpoint = (GTaskEndpoint)super.createEndpoint(
Modified: camel/trunk/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/CamelGroovyMethods.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/CamelGroovyMethods.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/CamelGroovyMethods.java (original)
+++ camel/trunk/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/CamelGroovyMethods.java Sat Jan 14 00:13:10 2012
@@ -31,15 +31,15 @@ public final class CamelGroovyMethods {
// Utility Class
}
- public static FilterDefinition filter(ProcessorDefinition self, Closure filter) {
+ public static FilterDefinition filter(ProcessorDefinition<?> self, Closure<?> filter) {
return self.filter(toExpression(filter));
}
- public static ChoiceDefinition when(ChoiceDefinition self, Closure filter) {
+ public static ChoiceDefinition when(ChoiceDefinition self, Closure<?> filter) {
return self.when(toExpression(filter));
}
- public static ExpressionSupport toExpression(final Closure filter) {
+ public static ExpressionSupport toExpression(final Closure<?> filter) {
return new ExpressionSupport() {
protected String assertionFailureMessage(Exchange exchange) {
return filter.toString();
Modified: camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/FileEndpointReferenceRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/FileEndpointReferenceRouteTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/FileEndpointReferenceRouteTest.java (original)
+++ camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/FileEndpointReferenceRouteTest.java Sat Jan 14 00:13:10 2012
@@ -41,9 +41,9 @@ public class FileEndpointReferenceRouteT
}
}
- public static class MyFileFilter implements GenericFileFilter {
+ public static class MyFileFilter<T> implements GenericFileFilter<T> {
- public boolean accept(GenericFile file) {
+ public boolean accept(GenericFile<T> file) {
// we only want report files
return file.getFileName().startsWith("report");
}
@@ -59,8 +59,8 @@ public class FileEndpointReferenceRouteT
@Provides
@JndiBind("fileFilter")
- public GenericFileFilter getfileFilter() {
- return new MyFileFilter();
+ public GenericFileFilter<?> getfileFilter() {
+ return new MyFileFilter<Object>();
}
Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/DefaultHttpBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/DefaultHttpBinding.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/DefaultHttpBinding.java (original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/DefaultHttpBinding.java Sat Jan 14 00:13:10 2012
@@ -81,7 +81,7 @@ public class DefaultHttpBinding implemen
Map<String, Object> headers = message.getHeaders();
//apply the headerFilterStrategy
- Enumeration names = request.getHeaderNames();
+ Enumeration<?> names = request.getHeaderNames();
while (names.hasMoreElements()) {
String name = (String)names.nextElement();
String value = request.getHeader(name);
@@ -150,7 +150,7 @@ public class DefaultHttpBinding implemen
protected void populateRequestParameters(HttpServletRequest request, HttpMessage message) throws Exception {
//we populate the http request parameters without checking the request method
Map<String, Object> headers = message.getHeaders();
- Enumeration names = request.getParameterNames();
+ Enumeration<?> names = request.getParameterNames();
while (names.hasMoreElements()) {
String name = (String)names.nextElement();
// there may be multiple values for the same name
@@ -195,7 +195,7 @@ public class DefaultHttpBinding implemen
protected void populateAttachments(HttpServletRequest request, HttpMessage message) {
// check if there is multipart files, if so will put it into DataHandler
- Enumeration names = request.getAttributeNames();
+ Enumeration<?> names = request.getAttributeNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
Object object = request.getAttribute(name);
@@ -273,7 +273,7 @@ public class DefaultHttpBinding implemen
String key = entry.getKey();
Object value = entry.getValue();
// use an iterator as there can be multiple values. (must not use a delimiter)
- final Iterator it = ObjectHelper.createIterator(value, null);
+ final Iterator<?> it = ObjectHelper.createIterator(value, null);
while (it.hasNext()) {
String headerValue = exchange.getContext().getTypeConverter().convertTo(String.class, it.next());
if (headerValue != null && headerFilterStrategy != null
Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java (original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java Sat Jan 14 00:13:10 2012
@@ -25,7 +25,6 @@ import java.util.Set;
import org.apache.camel.Endpoint;
import org.apache.camel.ResolveEndpointFailedException;
import org.apache.camel.impl.HeaderFilterStrategyComponent;
-import org.apache.camel.util.CastUtils;
import org.apache.camel.util.CollectionHelper;
import org.apache.camel.util.IntrospectionSupport;
import org.apache.camel.util.ObjectHelper;
@@ -219,7 +218,7 @@ public class HttpComponent extends Heade
// create the configurer to use for this endpoint (authMethods contains the used methods created by the configurer)
final Set<AuthMethod> authMethods = new LinkedHashSet<AuthMethod>();
HttpClientConfigurer configurer = createHttpClientConfigurer(parameters, authMethods);
- URI endpointUri = URISupport.createRemainingURI(new URI(addressUri), CastUtils.cast(httpClientParameters));
+ URI endpointUri = URISupport.createRemainingURI(new URI(addressUri), httpClientParameters);
// create the endpoint
HttpEndpoint endpoint = new HttpEndpoint(endpointUri.toString(), this, clientParams, httpConnectionManager, configurer);
@@ -254,7 +253,7 @@ public class HttpComponent extends Heade
}
setProperties(endpoint, parameters);
// restructure uri to be based on the parameters left as we dont want to include the Camel internal options
- URI httpUri = URISupport.createRemainingURI(new URI(addressUri), CastUtils.cast(parameters));
+ URI httpUri = URISupport.createRemainingURI(new URI(addressUri), parameters);
// validate http uri that end-user did not duplicate the http part that can be a common error
String part = httpUri.getSchemeSpecificPart();
Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java (original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java Sat Jan 14 00:13:10 2012
@@ -118,7 +118,7 @@ public class HttpEndpoint extends Defaul
if (authMethodPriority != null) {
List<String> authPrefs = new ArrayList<String>();
- Iterator it = getCamelContext().getTypeConverter().convertTo(Iterator.class, authMethodPriority);
+ Iterator<?> it = getCamelContext().getTypeConverter().convertTo(Iterator.class, authMethodPriority);
int i = 1;
while (it.hasNext()) {
Object value = it.next();
Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java (original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java Sat Jan 14 00:13:10 2012
@@ -104,7 +104,7 @@ public class HttpProducer extends Defaul
if (headerValue != null) {
// use an iterator as there can be multiple values. (must not use a delimiter)
- final Iterator it = ObjectHelper.createIterator(headerValue, null);
+ final Iterator<?> it = ObjectHelper.createIterator(headerValue, null);
// the value to add as request header
final List<String> values = new ArrayList<String>();
Modified: camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/helper/HttpHelperTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/helper/HttpHelperTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/helper/HttpHelperTest.java (original)
+++ camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/helper/HttpHelperTest.java Sat Jan 14 00:13:10 2012
@@ -59,7 +59,7 @@ public class HttpHelperTest {
assertEquals(2, headers.size());
assertEquals("a", headers.get("foo"));
- List list = (List) headers.get("bar");
+ List<?> list = (List<?>) headers.get("bar");
assertNotNull(list);
assertEquals(2, list.size());
assertEquals("b", list.get(0));
Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/DefaultHttpBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/DefaultHttpBinding.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/DefaultHttpBinding.java (original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/DefaultHttpBinding.java Sat Jan 14 00:13:10 2012
@@ -80,7 +80,7 @@ public class DefaultHttpBinding implemen
Map<String, Object> headers = message.getHeaders();
//apply the headerFilterStrategy
- Enumeration names = request.getHeaderNames();
+ Enumeration<?> names = request.getHeaderNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
Object value = request.getHeader(name);
@@ -138,7 +138,7 @@ public class DefaultHttpBinding implemen
protected void populateRequestParameters(HttpServletRequest request, HttpMessage message) throws Exception {
//we populate the http request parameters without checking the request method
Map<String, Object> headers = message.getHeaders();
- Enumeration names = request.getParameterNames();
+ Enumeration<?> names = request.getParameterNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
// there may be multiple values for the same name
@@ -180,7 +180,7 @@ public class DefaultHttpBinding implemen
protected void populateAttachments(HttpServletRequest request, HttpMessage message) {
// check if there is multipart files, if so will put it into DataHandler
- Enumeration names = request.getAttributeNames();
+ Enumeration<?> names = request.getAttributeNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
Object object = request.getAttribute(name);
@@ -256,7 +256,7 @@ public class DefaultHttpBinding implemen
String key = entry.getKey();
Object value = entry.getValue();
// use an iterator as there can be multiple values. (must not use a delimiter)
- final Iterator it = ObjectHelper.createIterator(value, null);
+ final Iterator<?> it = ObjectHelper.createIterator(value, null);
while (it.hasNext()) {
String headerValue = exchange.getContext().getTypeConverter().convertTo(String.class, it.next());
if (headerValue != null && headerFilterStrategy != null
Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java (original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java Sat Jan 14 00:13:10 2012
@@ -24,7 +24,6 @@ import org.apache.camel.Endpoint;
import org.apache.camel.ResolveEndpointFailedException;
import org.apache.camel.component.http4.helper.HttpHelper;
import org.apache.camel.impl.HeaderFilterStrategyComponent;
-import org.apache.camel.util.CastUtils;
import org.apache.camel.util.IntrospectionSupport;
import org.apache.camel.util.URISupport;
import org.apache.camel.util.jsse.SSLContextParameters;
@@ -192,7 +191,7 @@ public class HttpComponent extends Heade
// create the configurer to use for this endpoint
HttpClientConfigurer configurer = createHttpClientConfigurer(parameters, secure);
- URI endpointUri = URISupport.createRemainingURI(new URI(addressUri), CastUtils.cast(httpClientParameters));
+ URI endpointUri = URISupport.createRemainingURI(new URI(addressUri), httpClientParameters);
// create the endpoint and set the http uri to be null
HttpEndpoint endpoint = new HttpEndpoint(endpointUri.toString(), this, clientParams, clientConnectionManager, configurer);
// configure the endpoint
@@ -207,7 +206,7 @@ public class HttpComponent extends Heade
}
// restructure uri to be based on the parameters left as we dont want to include the Camel internal options
// build up the http uri
- URI httpUri = URISupport.createRemainingURI(new URI(httpUriAddress), CastUtils.cast(parameters));
+ URI httpUri = URISupport.createRemainingURI(new URI(httpUriAddress), parameters);
// validate http uri that end-user did not duplicate the http part that can be a common error
String part = httpUri.getSchemeSpecificPart();
Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java (original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java Sat Jan 14 00:13:10 2012
@@ -104,7 +104,7 @@ public class HttpProducer extends Defaul
if (headerValue != null) {
// use an iterator as there can be multiple values. (must not use a delimiter)
- final Iterator it = ObjectHelper.createIterator(headerValue, null);
+ final Iterator<?> it = ObjectHelper.createIterator(headerValue, null);
// the value to add as request header
final List<String> values = new ArrayList<String>();
Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java (original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java Sat Jan 14 00:13:10 2012
@@ -328,7 +328,6 @@ public final class HttpHelper {
* @param value the parameter value
* @return the extracted parameter value, see more details in javadoc.
*/
- @SuppressWarnings("unchecked")
public static Object extractHttpParameterValue(String value) {
if (value == null || ObjectHelper.isEmpty(value)) {
return value;
@@ -340,7 +339,7 @@ public final class HttpHelper {
if (trimmed.startsWith("[") && trimmed.endsWith("]")) {
// remove the [ ] markers
trimmed = trimmed.substring(1, trimmed.length() - 1);
- List list = new ArrayList<String>();
+ List<String> list = new ArrayList<String>();
String[] values = trimmed.split(",");
for (String s : values) {
list.add(s.trim());
Modified: camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoHeadersWithSameKeyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoHeadersWithSameKeyTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoHeadersWithSameKeyTest.java (original)
+++ camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoHeadersWithSameKeyTest.java Sat Jan 14 00:13:10 2012
@@ -57,7 +57,7 @@ public class HttpProducerTwoHeadersWithS
assertEquals("OK", out.getOut().getBody(String.class));
assertEquals("yes", out.getOut().getHeader("bar"));
- List foo = out.getOut().getHeader("foo", List.class);
+ List<?> foo = out.getOut().getHeader("foo", List.class);
assertNotNull(foo);
assertEquals(2, foo.size());
assertEquals("123", foo.get(0));
Modified: camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoParametersWithSameKeyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoParametersWithSameKeyTest.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoParametersWithSameKeyTest.java (original)
+++ camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoParametersWithSameKeyTest.java Sat Jan 14 00:13:10 2012
@@ -45,7 +45,7 @@ public class HttpProducerTwoParametersWi
assertEquals("OK", out.getOut().getBody(String.class));
assertEquals("yes", out.getOut().getHeader("bar"));
- List foo = out.getOut().getHeader("foo", List.class);
+ List<?> foo = out.getOut().getHeader("foo", List.class);
assertNotNull(foo);
assertEquals(2, foo.size());
assertEquals("123", foo.get(0));
Modified: camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java (original)
+++ camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java Sat Jan 14 00:13:10 2012
@@ -97,7 +97,7 @@ public class IBatisProducer extends Defa
Object in = exchange.getIn().getBody();
if (in != null) {
// lets handle arrays or collections of objects
- Iterator iter = ObjectHelper.createIterator(in);
+ Iterator<?> iter = ObjectHelper.createIterator(in);
while (iter.hasNext()) {
Object value = iter.next();
LOG.trace("Inserting: {} using statement: {}", value, statement);
@@ -118,7 +118,7 @@ public class IBatisProducer extends Defa
Object in = exchange.getIn().getBody();
if (in != null) {
// lets handle arrays or collections of objects
- Iterator iter = ObjectHelper.createIterator(in);
+ Iterator<?> iter = ObjectHelper.createIterator(in);
while (iter.hasNext()) {
Object value = iter.next();
LOG.trace("Updating: {} using statement: {}", value, statement);
@@ -139,7 +139,7 @@ public class IBatisProducer extends Defa
Object in = exchange.getIn().getBody();
if (in != null) {
// lets handle arrays or collections of objects
- Iterator iter = ObjectHelper.createIterator(in);
+ Iterator<?> iter = ObjectHelper.createIterator(in);
while (iter.hasNext()) {
Object value = iter.next();
LOG.trace("Deleting: {} using statement: {}", value, statement);
Modified: camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/strategy/DefaultIBatisProcessingStategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/strategy/DefaultIBatisProcessingStategy.java?rev=1231420&r1=1231419&r2=1231420&view=diff
==============================================================================
--- camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/strategy/DefaultIBatisProcessingStategy.java (original)
+++ camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/strategy/DefaultIBatisProcessingStategy.java Sat Jan 14 00:13:10 2012
@@ -52,7 +52,8 @@ public class DefaultIBatisProcessingStat
}
}
- public List poll(IBatisConsumer consumer, IBatisEndpoint endpoint) throws Exception {
+ @SuppressWarnings("unchecked")
+ public List<Object> poll(IBatisConsumer consumer, IBatisEndpoint endpoint) throws Exception {
SqlMapClient client = endpoint.getSqlMapClient();
return client.queryForList(endpoint.getStatement(), null);
}