[LANG-1394] org.apache.commons.lang3.SystemUtils should not write to
System.err.
This commit is contained in:
parent
7c441e87cf
commit
58a8f12b44
|
@ -60,6 +60,7 @@ The <action> type attribute can be add,update,fix,remove.
|
|||
<action issue="LANG-1356" type="add" dev="pschumacher" due-to="Yathos UG">Add bypass option for classes to recursive and reflective EqualsBuilder</action>
|
||||
<action issue="LANG-1391" type="add" dev="ggregory" due-to="Sauro Matulli, Oleg Chubaryov">Improve Javadoc for StringUtils.isAnyEmpty(null)</action>
|
||||
<action issue="LANG-1393" type="add" dev="ggregory" due-to="Gary Gregory">Add API SystemUtils.String getEnvironmentVariable(final String name, final String defaultValue)</action>
|
||||
<action issue="LANG-1394" type="add" dev="ggregory" due-to="Sebb, Gary Gregory">org.apache.commons.lang3.SystemUtils should not write to System.err.</action>
|
||||
</release>
|
||||
|
||||
<release version="3.7" date="2017-11-04" description="New features and bug fixes. Requires Java 7, supports Java 8, 9, 10.">
|
||||
|
|
|
@ -1599,8 +1599,8 @@ public class SystemUtils {
|
|||
return System.getProperty(property);
|
||||
} catch (final SecurityException ex) {
|
||||
// we are not allowed to look at this property
|
||||
System.err.println("Caught a SecurityException reading the system property '" + property
|
||||
+ "'; the SystemUtils property value will default to null.");
|
||||
// System.err.println("Caught a SecurityException reading the system property '" + property
|
||||
// + "'; the SystemUtils property value will default to null.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1627,7 +1627,7 @@ public class SystemUtils {
|
|||
return value == null ? defaultValue : value;
|
||||
} catch (final SecurityException ex) {
|
||||
// we are not allowed to look at this property
|
||||
System.err.println("Caught a SecurityException reading the environment variable '" + name + "'.");
|
||||
// System.err.println("Caught a SecurityException reading the environment variable '" + name + "'.");
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue