commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-564) StrLookup API is confused
Date Thu, 24 Dec 2009 15:54:29 GMT

    [ https://issues.apache.org/jira/browse/LANG-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794448#action_12794448
] 

Matt Benson commented on LANG-564:
----------------------------------

+1 for T extends CharSequence for parameters, but to guarantee a T return type would a) require
a Class<T> parameter, and b) require us to make assumptions about T+ constructors...
so either String or CharSequence (returning String) would still seem the appropriate RT.

> StrLookup API is confused
> -------------------------
>
>                 Key: LANG-564
>                 URL: https://issues.apache.org/jira/browse/LANG-564
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.*
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> The API for StrLookup is confused. The class has been partly genericised, but why?
> The Javadoc says the class is for looking up Strings which are indexed by Strings, and
this agrees with the method lookup()
> Surely if the class is generic on <V>, the lookup() method should return V, not
String?
> Does it make any sense for the class to return anything but a String? If not, then why
is the class generic?
> If it does make sense, then lookup() should return V.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message