[jira] [Updated] (LANG-863) Method returns number of inheritance hops between parent and subclass

2013-11-03 Thread Henri Yandell (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Yandell updated LANG-863:
---

Fix Version/s: (was: Patch Needed)
   Review Patch

 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: Review Patch

 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)


[jira] [Updated] (LANG-863) Method returns number of inheritance hops between parent and subclass

2013-11-01 Thread J. Taylor Mayfield (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

J. Taylor Mayfield updated LANG-863:


Attachment: LANG-863.patch

This is my first patch so if I'm doing this wrong, please let me know. The 
patch includes the new InheritanceUtils class as well as tests for the distance 
method exposed in the new class.

 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: Patch Needed

 Attachments: 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)


[jira] [Updated] (LANG-863) Method returns number of inheritance hops between parent and subclass

2013-11-01 Thread J. Taylor Mayfield (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

J. Taylor Mayfield updated LANG-863:


Attachment: LANG-863.patch

I've updated the attached patch with the minor nits and included the 
suggested improvements. The distance method now returns -1 if the classes are 
invalid (null) or disjointed and 0 only if they are equivalent. Are there any 
other improvements you would suggest related to this method?

 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: Patch Needed

 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)


[jira] [Updated] (LANG-863) Method returns number of inheritance hops between parent and subclass

2013-10-16 Thread Henri Yandell (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Yandell updated LANG-863:
---

Fix Version/s: Patch Needed

 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: Patch Needed

   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)


[jira] [Updated] (LANG-863) Method returns number of inheritance hops between parent and subclass

2013-01-05 Thread Sebb (JIRA)

 [ 
https://issues.apache.org/jira/browse/LANG-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb updated LANG-863:
--

Fix Version/s: (was: 4.0)

 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
   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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira