incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebengs...@apache.org
Subject svn commit: r616919 - /incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
Date Wed, 30 Jan 2008 22:05:38 GMT
Author: ebengston
Date: Wed Jan 30 14:05:36 2008
New Revision: 616919

URL: http://svn.apache.org/viewvc?rev=616919&view=rev
Log:
Configure the node class that Antlr has to use as node to avoid ClassCastException

Modified:
    incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java

Modified: incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java?rev=616919&r1=616918&r2=616919&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
(original)
+++ incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
Wed Jan 30 14:05:36 2008
@@ -113,21 +113,7 @@
 				lexer.setFilename(fileName);
 				// Create a parser that reads from the scanner
 				SPLParser parser = new SPLParser(lexer);
-				ClassLoader cl = null;
-				try
-				{
-					cl = Thread.currentThread().getContextClassLoader();
-					Thread.currentThread().setContextClassLoader(PolicyFileParser.class.getClassLoader());
-					parser.setASTNodeClass(AST_NODE_CLASS);
-				}
-				finally
-				{
-					if( cl != null )
-					{
-						Thread.currentThread().setContextClassLoader(cl);
-					}
-				}
-				
+				parser.getASTFactory().setASTNodeClass(PluginActivator.getDefault().getBundle().loadClass(AST_NODE_CLASS));
 				parser.setFilename(fileName);
 				// start parsing at the compilationUnit rule
 				parser.splpolicy();



Mime
View raw message