File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
api/src/main/java/io/minio/messages Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 2121import java .nio .charset .StandardCharsets ;
2222import java .time .ZonedDateTime ;
2323import java .util .Map ;
24- import java .util .Optional ;
2524import org .simpleframework .xml .Element ;
2625
2726/**
@@ -87,9 +86,7 @@ public String objectName() {
8786
8887 /** Returns last modified time of the object. */
8988 public ZonedDateTime lastModified () {
90- return Optional .ofNullable (lastModified )
91- .map (ResponseDate ::zonedDateTime )
92- .orElse (null );
89+ return (lastModified == null ) ? null : lastModified .zonedDateTime ();
9390 }
9491
9592 /** Returns ETag of the object. */
@@ -114,9 +111,7 @@ public Owner owner() {
114111
115112 /** Returns user metadata. This is MinIO specific extension to ListObjectsV2. */
116113 public Map <String , String > userMetadata () {
117- return Optional .ofNullable (userMetadata )
118- .map (Metadata ::get )
119- .orElse (null );
114+ return (userMetadata == null ) ? null : userMetadata .get ();
120115 }
121116
122117 public String userTags () {
You can’t perform that action at this time.
0 commit comments