You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Duncan Jones (JIRA)" <ji...@apache.org> on 2014/01/27 16:54:38 UTC

[jira] [Comment Edited] (LANG-417) New class ClassPathUtils with methods for turning FQN into resource path

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

Duncan Jones edited comment on LANG-417 at 1/27/14 3:54 PM:
------------------------------------------------------------

To avoid use of the raw {{Class}} type, since we build for Java 1.5+.


was (Author: dmjones500):
To avoid raw types in post Java 1.5 code?

> New class ClassPathUtils with methods for turning FQN into resource path
> ------------------------------------------------------------------------
>
>                 Key: LANG-417
>                 URL: https://issues.apache.org/jira/browse/LANG-417
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Paul Benedict
>            Assignee: Benedikt Ritter
>             Fix For: 3.3
>
>
> I commonly need a FQ path to a resource within the same location as a class file. I recommend the addition of this method:
> {code:java}
> public String getPackageResourcePath(Class clazz, String resourceName)
>     StringBuffer buf = new StringBuffer();
>     buf.append(ClassUtils.getPackageName(getClass()).replace('.', '/'));
>     buf.append("/");
>     buf.append(resourceName);
>     return  buf.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)