private static InputStream locateFile()

in jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnitParser.java [128:150]


    private static InputStream locateFile(Bundle bundle, String location) throws IOException {
        // There is nothing for an empty location
        if ("".equals(location)) {
            return null;
        }

        // If there is a '!' then we have to look in a jar
        int bangIndex = location.indexOf('!');
        if (bangIndex == -1) {
            URL url = bundle.getEntry(location);

            if (url != null) {
                return url.openStream();
            }
        } else {
            URL url = bundle.getEntry(location.substring(0, bangIndex));
            if (url != null) {
                String toLocate = location.substring(bangIndex + 2);
                return locateInJar(url, toLocate);
            }
        }
        return null;
    }