< prev index next >
src/java.base/share/classes/sun/security/ssl/SupportedGroupsExtension.java
Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD
*** 481,500 ****
//
// If the System Property is not defined or the value is empty, the
// default groups and preferences will be used.
String property = GetPropertyAction
.privilegedGetProperty("jdk.tls.namedGroups");
! if (property != null && property.length() != 0) {
// remove double quote marks from beginning/end of the property
if (property.length() > 1 && property.charAt(0) == '"' &&
property.charAt(property.length() - 1) == '"') {
property = property.substring(1, property.length() - 1);
}
}
ArrayList<NamedGroup> groupList;
! if (property != null && property.length() != 0) {
String[] groups = property.split(",");
groupList = new ArrayList<>(groups.length);
for (String group : groups) {
group = group.trim();
if (!group.isEmpty()) {
--- 481,500 ----
//
// If the System Property is not defined or the value is empty, the
// default groups and preferences will be used.
String property = GetPropertyAction
.privilegedGetProperty("jdk.tls.namedGroups");
! if (property != null && !property.isEmpty()) {
// remove double quote marks from beginning/end of the property
if (property.length() > 1 && property.charAt(0) == '"' &&
property.charAt(property.length() - 1) == '"') {
property = property.substring(1, property.length() - 1);
}
}
ArrayList<NamedGroup> groupList;
! if (property != null && !property.isEmpty()) {
String[] groups = property.split(",");
groupList = new ArrayList<>(groups.length);
for (String group : groups) {
group = group.trim();
if (!group.isEmpty()) {
< prev index next >