Skip to content

Commit e61f79b

Browse files
committed
Deprecate constants for obsolete system properties in SystemUtils
- Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_FONTS - Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_GRAPHICSENV - Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_HEADLESS - Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_PRINTERJOB - Deprecate constants for obsolete system property SystemUtils.JAVA_COMPILER - Deprecate constants for obsolete system property SystemUtils.JAVA_ENDORSED_DIRS - Deprecate constants for obsolete system property SystemUtils.JAVA_EXT_DIRS
1 parent 75f9aa6 commit e61f79b

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/changes/changes.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ The <action> type attribute can be add,update,fix,remove.
8282
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate method for obsolete system property constant SystemProperties.getJavaEndorsedDirs()</action>
8383
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate method for obsolete system property constant SystemProperties.getJavaExtDirs()</action>
8484
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate method for obsolete system property constant SystemUtils.isJavaAwtHeadless()</action>
85+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_FONTS.</action>
86+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_GRAPHICSENV.</action>
87+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_HEADLESS.</action>
88+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_PRINTERJOB.</action>
89+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_COMPILER.</action>
90+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_ENDORSED_DIRS.</action>
91+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate constants for obsolete system property SystemUtils.JAVA_EXT_DIRS.</action>
8592
<action type="fix" dev="ggregory" due-to="Gary Gregory">[javadoc] General improvements.</action>
8693
<action type="fix" dev="ggregory" due-to="Gary Gregory">[javadoc] Fix thrown exception documentation for MethodUtils.getMethodObject(Class&lt;?&gt;, String, Class&lt;?&gt;...).</action>
8794
<action type="fix" dev="ggregory" due-to="Scott Parish">[javadoc] Strings::equalsAny: CI doc string should show it's insensitive #1416.</action>

src/main/java/org/apache/commons/lang3/SystemUtils.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ public class SystemUtils {
103103
*
104104
* @see SystemProperties#getJavaAwtFonts()
105105
* @since 2.1
106+
* @deprecated Deprecated without replacement.
106107
*/
108+
@Deprecated
107109
public static final String JAVA_AWT_FONTS = SystemProperties.getJavaAwtFonts();
108110

109111
/**
@@ -119,7 +121,9 @@ public class SystemUtils {
119121
*
120122
* @see SystemProperties#getJavaAwtGraphicsenv()
121123
* @since 2.1
124+
* @deprecated Deprecated without replacement.
122125
*/
126+
@Deprecated
123127
public static final String JAVA_AWT_GRAPHICSENV = SystemProperties.getJavaAwtGraphicsenv();
124128

125129
/**
@@ -137,7 +141,9 @@ public class SystemUtils {
137141
* @see SystemProperties#getJavaAwtHeadless()
138142
* @since 2.1
139143
* @since Java 1.4
144+
* @deprecated Deprecated without replacement.
140145
*/
146+
@Deprecated
141147
public static final String JAVA_AWT_HEADLESS = SystemProperties.getJavaAwtHeadless();
142148

143149
/**
@@ -153,7 +159,9 @@ public class SystemUtils {
153159
*
154160
* @see SystemProperties#getJavaAwtPrinterjob()
155161
* @since 2.1
162+
* @deprecated Deprecated without replacement.
156163
*/
164+
@Deprecated
157165
public static final String JAVA_AWT_PRINTERJOB = SystemProperties.getJavaAwtPrinterjob();
158166

159167
/**
@@ -201,7 +209,9 @@ public class SystemUtils {
201209
*
202210
* @see SystemProperties#getJavaCompiler()
203211
* @since Java 1.2. Not used in Sun versions after 1.2.
212+
* @deprecated Deprecated without replacement.
204213
*/
214+
@Deprecated
205215
public static final String JAVA_COMPILER = SystemProperties.getJavaCompiler();
206216

207217
/**
@@ -217,7 +227,9 @@ public class SystemUtils {
217227
*
218228
* @see SystemProperties#getJavaEndorsedDirs()
219229
* @since Java 1.4
230+
* @deprecated Deprecated without replacement.
220231
*/
232+
@Deprecated
221233
public static final String JAVA_ENDORSED_DIRS = SystemProperties.getJavaEndorsedDirs();
222234

223235
/**
@@ -233,7 +245,9 @@ public class SystemUtils {
233245
*
234246
* @see SystemProperties#getJavaExtDirs()
235247
* @since Java 1.3
248+
* @deprecated Deprecated without replacement.
236249
*/
250+
@Deprecated
237251
public static final String JAVA_EXT_DIRS = SystemProperties.getJavaExtDirs();
238252

239253
/**
@@ -864,7 +878,7 @@ public class SystemUtils {
864878
* </p>
865879
*
866880
* @since 3.4
867-
* @deprecated As of release 3.5, replaced by {@link #IS_JAVA_9}
881+
* @deprecated As of release 3.5, replaced by {@link #IS_JAVA_9}.
868882
*/
869883
@Deprecated
870884
public static final boolean IS_JAVA_1_9 = getJavaVersionMatches("9");
@@ -2043,7 +2057,9 @@ public class SystemUtils {
20432057
*
20442058
* @since 2.1
20452059
* @see SystemProperties#getAwtToolkit()
2060+
* @deprecated Deprecated without replacement.
20462061
*/
2062+
@Deprecated
20472063
public static final String AWT_TOOLKIT = SystemProperties.getAwtToolkit();
20482064

20492065
/**

0 commit comments

Comments
 (0)