- 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