ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r806035 - in /ant/core/trunk/src/main/org/apache/tools/ant/types/resources: ArchiveResource.java TarResource.java ZipResource.java
Date Thu, 20 Aug 2009 03:47:15 GMT
Author: bodewig
Date: Thu Aug 20 03:47:14 2009
New Revision: 806035

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

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/TarResource.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ZipResource.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java?rev=806035&r1=806034&r2=806035&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java Thu
Aug 20 03:47:14 2009
@@ -242,7 +242,7 @@
             : getArchive().toString() + ':' + getName();
     }
 
-    private synchronized void checkEntry() throws BuildException {
+    protected final synchronized void checkEntry() throws BuildException {
         dieOnCircularReference();
         if (haveEntry) {
             return;

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/TarResource.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/TarResource.java?rev=806035&r1=806034&r2=806035&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/TarResource.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/TarResource.java Thu Aug
20 03:47:14 2009
@@ -115,6 +115,7 @@
         if (isReference()) {
             return ((TarResource) getCheckedRef()).getUserName();
         }
+        checkEntry();
         return userName;
     }
 
@@ -125,6 +126,7 @@
         if (isReference()) {
             return ((TarResource) getCheckedRef()).getGroup();
         }
+        checkEntry();
         return groupName;
     }
 
@@ -135,6 +137,7 @@
         if (isReference()) {
             return ((TarResource) getCheckedRef()).getUid();
         }
+        checkEntry();
         return uid;
     }
 
@@ -145,6 +148,7 @@
         if (isReference()) {
             return ((TarResource) getCheckedRef()).getGid();
         }
+        checkEntry();
         return uid;
     }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ZipResource.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ZipResource.java?rev=806035&r1=806034&r2=806035&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ZipResource.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/ZipResource.java Thu Aug
20 03:47:14 2009
@@ -173,6 +173,10 @@
      * @since Ant 1.8.0
      */
     public ZipExtraField[] getExtraFields() {
+        if (isReference()) {
+            return ((ZipResource) getCheckedRef()).getExtraFields();
+        }
+        checkEntry();
         if (extras == null) {
             return new ZipExtraField[0];
         }



Mime
View raw message