Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,10 @@ public void readExternal(ObjectInput in) throws IOException,
* @see java.lang.Class#getResourceAsStream(String)
*/
public InputStream getInputStream() throws IOException {
InputStream is = null;
if ( this.clazz != null ) {
is = this.clazz.getResourceAsStream( this.path );
}

if ( is == null ) {
is = this.classLoader.getResourceAsStream( this.path );
}

if ( is == null ) {
throw new FileNotFoundException( "'" + this.path + "' cannot be opened because it does not exist" );
}
this.lastRead = getLastModified();
return is;
//Some ClassLoaders caches the result of getResourceAsStream() this is
//why we get the Input Stream from the URL of the resource
//@see JBRULES-2960
return this.getURL().openStream();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ public Resource newClassPathResource(String path,
clazz );
}

public Resource newURLClassPathResource(String path) {
return new URLClassPathResource( path );
}

public Resource newFileSystemResource(File file) {
return new FileSystemResource( file );
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.drools.io.Resource;
import org.drools.io.impl.ClassPathResource;
import org.drools.io.impl.KnowledgeResource;
import org.drools.io.impl.URLClassPathResource;
import org.drools.io.impl.UrlResource;
import org.drools.io.internal.InternalResource;
import org.drools.xml.BaseAbstractHandler;
Expand Down Expand Up @@ -79,8 +78,6 @@ public Object start(String uri,

if ( src.trim().startsWith( "classpath:" ) ) {
resource = new ClassPathResource( src.substring( src.indexOf( ':' ) + 1 ) );
} else if (src.trim().startsWith( "URLClasspath:" )){
resource = new URLClassPathResource( src.substring( src.indexOf( ':' ) + 1 ) );
} else {
resource = new UrlResource( src );
((UrlResource)resource).setBasicAuthentication(basicAuthentication);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,13 @@ public SingleSessionCommandService(KnowledgeBase kbase,

this.txm.commit();

} catch (RuntimeException re){
rollbackTransaction(re);
throw re;
} catch ( Exception t1 ) {
try {
this.txm.rollback();
} catch ( Throwable t2 ) {
throw new RuntimeException( "Could not commit session or rollback",
t2 );
}
throw new RuntimeException( "Could not commit session",
t1 );
}
rollbackTransaction(t1);
throw new RuntimeException("Wrapped exception see cause", t1);
}

// update the session id to be the same as the session info id
((InternalKnowledgeRuntime) ksession).setId( this.sessionInfo.getId() );
Expand Down