Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
7bb0cdab
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,发现更多精彩内容 >>
提交
7bb0cdab
编写于
6月 25, 2015
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
ab735795
39af878c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
303 addition
and
100 deletion
+303
-100
make/lib/CoreLibraries.gmk
make/lib/CoreLibraries.gmk
+1
-1
src/share/classes/com/sun/jndi/ldap/LdapURL.java
src/share/classes/com/sun/jndi/ldap/LdapURL.java
+35
-29
src/solaris/classes/sun/awt/X11/XWindowPeer.java
src/solaris/classes/sun/awt/X11/XWindowPeer.java
+25
-20
src/solaris/classes/sun/awt/X11GraphicsDevice.java
src/solaris/classes/sun/awt/X11GraphicsDevice.java
+9
-4
src/windows/native/java/lang/java_props_md.c
src/windows/native/java/lang/java_props_md.c
+88
-37
src/windows/resource/java.manifest
src/windows/resource/java.manifest
+2
-0
test/TEST.groups
test/TEST.groups
+1
-0
test/com/sun/jndi/ldap/LdapURLOptionalFields.java
test/com/sun/jndi/ldap/LdapURLOptionalFields.java
+62
-0
test/java/awt/FullScreen/MultimonFullscreenTest/MultimonDeadlockTest.java
...llScreen/MultimonFullscreenTest/MultimonDeadlockTest.java
+66
-0
test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
.../java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
+2
-7
test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java
test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java
+12
-2
未找到文件。
make/lib/CoreLibraries.gmk
浏览文件 @
7bb0cdab
...
...
@@ -207,7 +207,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
advapi32.lib, \
advapi32.lib
version.lib
, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java.dll" \
...
...
src/share/classes/com/sun/jndi/ldap/LdapURL.java
浏览文件 @
7bb0cdab
...
...
@@ -26,9 +26,6 @@
package
com.sun.jndi.ldap
;
import
javax.naming.*
;
import
javax.naming.directory.*
;
import
javax.naming.spi.*
;
import
java.net.URL
;
import
java.net.MalformedURLException
;
import
java.io.UnsupportedEncodingException
;
import
java.util.StringTokenizer
;
...
...
@@ -211,44 +208,53 @@ final public class LdapURL extends Uri {
// query begins with a '?' or is null
if
(
query
==
null
)
{
if
(
query
==
null
||
query
.
length
()
<
2
)
{
return
;
}
int
qmark2
=
query
.
indexOf
(
'?'
,
1
);
int
currentIndex
=
1
;
int
nextQmark
;
int
endIndex
;
if
(
qmark2
<
0
)
{
attributes
=
query
.
substring
(
1
);
// attributes:
nextQmark
=
query
.
indexOf
(
'?'
,
currentIndex
);
endIndex
=
nextQmark
==
-
1
?
query
.
length
()
:
nextQmark
;
if
(
endIndex
-
currentIndex
>
0
)
{
attributes
=
query
.
substring
(
currentIndex
,
endIndex
);
}
currentIndex
=
endIndex
+
1
;
if
(
currentIndex
>=
query
.
length
())
{
return
;
}
else
if
(
qmark2
!=
1
)
{
attributes
=
query
.
substring
(
1
,
qmark2
);
}
int
qmark3
=
query
.
indexOf
(
'?'
,
qmark2
+
1
);
if
(
qmark3
<
0
)
{
scope
=
query
.
substring
(
qmark2
+
1
);
// scope:
nextQmark
=
query
.
indexOf
(
'?'
,
currentIndex
);
endIndex
=
nextQmark
==
-
1
?
query
.
length
()
:
nextQmark
;
if
(
endIndex
-
currentIndex
>
0
)
{
scope
=
query
.
substring
(
currentIndex
,
endIndex
);
}
currentIndex
=
endIndex
+
1
;
if
(
currentIndex
>=
query
.
length
())
{
return
;
}
else
if
(
qmark3
!=
qmark2
+
1
)
{
scope
=
query
.
substring
(
qmark2
+
1
,
qmark3
);
}
int
qmark4
=
query
.
indexOf
(
'?'
,
qmark3
+
1
);
if
(
qmark4
<
0
)
{
filter
=
query
.
substring
(
qmark3
+
1
);
}
else
{
if
(
qmark4
!=
qmark3
+
1
)
{
filter
=
query
.
substring
(
qmark3
+
1
,
qmark4
);
}
extensions
=
query
.
substring
(
qmark4
+
1
);
if
(
extensions
.
length
()
>
0
)
{
extensions
=
UrlUtil
.
decode
(
extensions
,
"UTF8"
);
}
}
if
(
filter
!=
null
&&
filter
.
length
()
>
0
)
{
// filter:
nextQmark
=
query
.
indexOf
(
'?'
,
currentIndex
);
endIndex
=
nextQmark
==
-
1
?
query
.
length
()
:
nextQmark
;
if
(
endIndex
-
currentIndex
>
0
)
{
filter
=
query
.
substring
(
currentIndex
,
endIndex
);
filter
=
UrlUtil
.
decode
(
filter
,
"UTF8"
);
}
currentIndex
=
endIndex
+
1
;
if
(
currentIndex
>=
query
.
length
())
{
return
;
}
// extensions:
if
(
query
.
length
()
-
currentIndex
>
0
)
{
extensions
=
query
.
substring
(
currentIndex
);
extensions
=
UrlUtil
.
decode
(
extensions
,
"UTF8"
);
}
}
/*
...
...
src/solaris/classes/sun/awt/X11/XWindowPeer.java
浏览文件 @
7bb0cdab
...
...
@@ -679,28 +679,33 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
GraphicsConfiguration
newGC
=
null
;
Rectangle
screenBounds
;
for
(
int
i
=
0
;
i
<
gds
.
length
;
i
++)
{
screenBounds
=
gds
[
i
].
getDefaultConfiguration
().
getBounds
();
if
(
newBounds
.
intersects
(
screenBounds
))
{
horizAmt
=
Math
.
min
(
newBounds
.
x
+
newBounds
.
width
,
screenBounds
.
x
+
screenBounds
.
width
)
-
Math
.
max
(
newBounds
.
x
,
screenBounds
.
x
);
vertAmt
=
Math
.
min
(
newBounds
.
y
+
newBounds
.
height
,
screenBounds
.
y
+
screenBounds
.
height
)-
Math
.
max
(
newBounds
.
y
,
screenBounds
.
y
);
intAmt
=
horizAmt
*
vertAmt
;
if
(
intAmt
==
area
)
{
// Completely on this screen - done!
newScreenNum
=
i
;
newGC
=
gds
[
i
].
getDefaultConfiguration
();
break
;
}
if
(
intAmt
>
largestAmt
)
{
largestAmt
=
intAmt
;
newScreenNum
=
i
;
newGC
=
gds
[
i
].
getDefaultConfiguration
();
XToolkit
.
awtUnlock
();
try
{
for
(
int
i
=
0
;
i
<
gds
.
length
;
i
++)
{
screenBounds
=
gds
[
i
].
getDefaultConfiguration
().
getBounds
();
if
(
newBounds
.
intersects
(
screenBounds
))
{
horizAmt
=
Math
.
min
(
newBounds
.
x
+
newBounds
.
width
,
screenBounds
.
x
+
screenBounds
.
width
)
-
Math
.
max
(
newBounds
.
x
,
screenBounds
.
x
);
vertAmt
=
Math
.
min
(
newBounds
.
y
+
newBounds
.
height
,
screenBounds
.
y
+
screenBounds
.
height
)-
Math
.
max
(
newBounds
.
y
,
screenBounds
.
y
);
intAmt
=
horizAmt
*
vertAmt
;
if
(
intAmt
==
area
)
{
// Completely on this screen - done!
newScreenNum
=
i
;
newGC
=
gds
[
i
].
getDefaultConfiguration
();
break
;
}
if
(
intAmt
>
largestAmt
)
{
largestAmt
=
intAmt
;
newScreenNum
=
i
;
newGC
=
gds
[
i
].
getDefaultConfiguration
();
}
}
}
}
finally
{
XToolkit
.
awtLock
();
}
if
(
newScreenNum
!=
curScreenNum
)
{
if
(
log
.
isLoggable
(
PlatformLogger
.
Level
.
FINEST
))
{
...
...
src/solaris/classes/sun/awt/X11GraphicsDevice.java
浏览文件 @
7bb0cdab
...
...
@@ -286,7 +286,6 @@ public class X11GraphicsDevice
* Returns true only if:
* - the Xrandr extension is present
* - the necessary Xrandr functions were loaded successfully
* - XINERAMA is not enabled
*/
private
static
synchronized
boolean
isXrandrExtensionSupported
()
{
if
(
xrandrExtSupported
==
null
)
{
...
...
@@ -318,7 +317,9 @@ public class X11GraphicsDevice
@Override
public
boolean
isDisplayChangeSupported
()
{
return
(
isFullScreenSupported
()
&&
(
getFullScreenWindow
()
!=
null
));
return
(
isFullScreenSupported
()
&&
!((
X11GraphicsEnvironment
)
GraphicsEnvironment
.
getLocalGraphicsEnvironment
()).
runningXinerama
());
}
private
static
void
enterFullScreenExclusive
(
Window
w
)
{
...
...
@@ -348,7 +349,9 @@ public class X11GraphicsDevice
if
(
fsSupported
&&
old
!=
null
)
{
// enter windowed mode (and restore original display mode)
exitFullScreenExclusive
(
old
);
setDisplayMode
(
origDisplayMode
);
if
(
isDisplayChangeSupported
())
{
setDisplayMode
(
origDisplayMode
);
}
}
super
.
setFullScreenWindow
(
w
);
...
...
@@ -431,7 +434,9 @@ public class X11GraphicsDevice
Window
old
=
getFullScreenWindow
();
if
(
old
!=
null
)
{
exitFullScreenExclusive
(
old
);
setDisplayMode
(
origDisplayMode
);
if
(
isDisplayChangeSupported
())
{
setDisplayMode
(
origDisplayMode
);
}
}
};
Thread
t
=
new
Thread
(
rootTG
,
r
,
"Display-Change-Shutdown-Thread-"
+
screen
);
...
...
src/windows/native/java/lang/java_props_md.c
浏览文件 @
7bb0cdab
...
...
@@ -348,8 +348,8 @@ java_props_t *
GetJavaProperties
(
JNIEnv
*
env
)
{
static
java_props_t
sprops
=
{
0
};
OSVERSIONINFOEX
ver
;
int
majorVersion
;
int
minorVersion
;
if
(
sprops
.
line_separator
)
{
return
&
sprops
;
...
...
@@ -380,21 +380,67 @@ GetJavaProperties(JNIEnv* env)
/* OS properties */
{
char
buf
[
100
];
SYSTEM_INFO
si
;
PGNSI
pGNSI
;
ver
.
dwOSVersionInfoSize
=
sizeof
(
ver
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
ver
);
ZeroMemory
(
&
si
,
sizeof
(
SYSTEM_INFO
));
// Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
pGNSI
=
(
PGNSI
)
GetProcAddress
(
GetModuleHandle
(
TEXT
(
"kernel32.dll"
)),
"GetNativeSystemInfo"
);
if
(
NULL
!=
pGNSI
)
pGNSI
(
&
si
);
else
GetSystemInfo
(
&
si
);
boolean
is_workstation
;
boolean
is_64bit
;
DWORD
platformId
;
{
OSVERSIONINFOEX
ver
;
ver
.
dwOSVersionInfoSize
=
sizeof
(
ver
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
ver
);
majorVersion
=
ver
.
dwMajorVersion
;
minorVersion
=
ver
.
dwMinorVersion
;
is_workstation
=
(
ver
.
wProductType
==
VER_NT_WORKSTATION
);
platformId
=
ver
.
dwPlatformId
;
sprops
.
patch_level
=
_strdup
(
ver
.
szCSDVersion
);
}
{
SYSTEM_INFO
si
;
ZeroMemory
(
&
si
,
sizeof
(
SYSTEM_INFO
));
GetNativeSystemInfo
(
&
si
);
is_64bit
=
(
si
.
wProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_AMD64
);
}
do
{
// Read the major and minor version number from kernel32.dll
VS_FIXEDFILEINFO
*
file_info
;
WCHAR
kernel32_path
[
MAX_PATH
];
DWORD
version_size
;
LPTSTR
version_info
;
UINT
len
,
ret
;
// Get the full path to \Windows\System32\kernel32.dll and use that for
// determining what version of Windows we're running on.
len
=
MAX_PATH
-
(
UINT
)
strlen
(
"
\\
kernel32.dll"
)
-
1
;
ret
=
GetSystemDirectoryW
(
kernel32_path
,
len
);
if
(
ret
==
0
||
ret
>
len
)
{
break
;
}
wcsncat
(
kernel32_path
,
L"
\\
kernel32.dll"
,
MAX_PATH
-
ret
);
version_size
=
GetFileVersionInfoSizeW
(
kernel32_path
,
NULL
);
if
(
version_size
==
0
)
{
break
;
}
version_info
=
(
LPTSTR
)
malloc
(
version_size
);
if
(
version_info
==
NULL
)
{
break
;
}
if
(
!
GetFileVersionInfoW
(
kernel32_path
,
0
,
version_size
,
version_info
))
{
free
(
version_info
);
break
;
}
if
(
!
VerQueryValueW
(
version_info
,
L"
\\
"
,
(
LPVOID
*
)
&
file_info
,
&
len
))
{
free
(
version_info
);
break
;
}
majorVersion
=
HIWORD
(
file_info
->
dwProductVersionMS
);
minorVersion
=
LOWORD
(
file_info
->
dwProductVersionMS
);
free
(
version_info
);
}
while
(
0
);
/*
* From msdn page on OSVERSIONINFOEX, current as of this
...
...
@@ -420,17 +466,15 @@ GetJavaProperties(JNIEnv* env)
* Windows Server 2008 R2 6 1 (!VER_NT_WORKSTATION)
* Windows 8 6 2 (VER_NT_WORKSTATION)
* Windows Server 2012 6 2 (!VER_NT_WORKSTATION)
* Windows 10 10 0 (VER_NT_WORKSTATION)
*
* This mapping will presumably be augmented as new Windows
* versions are released.
*/
switch
(
ver
.
dwPlatformId
)
{
case
VER_PLATFORM_WIN32s
:
sprops
.
os_name
=
"Windows 3.1"
;
break
;
switch
(
platformId
)
{
case
VER_PLATFORM_WIN32_WINDOWS
:
if
(
ver
.
dwM
ajorVersion
==
4
)
{
switch
(
ver
.
dwM
inorVersion
)
{
if
(
m
ajorVersion
==
4
)
{
switch
(
m
inorVersion
)
{
case
0
:
sprops
.
os_name
=
"Windows 95"
;
break
;
case
10
:
sprops
.
os_name
=
"Windows 98"
;
break
;
case
90
:
sprops
.
os_name
=
"Windows Me"
;
break
;
...
...
@@ -441,10 +485,10 @@ GetJavaProperties(JNIEnv* env)
}
break
;
case
VER_PLATFORM_WIN32_NT
:
if
(
ver
.
dwM
ajorVersion
<=
4
)
{
if
(
m
ajorVersion
<=
4
)
{
sprops
.
os_name
=
"Windows NT"
;
}
else
if
(
ver
.
dwM
ajorVersion
==
5
)
{
switch
(
ver
.
dwM
inorVersion
)
{
}
else
if
(
m
ajorVersion
==
5
)
{
switch
(
m
inorVersion
)
{
case
0
:
sprops
.
os_name
=
"Windows 2000"
;
break
;
case
1
:
sprops
.
os_name
=
"Windows XP"
;
break
;
case
2
:
...
...
@@ -459,8 +503,7 @@ GetJavaProperties(JNIEnv* env)
* If it is, the operating system is Windows XP 64 bit;
* otherwise, it is Windows Server 2003."
*/
if
(
ver
.
wProductType
==
VER_NT_WORKSTATION
&&
si
.
wProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_AMD64
)
{
if
(
is_workstation
&&
is_64bit
)
{
sprops
.
os_name
=
"Windows XP"
;
/* 64 bit */
}
else
{
sprops
.
os_name
=
"Windows 2003"
;
...
...
@@ -468,12 +511,12 @@ GetJavaProperties(JNIEnv* env)
break
;
default:
sprops
.
os_name
=
"Windows NT (unknown)"
;
break
;
}
}
else
if
(
ver
.
dwM
ajorVersion
==
6
)
{
}
else
if
(
m
ajorVersion
==
6
)
{
/*
* See table in MSDN OSVERSIONINFOEX documentation.
*/
if
(
ver
.
wProductType
==
VER_NT_WORKSTATION
)
{
switch
(
ver
.
dwM
inorVersion
)
{
if
(
is_workstation
)
{
switch
(
m
inorVersion
)
{
case
0
:
sprops
.
os_name
=
"Windows Vista"
;
break
;
case
1
:
sprops
.
os_name
=
"Windows 7"
;
break
;
case
2
:
sprops
.
os_name
=
"Windows 8"
;
break
;
...
...
@@ -481,7 +524,7 @@ GetJavaProperties(JNIEnv* env)
default:
sprops
.
os_name
=
"Windows NT (unknown)"
;
}
}
else
{
switch
(
ver
.
dwM
inorVersion
)
{
switch
(
m
inorVersion
)
{
case
0
:
sprops
.
os_name
=
"Windows Server 2008"
;
break
;
case
1
:
sprops
.
os_name
=
"Windows Server 2008 R2"
;
break
;
case
2
:
sprops
.
os_name
=
"Windows Server 2012"
;
break
;
...
...
@@ -489,6 +532,17 @@ GetJavaProperties(JNIEnv* env)
default:
sprops
.
os_name
=
"Windows NT (unknown)"
;
}
}
}
else
if
(
majorVersion
==
10
)
{
if
(
is_workstation
)
{
switch
(
minorVersion
)
{
case
0
:
sprops
.
os_name
=
"Windows 10"
;
break
;
default:
sprops
.
os_name
=
"Windows NT (unknown)"
;
}
}
else
{
switch
(
minorVersion
)
{
default:
sprops
.
os_name
=
"Windows NT (unknown)"
;
}
}
}
else
{
sprops
.
os_name
=
"Windows NT (unknown)"
;
}
...
...
@@ -497,7 +551,7 @@ GetJavaProperties(JNIEnv* env)
sprops
.
os_name
=
"Windows (unknown)"
;
break
;
}
sprintf
(
buf
,
"%d.%d"
,
ver
.
dwMajorVersion
,
ver
.
dwM
inorVersion
);
sprintf
(
buf
,
"%d.%d"
,
majorVersion
,
m
inorVersion
);
sprops
.
os_version
=
_strdup
(
buf
);
#if _M_IA64
sprops
.
os_arch
=
"ia64"
;
...
...
@@ -508,9 +562,6 @@ GetJavaProperties(JNIEnv* env)
#else
sprops
.
os_arch
=
"unknown"
;
#endif
sprops
.
patch_level
=
_strdup
(
ver
.
szCSDVersion
);
sprops
.
desktop
=
"windows"
;
}
...
...
@@ -621,7 +672,7 @@ GetJavaProperties(JNIEnv* env)
&
display_encoding
);
sprops
.
sun_jnu_encoding
=
getEncodingInternal
(
systemDefaultLCID
);
if
(
LANGIDFROMLCID
(
userDefaultLCID
)
==
0x0c04
&&
ver
.
dwM
ajorVersion
==
6
)
{
if
(
LANGIDFROMLCID
(
userDefaultLCID
)
==
0x0c04
&&
m
ajorVersion
==
6
)
{
// MS claims "Vista has built-in support for HKSCS-2004.
// All of the HKSCS-2004 characters have Unicode 4.1.
// PUA code point assignments". But what it really means
...
...
src/windows/resource/java.manifest
浏览文件 @
7bb0cdab
...
...
@@ -52,6 +52,8 @@
<supportedOS
Id=
"{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"
/>
<!-- Windows 8.1 -->
<supportedOS
Id=
"{1f676c76-80e1-4239-95bb-83d0f6d0da78}"
/>
<!-- Windows 10 -->
<supportedOS
Id=
"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"
/>
</application>
</compatibility>
...
...
test/TEST.groups
浏览文件 @
7bb0cdab
...
...
@@ -489,6 +489,7 @@ needs_compact3 = \
java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java \
java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java \
java/lang/System/MacEncoding/TestFileEncoding.java \
java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java \
java/nio/channels/AsynchronousSocketChannel/Leaky.java \
java/security/PermissionCollection/Concurrent.java \
java/security/Principal/Implies.java \
...
...
test/com/sun/jndi/ldap/LdapURLOptionalFields.java
0 → 100644
浏览文件 @
7bb0cdab
/*
* Copyright (c) 2015, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 8074761
* @summary RFC-2255 allows attribute, scope and filter to be empty.
*/
import
com.sun.jndi.ldap.LdapURL
;
public
class
LdapURLOptionalFields
{
private
static
final
String
[]
TEST_URLS
=
{
"ldap://localhost:10389/ou=RefPeople,dc=example,dc=com"
,
"ldap://localhost:10389/ou=RefPeople,dc=example,dc=com?"
,
"ldap://localhost:10389/ou=RefPeople,dc=example,dc=com??"
,
"ldap://localhost:10389/ou=RefPeople,dc=example,dc=com???"
,
"ldap://localhost:10389/ou=RefPeople,dc=example,dc=com????"
};
public
static
void
main
(
String
[]
args
)
throws
Exception
{
for
(
int
i
=
0
;
i
<
TEST_URLS
.
length
;
i
++)
{
String
url
=
TEST_URLS
[
i
];
checkEmptyAttributes
(
url
);
}
}
private
static
void
checkEmptyAttributes
(
String
urlString
)
throws
Exception
{
LdapURL
url
=
new
LdapURL
(
urlString
);
if
(
url
.
getAttributes
()
!=
null
)
{
throw
new
Exception
(
"Expected null attributes for url: '"
+
urlString
+
"'"
);
}
if
(
url
.
getScope
()
!=
null
)
{
throw
new
Exception
(
"Expected null scope for url: '"
+
urlString
+
"'"
);
}
if
(
url
.
getFilter
()
!=
null
)
{
throw
new
Exception
(
"Expected null filter for url: '"
+
urlString
+
"'"
);
}
}
}
test/java/awt/FullScreen/MultimonFullscreenTest/MultimonDeadlockTest.java
0 → 100644
浏览文件 @
7bb0cdab
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 8129116
@summary Deadlock with multimonitor fullscreen windows.
@run main/timeout=20 MultimonDeadlockTest
*/
import
java.awt.*
;
import
java.awt.event.WindowAdapter
;
import
java.awt.event.WindowEvent
;
import
java.lang.reflect.InvocationTargetException
;
public
class
MultimonDeadlockTest
{
public
static
void
main
(
String
argv
[])
{
final
GraphicsDevice
[]
devices
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
()
.
getScreenDevices
();
if
(
devices
.
length
<
2
)
{
System
.
out
.
println
(
"It's a multiscreen test... skipping!"
);
return
;
}
Frame
frames
[]
=
new
Frame
[
devices
.
length
];
try
{
EventQueue
.
invokeAndWait
(()
->
{
for
(
int
i
=
0
;
i
<
devices
.
length
;
i
++)
{
frames
[
i
]
=
new
Frame
();
frames
[
i
].
setSize
(
100
,
100
);
frames
[
i
].
setBackground
(
Color
.
BLUE
);
devices
[
i
].
setFullScreenWindow
(
frames
[
i
]);
}
});
Thread
.
sleep
(
5000
);
}
catch
(
InterruptedException
|
InvocationTargetException
ex
)
{
}
finally
{
for
(
int
i
=
0
;
i
<
devices
.
length
;
i
++)
{
devices
[
i
].
setFullScreenWindow
(
null
);
frames
[
i
].
dispose
();
}
}
}
}
test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
浏览文件 @
7bb0cdab
...
...
@@ -79,23 +79,18 @@ public final class LFMultiThreadCachingTest extends LFCachingTestCase {
CountDownLatch
end
=
new
CountDownLatch
(
CORES
);
final
Map
<
Thread
,
Throwable
>
threadUncaughtExceptions
=
Collections
.
synchronizedMap
(
new
HashMap
<
Thread
,
Throwable
>(
CORES
));
Thread
.
UncaughtExceptionHandler
exHandler
=
(
t
,
e
)
->
{
threadUncaughtExceptions
.
put
(
t
,
e
);
};
for
(
int
i
=
0
;
i
<
CORES
;
++
i
)
{
TestMethods
.
Kind
kind
=
KINDS
[
i
%
KINDS
.
length
];
Thread
t
=
new
Thread
(()
->
{
try
{
begin
.
await
();
adapters
.
add
(
getTestMethod
().
getTestCaseMH
(
data
,
kind
));
}
catch
(
InterruptedException
|
BrokenBarrierException
|
IllegalAccessException
|
NoSuchMethodException
ex
)
{
throw
new
Error
(
"Unexpected exception"
,
ex
);
}
catch
(
Throwable
ex
)
{
threadUncaughtExceptions
.
put
(
Thread
.
currentThread
(),
ex
);
}
finally
{
end
.
countDown
();
}
});
t
.
setUncaughtExceptionHandler
(
exHandler
);
t
.
start
();
}
try
{
...
...
test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java
浏览文件 @
7bb0cdab
...
...
@@ -104,6 +104,8 @@ public class DisabledAlgorithms {
default
:
throw
new
RuntimeException
(
"Wrong parameter: "
+
args
[
0
]);
}
System
.
out
.
println
(
"Test passed"
);
}
/*
...
...
@@ -128,7 +130,6 @@ public class DisabledAlgorithms {
}
}
server
.
stop
();
while
(
server
.
isRunning
())
{
sleep
();
}
...
...
@@ -224,11 +225,19 @@ public class DisabledAlgorithms {
}
catch
(
SSLHandshakeException
e
)
{
System
.
out
.
println
(
"Server: run: "
+
e
);
sslError
=
true
;
stopped
=
true
;
}
catch
(
IOException
e
)
{
if
(!
stopped
)
{
System
.
out
.
println
(
"Server: run: "
+
e
);
System
.
out
.
println
(
"Server: run: unexpected exception: "
+
e
);
e
.
printStackTrace
();
otherError
=
true
;
stopped
=
true
;
}
else
{
System
.
out
.
println
(
"Server: run: "
+
e
);
System
.
out
.
println
(
"The exception above occurred "
+
"because socket was closed, "
+
"please ignore it"
);
}
}
}
...
...
@@ -261,6 +270,7 @@ public class DisabledAlgorithms {
stopped
=
true
;
if
(!
ssocket
.
isClosed
())
{
try
{
System
.
out
.
println
(
"Server: close socket"
);
ssocket
.
close
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"Server: close: "
+
e
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录