[rules-users] A little suggestion about the 'ResourceFactory', 'DrlParser' API

Miles Wen miles.wy.1 at gmail.com
Thu Nov 10 00:47:10 EST 2011


Would you please provide a method in 'org.drools.io.ResourceFactory' like
this:

public static Resource newReaderResource(InputStream stream, String
encoding);

then I can use this method to load drl files as a stream while explicitly
specify its ecoding?

And in line: 287 of class 'org.drools.compiler.DrlParser':

lexer = new DRLLexer( new ANTLRInputStream( is ) );

no encoding specified as well. The ANTLRInputStream has constructors which
allows you to specify the encoding, otherwise it would figure out the
encoding according to the environment, which is unpredictable some times.

I'm using drools 5.3.0, the newest version. Thosse problems exists for
quite a while during previous versions. I'm fainting to see they are almost
there after upgraded to the new version.

-- 
Regards.
Miles. Wen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111110/aa8f961f/attachment.html 


More information about the rules-users mailing list