Disable unused method.
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 7 Jun 2022 05:00:11 +0000 (07:00 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 7 Jun 2022 05:00:11 +0000 (07:00 +0200)
org.argeo.util/src/org/argeo/util/LangUtils.java

index 16229453776e04ed968457183aa225fd578d6c0a..36bec240e83601aedd915a342f377b5aef89b1d4 100644 (file)
@@ -11,6 +11,7 @@ import java.time.ZonedDateTime;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.Temporal;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Dictionary;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -38,20 +39,23 @@ public class LangUtils {
                return res;
        }
 
-       /*
-        * MAP
-        */
-       /**
-        * Creates a new {@link Dictionary} with one key-value pair. Key should not be
-        * null, but if the value is null, it returns an empty {@link Dictionary}.
-        */
-       public static Map<String, Object> map(String key, Object value) {
-               assert key != null;
-               HashMap<String, Object> props = new HashMap<>();
-               if (value != null)
-                       props.put(key, value);
-               return props;
-       }
+//     /*
+//      * MAP
+//      */
+//     /**
+//      * Creates a new {@link Map} with one key-value pair. Key should not be null,
+//      * but if the value is null, it returns an empty {@link Map}.
+//      * 
+//      * @deprecated Use {@link Collections#singletonMap(Object, Object)} instead.
+//      */
+//     @Deprecated
+//     public static Map<String, Object> map(String key, Object value) {
+//             assert key != null;
+//             HashMap<String, Object> props = new HashMap<>();
+//             if (value != null)
+//                     props.put(key, value);
+//             return props;
+//     }
 
        /*
         * DICTIONARY