cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: rev 36552 - in cocoon/branches/BRANCH_2_1_X: . lib lib/optional src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java
Date Wed, 18 Aug 2004 08:44:10 GMT
Author: antonio
Date: Wed Aug 18 01:44:08 2004
New Revision: 36552

Added:
   cocoon/branches/BRANCH_2_1_X/lib/optional/jdtcore-3.0.0.jar   (contents, props changed)
Removed:
   cocoon/branches/BRANCH_2_1_X/lib/optional/jdtcore-2.1.3.jar
Modified:
   cocoon/branches/BRANCH_2_1_X/lib/jars.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
   cocoon/branches/BRANCH_2_1_X/status.xml
Log:
Update jdtcore to 3.0.0

Modified: cocoon/branches/BRANCH_2_1_X/lib/jars.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/lib/jars.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/lib/jars.xml	Wed Aug 18 01:44:08 2004
@@ -682,7 +682,7 @@
     <title>Eclipse Java Development Tools Core</title>
     <description>Eclipse Java Compiler</description>
     <used-by>XSP</used-by>
-    <lib>optional/jdtcore-2.1.3.jar</lib>
+    <lib>optional/jdtcore-3.0.0.jar</lib>
     <homepage>http://www.eclipse.org/jdt</homepage>
   </file>
 

Added: cocoon/branches/BRANCH_2_1_X/lib/optional/jdtcore-3.0.0.jar
==============================================================================
Binary file. No diff available.

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
Wed Aug 18 01:44:08 2004
@@ -19,6 +19,8 @@
 import org.apache.cocoon.components.language.programming.CompilerError;
 import org.apache.cocoon.components.language.programming.LanguageCompiler;
 import org.apache.cocoon.util.ClassUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.SystemUtils;
 
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.compiler.ClassFile;
@@ -54,7 +56,7 @@
 /**
  * Eclipse Java Compiler
  *
- * @version CVS $Id: EclipseJavaCompiler.java,v 1.1 2004/03/10 12:58:07 stephan Exp $
+ * @version CVS $Id$
  */
 public class EclipseJavaCompiler implements LanguageCompiler, Recyclable {
 
@@ -63,12 +65,7 @@
 
     static {
         // Detect JDK version we are running under
-        String version = System.getProperty("java.specification.version");
-        try {
-            source14 = target14 = Float.parseFloat(version) >= 1.4;
-        } catch (NumberFormatException e) {
-            source14 = target14 = false;
-        }
+        source14 = target14 = SystemUtils.isJavaVersionAtLeast(140);
     }
 
     boolean debug;
@@ -154,8 +151,7 @@
         if (fileName.endsWith(".java")) {
             fileName = fileName.substring(0, fileName.length() - 5);
         }
-        fileName = fileName.replace('\\', '.');
-        return fileName.replace('/', '.');
+        return StringUtils.replaceChars(fileName, "\\/", "..");
     }
 
     public boolean compile() throws IOException {
@@ -330,13 +326,14 @@
             };
         final IErrorHandlingPolicy policy = 
             DefaultErrorHandlingPolicies.proceedWithAllProblems();
-        final Map settings = new HashMap();
+        final Map settings = new HashMap(8);
         settings.put(CompilerOptions.OPTION_LineNumberAttribute,
                      CompilerOptions.GENERATE);
         settings.put(CompilerOptions.OPTION_SourceFileAttribute,
                      CompilerOptions.GENERATE);
         settings.put(CompilerOptions.OPTION_ReportDeprecation,
                      CompilerOptions.IGNORE);
+        settings.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
         if (sourceEncoding != null) {
             settings.put(CompilerOptions.OPTION_Encoding,
                          sourceEncoding);

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml	Wed Aug 18 01:44:08 2004
@@ -205,7 +205,7 @@
  <release version="@version@" date="@date@">
    <action dev="AG" type="update">
      Updated rhino to 1.5r4-20040629T1232, util.concurrent to 1.3.4, jcs to 1.1-dev-20040811,
-     commons-jxpath to 1.2, commons-httpclient to 2.0.1
+     commons-jxpath to 1.2, commons-httpclient to 2.0.1, jdtcore to 3.0.0
    </action>
    <action dev="CZ" type="fix" fixes-bug="26854">
      A redirect is now possible, if it's called from flow. This also fixes bug #26571.

Mime
View raw message