Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
0ba2e05f
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0ba2e05f
编写于
1月 07, 2011
作者:
S
smarks
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7008728: diamond conversion of basic security, permissions, authentication
Reviewed-by: mullan
上级
5fa67826
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
53 addition
and
59 deletion
+53
-59
src/share/classes/com/sun/security/auth/PolicyFile.java
src/share/classes/com/sun/security/auth/PolicyFile.java
+1
-1
src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java
...com/sun/security/auth/callback/DialogCallbackHandler.java
+2
-2
src/share/classes/com/sun/security/auth/login/ConfigFile.java
...share/classes/com/sun/security/auth/login/ConfigFile.java
+3
-4
src/share/classes/com/sun/security/auth/module/JndiLoginModule.java
...classes/com/sun/security/auth/module/JndiLoginModule.java
+1
-1
src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java
...ses/com/sun/security/auth/module/KeyStoreLoginModule.java
+1
-2
src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java
...sses/com/sun/security/auth/module/SolarisLoginModule.java
+1
-1
src/share/classes/com/sun/security/auth/module/UnixLoginModule.java
...classes/com/sun/security/auth/module/UnixLoginModule.java
+1
-1
src/share/classes/java/security/AccessControlContext.java
src/share/classes/java/security/AccessControlContext.java
+1
-1
src/share/classes/java/security/BasicPermission.java
src/share/classes/java/security/BasicPermission.java
+1
-1
src/share/classes/java/security/CodeSource.java
src/share/classes/java/security/CodeSource.java
+3
-3
src/share/classes/java/security/Permissions.java
src/share/classes/java/security/Permissions.java
+2
-2
src/share/classes/java/security/ProtectionDomain.java
src/share/classes/java/security/ProtectionDomain.java
+2
-2
src/share/classes/java/security/Provider.java
src/share/classes/java/security/Provider.java
+3
-3
src/share/classes/java/security/SecureClassLoader.java
src/share/classes/java/security/SecureClassLoader.java
+1
-1
src/share/classes/java/security/Security.java
src/share/classes/java/security/Security.java
+5
-7
src/share/classes/java/security/UnresolvedPermission.java
src/share/classes/java/security/UnresolvedPermission.java
+1
-1
src/share/classes/java/security/UnresolvedPermissionCollection.java
...classes/java/security/UnresolvedPermissionCollection.java
+4
-6
src/share/classes/javax/security/auth/PrivateCredentialPermission.java
...sses/javax/security/auth/PrivateCredentialPermission.java
+1
-1
src/share/classes/javax/security/auth/SubjectDomainCombiner.java
...re/classes/javax/security/auth/SubjectDomainCombiner.java
+1
-1
src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
...es/javax/security/auth/kerberos/DelegationPermission.java
+1
-1
src/share/classes/javax/security/auth/kerberos/ServicePermission.java
...asses/javax/security/auth/kerberos/ServicePermission.java
+1
-1
src/share/classes/sun/security/acl/AclEntryImpl.java
src/share/classes/sun/security/acl/AclEntryImpl.java
+1
-1
src/share/classes/sun/security/acl/AclImpl.java
src/share/classes/sun/security/acl/AclImpl.java
+7
-7
src/share/classes/sun/security/acl/GroupImpl.java
src/share/classes/sun/security/acl/GroupImpl.java
+2
-2
test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.java
...un/security/auth/module/LdapLoginModule/CheckConfigs.java
+3
-3
test/com/sun/security/auth/module/LdapLoginModule/CheckOptions.java
...un/security/auth/module/LdapLoginModule/CheckOptions.java
+3
-3
未找到文件。
src/share/classes/com/sun/security/auth/PolicyFile.java
浏览文件 @
0ba2e05f
...
...
@@ -1180,7 +1180,7 @@ public class PolicyFile extends javax.security.auth.Policy {
// Done
return
certs
;
ArrayList
<
Certificate
>
userCertList
=
new
ArrayList
<
Certificate
>();
ArrayList
<
Certificate
>
userCertList
=
new
ArrayList
<>();
i
=
0
;
while
(
i
<
certs
.
length
)
{
userCertList
.
add
(
certs
[
i
]);
...
...
src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java
浏览文件 @
0ba2e05f
...
...
@@ -99,10 +99,10 @@ public class DialogCallbackHandler implements CallbackHandler {
throws
UnsupportedCallbackException
{
/* Collect messages to display in the dialog */
final
List
<
Object
>
messages
=
new
ArrayList
<
Object
>(
3
);
final
List
<
Object
>
messages
=
new
ArrayList
<>(
3
);
/* Collection actions to perform if the user clicks OK */
final
List
<
Action
>
okActions
=
new
ArrayList
<
Action
>(
2
);
final
List
<
Action
>
okActions
=
new
ArrayList
<>(
2
);
ConfirmationInfo
confirmation
=
new
ConfirmationInfo
();
...
...
src/share/classes/com/sun/security/auth/login/ConfigFile.java
浏览文件 @
0ba2e05f
...
...
@@ -152,7 +152,7 @@ public class ConfigFile extends javax.security.auth.login.Configuration {
// new configuration
HashMap
<
String
,
LinkedList
<
AppConfigurationEntry
>>
newConfig
=
new
HashMap
<
String
,
LinkedList
<
AppConfigurationEntry
>
>();
new
HashMap
<>();
if
(
url
!=
null
)
{
...
...
@@ -392,8 +392,7 @@ public class ConfigFile extends javax.security.auth.login.Configuration {
String
moduleClass
;
String
sflag
;
AppConfigurationEntry
.
LoginModuleControlFlag
controlFlag
;
LinkedList
<
AppConfigurationEntry
>
configEntries
=
new
LinkedList
<
AppConfigurationEntry
>();
LinkedList
<
AppConfigurationEntry
>
configEntries
=
new
LinkedList
<>();
// application name
appName
=
st
.
sval
;
...
...
@@ -433,7 +432,7 @@ public class ConfigFile extends javax.security.auth.login.Configuration {
}
// get the args
HashMap
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>();
HashMap
<
String
,
String
>
options
=
new
HashMap
<>();
String
key
;
String
value
;
while
(
peek
(
";"
)
==
false
)
{
...
...
src/share/classes/com/sun/security/auth/module/JndiLoginModule.java
浏览文件 @
0ba2e05f
...
...
@@ -184,7 +184,7 @@ public class JndiLoginModule implements LoginModule {
private
UnixNumericUserPrincipal
UIDPrincipal
;
private
UnixNumericGroupPrincipal
GIDPrincipal
;
private
LinkedList
<
UnixNumericGroupPrincipal
>
supplementaryGroups
=
new
LinkedList
<
UnixNumericGroupPrincipal
>();
new
LinkedList
<>();
// initial state
private
Subject
subject
;
...
...
src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java
浏览文件 @
0ba2e05f
...
...
@@ -658,8 +658,7 @@ public class KeyStoreLoginModule implements LoginModule {
throw
new
FailedLoginException
(
"Unable to find X.509 certificate chain in keystore"
);
}
else
{
LinkedList
<
Certificate
>
certList
=
new
LinkedList
<
Certificate
>();
LinkedList
<
Certificate
>
certList
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
fromKeyStore
.
length
;
i
++)
{
certList
.
add
(
fromKeyStore
[
i
]);
}
...
...
src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java
浏览文件 @
0ba2e05f
...
...
@@ -76,7 +76,7 @@ public class SolarisLoginModule implements LoginModule {
private
SolarisNumericUserPrincipal
UIDPrincipal
;
private
SolarisNumericGroupPrincipal
GIDPrincipal
;
private
LinkedList
<
SolarisNumericGroupPrincipal
>
supplementaryGroups
=
new
LinkedList
<
SolarisNumericGroupPrincipal
>();
new
LinkedList
<>();
/**
* Initialize this <code>LoginModule</code>.
...
...
src/share/classes/com/sun/security/auth/module/UnixLoginModule.java
浏览文件 @
0ba2e05f
...
...
@@ -70,7 +70,7 @@ public class UnixLoginModule implements LoginModule {
private
UnixNumericUserPrincipal
UIDPrincipal
;
private
UnixNumericGroupPrincipal
GIDPrincipal
;
private
LinkedList
<
UnixNumericGroupPrincipal
>
supplementaryGroups
=
new
LinkedList
<
UnixNumericGroupPrincipal
>();
new
LinkedList
<>();
/**
* Initialize this <code>LoginModule</code>.
...
...
src/share/classes/java/security/AccessControlContext.java
浏览文件 @
0ba2e05f
...
...
@@ -121,7 +121,7 @@ public final class AccessControlContext {
this
.
context
=
null
;
}
}
else
{
List
<
ProtectionDomain
>
v
=
new
ArrayList
<
ProtectionDomain
>(
context
.
length
);
List
<
ProtectionDomain
>
v
=
new
ArrayList
<>(
context
.
length
);
for
(
int
i
=
0
;
i
<
context
.
length
;
i
++)
{
if
((
context
[
i
]
!=
null
)
&&
(!
v
.
contains
(
context
[
i
])))
v
.
add
(
context
[
i
]);
...
...
src/share/classes/java/security/BasicPermission.java
浏览文件 @
0ba2e05f
...
...
@@ -515,7 +515,7 @@ implements java.io.Serializable
// Copy perms into a Hashtable
Hashtable
<
String
,
Permission
>
permissions
=
new
Hashtable
<
String
,
Permission
>(
perms
.
size
()*
2
);
new
Hashtable
<>(
perms
.
size
()*
2
);
synchronized
(
this
)
{
permissions
.
putAll
(
perms
);
...
...
src/share/classes/java/security/CodeSource.java
浏览文件 @
0ba2e05f
...
...
@@ -188,7 +188,7 @@ public class CodeSource implements java.io.Serializable {
}
else
if
(
signers
!=
null
)
{
// Convert the code signers to certs
ArrayList
<
java
.
security
.
cert
.
Certificate
>
certChains
=
new
ArrayList
<
java
.
security
.
cert
.
Certificate
>();
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
signers
.
length
;
i
++)
{
certChains
.
addAll
(
signers
[
i
].
getSignerCertPath
().
getCertificates
());
...
...
@@ -606,10 +606,10 @@ public class CodeSource implements java.io.Serializable {
// Iterate through all the certificates
int
i
=
0
;
List
<
CodeSigner
>
signers
=
new
ArrayList
<
CodeSigner
>();
List
<
CodeSigner
>
signers
=
new
ArrayList
<>();
while
(
i
<
certs
.
length
)
{
List
<
java
.
security
.
cert
.
Certificate
>
certChain
=
new
ArrayList
<
java
.
security
.
cert
.
Certificate
>();
new
ArrayList
<>();
certChain
.
add
(
certs
[
i
++]);
// first cert is an end-entity cert
int
j
=
i
;
...
...
src/share/classes/java/security/Permissions.java
浏览文件 @
0ba2e05f
...
...
@@ -362,7 +362,7 @@ implements Serializable
// Copy perms into a Hashtable
Hashtable
<
Class
<?>,
PermissionCollection
>
perms
=
new
Hashtable
<
Class
<?>,
PermissionCollection
>(
permsMap
.
size
()*
2
);
// no sync; estimate
new
Hashtable
<>(
permsMap
.
size
()*
2
);
// no sync; estimate
synchronized
(
this
)
{
perms
.
putAll
(
permsMap
);
}
...
...
@@ -567,7 +567,7 @@ implements Serializable
// Copy perms into a Hashtable
Hashtable
<
Permission
,
Permission
>
perms
=
new
Hashtable
<
Permission
,
Permission
>(
permsMap
.
size
()*
2
);
new
Hashtable
<>(
permsMap
.
size
()*
2
);
synchronized
(
this
)
{
perms
.
putAll
(
permsMap
);
}
...
...
src/share/classes/java/security/ProtectionDomain.java
浏览文件 @
0ba2e05f
...
...
@@ -336,8 +336,8 @@ public class ProtectionDomain {
int
swag
=
32
;
int
vcap
=
8
;
Enumeration
<
Permission
>
e
;
List
<
Permission
>
pdVector
=
new
ArrayList
<
Permission
>(
vcap
);
List
<
Permission
>
plVector
=
new
ArrayList
<
Permission
>(
swag
);
List
<
Permission
>
pdVector
=
new
ArrayList
<>(
vcap
);
List
<
Permission
>
plVector
=
new
ArrayList
<>(
swag
);
//
// Build a vector of domain permissions for subsequent merge
...
...
src/share/classes/java/security/Provider.java
浏览文件 @
0ba2e05f
...
...
@@ -437,7 +437,7 @@ public abstract class Provider extends Properties {
private
void
readObject
(
ObjectInputStream
in
)
throws
IOException
,
ClassNotFoundException
{
Map
<
Object
,
Object
>
copy
=
new
HashMap
<
Object
,
Object
>();
Map
<
Object
,
Object
>
copy
=
new
HashMap
<>();
for
(
Map
.
Entry
<
Object
,
Object
>
entry
:
super
.
entrySet
())
{
copy
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
}
...
...
@@ -719,7 +719,7 @@ public abstract class Provider extends Properties {
}
if
(
serviceSet
==
null
)
{
ensureLegacyParsed
();
Set
<
Service
>
set
=
new
LinkedHashSet
<
Service
>();
Set
<
Service
>
set
=
new
LinkedHashSet
<>();
if
(
serviceMap
!=
null
)
{
set
.
addAll
(
serviceMap
.
values
());
}
...
...
@@ -1395,7 +1395,7 @@ public abstract class Provider extends Properties {
if
(
s
!=
null
)
{
String
[]
classNames
=
s
.
split
(
"\\|"
);
List
<
Class
>
classList
=
new
ArrayList
<
Class
>(
classNames
.
length
);
new
ArrayList
<>(
classNames
.
length
);
for
(
String
className
:
classNames
)
{
Class
clazz
=
getKeyClass
(
className
);
if
(
clazz
!=
null
)
{
...
...
src/share/classes/java/security/SecureClassLoader.java
浏览文件 @
0ba2e05f
...
...
@@ -50,7 +50,7 @@ public class SecureClassLoader extends ClassLoader {
// HashMap that maps CodeSource to ProtectionDomain
// @GuardedBy("pdcache")
private
final
HashMap
<
CodeSource
,
ProtectionDomain
>
pdcache
=
new
HashMap
<
CodeSource
,
ProtectionDomain
>(
11
);
new
HashMap
<>(
11
);
private
static
final
Debug
debug
=
Debug
.
getInstance
(
"scl"
);
...
...
src/share/classes/java/security/Security.java
浏览文件 @
0ba2e05f
...
...
@@ -545,8 +545,7 @@ public final class Security {
value
=
filter
.
substring
(
index
+
1
);
}
Hashtable
<
String
,
String
>
hashtableFilter
=
new
Hashtable
<
String
,
String
>(
1
);
Hashtable
<
String
,
String
>
hashtableFilter
=
new
Hashtable
<>(
1
);
hashtableFilter
.
put
(
key
,
value
);
return
(
getProviders
(
hashtableFilter
));
...
...
@@ -606,7 +605,7 @@ public final class Security {
// Then only return those providers who satisfy the selection criteria.
Provider
[]
allProviders
=
Security
.
getProviders
();
Set
<
String
>
keySet
=
filter
.
keySet
();
LinkedHashSet
<
Provider
>
candidates
=
new
LinkedHashSet
<
Provider
>(
5
);
LinkedHashSet
<
Provider
>
candidates
=
new
LinkedHashSet
<>(
5
);
// Returns all installed providers
// if the selection criteria is null.
...
...
@@ -660,8 +659,7 @@ public final class Security {
}
// Map containing cached Spi Class objects of the specified type
private
static
final
Map
<
String
,
Class
>
spiMap
=
new
ConcurrentHashMap
<
String
,
Class
>();
private
static
final
Map
<
String
,
Class
>
spiMap
=
new
ConcurrentHashMap
<>();
/**
* Return the Class object for the given engine type
...
...
@@ -885,7 +883,7 @@ public final class Security {
String
attrName
,
String
filterValue
,
Provider
[]
allProviders
)
{
LinkedHashSet
<
Provider
>
candidates
=
new
LinkedHashSet
<
Provider
>(
5
);
LinkedHashSet
<
Provider
>
candidates
=
new
LinkedHashSet
<>(
5
);
for
(
int
i
=
0
;
i
<
allProviders
.
length
;
i
++)
{
if
(
isCriterionSatisfied
(
allProviders
[
i
],
serviceName
,
algName
,
...
...
@@ -1082,7 +1080,7 @@ public final class Security {
return
Collections
.
EMPTY_SET
;
}
HashSet
<
String
>
result
=
new
HashSet
<
String
>();
HashSet
<
String
>
result
=
new
HashSet
<>();
Provider
[]
providers
=
Security
.
getProviders
();
for
(
int
i
=
0
;
i
<
providers
.
length
;
i
++)
{
...
...
src/share/classes/java/security/UnresolvedPermission.java
浏览文件 @
0ba2e05f
...
...
@@ -198,7 +198,7 @@ implements java.io.Serializable
if
(
this
.
certs
==
null
)
{
// extract the signer certs
ArrayList
<
java
.
security
.
cert
.
Certificate
>
signerCerts
=
new
ArrayList
<
java
.
security
.
cert
.
Certificate
>();
new
ArrayList
<>();
i
=
0
;
while
(
i
<
certs
.
length
)
{
signerCerts
.
add
(
certs
[
i
]);
...
...
src/share/classes/java/security/UnresolvedPermissionCollection.java
浏览文件 @
0ba2e05f
...
...
@@ -119,7 +119,7 @@ implements java.io.Serializable
public
Enumeration
<
Permission
>
elements
()
{
List
<
Permission
>
results
=
new
ArrayList
<
Permission
>();
// where results are stored
new
ArrayList
<>();
// where results are stored
// Get iterator of Map values (which are lists of permissions)
synchronized
(
this
)
{
...
...
@@ -161,7 +161,7 @@ implements java.io.Serializable
// Copy perms into a Hashtable
Hashtable
<
String
,
Vector
<
UnresolvedPermission
>>
permissions
=
new
Hashtable
<
String
,
Vector
<
UnresolvedPermission
>
>(
perms
.
size
()*
2
);
new
Hashtable
<>(
perms
.
size
()*
2
);
// Convert each entry (List) into a Vector
synchronized
(
this
)
{
...
...
@@ -169,8 +169,7 @@ implements java.io.Serializable
for
(
Map
.
Entry
<
String
,
List
<
UnresolvedPermission
>>
e
:
set
)
{
// Convert list into Vector
List
<
UnresolvedPermission
>
list
=
e
.
getValue
();
Vector
<
UnresolvedPermission
>
vec
=
new
Vector
<
UnresolvedPermission
>(
list
.
size
());
Vector
<
UnresolvedPermission
>
vec
=
new
Vector
<>(
list
.
size
());
synchronized
(
list
)
{
vec
.
addAll
(
list
);
}
...
...
@@ -207,8 +206,7 @@ implements java.io.Serializable
for
(
Map
.
Entry
<
String
,
Vector
<
UnresolvedPermission
>>
e
:
set
)
{
// Convert Vector into ArrayList
Vector
<
UnresolvedPermission
>
vec
=
e
.
getValue
();
List
<
UnresolvedPermission
>
list
=
new
ArrayList
<
UnresolvedPermission
>(
vec
.
size
());
List
<
UnresolvedPermission
>
list
=
new
ArrayList
<>(
vec
.
size
());
list
.
addAll
(
vec
);
// Add to Hashtable being serialized
...
...
src/share/classes/javax/security/auth/PrivateCredentialPermission.java
浏览文件 @
0ba2e05f
...
...
@@ -329,7 +329,7 @@ public final class PrivateCredentialPermission extends Permission {
throw
new
IllegalArgumentException
(
"invalid empty name"
);
}
ArrayList
<
CredOwner
>
pList
=
new
ArrayList
<
CredOwner
>();
ArrayList
<
CredOwner
>
pList
=
new
ArrayList
<>();
StringTokenizer
tokenizer
=
new
StringTokenizer
(
name
,
" "
,
true
);
String
principalClass
=
null
;
String
principalName
=
null
;
...
...
src/share/classes/javax/security/auth/SubjectDomainCombiner.java
浏览文件 @
0ba2e05f
...
...
@@ -48,7 +48,7 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
private
Subject
subject
;
private
WeakKeyValueMap
<
ProtectionDomain
,
ProtectionDomain
>
cachedPDs
=
new
WeakKeyValueMap
<
ProtectionDomain
,
ProtectionDomain
>();
new
WeakKeyValueMap
<>();
private
Set
<
Principal
>
principalSet
;
private
Principal
[]
principals
;
...
...
src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
浏览文件 @
0ba2e05f
...
...
@@ -361,7 +361,7 @@ final class KrbDelegationPermissionCollection extends PermissionCollection
// Don't call out.defaultWriteObject()
// Write out Vector
Vector
<
Permission
>
permissions
=
new
Vector
<
Permission
>(
perms
.
size
());
Vector
<
Permission
>
permissions
=
new
Vector
<>(
perms
.
size
());
synchronized
(
this
)
{
permissions
.
addAll
(
perms
);
...
...
src/share/classes/javax/security/auth/kerberos/ServicePermission.java
浏览文件 @
0ba2e05f
...
...
@@ -569,7 +569,7 @@ final class KrbServicePermissionCollection extends PermissionCollection
// Don't call out.defaultWriteObject()
// Write out Vector
Vector
<
Permission
>
permissions
=
new
Vector
<
Permission
>(
perms
.
size
());
Vector
<
Permission
>
permissions
=
new
Vector
<>(
perms
.
size
());
synchronized
(
this
)
{
permissions
.
addAll
(
perms
);
...
...
src/share/classes/sun/security/acl/AclEntryImpl.java
浏览文件 @
0ba2e05f
...
...
@@ -37,7 +37,7 @@ import java.security.acl.*;
*/
public
class
AclEntryImpl
implements
AclEntry
{
private
Principal
user
=
null
;
private
Vector
<
Permission
>
permissionSet
=
new
Vector
<
Permission
>(
10
,
10
);
private
Vector
<
Permission
>
permissionSet
=
new
Vector
<>(
10
,
10
);
private
boolean
negative
=
false
;
/**
...
...
src/share/classes/sun/security/acl/AclImpl.java
浏览文件 @
0ba2e05f
...
...
@@ -41,15 +41,15 @@ public class AclImpl extends OwnerImpl implements Acl {
// or principal.
//
private
Hashtable
<
Principal
,
AclEntry
>
allowedUsersTable
=
new
Hashtable
<
Principal
,
AclEntry
>(
23
);
new
Hashtable
<>(
23
);
private
Hashtable
<
Principal
,
AclEntry
>
allowedGroupsTable
=
new
Hashtable
<
Principal
,
AclEntry
>(
23
);
new
Hashtable
<>(
23
);
private
Hashtable
<
Principal
,
AclEntry
>
deniedUsersTable
=
new
Hashtable
<
Principal
,
AclEntry
>(
23
);
new
Hashtable
<>(
23
);
private
Hashtable
<
Principal
,
AclEntry
>
deniedGroupsTable
=
new
Hashtable
<
Principal
,
AclEntry
>(
23
);
new
Hashtable
<>(
23
);
private
String
aclName
=
null
;
private
Vector
<
Permission
>
zeroSet
=
new
Vector
<
Permission
>(
1
,
1
);
private
Vector
<
Permission
>
zeroSet
=
new
Vector
<>(
1
,
1
);
/**
...
...
@@ -294,7 +294,7 @@ public class AclImpl extends OwnerImpl implements Acl {
//
private
static
Enumeration
<
Permission
>
union
(
Enumeration
<
Permission
>
e1
,
Enumeration
<
Permission
>
e2
)
{
Vector
<
Permission
>
v
=
new
Vector
<
Permission
>(
20
,
20
);
Vector
<
Permission
>
v
=
new
Vector
<>(
20
,
20
);
while
(
e1
.
hasMoreElements
())
v
.
addElement
(
e1
.
nextElement
());
...
...
@@ -313,7 +313,7 @@ public class AclImpl extends OwnerImpl implements Acl {
//
private
Enumeration
<
Permission
>
subtract
(
Enumeration
<
Permission
>
e1
,
Enumeration
<
Permission
>
e2
)
{
Vector
<
Permission
>
v
=
new
Vector
<
Permission
>(
20
,
20
);
Vector
<
Permission
>
v
=
new
Vector
<>(
20
,
20
);
while
(
e1
.
hasMoreElements
())
v
.
addElement
(
e1
.
nextElement
());
...
...
src/share/classes/sun/security/acl/GroupImpl.java
浏览文件 @
0ba2e05f
...
...
@@ -34,7 +34,7 @@ import java.security.acl.*;
* @author Satish Dharmaraj
*/
public
class
GroupImpl
implements
Group
{
private
Vector
<
Principal
>
groupMembers
=
new
Vector
<
Principal
>(
50
,
100
);
private
Vector
<
Principal
>
groupMembers
=
new
Vector
<>(
50
,
100
);
private
String
group
;
/**
...
...
@@ -131,7 +131,7 @@ public class GroupImpl implements Group {
if
(
groupMembers
.
contains
(
member
))
{
return
true
;
}
else
{
Vector
<
Group
>
alreadySeen
=
new
Vector
<
Group
>(
10
);
Vector
<
Group
>
alreadySeen
=
new
Vector
<>(
10
);
return
isMemberRecurse
(
member
,
alreadySeen
);
}
}
...
...
test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.java
浏览文件 @
0ba2e05f
...
...
@@ -178,7 +178,7 @@ class SearchFirstMode extends LdapConfiguration {
public
SearchFirstMode
()
{
super
();
Map
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>(
4
);
Map
<
String
,
String
>
options
=
new
HashMap
<>(
4
);
options
.
put
(
"userProvider"
,
"ldap://localhost:23456/dc=example,dc=com"
);
options
.
put
(
"userFilter"
,
"(&(uid={USERNAME})(objectClass=inetOrgPerson))"
);
...
...
@@ -213,7 +213,7 @@ class AuthFirstMode extends LdapConfiguration {
public
AuthFirstMode
()
{
super
();
Map
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>(
5
);
Map
<
String
,
String
>
options
=
new
HashMap
<>(
5
);
options
.
put
(
"userProvider"
,
"ldap://localhost:23456/dc=example,dc=com"
);
options
.
put
(
"authIdentity"
,
"{USERNAME}"
);
options
.
put
(
"userFilter"
,
...
...
@@ -248,7 +248,7 @@ class AuthOnlyMode extends LdapConfiguration {
public
AuthOnlyMode
()
{
super
();
Map
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>(
4
);
Map
<
String
,
String
>
options
=
new
HashMap
<>(
4
);
options
.
put
(
"userProvider"
,
"ldap://localhost:23456 ldap://localhost:23457"
);
options
.
put
(
"authIdentity"
,
...
...
test/com/sun/security/auth/module/LdapLoginModule/CheckOptions.java
浏览文件 @
0ba2e05f
...
...
@@ -73,7 +73,7 @@ public class CheckOptions {
// bad value for userProvider option
Map
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
options
=
new
HashMap
<>();
options
.
put
(
USER_PROVIDER_OPTION
,
"ldap://localhost:23456"
);
ldap
.
initialize
(
subject
,
null
,
null
,
options
);
...
...
@@ -93,7 +93,7 @@ public class CheckOptions {
LdapLoginModule
ldap
=
new
LdapLoginModule
();
Subject
subject
=
new
Subject
();
Map
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
options
=
new
HashMap
<>();
ldap
.
initialize
(
subject
,
null
,
null
,
options
);
try
{
...
...
@@ -110,7 +110,7 @@ public class CheckOptions {
LdapLoginModule
ldap
=
new
LdapLoginModule
();
Subject
subject
=
new
Subject
();
Map
<
String
,
String
>
options
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
options
=
new
HashMap
<>();
CallbackHandler
goodHandler
=
new
MyCallbackHandler
(
true
);
ldap
.
initialize
(
subject
,
goodHandler
,
null
,
options
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录