src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosTicket.java

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


 634             renewTill = null;
 635             clientAddresses = null;
 636             destroyed = true;
 637         }
 638     }
 639 
 640     /**
 641      * Determines if this ticket has been destroyed.
 642      */
 643     public boolean isDestroyed() {
 644         return destroyed;
 645     }
 646 
 647     public String toString() {
 648         if (destroyed) {
 649             return "Destroyed KerberosTicket";
 650         }
 651         StringBuilder caddrString = new StringBuilder();
 652         if (clientAddresses != null) {
 653             for (int i = 0; i < clientAddresses.length; i++) {
 654                 caddrString.append("clientAddresses[" + i + "] = " +
 655                         clientAddresses[i].toString());
 656             }
 657         }
 658         return ("Ticket (hex) = " + "\n" +
 659                  (new HexDumpEncoder()).encodeBuffer(asn1Encoding) + "\n" +
 660                 "Client Principal = " + client.toString() + "\n" +
 661                 "Server Principal = " + server.toString() + "\n" +
 662                 "Session Key = " + sessionKey.toString() + "\n" +
 663                 "Forwardable Ticket " + flags[FORWARDABLE_TICKET_FLAG] + "\n" +
 664                 "Forwarded Ticket " + flags[FORWARDED_TICKET_FLAG] + "\n" +
 665                 "Proxiable Ticket " + flags[PROXIABLE_TICKET_FLAG] + "\n" +
 666                 "Proxy Ticket " + flags[PROXY_TICKET_FLAG] + "\n" +
 667                 "Postdated Ticket " + flags[POSTDATED_TICKET_FLAG] + "\n" +
 668                 "Renewable Ticket " + flags[RENEWABLE_TICKET_FLAG] + "\n" +
 669                 "Initial Ticket " + flags[RENEWABLE_TICKET_FLAG] + "\n" +
 670                 "Auth Time = " + String.valueOf(authTime) + "\n" +
 671                 "Start Time = " + String.valueOf(startTime) + "\n" +
 672                 "End Time = " + endTime.toString() + "\n" +
 673                 "Renew Till = " + String.valueOf(renewTill) + "\n" +
 674                 "Client Addresses " +
 675                 (clientAddresses == null ? " Null " : caddrString.toString() +




 634             renewTill = null;
 635             clientAddresses = null;
 636             destroyed = true;
 637         }
 638     }
 639 
 640     /**
 641      * Determines if this ticket has been destroyed.
 642      */
 643     public boolean isDestroyed() {
 644         return destroyed;
 645     }
 646 
 647     public String toString() {
 648         if (destroyed) {
 649             return "Destroyed KerberosTicket";
 650         }
 651         StringBuilder caddrString = new StringBuilder();
 652         if (clientAddresses != null) {
 653             for (int i = 0; i < clientAddresses.length; i++) {
 654                 caddrString.append("clientAddresses[").append(i).append("] = ")
 655                         .append(clientAddresses[i]);
 656             }
 657         }
 658         return ("Ticket (hex) = " + "\n" +
 659                  (new HexDumpEncoder()).encodeBuffer(asn1Encoding) + "\n" +
 660                 "Client Principal = " + client.toString() + "\n" +
 661                 "Server Principal = " + server.toString() + "\n" +
 662                 "Session Key = " + sessionKey.toString() + "\n" +
 663                 "Forwardable Ticket " + flags[FORWARDABLE_TICKET_FLAG] + "\n" +
 664                 "Forwarded Ticket " + flags[FORWARDED_TICKET_FLAG] + "\n" +
 665                 "Proxiable Ticket " + flags[PROXIABLE_TICKET_FLAG] + "\n" +
 666                 "Proxy Ticket " + flags[PROXY_TICKET_FLAG] + "\n" +
 667                 "Postdated Ticket " + flags[POSTDATED_TICKET_FLAG] + "\n" +
 668                 "Renewable Ticket " + flags[RENEWABLE_TICKET_FLAG] + "\n" +
 669                 "Initial Ticket " + flags[RENEWABLE_TICKET_FLAG] + "\n" +
 670                 "Auth Time = " + String.valueOf(authTime) + "\n" +
 671                 "Start Time = " + String.valueOf(startTime) + "\n" +
 672                 "End Time = " + endTime.toString() + "\n" +
 673                 "Renew Till = " + String.valueOf(renewTill) + "\n" +
 674                 "Client Addresses " +
 675                 (clientAddresses == null ? " Null " : caddrString.toString() +