From fb7784fa1472b4c55d329aacae672f416e11a703 Mon Sep 17 00:00:00 2001 From: Chas Honton <chas@apache.org> Date: Mon, 13 Jul 2015 22:26:44 -0700 Subject: [PATCH] LANG-1075 - Deprecate SystemUtils.FILE_SEPARATOR and SystemUtils.PATH_SEPARATOR --- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/lang3/SystemUtils.java | 6 ++++++ 2 files changed, 7 insertions(+) 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 @@ <body> <release version="3.5" date="tba" description="tba"> + <action issue="LANG-1075" type="update" dev="chas">Deprecate SystemUtils.FILE_SEPARATOR and SystemUtils.PATH_SEPARATOR</action> <action issue="LANG-1154" type="add" dev="chas" due-to="Gary Gregory">FastDateFormat APIs that use a StringBuilder</action> <action issue="LANG-1149" type="add" dev="chas" due-to="Gregory Zak">Ability to throw checked exceptions without declaring them</action> <action issue="LANG-1002" type="fix" dev="chas" due-to="Michael Osipov">Several predefined ISO FastDateFormats in DateFormatUtils are incorrect</action> 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. * </p> * + * @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. * </p> * + * @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"); /**