ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r927494 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/Rmic.java src/tests/antunit/taskdefs/rmic-test.xml
Date Thu, 25 Mar 2010 16:45:01 GMT
Author: bodewig
Date: Thu Mar 25 16:45:00 2010
New Revision: 927494

URL: http://svn.apache.org/viewvc?rev=927494&view=rev
Log:
rmic's sourcebase is broken.  PR 48970.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java
    ant/core/trunk/src/tests/antunit/taskdefs/rmic-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=927494&r1=927493&r2=927494&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Mar 25 16:45:00 2010
@@ -68,6 +68,9 @@ Fixed bugs:
    target if "ant -p" failed.
    Bugzilla Report 48980
 
+ * <rmic>'s sourcebase attribute was broken.
+   Bugzilla Report 48970
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java?rev=927494&r1=927493&r2=927494&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java Thu Mar 25 16:45:00 2010
@@ -705,7 +705,8 @@ public class Rmic extends MatchingTask {
                 continue;
             }
             String sourceFileName = StringUtils.removeSuffix(generatedFile,
-                                                             ".class");
+                                                             ".class")
+                + ".java";
 
             File oldFile = new File(baseDir, sourceFileName);
             if (!oldFile.exists()) {

Modified: ant/core/trunk/src/tests/antunit/taskdefs/rmic-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/rmic-test.xml?rev=927494&r1=927493&r2=927494&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/rmic-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/rmic-test.xml Thu Mar 25 16:45:00 2010
@@ -76,4 +76,31 @@ public class Adapter implements RmicAdap
     </rmic>
     <au:assertLogContains text="adapter called"/>
   </target>
+
+  <target name="testSourceBase"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=48970">
+    <mkdir dir="${input}/org/example"/>
+    <mkdir dir="${output}"/>
+    <echo file="${input}/org/example/Foo.java"><![CDATA[
+package org.example;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+public interface Foo extends Remote {
+    long bar() throws RemoteException ;
+}]]></echo>
+    <echo file="${input}/org/example/FooImpl.java"><![CDATA[
+package org.example;
+import java.rmi.RemoteException;
+public class FooImpl implements Foo {
+    public long bar() throws RemoteException {
+        return 0;
+    }
+}]]></echo>
+    <javac srcdir="${input}" destdir="${output}"/>
+    <rmic sourcebase="${input}" base="${output}">
+      <include name="**/*Impl.class"/>
+    </rmic>
+    <au:assertFileExists file="${input}/org/example/FooImpl_Stub.java"/>
+    <au:assertFileDoesntExist file="${output}/org/example/FooImpl_Stub.java"/>
+  </target>
 </project>



Mime
View raw message