You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by mb...@apache.org on 2022/03/10 22:13:43 UTC

[ant-antlibs-s3] 02/03: support Duration

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

mbenson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git

commit b81ff5a078ccd05d1c1b67d4621fb64ec428b0b4
Author: Matt Benson <mb...@apache.org>
AuthorDate: Thu Mar 10 16:13:21 2022 -0600

    support Duration
---
 src/main/org/apache/ant/s3/StringConversions.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/org/apache/ant/s3/StringConversions.java b/src/main/org/apache/ant/s3/StringConversions.java
index 0dd23b9..7705e85 100644
--- a/src/main/org/apache/ant/s3/StringConversions.java
+++ b/src/main/org/apache/ant/s3/StringConversions.java
@@ -22,6 +22,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
+import java.time.Duration;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Locale;
@@ -70,6 +71,7 @@ class StringConversions {
         cnv.put(Boolean.class, Boolean::valueOf);
         cnv.put(String.class, Function.identity());
         cnv.put(Region.class, Region::of);
+        cnv.put(Duration.class, Duration::parse);
         CONVERTERS = Collections.unmodifiableMap(cnv);
     }