commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1527270 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz: SevenZArchiveEntry.java SevenZOutputFile.java
Date Sun, 29 Sep 2013 05:06:13 GMT
Author: bodewig
Date: Sun Sep 29 05:06:12 2013
New Revision: 1527270

URL: http://svn.apache.org/r1527270
Log:
simplify has*Date handling in SevenZEntry

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java?rev=1527270&r1=1527269&r2=1527270&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
Sun Sep 29 05:06:12 2013
@@ -112,6 +112,7 @@ public class SevenZArchiveEntry implemen
     }
     
     public void setCreationDate(Date creationDate) {
+        hasCreationDate = creationDate != null;
         this.creationDate = javaTimeToNtfsTime(creationDate);
     }
 
@@ -137,6 +138,7 @@ public class SevenZArchiveEntry implemen
     }
     
     public void setLastModifiedDate(Date lastModifiedDate) {
+        hasLastModifiedDate = lastModifiedDate != null;
         this.lastModifiedDate = javaTimeToNtfsTime(lastModifiedDate);
     }
     
@@ -162,6 +164,7 @@ public class SevenZArchiveEntry implemen
     }
     
     public void setAccessDate(Date accessDate) {
+        hasAccessDate = accessDate != null;
         this.accessDate = javaTimeToNtfsTime(accessDate);
     }
 

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java?rev=1527270&r1=1527269&r2=1527270&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
Sun Sep 29 05:06:12 2013
@@ -62,7 +62,6 @@ public class SevenZOutputFile {
         final SevenZArchiveEntry entry = new SevenZArchiveEntry();
         entry.setDirectory(inputFile.isDirectory());
         entry.setName(entryName);
-        entry.setHasLastModifiedDate(true);
         entry.setLastModifiedDate(new Date(inputFile.lastModified()));
         return entry;
     }



Mime
View raw message