diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e6bd03005..1271d5f0c 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,6 +22,7 @@ + Deprecate SystemUtils.FILE_SEPARATOR and SystemUtils.PATH_SEPARATOR FastDateFormat APIs that use a StringBuilder Ability to throw checked exceptions without declaring them Several predefined ISO FastDateFormats in DateFormatUtils are incorrect diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index 527cf0e36..8c6ab477e 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -129,8 +129,11 @@ public class SystemUtils { * sync with that System property. *

* + * @deprecated Use {@link File#separator}, since it is guaranteed to be a + * string containing a single character and it does not require a privilege check. * @since Java 1.1 */ + @Deprecated public static final String FILE_SEPARATOR = getSystemProperty("file.separator"); /** @@ -733,8 +736,11 @@ public class SystemUtils { * sync with that System property. *

* + * @deprecated Use {@link File#pathSeparator}, since it is guaranteed to be a + * string containing a single character and it does not require a privilege check. * @since Java 1.1 */ + @Deprecated public static final String PATH_SEPARATOR = getSystemProperty("path.separator"); /**