< prev index next >
src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java
Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD
*** 78,88 ****
* separately.
* <p>
* Please override the method if need to support more name pattern.
*/
public Set<String> decompose(String algorithm) {
! if (algorithm == null || algorithm.length() == 0) {
return new HashSet<>();
}
Set<String> elements = decomposeImpl(algorithm);
--- 78,88 ----
* separately.
* <p>
* Please override the method if need to support more name pattern.
*/
public Set<String> decompose(String algorithm) {
! if (algorithm == null || algorithm.isEmpty()) {
return new HashSet<>();
}
Set<String> elements = decomposeImpl(algorithm);
*** 165,175 ****
/*
* This decomposes a standard name into sub-elements with a consistent
* message digest algorithm name to avoid overly complicated checking.
*/
public static Set<String> decomposeOneHash(String algorithm) {
! if (algorithm == null || algorithm.length() == 0) {
return new HashSet<>();
}
Set<String> elements = decomposeImpl(algorithm);
--- 165,175 ----
/*
* This decomposes a standard name into sub-elements with a consistent
* message digest algorithm name to avoid overly complicated checking.
*/
public static Set<String> decomposeOneHash(String algorithm) {
! if (algorithm == null || algorithm.isEmpty()) {
return new HashSet<>();
}
Set<String> elements = decomposeImpl(algorithm);
< prev index next >