ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r806036 - in /ant/sandbox/antlibs/compress/trunk/src: main/org/apache/ant/compress/resources/ tests/antunit/
Date Thu, 20 Aug 2009 03:55:01 GMT
Author: bodewig
Date: Thu Aug 20 03:55:01 2009
New Revision: 806036

URL: http://svn.apache.org/viewvc?rev=806036&view=rev
Log:
make sure the entry has been read when looking for uid/gid and so on

Modified:
    ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/CommonsCompressArchiveResource.java
    ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/TarResource.java
  (contents, props changed)
    ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/ZipResource.java
  (contents, props changed)
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml

Modified: ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/CommonsCompressArchiveResource.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/CommonsCompressArchiveResource.java?rev=806036&r1=806035&r2=806036&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/CommonsCompressArchiveResource.java
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/CommonsCompressArchiveResource.java
Thu Aug 20 03:55:01 2009
@@ -166,6 +166,7 @@
         if (isReference()) {
             return ((CommonsCompressArchiveResource) getCheckedRef()).getUid();
         }
+        checkEntry();
         return uid;
     }
 
@@ -176,7 +177,8 @@
         if (isReference()) {
             return ((CommonsCompressArchiveResource) getCheckedRef()).getGid();
         }
-        return uid;
+        checkEntry();
+        return gid;
     }
 
     /**

Modified: ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/TarResource.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/TarResource.java?rev=806036&r1=806035&r2=806036&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/TarResource.java
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/TarResource.java
Thu Aug 20 03:55:01 2009
@@ -66,6 +66,7 @@
         if (isReference()) {
             return ((TarResource) getCheckedRef()).getUserName();
         }
+        checkEntry();
         return userName;
     }
 
@@ -76,6 +77,7 @@
         if (isReference()) {
             return ((TarResource) getCheckedRef()).getGroup();
         }
+        checkEntry();
         return groupName;
     }
 

Propchange: ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/TarResource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 20 03:55:01 2009
@@ -0,0 +1 @@
+/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/TarResource.java:806035

Modified: ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/ZipResource.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/ZipResource.java?rev=806036&r1=806035&r2=806036&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/ZipResource.java
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/ZipResource.java
Thu Aug 20 03:55:01 2009
@@ -140,6 +140,10 @@
      * @return an array of the extra fields
      */
     public ZipExtraField[] getExtraFields() {
+        if (isReference()) {
+            return ((ZipResource) getCheckedRef()).getExtraFields();
+        }
+        checkEntry();
         if (extras == null) {
             return new ZipExtraField[0];
         }

Propchange: ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/ZipResource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 20 03:55:01 2009
@@ -0,0 +1 @@
+/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ZipResource.java:806035

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml?rev=806036&r1=806035&r2=806036&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml Thu Aug 20 03:55:01
2009
@@ -54,7 +54,7 @@
     </cmp:zip>
   </target>
 
-  <target name="fail-testCoreTarHasUserName" depends="setUp">
+  <target name="testCoreTarHasUserName" depends="setUp">
     <au:assertTrue>
       <cmp:hasusername name="user">
         <tarentry name="asf-logo.gif">
@@ -64,7 +64,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testCoreTarHasGroupName" depends="setUp">
+  <target name="testCoreTarHasGroupName" depends="setUp">
     <au:assertTrue>
       <cmp:hasgroupname name="group">
         <tarentry name="asf-logo.gif">
@@ -74,7 +74,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testCoreTarHasUserId" depends="setUp">
+  <target name="testCoreTarHasUserId" depends="setUp">
     <au:assertTrue>
       <cmp:hasuserid id="500">
         <tarentry name="asf-logo.gif">
@@ -84,7 +84,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testCoreTarHasGroupId" depends="setUp">
+  <target name="testCoreTarHasGroupId" depends="setUp">
     <au:assertTrue>
       <cmp:hasgroupid id="600">
         <tarentry name="asf-logo.gif">
@@ -115,7 +115,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testAntlibTarHasUserName" depends="setUp">
+  <target name="testAntlibTarHasUserName" depends="setUp">
     <au:assertTrue>
       <cmp:hasusername name="user">
         <cmp:tarentry name="asf-logo.gif">
@@ -125,7 +125,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testAntlibTarHasGroupName" depends="setUp">
+  <target name="testAntlibTarHasGroupName" depends="setUp">
     <au:assertTrue>
       <cmp:hasgroupname name="group">
         <cmp:tarentry name="asf-logo.gif">
@@ -135,7 +135,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testAntlibTarHasUserId" depends="setUp">
+  <target name="testAntlibTarHasUserId" depends="setUp">
     <au:assertTrue>
       <cmp:hasuserid id="500">
         <cmp:tarentry name="asf-logo.gif">
@@ -145,7 +145,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testAntlibTarHasGroupId" depends="setUp">
+  <target name="testAntlibTarHasGroupId" depends="setUp">
     <au:assertTrue>
       <cmp:hasgroupid id="600">
         <cmp:tarentry name="asf-logo.gif">
@@ -176,7 +176,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testArHasUserId" depends="setUp">
+  <target name="testArHasUserId" depends="setUp">
     <au:assertTrue>
       <cmp:hasuserid id="500">
         <cmp:arentry name="asf-logo.gif">
@@ -186,7 +186,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testArHasGroupId" depends="setUp">
+  <target name="testArHasGroupId" depends="setUp">
     <au:assertTrue>
       <cmp:hasgroupid id="600">
         <cmp:arentry name="asf-logo.gif">
@@ -217,7 +217,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testCpioHasUserId" depends="setUp">
+  <target name="testCpioHasUserId" depends="setUp">
     <au:assertTrue>
       <cmp:hasuserid id="500">
         <cmp:cpioentry name="asf-logo.gif">
@@ -227,7 +227,7 @@
     </au:assertTrue>
   </target>
 
-  <target name="fail-testCpioHasGroupId" depends="setUp">
+  <target name="testCpioHasGroupId" depends="setUp">
     <au:assertTrue>
       <cmp:hasgroupid id="600">
         <cmp:cpioentry name="asf-logo.gif">

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml?rev=806036&r1=806035&r2=806036&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml Thu Aug 20 03:55:01
2009
@@ -64,7 +64,6 @@
         </cmp:tarentry>
       </cond:islastmodified>
     </au:assertTrue>
-    <!--
     <au:assertTrue>
       <cmp:hasusername name="bodewig">
         <cmp:tarentry name="asf-logo.gif">
@@ -79,6 +78,5 @@
         </cmp:tarentry>
       </cmp:hasgroupname>
     </au:assertTrue>
-    -->
   </target>
 </project>



Mime
View raw message