[jsoar] 2 new revisions pushed by voigtjr@gmail.com on 2013-04-15 21:54 GMT

0 views
Skip to first unread message

js...@googlecode.com

unread,
Apr 15, 2013, 5:54:50 PM4/15/13
to jsoa...@googlegroups.com
2 new revisions:

Revision: 79db96e40f85
Author: Jonathan Voigt <voi...@gmail.com>
Date: Mon Apr 15 14:43:33 2013
Log: Reversing part of line ending fix to fix osgi...
http://code.google.com/p/jsoar/source/detail?r=79db96e40f85

Revision: 07414904c112
Author: Jonathan Voigt <jon....@soartech.com>
Date: Mon Apr 15 14:45:00 2013
Log: Merge branch 'master' into maven
http://code.google.com/p/jsoar/source/detail?r=07414904c112

==============================================================================
Revision: 79db96e40f85
Author: Jonathan Voigt <voi...@gmail.com>
Date: Mon Apr 15 14:43:33 2013
Log: Reversing part of line ending fix to fix osgi

For some reason, interp.evalURL does not work with the OSGi classloader
when trying to find resources in the jar inside of an OSGI bundle/project.
I reversed this part of the change 3dc8c97ba05f65fba4aaacbba689a3046bc9d14a
and it works again.

Unclear if having this breaks something else, Chris says it might break the
JRete, I will email to find out.

http://code.google.com/p/jsoar/source/detail?r=79db96e40f85

Modified:
/jsoar-tcl/src/main/java/org/jsoar/tcl/SoarTclInterface.java

=======================================
--- /jsoar-tcl/src/main/java/org/jsoar/tcl/SoarTclInterface.java Thu Feb 21
13:23:24 2013
+++ /jsoar-tcl/src/main/java/org/jsoar/tcl/SoarTclInterface.java Mon Apr 15
14:43:33 2013
@@ -5,7 +5,11 @@
*/
package org.jsoar.tcl;

+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
@@ -33,6 +37,7 @@
import tcl.lang.TclRuntimeError;

import com.google.common.collect.MapMaker;
+import com.google.common.io.ByteStreams;

/**
* @author ray
@@ -306,9 +311,19 @@
{
try
{
- interp.evalURL(url, url.toString());
+ final InputStream in = new
BufferedInputStream(url.openStream());
+ try
+ {
+ final ByteArrayOutputStream out = new
ByteArrayOutputStream();
+ ByteStreams.copy(in, out);
+ eval(out.toString());
+ }
+ finally
+ {
+ in.close();
+ }
}
- catch (TclException e)
+ catch(IOException e)
{
throw new SoarException(e.getMessage(), e);
}

==============================================================================
Revision: 07414904c112
Author: Jonathan Voigt <jon....@soartech.com>
Date: Mon Apr 15 14:45:00 2013
Log: Merge branch 'master' into maven

http://code.google.com/p/jsoar/source/detail?r=07414904c112


Reply all
Reply to author
Forward
0 new messages