Author: bvahdat Date: Wed Feb 29 00:19:14 2012 New Revision: 1294914 URL: http://svn.apache.org/viewvc?rev=1294914&view=rev Log: Merged revisions 1294909 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk
........ r1294909 | bvahdat | 2012-02-29 01:08:02 +0100 (Mi, 29 Feb 2012) | 1 line CAMEL-5051: Avoid NPE while collecting the parameter annotations of a given bean whose class is java.lang.Object. This also fixes the existing behaviour which used to skip the java.lang.Object.toString() method. ........ Modified: camel/branches/camel-2.9.x/ (props changed) camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 29 00:19:14 2012 @@ -1 +1 @@ -/camel/trunk:1243046,1243057,1243234,1244518,1244644,1244859,1244861,1244864,1244870,1244872,1245021,1291555,1291727,1291848,1291864,1292114,1292384,1292725,1292760,1292767,1293079,1293268,1293288,1293330,1293590,1293828,1293852,1293855,1294130,1294482,1294502,1294533,1294588,1294639,1294709 +/camel/trunk:1243046,1243057,1243234,1244518,1244644,1244859,1244861,1244864,1244870,1244872,1245021,1291555,1291727,1291848,1291864,1292114,1292384,1292725,1292760,1292767,1293079,1293268,1293288,1293330,1293590,1293828,1293852,1293855,1294130,1294482,1294502,1294533,1294588,1294639,1294709,1294909 Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java?rev=1294914&r1=1294913&r2=1294914&view=diff ============================================================================== --- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java (original) +++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java Wed Feb 29 00:19:14 2012 @@ -393,10 +393,9 @@ public class BeanInfo { for (Class<?> i : c.getInterfaces()) { collectParameterAnnotations(i, m, a); } - if (!c.isInterface() && c.getSuperclass() != Object.class) { + if (!c.isInterface() && c.getSuperclass() != null) { collectParameterAnnotations(c.getSuperclass(), m, a); } - } /** Modified: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java?rev=1294914&r1=1294913&r2=1294914&view=diff ============================================================================== --- camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java (original) +++ camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java Wed Feb 29 00:19:14 2012 @@ -37,6 +37,14 @@ public class BeanInfoTest extends TestCa protected CamelContext camelContext = new DefaultCamelContext(); + public void testObjectOperations() throws Exception { + BeanInfo info = createBeanInfo(Object.class); + + List<MethodInfo> operations = info.getMethods(); + assertEquals(1, operations.size()); + assertEquals("toString", operations.get(0).getMethod().getName()); + } + public void testGetOperations() throws Exception { BeanInfo info = createBeanInfo(Foo.class);