ctakes-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Finan (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CTAKES-66) FileLocator.locateOnClasspath should take Class object
Date Thu, 13 Apr 2017 18:53:41 GMT

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

Sean Finan resolved CTAKES-66.
------------------------------
       Resolution: Fixed
         Assignee: Sean Finan
    Fix Version/s: 4.0.0

Done while I was making another fix/improvement to the FileLocator

> FileLocator.locateOnClasspath should take Class object
> ------------------------------------------------------
>
>                 Key: CTAKES-66
>                 URL: https://issues.apache.org/jira/browse/CTAKES-66
>             Project: cTAKES
>          Issue Type: Bug
>          Components: ctakes-core
>    Affects Versions: 3.0-incubating
>            Reporter: Steven Bethard
>            Assignee: Sean Finan
>             Fix For: 4.0.0
>
>
> The method org.apache.ctakes.core.resource.FileLocator.locateOnClasspath uses the code:
>         ClassLoader cl = FileLocator.class.getClassLoader();
>         URL indexUrl = cl.getResource(cpLocation);
> But this means that the "cpLocation" path will be interpreted relative to FileLocator,
rather than the class that is calling FileLocator.locateOnClasspath. Instead, this method
should take a Class<?> as a parameter and use that to get the resource.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message