[ https://issues.apache.org/jira/browse/LANG-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved LANG-863. ----------------------- Resolution: Fixed Fix Version/s: (was: Review Patch) 3.2 URL: http://svn.apache.org/r1545145 Log: LANG-863 Method returns number of inheritance hops between parent and subclass Added: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/InheritanceUtils.java (with props) commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/InheritanceUtilsTest.java (with props) commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/testbed/AnotherChild.java (with props) commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/testbed/AnotherParent.java (with props) commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/testbed/Grandchild.java (with props) Modified: commons/proper/lang/trunk/src/changes/changes.xml > Method returns number of inheritance hops between parent and subclass > --------------------------------------------------------------------- > > Key: LANG-863 > URL: https://issues.apache.org/jira/browse/LANG-863 > Project: Commons Lang > Issue Type: New Feature > Components: lang.reflect.* > Reporter: Daneel S. Yaitskov > Fix For: 3.2 > > Attachments: LANG-863.patch, LANG-863.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > For example. > class A { > } > class B extends A { > } > class C extends B { > } > int d; > d = InheritanceUtils.distance(A.class, A.class); > Assert.assertEquals(0, d); > d = InheritanceUtils.distance(B.class, A.class); > Assert.assertEquals(1, d); > d = InheritanceUtils.distance(C.class, A.class); > Assert.assertEquals(2, d); -- This message was sent by Atlassian JIRA (v6.1#6144)