src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java

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

*** 674,691 **** sb = new StringBuffer(); boolean inManifest = ((man.getAttributes(name) != null) || (man.getAttributes("./"+name) != null) || (man.getAttributes("/"+name) != null)); ! sb.append( ! (isSigned ? rb.getString("s") : rb.getString("SPACE")) + ! (inManifest ? rb.getString("m") : rb.getString("SPACE")) + ! (inStore ? rb.getString("k") : rb.getString("SPACE")) + ! (inScope ? rb.getString("i") : rb.getString("SPACE")) + ! ((inStoreOrScope & NOT_ALIAS) != 0 ?"X":" ") + ! rb.getString("SPACE")); ! sb.append("|"); } // When -certs provided, display info has extra empty // lines at the beginning and end. if (isSigned) { --- 674,690 ---- sb = new StringBuffer(); boolean inManifest = ((man.getAttributes(name) != null) || (man.getAttributes("./"+name) != null) || (man.getAttributes("/"+name) != null)); ! sb.append(isSigned ? rb.getString("s") : rb.getString("SPACE")) ! .append(inManifest ? rb.getString("m") : rb.getString("SPACE")) ! .append(inStore ? rb.getString("k") : rb.getString("SPACE")) ! .append(inScope ? rb.getString("i") : rb.getString("SPACE")) ! .append((inStoreOrScope & NOT_ALIAS) != 0 ? 'X' : ' ') ! .append(rb.getString("SPACE")); ! sb.append('|'); } // When -certs provided, display info has extra empty // lines at the beginning and end. if (isSigned) {
*** 702,716 **** } } else if (showcerts && !verbose.equals("all")) { // Print no info for unsigned entries when -verbose:all, // to be consistent with old behavior. if (signatureRelated(name)) { ! sb.append("\n" + tab + rb.getString( ! ".Signature.related.entries.") + "\n\n"); ! } else { ! sb.append("\n" + tab + rb.getString( ! ".Unsigned.entries.") + "\n\n"); } } if (verbose != null) { String label = sb.toString(); --- 701,719 ---- } } else if (showcerts && !verbose.equals("all")) { // Print no info for unsigned entries when -verbose:all, // to be consistent with old behavior. if (signatureRelated(name)) { ! sb.append('\n') ! .append(tab) ! .append(rb ! .getString(".Signature.related.entries.")) ! .append("\n\n"); ! } else { ! sb.append('\n').append(tab) ! .append(rb.getString(".Unsigned.entries.")) ! .append("\n\n"); } } if (verbose != null) { String label = sb.toString();
*** 1603,1614 **** (e.getCause() instanceof CertificateExpiredException || e.getCause() instanceof CertificateNotYetValidException)) { // No more warning, we alreay have hasExpiredCert or notYetValidCert } else { chainNotValidated = true; ! sb.append(tab + rb.getString(".CertPath.not.validated.") + ! e.getLocalizedMessage() + "]\n"); // TODO } } String result = sb.toString(); cacheForSignerInfo.put(signer, result); return result; --- 1606,1617 ---- (e.getCause() instanceof CertificateExpiredException || e.getCause() instanceof CertificateNotYetValidException)) { // No more warning, we alreay have hasExpiredCert or notYetValidCert } else { chainNotValidated = true; ! sb.append(tab).append(rb.getString(".CertPath.not.validated.")) ! .append(e.getLocalizedMessage()).append("]\n"); // TODO } } String result = sb.toString(); cacheForSignerInfo.put(signer, result); return result;