src/java.base/share/classes/sun/security/x509/DistributionPointName.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


 214         int hash = hashCode;
 215         if (hash == 0) {
 216             hash = 1;
 217             if (fullName != null) {
 218                 hash += fullName.hashCode();
 219 
 220             } else {
 221                 hash += relativeName.hashCode();
 222             }
 223             hashCode = hash;
 224         }
 225         return hash;
 226     }
 227 
 228     /**
 229      * Returns a printable string of the distribution point name.
 230      */
 231     public String toString() {
 232         StringBuilder sb = new StringBuilder();
 233         if (fullName != null) {
 234             sb.append("DistributionPointName:\n     " + fullName + "\n");
 235 
 236         } else {
 237             sb.append("DistributionPointName:\n     " + relativeName + "\n");
 238         }
 239 
 240         return sb.toString();
 241     }
 242 }


 214         int hash = hashCode;
 215         if (hash == 0) {
 216             hash = 1;
 217             if (fullName != null) {
 218                 hash += fullName.hashCode();
 219 
 220             } else {
 221                 hash += relativeName.hashCode();
 222             }
 223             hashCode = hash;
 224         }
 225         return hash;
 226     }
 227 
 228     /**
 229      * Returns a printable string of the distribution point name.
 230      */
 231     public String toString() {
 232         StringBuilder sb = new StringBuilder();
 233         if (fullName != null) {
 234             sb.append("DistributionPointName:\n     ").append(fullName).append('\n');
 235 
 236         } else {
 237             sb.append("DistributionPointName:\n     ").append(relativeName).append('\n');
 238         }
 239 
 240         return sb.toString();
 241     }
 242 }