Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5eb0cb85
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
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看板
提交
5eb0cb85
编写于
5月 28, 2013
作者:
X
xuelei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8010815: some constructors issues in com.sun.jndi.toolkit
Reviewed-by: alanb
上级
2945ea91
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
14 deletion
+16
-14
src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java
src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java
+6
-4
src/share/classes/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java
...s/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java
+4
-2
src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java
...e/classes/com/sun/jndi/toolkit/url/GenericURLContext.java
+6
-8
未找到文件。
src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java
浏览文件 @
5eb0cb85
/*
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -90,14 +90,16 @@ public class Continuation extends ResolveResult {
...
@@ -90,14 +90,16 @@ public class Continuation extends ResolveResult {
* Constructs a new instance of Continuation.
* Constructs a new instance of Continuation.
* @param top The name of the object that is to be resolved/operated upon.
* @param top The name of the object that is to be resolved/operated upon.
* This becomes the Continuation's 'starter' and is used to
* This becomes the Continuation's 'starter' and is used to
* calculate the "resolved name" when filling
in a NamingException.
* calculate the "resolved name" when filling in a NamingException.
* @param environment The environment used by the caller. It is used
* @param environment The environment used by the caller. It is used
* when setting the "environment" of a CannotProceedException.
*
when setting the "environment" of a CannotProceedException.
*/
*/
@SuppressWarnings
(
"unchecked"
)
// For Hashtable clone: environment.clone()
public
Continuation
(
Name
top
,
Hashtable
<?,?>
environment
)
{
public
Continuation
(
Name
top
,
Hashtable
<?,?>
environment
)
{
super
();
super
();
starter
=
top
;
starter
=
top
;
this
.
environment
=
environment
;
this
.
environment
=
(
Hashtable
<?,?>)
((
environment
==
null
)
?
null
:
environment
.
clone
());
}
}
/**
/**
...
...
src/share/classes/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java
浏览文件 @
5eb0cb85
/*
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -69,6 +69,7 @@ final public class LazySearchEnumerationImpl
...
@@ -69,6 +69,7 @@ final public class LazySearchEnumerationImpl
}
}
}
}
@SuppressWarnings
(
"unchecked"
)
// For Hashtable clone: env.clone()
public
LazySearchEnumerationImpl
(
NamingEnumeration
<
Binding
>
candidates
,
public
LazySearchEnumerationImpl
(
NamingEnumeration
<
Binding
>
candidates
,
AttrFilter
filter
,
SearchControls
cons
,
AttrFilter
filter
,
SearchControls
cons
,
Context
ctx
,
Hashtable
<
String
,
Object
>
env
,
boolean
useFactory
)
Context
ctx
,
Hashtable
<
String
,
Object
>
env
,
boolean
useFactory
)
...
@@ -76,7 +77,8 @@ final public class LazySearchEnumerationImpl
...
@@ -76,7 +77,8 @@ final public class LazySearchEnumerationImpl
this
.
candidates
=
candidates
;
this
.
candidates
=
candidates
;
this
.
filter
=
filter
;
this
.
filter
=
filter
;
this
.
env
=
env
;
this
.
env
=
(
Hashtable
<
String
,
Object
>)
((
env
==
null
)
?
null
:
env
.
clone
());
this
.
context
=
ctx
;
this
.
context
=
ctx
;
this
.
useFactory
=
useFactory
;
this
.
useFactory
=
useFactory
;
...
...
src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java
浏览文件 @
5eb0cb85
/*
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -53,7 +53,8 @@ abstract public class GenericURLContext implements Context {
...
@@ -53,7 +53,8 @@ abstract public class GenericURLContext implements Context {
@SuppressWarnings
(
"unchecked"
)
// Expect Hashtable<String, Object>
@SuppressWarnings
(
"unchecked"
)
// Expect Hashtable<String, Object>
public
GenericURLContext
(
Hashtable
<?,?>
env
)
{
public
GenericURLContext
(
Hashtable
<?,?>
env
)
{
// context that is not tied to any specific URL
// context that is not tied to any specific URL
myEnv
=
(
Hashtable
<
String
,
Object
>)
env
;
// copied on write
myEnv
=
(
Hashtable
<
String
,
Object
>)(
env
==
null
?
null
:
env
.
clone
());
}
}
public
void
close
()
throws
NamingException
{
public
void
close
()
throws
NamingException
{
...
@@ -488,22 +489,19 @@ abstract public class GenericURLContext implements Context {
...
@@ -488,22 +489,19 @@ abstract public class GenericURLContext implements Context {
return
result
;
return
result
;
}
}
@SuppressWarnings
(
"unchecked"
)
// clone()
public
Object
removeFromEnvironment
(
String
propName
)
public
Object
removeFromEnvironment
(
String
propName
)
throws
NamingException
{
throws
NamingException
{
if
(
myEnv
==
null
)
{
if
(
myEnv
==
null
)
{
return
null
;
return
null
;
}
}
myEnv
=
(
Hashtable
<
String
,
Object
>)
myEnv
.
clone
();
return
myEnv
.
remove
(
propName
);
return
myEnv
.
remove
(
propName
);
}
}
@SuppressWarnings
(
"unchecked"
)
// clone()
public
Object
addToEnvironment
(
String
propName
,
Object
propVal
)
public
Object
addToEnvironment
(
String
propName
,
Object
propVal
)
throws
NamingException
{
throws
NamingException
{
myEnv
=
(
myEnv
==
null
)
if
(
myEnv
==
null
)
{
?
new
Hashtable
<
String
,
Object
>(
11
,
0.75f
)
myEnv
=
new
Hashtable
<
String
,
Object
>(
11
,
0.75f
);
:
(
Hashtable
<
String
,
Object
>)
myEnv
.
clone
();
}
return
myEnv
.
put
(
propName
,
propVal
);
return
myEnv
.
put
(
propName
,
propVal
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录