mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8291974: PrivateCredentialPermission should not use local variable to enable debugging
Reviewed-by: mullan
This commit is contained in:
parent
590de37bd7
commit
8480f87044
2 changed files with 79 additions and 22 deletions
|
@ -124,11 +124,6 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
private Set<Principal> principals; // ignored - kept around for compatibility
|
||||
private transient CredOwner[] credOwners;
|
||||
|
||||
/**
|
||||
* @serial
|
||||
*/
|
||||
private final boolean testing = false;
|
||||
|
||||
/**
|
||||
* Create a new {@code PrivateCredentialPermission}
|
||||
* with the specified {@code credentialClass} and Principals.
|
||||
|
@ -317,13 +312,8 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
String principalClass;
|
||||
String principalName;
|
||||
|
||||
if (testing)
|
||||
System.out.println("whole name = " + name);
|
||||
|
||||
// get the Credential Class
|
||||
credentialClass = tokenizer.nextToken();
|
||||
if (testing)
|
||||
System.out.println("Credential Class = " + credentialClass);
|
||||
|
||||
if (!tokenizer.hasMoreTokens()) {
|
||||
MessageFormat form = new MessageFormat(ResourcesMgr.getString
|
||||
|
@ -341,8 +331,6 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
|
||||
// get the Principal Class
|
||||
principalClass = tokenizer.nextToken();
|
||||
if (testing)
|
||||
System.out.println(" Principal Class = " + principalClass);
|
||||
|
||||
if (!tokenizer.hasMoreTokens()) {
|
||||
MessageFormat form = new MessageFormat(ResourcesMgr.getString
|
||||
|
@ -391,9 +379,6 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
}
|
||||
}
|
||||
|
||||
if (testing)
|
||||
System.out.println("\tprincipalName = '" + principalName + "'");
|
||||
|
||||
principalName = principalName.substring
|
||||
(1, principalName.length() - 1);
|
||||
|
||||
|
@ -403,9 +388,6 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
("PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value"));
|
||||
}
|
||||
|
||||
if (testing)
|
||||
System.out.println("\tprincipalName = '" + principalName + "'");
|
||||
|
||||
pList.add(new CredOwner(principalClass, principalName));
|
||||
}
|
||||
|
||||
|
@ -419,10 +401,6 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
if (thisC == null || thatC == null)
|
||||
return false;
|
||||
|
||||
if (testing)
|
||||
System.out.println("credential class comparison: " +
|
||||
thisC + "/" + thatC);
|
||||
|
||||
if (thisC.equals("*"))
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue