Remove deprecated properties
[lgpl/argeo-commons.git] / osgi / runtime / org.argeo.osgi.boot / src / main / java / org / argeo / osgi / boot / OsgiBootUtils.java
index a9067a213c04e912985fb139651db012c4b3ff3b..acc0302e62b2178690052f192946edf36f277da5 100644 (file)
@@ -16,6 +16,7 @@
 \r
 package org.argeo.osgi.boot;\r
 \r
+/** Utilities, mostly related to logging. */\r
 public class OsgiBootUtils {\r
 \r
        public static void info(Object obj) {\r
@@ -23,7 +24,7 @@ public class OsgiBootUtils {
        }\r
 \r
        public static void debug(Object obj) {\r
-                       System.out.println("# OSGiBOOT DBG  # " + obj);\r
+               System.out.println("# OSGiBOOT DBG  # " + obj);\r
        }\r
 \r
        public static void warn(Object obj) {\r
@@ -35,14 +36,18 @@ public class OsgiBootUtils {
                // System.err.println("# WARN " + obj);\r
        }\r
 \r
-       //FIXE: returns null when defaultValue is ""\r
+       /**\r
+        * Gets a property value\r
+        * \r
+        * @return null when defaultValue is ""\r
+        */\r
        public static String getProperty(String name, String defaultValue) {\r
                final String value;\r
                if (defaultValue != null)\r
                        value = System.getProperty(name, defaultValue);\r
                else\r
                        value = System.getProperty(name);\r
-               \r
+\r
                if (value == null || value.equals(""))\r
                        return null;\r
                else\r
@@ -53,36 +58,4 @@ public class OsgiBootUtils {
                return getProperty(name, null);\r
        }\r
 \r
-       public static String getPropertyCompat(String name, String oldName) {\r
-               return getPropertyCompat(name, oldName, null);\r
-       }\r
-\r
-       public static String getPropertyCompat(String name, String oldName,\r
-                       String defaultValue) {\r
-               String res = null;\r
-\r
-               if (defaultValue != null) {\r
-                       res = getProperty(name, defaultValue);\r
-                       if (res.equals(defaultValue)) {\r
-                               res = getProperty(oldName, defaultValue);\r
-                               if (!res.equals(defaultValue))\r
-                                       warnDeprecated(name, oldName);\r
-                       }\r
-               } else {\r
-                       res = getProperty(name, null);\r
-                       if (res == null) {\r
-                               res = getProperty(oldName, null);\r
-                               if (res != null)\r
-                                       warnDeprecated(name, oldName);\r
-                       }\r
-               }\r
-               return res;\r
-       }\r
-\r
-       public static void warnDeprecated(String name, String oldName) {\r
-               warn("Property '" + oldName\r
-                               + "' is deprecated and will be removed soon, use '" + name\r
-                               + "' instead.");\r
-       }       \r
-       \r
 }\r