Revision: 17832
http://sourceforge.net/p/gate/code/17832
Author: ian_roberts
Date: 2014-04-15 09:53:17 +0000 (Tue, 15 Apr 2014)
Log Message:
-----------
Corrected another couple of instances of the same (potential) issue, where
plugins load a class from the top-level GCL and try to cast it to a class in
their own JAR. Fixed these to use the single-argument Class.forName so they
try this plugin's classpath first before looking in other plugins.
Modified Paths:
--------------
gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentActionsManager.java
gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/MachineLearningPR.java
Modified:
gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentActionsManager.java
===================================================================
---
gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentActionsManager.java
2014-04-15 09:37:23 UTC (rev 17831)
+++
gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentActionsManager.java
2014-04-15 09:53:17 UTC (rev 17832)
@@ -443,7 +443,7 @@
line = index < 0 ? "" : line.substring(index + 1);
Class<?> actionClass =
- Class.forName(cName, true, Gate.getClassLoader());
+ Class.forName(cName);
Object action = actionClass.newInstance();
String[] args = line.split("[,]");
Modified:
gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/MachineLearningPR.java
===================================================================
---
gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/MachineLearningPR.java
2014-04-15 09:37:23 UTC (rev 17831)
+++
gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/MachineLearningPR.java
2014-04-15 09:53:17 UTC (rev 17832)
@@ -101,9 +101,9 @@
"No ML engine class provided!");
String engineClassName = engineClassElement.getTextTrim();
try{
- // load MLEngine class from GATE Classloader
+ // load MLEngine class from this plugin's classloader
Class engineClass =
- Class.forName(engineClassName, true, Gate.getClassLoader());
+ Class.forName(engineClassName);
engine = (MLEngine)engineClass.newInstance();
}catch(ClassNotFoundException cnfe){
throw new ResourceInstantiationException(
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs