incubator-ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Bethard (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CTAKES-66) FileLocator.locateOnClasspath should take Class object
Date Thu, 04 Oct 2012 22:03:47 GMT
Steven Bethard created CTAKES-66:
------------------------------------

             Summary: 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: 2.6-incubating, 3.0-incubating
            Reporter: Steven Bethard


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 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

Mime
View raw message