commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Heinicke (JIRA) <j...@apache.org>
Subject [jira] Commented: (LANG-297) Addition to ObjectUtils: public static List getAllSuperclassesUpTo( Class cls, Class upToClass )
Date Fri, 08 Dec 2006 11:55:22 GMT
    [ http://issues.apache.org/jira/browse/LANG-297?page=comments#action_12456793 ] 
            
Jörg Heinicke commented on LANG-297:
------------------------------------

1. Looks a bit like featuritis ;)

2. If it gets added, only the while condition should be changed, not the stuff inside the
while loop. It is sufficient to change 

    while (superclass != null)

to

    while (superclass != null && !superclass.equals(upToClass))

Jörg

> Addition to ObjectUtils: public static List getAllSuperclassesUpTo( Class cls, Class
upToClass )
> ------------------------------------------------------------------------------------------------
>
>                 Key: LANG-297
>                 URL: http://issues.apache.org/jira/browse/LANG-297
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.3
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Attachments: CommonsLang-patch-JIRA297.txt
>
>
> Add another method: 
>     /**
>      * Gets a <code>List</code> of superclasses up to, but not including
<code>upToClass</code>.
>      * If upToClass is null this is effectively the same as getAllSuperClasses( cls )
(e.g. the whole hierarchy).
>      * returns null if cls is null
>      */
> public static List getAllSuperclassesUpTo( Class cls, Class upToClass )
> Patch with code and test will be added.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message