You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by tc...@apache.org on 2005/11/11 00:59:46 UTC

svn commit: r332401 - in /jakarta/commons/sandbox/jci/trunk/src: java/org/apache/commons/jci/compilers/eclipse/ test/org/apache/commons/jci/ test/org/apache/commons/jci/compilers/ test/org/apache/commons/jci/compilers/eclipse/ test/org/apache/commons/j...

Author: tcurdt
Date: Thu Nov 10 15:59:34 2005
New Revision: 332401

URL: http://svn.apache.org/viewcvs?rev=332401&view=rev
Log:
removed StringUtils runtime dep, different extensions (thanks to Mark Proctor)

Modified:
    jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompiler.java
    jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/AbstractTestCase.java
    jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
    jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompilerTestCase.java
    jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/groovy/GroovyJavaCompilerTestCase.java
    jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/janino/JaninoJavaCompilerTestCase.java

Modified: jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompiler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompiler.java?rev=332401&r1=332400&r2=332401&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompiler.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompiler.java Thu Nov 10 15:59:34 2005
@@ -30,7 +30,6 @@
 import org.apache.commons.jci.problems.CompilationProblem;
 import org.apache.commons.jci.readers.ResourceReader;
 import org.apache.commons.jci.stores.ResourceStore;
-import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.eclipse.jdt.core.compiler.IProblem;
@@ -72,7 +71,8 @@
         CompilationUnit(final ResourceReader pReader, final String pClazzName) {
             reader = pReader;
             clazzName = pClazzName;
-            fileName = StringUtils.replaceChars(clazzName, '.', '/') + ".java";
+            clazzName.replace('.', '/');
+            fileName = clazzName.replace('.', '/') + ".java";
             int dot = clazzName.lastIndexOf('.');
             if (dot > 0) {
                 typeName = clazzName.substring(dot + 1).toCharArray();

Modified: jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/AbstractTestCase.java?rev=332401&r1=332400&r2=332401&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/AbstractTestCase.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/AbstractTestCase.java Thu Nov 10 15:59:34 2005
@@ -29,6 +29,8 @@
 public abstract class AbstractTestCase extends TestCase {
 
     private final static Log log = LogFactory.getLog(AbstractTestCase.class);
+    
+    protected String extension = "java";
 
     protected File directory;
 

Modified: jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java?rev=332401&r1=332400&r2=332401&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java Thu Nov 10 15:59:34 2005
@@ -8,6 +8,9 @@
 
 public abstract class AbstractCompilerTestCase extends AbstractTestCase {
 
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
         
     protected CompilationResult compileWith( final JavaCompiler pCompiler, final String pSource ) throws Exception {
         final File srcDir = new File(directory, "src");
@@ -19,7 +22,7 @@
         final FileResourceReader src = new FileResourceReader(srcDir);
         final FileResourceStore dst = new FileResourceStore(dstDir);
         
-        writeFile("src/jci/Simple.java", pSource);
+        writeFile("src/jci/Simple." + extension, pSource);
         
         return pCompiler.compile(
                 new String[] { "jci.Simple"},

Modified: jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompilerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompilerTestCase.java?rev=332401&r1=332400&r2=332401&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompilerTestCase.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/eclipse/EclipseJavaCompilerTestCase.java Thu Nov 10 15:59:34 2005
@@ -7,6 +7,12 @@
 
 
 public final class EclipseJavaCompilerTestCase extends AbstractCompilerTestCase {
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        extension = "java";
+    }    
+    
     public void testSimpleCompilation() throws Exception {
         final JavaCompiler compiler = new EclipseJavaCompiler();
         final CompilationResult result = compileWith(compiler, JavaSources.simple);

Modified: jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/groovy/GroovyJavaCompilerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/groovy/GroovyJavaCompilerTestCase.java?rev=332401&r1=332400&r2=332401&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/groovy/GroovyJavaCompilerTestCase.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/groovy/GroovyJavaCompilerTestCase.java Thu Nov 10 15:59:34 2005
@@ -7,6 +7,12 @@
 
 
 public final class GroovyJavaCompilerTestCase extends AbstractCompilerTestCase {
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        extension = "groovy";
+    }   
+    
     public void testSimpleCompilation() throws Exception {
         final JavaCompiler compiler = new GroovyJavaCompiler();
         final CompilationResult result = compileWith(compiler, GroovySources.simple);

Modified: jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/janino/JaninoJavaCompilerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/janino/JaninoJavaCompilerTestCase.java?rev=332401&r1=332400&r2=332401&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/janino/JaninoJavaCompilerTestCase.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/test/org/apache/commons/jci/compilers/janino/JaninoJavaCompilerTestCase.java Thu Nov 10 15:59:34 2005
@@ -7,6 +7,12 @@
 
 
 public final class JaninoJavaCompilerTestCase extends AbstractCompilerTestCase {
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        extension = "java";
+    }   
+    
     public void testSimpleCompilation() throws Exception {
         final JavaCompiler compiler = new JaninoJavaCompiler();
         final CompilationResult result = compileWith(compiler, JavaSources.simple);



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