This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new aa71cb935 Use ternary expression
aa71cb935 is described below

commit aa71cb935499ee26fa48ee5fbb7858aa64415787
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Thu Apr 25 09:56:10 2024 -0400

    Use ternary expression
---
 .../org/apache/commons/compress/archivers/tar/TarArchiveEntry.java   | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java 
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
index edfd51758..f64474199 100644
--- 
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
+++ 
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
@@ -219,10 +219,7 @@ public class TarArchiveEntry implements ArchiveEntry, 
TarConstants, EntryStreamO
     private static final Pattern PAX_EXTENDED_HEADER_FILE_TIMES_PATTERN = 
Pattern.compile("-?\\d{1,19}(?:\\.\\d{1,19})?");
 
     private static FileTime fileTimeFromOptionalSeconds(final long seconds) {
-        if (seconds <= 0) {
-            return null;
-        }
-        return TimeUtils.unixTimeToFileTime(seconds);
+        return seconds <= 0 ? null : TimeUtils.unixTimeToFileTime(seconds);
     }
 
     /**

Reply via email to