Revision: 17895
http://sourceforge.net/p/gate/code/17895
Author: markagreenwood
Date: 2014-04-24 06:21:59 +0000 (Thu, 24 Apr 2014)
Log Message:
-----------
use the right classloader when saving/loading binary grammars
Modified Paths:
--------------
gate/trunk/src/main/gate/jape/RightHandSide.java
Modified: gate/trunk/src/main/gate/jape/RightHandSide.java
===================================================================
--- gate/trunk/src/main/gate/jape/RightHandSide.java 2014-04-24 01:21:42 UTC
(rev 17894)
+++ gate/trunk/src/main/gate/jape/RightHandSide.java 2014-04-24 06:21:59 UTC
(rev 17895)
@@ -271,7 +271,7 @@
out.defaultWriteObject();
//now we need to save the class for the action
try{
- Class<?> class1 =
Gate.getClassLoader().loadClass(actionClassQualifiedName);
+ Class<?> class1 =
classloader.loadClass(actionClassQualifiedName);
//System.out.println(class1.getName());
out.writeObject(class1);
}catch(ClassNotFoundException cnfe){
@@ -283,17 +283,19 @@
throws IOException, ClassNotFoundException{
in.defaultReadObject();
//now read the class
- String className = getActionClassName();
- if(Gate.getClassLoader().findExistingClass(className) == null) {
+ String className = getActionClassName();
+ if (classloader == null)
+ classloader =
Gate.getClassLoader().getDisposableClassLoader(in.toString(),true);
+
try{
Map<String, String> actionClasses = new HashMap<String,
String>();
actionClasses.put(className, getActionClassString());
- classloader =
Gate.getClassLoader().getDisposableClassLoader(in.toString(),true);
+
gate.util.Javac.loadClasses(actionClasses, classloader);
}catch(Exception e1){
throw new GateRuntimeException (e1);
}
- }
+
}
/** Makes changes to the document, using LHS bindings. */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs