You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2014/08/22 18:56:42 UTC
[3/4] git commit: Fix a bunch of eclipse warnings
Fix a bunch of eclipse warnings
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/24758afb
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/24758afb
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/24758afb
Branch: refs/heads/master
Commit: 24758afb4f5236e726b846ba46bc3fe10723afff
Parents: 276bf38
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Aug 22 11:46:27 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Aug 22 12:56:10 2014 -0400
----------------------------------------------------------------------
.../protobuf/generated/AddressBookProtos.java | 2 --
.../java/org/apache/camel/itest/osgi/ahc/AhcTest.java | 6 +++---
.../org/apache/camel/itest/osgi/aws/AwsSdbTest.java | 2 +-
.../itest/osgi/blueprint/AbstractIntegrationTest.java | 13 +++++++------
.../camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java | 2 --
.../osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java | 2 --
.../osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java | 2 --
.../itest/osgi/servlet/support/ServletActivator.java | 2 +-
8 files changed, 12 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
index 18e1c0f..bc96f1f 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
@@ -361,7 +361,6 @@ public final class AddressBookProtos {
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
- int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -2150,7 +2149,6 @@ public final class AddressBookProtos {
public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook buildPartial() {
org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook(this);
- int from_bitField0_ = bitField0_;
if (personBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
person_ = java.util.Collections.unmodifiableList(person_);
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java
index 0d30d03..f9ea05b 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java
@@ -23,16 +23,16 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.ExamReactorStrategy;
import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
import static org.ops4j.pax.exam.OptionUtils.combine;
/**
*
*/
@RunWith(PaxExam.class)
-@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
+@ExamReactorStrategy(PerMethod.class)
public class AhcTest extends OSGiIntegrationTestSupport {
@Test
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsSdbTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsSdbTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsSdbTest.java
index 139d157..eb27fda 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsSdbTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsSdbTest.java
@@ -47,7 +47,7 @@ public class AwsSdbTest extends AwsTestSupport {
public void setUp() throws Exception {
super.setUp();
- amazonSDBClient = context.getRegistry().lookup("amazonSDBClient", AmazonSDBClientMock.class);
+ amazonSDBClient = context.getRegistry().lookupByNameAndType("amazonSDBClient", AmazonSDBClientMock.class);
}
@Override
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
index 5bf733e..c98a270 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
@@ -53,7 +53,7 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport
}
protected <T> T getOsgiService(Class<T> type, String filter, long timeout) {
- ServiceTracker tracker = null;
+ ServiceTracker<?, ?> tracker = null;
try {
String flt;
if (filter != null) {
@@ -66,7 +66,7 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport
flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")";
}
Filter osgiFilter = FrameworkUtil.createFilter(flt);
- tracker = new ServiceTracker(bundleContext, osgiFilter, null);
+ tracker = new ServiceTracker<Object, Object>(bundleContext, osgiFilter, null);
tracker.open(true);
// Note that the tracker is not closed to keep the reference
// This is buggy, as the service reference may change i think
@@ -76,11 +76,11 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport
Dictionary dic = bundleContext.getBundle().getHeaders();
LOG.warn("Test bundle headers: " + explode(dic));
- for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, null))) {
+ for (ServiceReference<?> ref : asCollection(bundleContext.getAllServiceReferences(null, null))) {
LOG.warn("ServiceReference: " + ref);
}
- for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, flt))) {
+ for (ServiceReference<?> ref : asCollection(bundleContext.getAllServiceReferences(null, flt))) {
LOG.warn("Filtered ServiceReference: " + ref);
}
@@ -130,8 +130,9 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport
/*
* Provides an iterable collection of references, even if the original array is null
*/
- private static Collection<ServiceReference> asCollection(ServiceReference[] references) {
- return references != null ? Arrays.asList(references) : Collections.<ServiceReference>emptyList();
+ private static Collection<ServiceReference<?>> asCollection(ServiceReference<?>[] references) {
+ return (Collection<ServiceReference<?>>)(references != null ? Arrays.asList(references)
+ : Collections.<ServiceReference<?>>emptyList());
}
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java
index 0815064..265a464 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java
@@ -18,10 +18,8 @@ package org.apache.camel.itest.osgi.cxf;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
index 2d71d54..0a2c1bf 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
@@ -19,10 +19,8 @@ package org.apache.camel.itest.osgi.cxf.blueprint;
import org.apache.camel.CamelContext;
import org.apache.camel.itest.osgi.blueprint.OSGiBlueprintTestSupport;
import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
index 1a74be5..03c46ef 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
@@ -23,13 +23,11 @@ import org.apache.camel.itest.osgi.cxf.jaxrs.testbean.CustomerService;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
http://git-wip-us.apache.org/repos/asf/camel/blob/24758afb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
index 71b78db..2c9567d 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
@@ -37,7 +37,7 @@ public final class ServletActivator implements BundleActivator, BundleContextAwa
/**
* HttpService reference.
*/
- private ServiceReference httpServiceRef;
+ private ServiceReference<?> httpServiceRef;
/**
* Called when the OSGi framework starts our bundle