commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r332178 - in /jakarta/commons/sandbox/jci/trunk: project.xml src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java
Date Wed, 09 Nov 2005 23:46:25 GMT
Author: tcurdt
Date: Wed Nov  9 15:46:18 2005
New Revision: 332178

URL: http://svn.apache.org/viewcvs?rev=332178&view=rev
Log:
some fixes from Mark Proctor

Modified:
    jakarta/commons/sandbox/jci/trunk/project.xml
    jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java
    jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

Modified: jakarta/commons/sandbox/jci/trunk/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/project.xml?rev=332178&r1=332177&r2=332178&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/project.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/project.xml Wed Nov  9 15:46:18 2005
@@ -74,6 +74,11 @@
       <id>jheinicke</id>
       <email>joerg.heinicke at gmx.de</email>
     </contributor>
+    <contributor>
+      <name>Mark Proctor</name>
+      <id>mprotor</id>
+      <email>mproctor at codehaus.org</email>
+    </contributor>
   </contributors>
 
   <dependencies>

Modified: jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java?rev=332178&r1=332177&r2=332178&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java
(original)
+++ jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java
Wed Nov  9 15:46:18 2005
@@ -19,16 +19,13 @@
                               final ResourceStore pStore
                               ) {
         
-        ClassLoader classLoader = null;
-
-        classLoader = Thread.currentThread().getContextClassLoader();
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         
-        if ( classLoader == null ) {
+        if (classLoader == null) {
             classLoader = this.getClass().getClassLoader();
         }
-
         
-        return compile( pClazzNames, pReader, pStore, classLoader );               
+        return compile(pClazzNames, pReader, pStore, classLoader);
     }
     
 }

Modified: jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java?rev=332178&r1=332177&r2=332178&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java
(original)
+++ jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java
Wed Nov  9 15:46:18 2005
@@ -1,6 +1,5 @@
 package org.apache.commons.jci.compilers.groovy;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -35,7 +34,7 @@
      
         final CompilerConfiguration configuration = new CompilerConfiguration();
         final ErrorCollector collector = new ErrorCollector(configuration);
-        final CompilationUnit unit = new CompilationUnit(configuration);
+        final CompilationUnit unit = new CompilationUnit(configuration, null, classLoader);
         final SourceUnit[] source = new SourceUnit[clazzNames.length];
         for (int i = 0; i < source.length; i++) {
             final String filename = clazzNames[i].replace('.','/') + ".groovy";
@@ -59,9 +58,8 @@
             final List classes = unit.getClasses();
             for (final Iterator it = classes.iterator(); it.hasNext();) {
                 final GroovyClass clazz = (GroovyClass) it.next();
-                final String name = clazz.getName().replace('.', File.separatorChar) + ".class";
                 final byte[] bytes = clazz.getBytes();
-                store.write(name, bytes);
+                store.write(clazz.getName(), bytes);
             }
         } catch (final MultipleCompilationErrorsException e) {
             final ErrorCollector col = e.getErrorCollector();



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message