src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java
changeset 53018 8bf9268df0e2
parent 47216 71c04702a3d5
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
    78      * separately.
    78      * separately.
    79      * <p>
    79      * <p>
    80      * Please override the method if need to support more name pattern.
    80      * Please override the method if need to support more name pattern.
    81      */
    81      */
    82     public Set<String> decompose(String algorithm) {
    82     public Set<String> decompose(String algorithm) {
    83         if (algorithm == null || algorithm.length() == 0) {
    83         if (algorithm == null || algorithm.isEmpty()) {
    84             return new HashSet<>();
    84             return new HashSet<>();
    85         }
    85         }
    86 
    86 
    87         Set<String> elements = decomposeImpl(algorithm);
    87         Set<String> elements = decomposeImpl(algorithm);
    88 
    88 
   165     /*
   165     /*
   166      * This decomposes a standard name into sub-elements with a consistent
   166      * This decomposes a standard name into sub-elements with a consistent
   167      * message digest algorithm name to avoid overly complicated checking.
   167      * message digest algorithm name to avoid overly complicated checking.
   168      */
   168      */
   169     public static Set<String> decomposeOneHash(String algorithm) {
   169     public static Set<String> decomposeOneHash(String algorithm) {
   170         if (algorithm == null || algorithm.length() == 0) {
   170         if (algorithm == null || algorithm.isEmpty()) {
   171             return new HashSet<>();
   171             return new HashSet<>();
   172         }
   172         }
   173 
   173 
   174         Set<String> elements = decomposeImpl(algorithm);
   174         Set<String> elements = decomposeImpl(algorithm);
   175 
   175