Skip to content

Commit 8f3b627

Browse files
committed
[LANG-1511] SystemUtils is missing important documentation
1 parent f6de133 commit 8f3b627

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,9 @@ private static boolean getOsNameMatches(final String osNamePrefix) {
21222122

21232123
/**
21242124
* Gets the current user directory as a {@link File}.
2125+
* <p>
2126+
* The result is based on the system property {@value SystemProperties#USER_DIR}.
2127+
* </p>
21252128
*
21262129
* @return a directory
21272130
* @throws SecurityException if a security manager exists and its {@code checkPropertyAccess} method doesn't allow access to the specified system property.
@@ -2134,6 +2137,9 @@ public static File getUserDir() {
21342137

21352138
/**
21362139
* Gets the current user home directory as a {@link File}.
2140+
* <p>
2141+
* The result is based on the system property {@value SystemProperties#USER_HOME}.
2142+
* </p>
21372143
*
21382144
* @return a directory
21392145
* @throws SecurityException if a security manager exists and its {@code checkPropertyAccess} method doesn't allow access to the specified system property.
@@ -2146,6 +2152,9 @@ public static File getUserHome() {
21462152

21472153
/**
21482154
* Gets the current user name.
2155+
* <p>
2156+
* The result is based on the system property {@value SystemProperties#USER_NAME}.
2157+
* </p>
21492158
*
21502159
* @return a name
21512160
* @throws SecurityException if a security manager exists and its {@code checkPropertyAccess} method doesn't allow access to the specified system property.
@@ -2160,6 +2169,9 @@ public static String getUserName() {
21602169

21612170
/**
21622171
* Gets the user name.
2172+
* <p>
2173+
* The result is based on the system property {@value SystemProperties#USER_NAME}.
2174+
* </p>
21632175
*
21642176
* @param defaultValue A default value.
21652177
* @return a name
@@ -2175,6 +2187,9 @@ public static String getUserName(final String defaultValue) {
21752187

21762188
/**
21772189
* Tests whether the {@link #JAVA_AWT_HEADLESS} value is {@code true}.
2190+
* <p>
2191+
* The result is based on the system property {@value SystemProperties#JAVA_AWT_HEADLESS}.
2192+
* </p>
21782193
*
21792194
* @return {@code true} if {@code JAVA_AWT_HEADLESS} is {@code "true"}, {@code false} otherwise.
21802195
* @see #JAVA_AWT_HEADLESS
@@ -2187,6 +2202,9 @@ public static boolean isJavaAwtHeadless() {
21872202

21882203
/**
21892204
* Tests whether the Java version at least the requested version.
2205+
* <p>
2206+
* The result is based on the system property saved in {@value #JAVA_SPECIFICATION_VERSION}.
2207+
* </p>
21902208
*
21912209
* @param requiredVersion the required version, for example 1.31f
21922210
* @return {@code true} if the actual version is equal or greater than the required version
@@ -2197,9 +2215,8 @@ public static boolean isJavaVersionAtLeast(final JavaVersion requiredVersion) {
21972215

21982216
/**
21992217
* Tests whether the Java version at most the requested version.
2200-
*
22012218
* <p>
2202-
* Example input:
2219+
* The result is based on the system property saved in {@value #JAVA_SPECIFICATION_VERSION}.
22032220
* </p>
22042221
*
22052222
* @param requiredVersion the required version, for example 1.31f

0 commit comments

Comments
 (0)