You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by "Steven Bethard (JIRA)" <ji...@apache.org> on 2012/10/05 00:03:47 UTC

[jira] [Created] (CTAKES-66) FileLocator.locateOnClasspath should take Class object

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