Author: bvahdat Date: Wed Feb 29 00:23:24 2012 New Revision: 1294915 URL: http://svn.apache.org/viewvc?rev=1294915&view=rev Log: Merged revisions 1294914 via svnmerge from https://svn.apache.org/repos/asf/camel/branches/camel-2.9.x
................ r1294914 | bvahdat | 2012-02-29 01:19:14 +0100 (Mi, 29 Feb 2012) | 9 lines 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.8.x/ (props changed) camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java Propchange: camel/branches/camel-2.8.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 29 00:23:24 2012 @@ -1,2 +1,2 @@ -/camel/branches/camel-2.9.x:1227549,1228229,1229567,1234054,1236672,1238942,1240157,1241006,1241489,1243052,1243058,1244875,1244877,1291871,1292116,1292389,1292726,1292769,1293082,1293935,1294044,1294589 -/camel/trunk:1226860,1227540,1228223,1229565,1234043,1236667,1238937,1240025,1240950,1240967,1241482,1243046,1243057,1244870,1244872,1291848,1292114,1292384,1292725,1292767,1293079,1293828,1293855,1294588 +/camel/branches/camel-2.9.x:1227549,1228229,1229567,1234054,1236672,1238942,1240157,1241006,1241489,1243052,1243058,1244875,1244877,1291871,1292116,1292389,1292726,1292769,1293082,1293935,1294044,1294589,1294914 +/camel/trunk:1226860,1227540,1228223,1229565,1234043,1236667,1238937,1240025,1240950,1240967,1241482,1243046,1243057,1244870,1244872,1291848,1292114,1292384,1292725,1292767,1293079,1293828,1293855,1294588,1294909 Propchange: camel/branches/camel-2.8.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java?rev=1294915&r1=1294914&r2=1294915&view=diff ============================================================================== --- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java (original) +++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java Wed Feb 29 00:23:24 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.8.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java?rev=1294915&r1=1294914&r2=1294915&view=diff ============================================================================== --- camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java (original) +++ camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java Wed Feb 29 00:23:24 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);