You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2014/03/16 22:45:06 UTC
git commit: Make proper usage of the Class#getMethod() method
signature with varargs
Repository: camel
Updated Branches:
refs/heads/master 775e08892 -> 8ef949d35
Make proper usage of the Class#getMethod() method signature with varargs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8ef949d3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8ef949d3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8ef949d3
Branch: refs/heads/master
Commit: 8ef949d353566f67b6f86fa33fee199200d8dfcf
Parents: 775e088
Author: Babak Vahdat <bv...@apache.org>
Authored: Sun Mar 16 22:44:38 2014 +0100
Committer: Babak Vahdat <bv...@apache.org>
Committed: Sun Mar 16 22:44:38 2014 +0100
----------------------------------------------------------------------
.../main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java | 2 +-
.../src/main/java/org/apache/camel/component/cxf/CxfConsumer.java | 2 +-
.../org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/8ef949d3/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java b/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
index 5c158d9..6528dd4 100644
--- a/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
+++ b/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
@@ -105,7 +105,7 @@ public class AvroDataFormat extends ServiceSupport implements DataFormat, CamelC
if (genericContainer.isAssignableFrom(instanceClass)) {
try {
- Method method = instanceClass.getMethod("getSchema", new Class[0]);
+ Method method = instanceClass.getMethod("getSchema");
return (Schema) method.invoke(camelContext.getInjector().newInstance(instanceClass));
} catch (Exception ex) {
throw new CamelException("Error calling getSchema on " + instanceClass, ex);
http://git-wip-us.apache.org/repos/asf/camel/blob/8ef949d3/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
index cd68921..7585b38 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
@@ -236,7 +236,7 @@ public class CxfConsumer extends DefaultConsumer {
WebFault faultAnnotation = t.getClass().getAnnotation(WebFault.class);
Object faultInfo = null;
try {
- Method method = t.getClass().getMethod("getFaultInfo", new Class[0]);
+ Method method = t.getClass().getMethod("getFaultInfo");
faultInfo = method.invoke(t, new Object[0]);
} catch (Exception e) {
// do nothing here
http://git-wip-us.apache.org/repos/asf/camel/blob/8ef949d3/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
index 1c240d4..446edfc 100755
--- a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
+++ b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
@@ -99,7 +99,7 @@ public class ProtobufDataFormat extends ServiceSupport implements DataFormat, Ca
Class<?> instanceClass = context.getClassResolver().resolveMandatoryClass(className);
if (Message.class.isAssignableFrom(instanceClass)) {
try {
- Method method = instanceClass.getMethod("getDefaultInstance", new Class[0]);
+ Method method = instanceClass.getMethod("getDefaultInstance");
return (Message) method.invoke(null, new Object[0]);
} catch (Exception ex) {
throw new CamelException("Can't set the defaultInstance of ProtobufferDataFormat with "