As far as my existing patch to StreamSource, it is very minimal; just
some checks on the values of filepath (to avoid double / and thus
stream = null) and resourcepath (to assume stream name is absolute if
resourcepath is null).
If you prefer the specialised IStreamSource implementation suggestion
I will refactor more significantly.
Tim
diff --git a/dtrules-engine/src/main/java/com/dtrules/session/
StreamSource.java
index da9079b..6ffdb01 100644
--- a/dtrules-engine/src/main/java/com/dtrules/session/
StreamSource.java
+++ b/dtrules-engine/src/main/java/com/dtrules/session/
StreamSource.java
@@ -28,9 +28,14 @@ public class StreamSource implements IStreamSource
{
if(s!=null)return s;
if(ruleSet != null){
- s = openstream(type, ruleSet.getFilepath()
+"/"+streamSpecification)
+ String filepath = ruleSet.getFilepath();
+ filepath = filepath.endsWith("/") ? filepath : filepath +
"/";
+ s = openstream(type, filepath + streamSpecification);
if(s!=null)return s;
- s = openstream(type, ruleSet.getResourcepath()
+streamSpecificati
+
+ String resourcepath = ruleSet.getResourcepath();
+ resourcepath = resourcepath == null ? "/" : resourcepath;
+ s = openstream(type, resourcepath+streamSpecification);