jdk/src/share/classes/sun/security/jgss/wrapper/Krb5Util.java
changeset 24969 afa6934dd8e8
parent 24685 215fa91e1b4c
equal deleted inserted replaced
24968:3308660aa3f2 24969:afa6934dd8e8
    39     static String getTGSName(GSSNameElement name)
    39     static String getTGSName(GSSNameElement name)
    40         throws GSSException {
    40         throws GSSException {
    41         String krbPrinc = name.getKrbName();
    41         String krbPrinc = name.getKrbName();
    42         int atIndex = krbPrinc.indexOf('@');
    42         int atIndex = krbPrinc.indexOf('@');
    43         String realm = krbPrinc.substring(atIndex + 1);
    43         String realm = krbPrinc.substring(atIndex + 1);
    44         StringBuffer buf = new StringBuffer("krbtgt/");
    44         StringBuilder sb = new StringBuilder("krbtgt/");
    45         buf.append(realm).append('@').append(realm);
    45         sb.append(realm).append('@').append(realm);
    46         return buf.toString();
    46         return sb.toString();
    47     }
    47     }
    48 
    48 
    49     // Perform the Service Permission check using the specified
    49     // Perform the Service Permission check using the specified
    50     // <code>target</code> and <code>action</code>
    50     // <code>target</code> and <code>action</code>
    51     static void checkServicePermission(String target, String action) {
    51     static void checkServicePermission(String target, String action) {