public InputSource resolveEntity(String publicId, String systemId) { log.trace("Resolving XML entity {} : {}", publicId, systemId); InputSource is = super.resolveEntity( publicId, systemId ); if ( is == null ) { if ( systemId != null ) {
public InputSource resolveEntity( String publicId, String systemId ) { log.debug( "Trying to resolve system id: " + systemId ); if ( systemId != null && systemId.startsWith( PREFIX ) ) { // Remove the initial slash and look it up String resource = systemId.substring( PREFIX.length() ); log.debug( "Looking up entity on classpath: " + resource ); InputStream stream = getClass().getResourceAsStream( resource ); if ( stream == null ) { stream = getClass().getClassLoader() .getResourceAsStream( resource ); } if ( stream == null ) { stream = Thread.currentThread().getContextClassLoader() .getResourceAsStream( resource ); } if ( stream == null ) { log.error( "Couldn't find entity in classpath: " + resource ); } else { log.debug( "Found entity on classpath: " + resource ); InputSource source = new InputSource( stream ); source.setPublicId( publicId ); source.setSystemId( systemId ); return source; } } return super.resolveEntity( publicId, systemId ); }
public InputSource resolveEntity(String publicId, String systemId) { InputSource is = super.resolveEntity( publicId, systemId ); if ( is == null ) { if ( systemId != null ) {