mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
Merge
This commit is contained in:
commit
78bfdda141
1037 changed files with 46827 additions and 13491 deletions
4
.hgtags
4
.hgtags
|
@ -250,3 +250,7 @@ b32e2219736e42baaf45daf0ad67ed34f6033799 jdk9-b02
|
|||
dd311791ad6895a3989020dd6c6c46db87972ab8 jdk9-b05
|
||||
85dbdc227c5e11429b4fc4a8ba763f50107edd6e jdk9-b06
|
||||
c826d05f1fb0773f6a28caa763307dd30d90d36e jdk9-b07
|
||||
b47e021195757f8f45582124ea7cad48ccf5f872 jdk9-b08
|
||||
efe7dbc6088691757404e0c8745f894e3ca9c022 jdk9-b09
|
||||
8c0bdeecd7c0f9ce3f3762a51991f755cb3a972c jdk9-b10
|
||||
0809c9a4d36e6291f1c4384604c4bbf29e975722 jdk9-b11
|
||||
|
|
|
@ -250,3 +250,7 @@ cb4c3440bc2748101923e2488506e61009ab1bf5 jdk9-b04
|
|||
8c63f0b6ada282f27e3a80125e53c3be603f9af7 jdk9-b05
|
||||
d0b525cd31b87abeb6d5b7e3516953eeb13b323c jdk9-b06
|
||||
0ea015c298b201c07fa33990f2445b6d0ef3566d jdk9-b07
|
||||
db045d8faa0924b7378102d24a1a0d850c1e3834 jdk9-b08
|
||||
4a21dc7d57d1069a01f68e7182c074cb37349dfb jdk9-b09
|
||||
fa13f2b926f8426876ec03e7903f3ee0ee150f2e jdk9-b10
|
||||
ab55a18a95e1990a588929d5d29db3eb9985fea0 jdk9-b11
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
root repository:
|
||||
<blockquote>
|
||||
<code>
|
||||
hg clone http://hg.openjdk.java.net/jdk8/jdk8
|
||||
hg clone http://hg.openjdk.java.net/jdk9/jdk9
|
||||
<i>YourOpenJDK</i>
|
||||
<br>
|
||||
cd <i>YourOpenJDK</i>
|
||||
|
@ -373,18 +373,17 @@
|
|||
particular update level.
|
||||
<br> <br>
|
||||
|
||||
<b><i>Building JDK 8 requires use of a version
|
||||
of JDK 7 that is at Update 7 or newer. JDK 8
|
||||
developers should not use JDK 8 as the boot
|
||||
JDK, to ensure that JDK 8 dependencies are
|
||||
<b><i>Building JDK 9 requires JDK 8. JDK 9
|
||||
developers should not use JDK 9 as the boot
|
||||
JDK, to ensure that JDK 9 dependencies are
|
||||
not introduced into the parts of the system
|
||||
that are built with JDK 7.</i></b>
|
||||
that are built with JDK 8.</i></b>
|
||||
|
||||
<br> <br>
|
||||
The JDK 7 binaries can be downloaded from Oracle's
|
||||
The JDK 8 binaries can be downloaded from Oracle's
|
||||
<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
||||
target="_blank">JDK 7 download site</a>.
|
||||
For build performance reasons
|
||||
target="_blank">JDK 8 download site</a>.
|
||||
For build performance reasons it
|
||||
is very important that this bootstrap JDK be made available
|
||||
on the local disk of the machine doing the build.
|
||||
You should add its <code>bin</code> directory
|
||||
|
@ -1454,9 +1453,7 @@
|
|||
<p>One of the top goals of the new build system is to improve the
|
||||
build performance and decrease the time needed to build. This will
|
||||
soon also apply to the java compilation when the Smart Javac wrapper
|
||||
is making its way into jdk8. It can be tried in the build-infra
|
||||
repository already. You are likely to find that the new build system
|
||||
is faster than the old one even without this feature.</p>
|
||||
is fully supported.</p>
|
||||
|
||||
<p>At the end of a successful execution of <code>configure</code>,
|
||||
you will get a performance summary,
|
||||
|
|
|
@ -82,10 +82,10 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`]
|
||||
[FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`]
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
|
||||
AC_MSG_NOTICE([(Your Boot JDK must be version 7, 8 or 9)])
|
||||
AC_MSG_NOTICE([(Your Boot JDK must be version 8 or 9)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
|
|
@ -89,7 +89,7 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
|||
if test "x$FOUND_MEM" = xyes; then
|
||||
AC_MSG_RESULT([$MEMORY_SIZE MB])
|
||||
else
|
||||
AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
|
||||
AC_MSG_RESULT([could not detect memory size, defaulting to $MEMORY_SIZE MB])
|
||||
AC_MSG_WARN([This might seriously impact build performance!])
|
||||
fi
|
||||
])
|
||||
|
|
|
@ -473,7 +473,8 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
|||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
ppc )
|
||||
# on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
|
||||
# on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
* )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
|
||||
|
|
|
@ -4243,7 +4243,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
|||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1396624161
|
||||
DATE_WHEN_GENERATED=1398861894
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -19896,12 +19896,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -20228,12 +20228,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -20422,12 +20422,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -20609,12 +20609,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -20795,12 +20795,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -20981,12 +20981,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -21158,12 +21158,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -21476,12 +21476,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -21804,12 +21804,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -22019,12 +22019,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -22199,12 +22199,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -22407,12 +22407,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -22587,12 +22587,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -22795,12 +22795,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -22975,12 +22975,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -23183,12 +23183,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -23363,12 +23363,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -23558,12 +23558,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -23736,12 +23736,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -23932,12 +23932,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -24110,12 +24110,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -24305,12 +24305,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -24483,12 +24483,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -24679,12 +24679,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -24857,12 +24857,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -25034,12 +25034,12 @@ $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.ja
|
|||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`
|
||||
FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
|
||||
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
|
||||
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
|
@ -41662,7 +41662,8 @@ fi
|
|||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
ppc )
|
||||
# on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
|
||||
# on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
* )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
|
||||
|
@ -43504,9 +43505,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -44092,9 +44094,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -44394,9 +44397,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -44687,9 +44691,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -44980,9 +44985,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -45274,9 +45280,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -45569,9 +45576,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -45860,9 +45868,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -46151,9 +46160,10 @@ $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME
|
|||
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -48566,8 +48576,8 @@ $as_echo_n "checking for memory size... " >&6; }
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
|
||||
$as_echo "$MEMORY_SIZE MB" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
|
||||
$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
|
||||
$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
|
||||
$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
|
||||
fi
|
||||
|
|
|
@ -286,9 +286,10 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
|||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -261,6 +261,7 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
|
|||
|
||||
# Information about the build system
|
||||
NUM_CORES:=@NUM_CORES@
|
||||
MEMORY_SIZE:=@MEMORY_SIZE@
|
||||
# Enable sjavac support = use a javac server,
|
||||
# multi core javac compilation and dependency tracking.
|
||||
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
||||
|
|
|
@ -72,12 +72,21 @@ usage() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
|
||||
if [ "x" = "x$command" ] ; then
|
||||
echo "ERROR: No command to hg supplied!"
|
||||
usage
|
||||
fi
|
||||
|
||||
# Check if we can use fifos for monitoring sub-process completion.
|
||||
on_windows=`uname -s | egrep -ic -e 'cygwin|msys'`
|
||||
if [ ${on_windows} = "1" ]; then
|
||||
# cygwin has (2014-04-18) broken (single writer only) FIFOs
|
||||
# msys has (2014-04-18) no FIFOs.
|
||||
have_fifos="false"
|
||||
else
|
||||
have_fifos="true"
|
||||
fi
|
||||
|
||||
# Clean out the temporary directory that stores the pid files.
|
||||
tmp=/tmp/forest.$$
|
||||
rm -f -r ${tmp}
|
||||
|
@ -210,7 +219,19 @@ if [ "${command}" = "serve" ] ; then
|
|||
) &
|
||||
else
|
||||
# Run the supplied command on all repos in parallel.
|
||||
|
||||
# n is the number of subprocess started or which might still be running.
|
||||
n=0
|
||||
if [ $have_fifos = "true" ]; then
|
||||
# if we have fifos use them to detect command completion.
|
||||
mkfifo ${tmp}/fifo
|
||||
exec 3<>${tmp}/fifo
|
||||
if [ "${sflag}" = "true" ] ; then
|
||||
# force sequential
|
||||
at_a_time=1
|
||||
fi
|
||||
fi
|
||||
|
||||
for i in ${repos} ${repos_extra} ; do
|
||||
n=`expr ${n} '+' 1`
|
||||
repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'`
|
||||
|
@ -221,10 +242,11 @@ else
|
|||
pull_base="${pull_extra}"
|
||||
fi
|
||||
done
|
||||
pull_base="`echo ${pull_base} | sed -e 's@[/]*$@@'`"
|
||||
(
|
||||
(
|
||||
if [ "${command}" = "clone" -o "${command}" = "fclone" -o "${command}" = "tclone" ] ; then
|
||||
pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
|
||||
pull_newrepo="${pull_base}/${i}"
|
||||
path="`dirname ${i}`"
|
||||
if [ "${path}" != "." ] ; then
|
||||
times=0
|
||||
|
@ -237,7 +259,7 @@ else
|
|||
sleep 5
|
||||
done
|
||||
fi
|
||||
echo "hg clone ${pull_newrepo} ${i}" > ${status_output}
|
||||
echo "hg${global_opts} clone ${pull_newrepo} ${i}" > ${status_output}
|
||||
(PYTHONUNBUFFERED=true hg${global_opts} clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc ) 2>&1 &
|
||||
else
|
||||
echo "cd ${i} && hg${global_opts} ${command} ${command_args}" > ${status_output}
|
||||
|
@ -246,21 +268,41 @@ else
|
|||
|
||||
echo $! > ${tmp}/${repopidfile}.pid
|
||||
) 2>&1 | sed -e "s@^@${reponame}: @" > ${status_output}
|
||||
if [ $have_fifos = "true" ]; then
|
||||
echo "${reponame}" >&3
|
||||
fi
|
||||
) &
|
||||
|
||||
if [ `expr ${n} '%' ${at_a_time}` -eq 0 -a "${sflag}" = "false" ] ; then
|
||||
sleep 2
|
||||
echo "Waiting 5 secs before spawning next background command." > ${status_output}
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
if [ "${sflag}" = "true" ] ; then
|
||||
if [ $have_fifos = "true" ]; then
|
||||
# check on count of running subprocesses and possibly wait for completion
|
||||
if [ ${at_a_time} -lt ${n} ] ; then
|
||||
# read will block until there are completed subprocesses
|
||||
while read repo_done; do
|
||||
n=`expr ${n} '-' 1`
|
||||
if [ ${n} -lt ${at_a_time} ] ; then
|
||||
# we should start more subprocesses
|
||||
break;
|
||||
fi
|
||||
done <&3
|
||||
fi
|
||||
else
|
||||
if [ "${sflag}" = "false" ] ; then
|
||||
# Compare completions to starts
|
||||
completed="`(ls -1 ${tmp}/*.pid.rc 2> /dev/null | wc -l) || echo 0`"
|
||||
while [ ${at_a_time} -lt `expr ${n} '-' ${completed}` ] ; do
|
||||
# sleep a short time to give time for something to complete
|
||||
sleep 1
|
||||
completed="`(ls -1 ${tmp}/*.pid.rc 2> /dev/null | wc -l) || echo 0`"
|
||||
done
|
||||
else
|
||||
# complete this task before starting another.
|
||||
wait
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Wait for all hg commands to complete
|
||||
# Wait for all subprocesses to complete
|
||||
wait
|
||||
|
||||
# Terminate with exit 0 only if all subprocesses were successful
|
||||
|
@ -270,7 +312,7 @@ if [ -d ${tmp} ]; then
|
|||
exit_code=`cat ${rc} | tr -d ' \n\r'`
|
||||
if [ "${exit_code}" != "0" ] ; then
|
||||
repo="`echo ${rc} | sed -e s@^${tmp}@@ -e 's@/*\([^/]*\)\.pid\.rc$@\1@' -e 's@_@/@g'`"
|
||||
echo "WARNING: ${repo} exited abnormally." > ${status_output}
|
||||
echo "WARNING: ${repo} exited abnormally ($exit_code)" > ${status_output}
|
||||
ec=1
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -109,7 +109,7 @@ char *replace_cygdrive_cygwin(char const *in)
|
|||
|
||||
void append(char **b, size_t *bl, size_t *u, char *add, size_t addlen)
|
||||
{
|
||||
while ( (addlen+*u+1) > *bl) {
|
||||
while ((addlen+*u+1) > *bl) {
|
||||
*bl *= 2;
|
||||
*b = (char*) realloc(*b, *bl);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void append(char **b, size_t *bl, size_t *u, char *add, size_t addlen)
|
|||
}
|
||||
|
||||
/*
|
||||
* Creates a new string from in where the first occurance of sub is
|
||||
* Creates a new string from in where the first occurrence of sub is
|
||||
* replaced by rep.
|
||||
*/
|
||||
char *replace_substring(char *in, char *sub, char *rep)
|
||||
|
@ -246,7 +246,7 @@ char *fix_at_file(char const *in)
|
|||
}
|
||||
|
||||
buffer = (char*) malloc(buflen);
|
||||
while((blocklen = fread(block,1,sizeof(block),atin)) > 0) {
|
||||
while ((blocklen = fread(block, 1, sizeof(block), atin)) > 0) {
|
||||
append(&buffer, &buflen, &used, block, blocklen);
|
||||
}
|
||||
buffer[used] = 0;
|
||||
|
@ -280,16 +280,21 @@ char * quote_arg(char const * in_arg) {
|
|||
char *current = quoted;
|
||||
int pass;
|
||||
|
||||
if(strpbrk(in_arg, " \t\n\v\r\\\"") == NULL) {
|
||||
if (strlen(in_arg) == 0) {
|
||||
// empty string? explicitly quote it.
|
||||
return _strdup("\"\"");
|
||||
}
|
||||
|
||||
if (strpbrk(in_arg, " \t\n\v\r\\\"") == NULL) {
|
||||
return _strdup(in_arg);
|
||||
}
|
||||
|
||||
// process the arg twice. Once to calculate the size and then to copy it.
|
||||
for(pass=1; pass<=2; pass++) {
|
||||
for (pass=1; pass<=2; pass++) {
|
||||
char const *arg = in_arg;
|
||||
|
||||
// initial "
|
||||
if(pass == 2) {
|
||||
if (pass == 2) {
|
||||
*current = '\"';
|
||||
}
|
||||
current++;
|
||||
|
@ -328,7 +333,7 @@ char * quote_arg(char const * in_arg) {
|
|||
*current = *arg;
|
||||
}
|
||||
current++;
|
||||
} while( *arg++ != '\0');
|
||||
} while (*arg++ != '\0');
|
||||
|
||||
// allocate the buffer
|
||||
if (pass == 1) {
|
||||
|
@ -362,7 +367,7 @@ int main(int argc, char const ** argv)
|
|||
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
char const * cmdline = GetCommandLine();
|
||||
fprintf(stderr, "fixpath input line >%s<\n", strstr( cmdline , argv[1]));
|
||||
fprintf(stderr, "fixpath input line >%s<\n", strstr(cmdline, argv[1]));
|
||||
}
|
||||
|
||||
if (argv[1][1] == 'c' && argv[1][2] == '\0') {
|
||||
|
@ -399,7 +404,7 @@ int main(int argc, char const ** argv)
|
|||
}
|
||||
|
||||
rc = SetEnvironmentVariable(var, val);
|
||||
if(!rc) {
|
||||
if (!rc) {
|
||||
// Could not set var for some reason. Try to report why.
|
||||
const int msg_len = 80 + var_len + strlen(val);
|
||||
char * msg = (char *) alloca(msg_len);
|
||||
|
@ -422,7 +427,7 @@ int main(int argc, char const ** argv)
|
|||
// handle command and it's args.
|
||||
while (i < argc) {
|
||||
char const *replaced = replace_cygdrive(argv[i]);
|
||||
if(replaced[0] == '@') {
|
||||
if (replaced[0] == '@') {
|
||||
// Found at-file! Fix it!
|
||||
replaced = fix_at_file(replaced);
|
||||
}
|
||||
|
@ -433,7 +438,7 @@ int main(int argc, char const ** argv)
|
|||
// determine the length of the line
|
||||
line = NULL;
|
||||
// args
|
||||
for(i = cmd; i < argc; i++) {
|
||||
for (i = cmd; i < argc; i++) {
|
||||
line += (ptrdiff_t) strlen(argv[i]);
|
||||
}
|
||||
// spaces and null
|
||||
|
@ -443,7 +448,7 @@ int main(int argc, char const ** argv)
|
|||
|
||||
// copy in args.
|
||||
current = line;
|
||||
for(i = cmd; i < argc; i++) {
|
||||
for (i = cmd; i < argc; i++) {
|
||||
ptrdiff_t len = strlen(argv[i]);
|
||||
if (i != cmd) {
|
||||
*current++ = ' ';
|
||||
|
@ -457,16 +462,16 @@ int main(int argc, char const ** argv)
|
|||
fprintf(stderr, "fixpath converted line >%s<\n", line);
|
||||
}
|
||||
|
||||
if(cmd == argc) {
|
||||
if (cmd == argc) {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath no command provided!\n");
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ZeroMemory(&si,sizeof(si));
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
si.cb=sizeof(si);
|
||||
ZeroMemory(&pi,sizeof(pi));
|
||||
ZeroMemory(&pi, sizeof(pi));
|
||||
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
|
@ -481,14 +486,14 @@ int main(int argc, char const ** argv)
|
|||
NULL,
|
||||
&si,
|
||||
&pi);
|
||||
if(!rc) {
|
||||
if (!rc) {
|
||||
// Could not start process for some reason. Try to report why:
|
||||
report_error("Could not start process!");
|
||||
exit(126);
|
||||
}
|
||||
|
||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
||||
GetExitCodeProcess(pi.hProcess,&exitCode);
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
GetExitCodeProcess(pi.hProcess, &exitCode);
|
||||
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
for (i=0; i<num_files_to_delete; ++i) {
|
||||
|
|
|
@ -250,3 +250,7 @@ d338b892a13db19b093f85cf5f949a4504e4d31f jdk9-b03
|
|||
167c39eb44731a5d66770d0f00e231164653a2ff jdk9-b05
|
||||
a4bf701ac316946c2e5e83138ad8e687da6a4b30 jdk9-b06
|
||||
6c8563600a71394c949405189ddd66267a88d8cd jdk9-b07
|
||||
2da7fead826bc27f193c7d63048c2cf100a8809c jdk9-b08
|
||||
1a3a4f48515dbf1cff37279691b2fb74f228298d jdk9-b09
|
||||
3bd4039dfc632fd7fc8418a25a3dcc34d1cd4019 jdk9-b10
|
||||
77ea0a2503582a28e4e66be7239a49a0d1dd313f jdk9-b11
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, 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
|
||||
|
@ -52,6 +52,7 @@ import java.io.IOException;
|
|||
import java.io.DataOutputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InvalidClassException;
|
||||
import java.io.Externalizable;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -80,15 +81,15 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
public static final long kDefaultUID = -1;
|
||||
|
||||
private static Object noArgsList[] = {};
|
||||
private static Class noTypesList[] = {};
|
||||
private static Class<?> noTypesList[] = {};
|
||||
|
||||
/** true if represents enum type */
|
||||
private boolean isEnum;
|
||||
|
||||
private static final Bridge bridge =
|
||||
(Bridge)AccessController.doPrivileged(
|
||||
new PrivilegedAction() {
|
||||
public Object run() {
|
||||
AccessController.doPrivileged(
|
||||
new PrivilegedAction<Bridge>() {
|
||||
public Bridge run() {
|
||||
return Bridge.get() ;
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +99,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* is returned if the specified class does not implement
|
||||
* java.io.Serializable or java.io.Externalizable.
|
||||
*/
|
||||
static final ObjectStreamClass lookup(Class cl)
|
||||
static final ObjectStreamClass lookup(Class<?> cl)
|
||||
{
|
||||
ObjectStreamClass desc = lookupInternal(cl);
|
||||
if (desc.isSerializable() || desc.isExternalizable())
|
||||
|
@ -110,7 +111,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* Find the class descriptor for the specified class.
|
||||
* Package access only so it can be called from ObjectIn/OutStream.
|
||||
*/
|
||||
static ObjectStreamClass lookupInternal(Class cl)
|
||||
static ObjectStreamClass lookupInternal(Class<?> cl)
|
||||
{
|
||||
/* Synchronize on the hashtable so no two threads will do
|
||||
* this at the same time.
|
||||
|
@ -121,14 +122,14 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
desc = findDescriptorFor(cl);
|
||||
if (desc == null) {
|
||||
/* Check if it's serializable */
|
||||
boolean serializable = classSerializable.isAssignableFrom(cl);
|
||||
boolean serializable = Serializable.class.isAssignableFrom(cl);
|
||||
|
||||
/* If the class is only Serializable,
|
||||
* lookup the descriptor for the superclass.
|
||||
*/
|
||||
ObjectStreamClass superdesc = null;
|
||||
if (serializable) {
|
||||
Class superclass = cl.getSuperclass();
|
||||
Class<?> superclass = cl.getSuperclass();
|
||||
if (superclass != null)
|
||||
superdesc = lookup(superclass);
|
||||
}
|
||||
|
@ -141,7 +142,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
if (serializable) {
|
||||
externalizable =
|
||||
((superdesc != null) && superdesc.isExternalizable()) ||
|
||||
classExternalizable.isAssignableFrom(cl);
|
||||
Externalizable.class.isAssignableFrom(cl);
|
||||
if (externalizable) {
|
||||
serializable = false;
|
||||
}
|
||||
|
@ -185,7 +186,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* that have evolved from a common root class and agree to be serialized
|
||||
* and deserialized using a common format.
|
||||
*/
|
||||
public static final long getSerialVersionUID( java.lang.Class clazz) {
|
||||
public static final long getSerialVersionUID( java.lang.Class<?> clazz) {
|
||||
ObjectStreamClass theosc = ObjectStreamClass.lookup( clazz );
|
||||
if( theosc != null )
|
||||
{
|
||||
|
@ -219,7 +220,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
/**
|
||||
* Return the actual (computed) serialVersionUID for this class.
|
||||
*/
|
||||
public static final long getActualSerialVersionUID( java.lang.Class clazz )
|
||||
public static final long getActualSerialVersionUID( java.lang.Class<?> clazz )
|
||||
{
|
||||
ObjectStreamClass theosc = ObjectStreamClass.lookup( clazz );
|
||||
if( theosc != null )
|
||||
|
@ -249,7 +250,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* Return the class in the local VM that this version is mapped to.
|
||||
* Null is returned if there is no corresponding local class.
|
||||
*/
|
||||
public final Class forClass() {
|
||||
public final Class<?> forClass() {
|
||||
return ofClass;
|
||||
}
|
||||
|
||||
|
@ -349,7 +350,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* Create a new ObjectStreamClass from a loaded class.
|
||||
* Don't call this directly, call lookup instead.
|
||||
*/
|
||||
private ObjectStreamClass(java.lang.Class cl, ObjectStreamClass superdesc,
|
||||
private ObjectStreamClass(java.lang.Class<?> cl, ObjectStreamClass superdesc,
|
||||
boolean serial, boolean extern)
|
||||
{
|
||||
ofClass = cl; /* created from this class */
|
||||
|
@ -433,7 +434,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
if (initialized)
|
||||
return;
|
||||
|
||||
final Class cl = ofClass;
|
||||
final Class<?> cl = ofClass;
|
||||
|
||||
if (!serializable ||
|
||||
externalizable ||
|
||||
|
@ -561,9 +562,9 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* will call it as necessary.
|
||||
*/
|
||||
writeObjectMethod = getPrivateMethod( cl, "writeObject",
|
||||
new Class[] { java.io.ObjectOutputStream.class }, Void.TYPE ) ;
|
||||
new Class<?>[] { java.io.ObjectOutputStream.class }, Void.TYPE ) ;
|
||||
readObjectMethod = getPrivateMethod( cl, "readObject",
|
||||
new Class[] { java.io.ObjectInputStream.class }, Void.TYPE ) ;
|
||||
new Class<?>[] { java.io.ObjectInputStream.class }, Void.TYPE ) ;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -589,9 +590,9 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* class, or null if none found. Access checks are disabled on the
|
||||
* returned method (if any).
|
||||
*/
|
||||
private static Method getPrivateMethod(Class cl, String name,
|
||||
Class[] argTypes,
|
||||
Class returnType)
|
||||
private static Method getPrivateMethod(Class<?> cl, String name,
|
||||
Class<?>[] argTypes,
|
||||
Class<?> returnType)
|
||||
{
|
||||
try {
|
||||
Method meth = cl.getDeclaredMethod(name, argTypes);
|
||||
|
@ -653,7 +654,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* Fill in the reflected Fields that will be used
|
||||
* for reading.
|
||||
*/
|
||||
final void setClass(Class cl) throws InvalidClassException {
|
||||
final void setClass(Class<?> cl) throws InvalidClassException {
|
||||
|
||||
if (cl == null) {
|
||||
localClassDesc = null;
|
||||
|
@ -920,9 +921,9 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* Access checks are disabled on the returned constructor (if any), since
|
||||
* the defining class may still be non-public.
|
||||
*/
|
||||
private static Constructor getExternalizableConstructor(Class cl) {
|
||||
private static Constructor getExternalizableConstructor(Class<?> cl) {
|
||||
try {
|
||||
Constructor cons = cl.getDeclaredConstructor(new Class[0]);
|
||||
Constructor cons = cl.getDeclaredConstructor(new Class<?>[0]);
|
||||
cons.setAccessible(true);
|
||||
return ((cons.getModifiers() & Modifier.PUBLIC) != 0) ?
|
||||
cons : null;
|
||||
|
@ -936,15 +937,15 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* superclass, or null if none found. Access checks are disabled on the
|
||||
* returned constructor (if any).
|
||||
*/
|
||||
private static Constructor getSerializableConstructor(Class cl) {
|
||||
Class initCl = cl;
|
||||
private static Constructor getSerializableConstructor(Class<?> cl) {
|
||||
Class<?> initCl = cl;
|
||||
while (Serializable.class.isAssignableFrom(initCl)) {
|
||||
if ((initCl = initCl.getSuperclass()) == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
try {
|
||||
Constructor cons = initCl.getDeclaredConstructor(new Class[0]);
|
||||
Constructor cons = initCl.getDeclaredConstructor(new Class<?>[0]);
|
||||
int mods = cons.getModifiers();
|
||||
if ((mods & Modifier.PRIVATE) != 0 ||
|
||||
((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 &&
|
||||
|
@ -1049,7 +1050,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* items to the hash accumulating in the digest stream.
|
||||
* Fold the hash into a long. Use the SHA secure hash function.
|
||||
*/
|
||||
private static long _computeSerialVersionUID(Class cl) {
|
||||
private static long _computeSerialVersionUID(Class<?> cl) {
|
||||
if (DEBUG_SVUID)
|
||||
msg( "Computing SerialVersionUID for " + cl ) ;
|
||||
ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
|
||||
|
@ -1103,7 +1104,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* them from its computation.
|
||||
*/
|
||||
|
||||
Class interfaces[] = cl.getInterfaces();
|
||||
Class<?> interfaces[] = cl.getInterfaces();
|
||||
Arrays.sort(interfaces, compareClassByName);
|
||||
|
||||
for (int i = 0; i < interfaces.length; i++) {
|
||||
|
@ -1233,7 +1234,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
return h;
|
||||
}
|
||||
|
||||
private static long computeStructuralUID(com.sun.corba.se.impl.io.ObjectStreamClass osc, Class cl) {
|
||||
private static long computeStructuralUID(com.sun.corba.se.impl.io.ObjectStreamClass osc, Class<?> cl) {
|
||||
ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
|
||||
|
||||
long h = 0;
|
||||
|
@ -1253,7 +1254,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
DataOutputStream data = new DataOutputStream(mdo);
|
||||
|
||||
// Get SUID of parent
|
||||
Class parent = cl.getSuperclass();
|
||||
Class<?> parent = cl.getSuperclass();
|
||||
if ((parent != null))
|
||||
// SerialBug 1; acc. to spec the one for
|
||||
// java.lang.object
|
||||
|
@ -1309,10 +1310,10 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
/**
|
||||
* Compute the JVM signature for the class.
|
||||
*/
|
||||
static String getSignature(Class clazz) {
|
||||
static String getSignature(Class<?> clazz) {
|
||||
String type = null;
|
||||
if (clazz.isArray()) {
|
||||
Class cl = clazz;
|
||||
Class<?> cl = clazz;
|
||||
int dimensions = 0;
|
||||
while (cl.isArray()) {
|
||||
dimensions++;
|
||||
|
@ -1358,7 +1359,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
|
||||
sb.append("(");
|
||||
|
||||
Class[] params = meth.getParameterTypes(); // avoid clone
|
||||
Class<?>[] params = meth.getParameterTypes(); // avoid clone
|
||||
for (int j = 0; j < params.length; j++) {
|
||||
sb.append(getSignature(params[j]));
|
||||
}
|
||||
|
@ -1375,7 +1376,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
|
||||
sb.append("(");
|
||||
|
||||
Class[] params = cons.getParameterTypes(); // avoid clone
|
||||
Class<?>[] params = cons.getParameterTypes(); // avoid clone
|
||||
for (int j = 0; j < params.length; j++) {
|
||||
sb.append(getSignature(params[j]));
|
||||
}
|
||||
|
@ -1395,7 +1396,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* The entries are extended from java.lang.ref.SoftReference so the
|
||||
* gc will be able to free them if needed.
|
||||
*/
|
||||
private static ObjectStreamClass findDescriptorFor(Class cl) {
|
||||
private static ObjectStreamClass findDescriptorFor(Class<?> cl) {
|
||||
|
||||
int hash = cl.hashCode();
|
||||
int index = (hash & 0x7FFFFFFF) % descriptorFor.length;
|
||||
|
@ -1442,7 +1443,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
descriptorFor[index] = e;
|
||||
}
|
||||
|
||||
private static Field[] getDeclaredFields(final Class clz) {
|
||||
private static Field[] getDeclaredFields(final Class<?> clz) {
|
||||
return (Field[]) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return clz.getDeclaredFields();
|
||||
|
@ -1476,7 +1477,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
/*
|
||||
* Class that is a descriptor for in this virtual machine.
|
||||
*/
|
||||
private Class ofClass;
|
||||
private Class<?> ofClass;
|
||||
|
||||
/*
|
||||
* True if descriptor for a proxy class.
|
||||
|
@ -1548,30 +1549,17 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
* Returns true if the given class defines a static initializer method,
|
||||
* false otherwise.
|
||||
*/
|
||||
private static boolean hasStaticInitializer(Class cl) {
|
||||
private static boolean hasStaticInitializer(Class<?> cl) {
|
||||
if (hasStaticInitializerMethod == null) {
|
||||
Class classWithThisMethod = null;
|
||||
Class<?> classWithThisMethod = null;
|
||||
|
||||
try {
|
||||
try {
|
||||
// When using rip-int with Merlin or when this is a Merlin
|
||||
// workspace, the method we want is in sun.misc.ClassReflector
|
||||
// and absent from java.io.ObjectStreamClass.
|
||||
//
|
||||
// When compiling rip-int with JDK 1.3.x, we have to get it
|
||||
// from java.io.ObjectStreamClass.
|
||||
classWithThisMethod = Class.forName("sun.misc.ClassReflector");
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
// Do nothing. This is either not a Merlin workspace,
|
||||
// or rip-int is being compiled with something other than
|
||||
// Merlin, probably JDK 1.3. Fall back on java.io.ObjectStreaClass.
|
||||
}
|
||||
if (classWithThisMethod == null)
|
||||
classWithThisMethod = java.io.ObjectStreamClass.class;
|
||||
|
||||
hasStaticInitializerMethod =
|
||||
classWithThisMethod.getDeclaredMethod("hasStaticInitializer",
|
||||
new Class[] { Class.class });
|
||||
new Class<?>[] { Class.class });
|
||||
} catch (NoSuchMethodException ex) {
|
||||
}
|
||||
|
||||
|
@ -1596,22 +1584,6 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
}
|
||||
|
||||
|
||||
/* The Class Object for java.io.Serializable */
|
||||
private static Class classSerializable = null;
|
||||
private static Class classExternalizable = null;
|
||||
|
||||
/*
|
||||
* Resolve java.io.Serializable at load time.
|
||||
*/
|
||||
static {
|
||||
try {
|
||||
classSerializable = Class.forName("java.io.Serializable");
|
||||
classExternalizable = Class.forName("java.io.Externalizable");
|
||||
} catch (Throwable e) {
|
||||
System.err.println("Could not load java.io.Serializable or java.io.Externalizable.");
|
||||
}
|
||||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
private static final long serialVersionUID = -6120832682080437368L;
|
||||
|
||||
|
@ -1649,8 +1621,8 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
|
||||
private static class CompareClassByName implements Comparator {
|
||||
public int compare(Object o1, Object o2) {
|
||||
Class c1 = (Class)o1;
|
||||
Class c2 = (Class)o2;
|
||||
Class<?> c1 = (Class)o1;
|
||||
Class<?> c2 = (Class)o2;
|
||||
return (c1.getName()).compareTo(c2.getName());
|
||||
}
|
||||
}
|
||||
|
@ -1764,12 +1736,12 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
*
|
||||
* Copied from the Merlin java.io.ObjectStreamClass.
|
||||
*/
|
||||
private static Method getInheritableMethod(Class cl, String name,
|
||||
Class[] argTypes,
|
||||
Class returnType)
|
||||
private static Method getInheritableMethod(Class<?> cl, String name,
|
||||
Class<?>[] argTypes,
|
||||
Class<?> returnType)
|
||||
{
|
||||
Method meth = null;
|
||||
Class defCl = cl;
|
||||
Class<?> defCl = cl;
|
||||
while (defCl != null) {
|
||||
try {
|
||||
meth = defCl.getDeclaredMethod(name, argTypes);
|
||||
|
@ -1801,7 +1773,7 @@ public class ObjectStreamClass implements java.io.Serializable {
|
|||
*
|
||||
* Copied from the Merlin java.io.ObjectStreamClass.
|
||||
*/
|
||||
private static boolean packageEquals(Class cl1, Class cl2) {
|
||||
private static boolean packageEquals(Class<?> cl1, Class<?> cl2) {
|
||||
Package pkg1 = cl1.getPackage(), pkg2 = cl2.getPackage();
|
||||
return ((pkg1 == pkg2) || ((pkg1 != null) && (pkg1.equals(pkg2))));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, 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
|
||||
|
@ -94,7 +94,7 @@ public final class ObjectStreamClassUtil_1_3 {
|
|||
});
|
||||
}
|
||||
|
||||
public static long computeStructuralUID(boolean hasWriteObject, Class cl) {
|
||||
public static long computeStructuralUID(boolean hasWriteObject, Class<?> cl) {
|
||||
ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
|
||||
|
||||
long h = 0;
|
||||
|
@ -119,7 +119,7 @@ public final class ObjectStreamClassUtil_1_3 {
|
|||
// Object method in there
|
||||
|
||||
// Get SUID of parent
|
||||
Class parent = cl.getSuperclass();
|
||||
Class<?> parent = cl.getSuperclass();
|
||||
if ((parent != null) && (parent != java.lang.Object.class)) {
|
||||
boolean hasWriteObjectFlag = false;
|
||||
Class [] args = {java.io.ObjectOutputStream.class};
|
||||
|
@ -503,19 +503,6 @@ public final class ObjectStreamClassUtil_1_3 {
|
|||
Class classWithThisMethod = null;
|
||||
|
||||
try {
|
||||
try {
|
||||
// When using rip-int with Merlin or when this is a Merlin
|
||||
// workspace, the method we want is in sun.misc.ClassReflector
|
||||
// and absent from java.io.ObjectStreamClass.
|
||||
//
|
||||
// When compiling rip-int with JDK 1.3.x, we have to get it
|
||||
// from java.io.ObjectStreamClass.
|
||||
classWithThisMethod = Class.forName("sun.misc.ClassReflector");
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
// Do nothing. This is either not a Merlin workspace,
|
||||
// or rip-int is being compiled with something other than
|
||||
// Merlin, probably JDK 1.3. Fall back on java.io.ObjectStreaClass.
|
||||
}
|
||||
if (classWithThisMethod == null)
|
||||
classWithThisMethod = java.io.ObjectStreamClass.class;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, 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
|
||||
|
@ -53,6 +53,7 @@ import java.io.DataOutputStream;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InvalidClassException;
|
||||
import java.io.Serializable;
|
||||
import java.io.Externalizable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
@ -88,7 +89,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
public static final long kDefaultUID = -1;
|
||||
|
||||
private static Object noArgsList[] = {};
|
||||
private static Class noTypesList[] = {};
|
||||
private static Class<?> noTypesList[] = {};
|
||||
|
||||
private static Hashtable translatedFields;
|
||||
|
||||
|
@ -96,7 +97,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* is returned if the specified class does not implement
|
||||
* java.io.Serializable or java.io.Externalizable.
|
||||
*/
|
||||
static final ObjectStreamClass_1_3_1 lookup(Class cl)
|
||||
static final ObjectStreamClass_1_3_1 lookup(Class<?> cl)
|
||||
{
|
||||
ObjectStreamClass_1_3_1 desc = lookupInternal(cl);
|
||||
if (desc.isSerializable() || desc.isExternalizable())
|
||||
|
@ -108,7 +109,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* Find the class descriptor for the specified class.
|
||||
* Package access only so it can be called from ObjectIn/OutStream.
|
||||
*/
|
||||
static ObjectStreamClass_1_3_1 lookupInternal(Class cl)
|
||||
static ObjectStreamClass_1_3_1 lookupInternal(Class<?> cl)
|
||||
{
|
||||
/* Synchronize on the hashtable so no two threads will do
|
||||
* this at the same time.
|
||||
|
@ -122,13 +123,13 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
}
|
||||
|
||||
/* Check if it's serializable */
|
||||
boolean serializable = classSerializable.isAssignableFrom(cl);
|
||||
boolean serializable = Serializable.class.isAssignableFrom(cl);
|
||||
/* If the class is only Serializable,
|
||||
* lookup the descriptor for the superclass.
|
||||
*/
|
||||
ObjectStreamClass_1_3_1 superdesc = null;
|
||||
if (serializable) {
|
||||
Class superclass = cl.getSuperclass();
|
||||
Class<?> superclass = cl.getSuperclass();
|
||||
if (superclass != null)
|
||||
superdesc = lookup(superclass);
|
||||
}
|
||||
|
@ -141,7 +142,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
if (serializable) {
|
||||
externalizable =
|
||||
((superdesc != null) && superdesc.isExternalizable()) ||
|
||||
classExternalizable.isAssignableFrom(cl);
|
||||
Externalizable.class.isAssignableFrom(cl);
|
||||
if (externalizable) {
|
||||
serializable = false;
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* that have evolved from a common root class and agree to be serialized
|
||||
* and deserialized using a common format.
|
||||
*/
|
||||
public static final long getSerialVersionUID( java.lang.Class clazz) {
|
||||
public static final long getSerialVersionUID( java.lang.Class<?> clazz) {
|
||||
ObjectStreamClass_1_3_1 theosc = ObjectStreamClass_1_3_1.lookup( clazz );
|
||||
if( theosc != null )
|
||||
{
|
||||
|
@ -204,7 +205,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
/**
|
||||
* Return the actual (computed) serialVersionUID for this class.
|
||||
*/
|
||||
public static final long getActualSerialVersionUID( java.lang.Class clazz )
|
||||
public static final long getActualSerialVersionUID( java.lang.Class<?> clazz )
|
||||
{
|
||||
ObjectStreamClass_1_3_1 theosc = ObjectStreamClass_1_3_1.lookup( clazz );
|
||||
if( theosc != null )
|
||||
|
@ -234,7 +235,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* Return the class in the local VM that this version is mapped to.
|
||||
* Null is returned if there is no corresponding local class.
|
||||
*/
|
||||
public final Class forClass() {
|
||||
public final Class<?> forClass() {
|
||||
return ofClass;
|
||||
}
|
||||
|
||||
|
@ -333,7 +334,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* Create a new ObjectStreamClass_1_3_1 from a loaded class.
|
||||
* Don't call this directly, call lookup instead.
|
||||
*/
|
||||
private ObjectStreamClass_1_3_1(java.lang.Class cl, ObjectStreamClass_1_3_1 superdesc,
|
||||
private ObjectStreamClass_1_3_1(java.lang.Class<?> cl, ObjectStreamClass_1_3_1 superdesc,
|
||||
boolean serial, boolean extern)
|
||||
{
|
||||
ofClass = cl; /* created from this class */
|
||||
|
@ -376,7 +377,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
private void init() {
|
||||
synchronized (lock) {
|
||||
|
||||
final Class cl = ofClass;
|
||||
final Class<?> cl = ofClass;
|
||||
|
||||
if (fields != null) // already initialized
|
||||
return;
|
||||
|
@ -558,7 +559,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* will call it as necessary.
|
||||
*/
|
||||
try {
|
||||
Class[] args = {java.io.ObjectOutputStream.class};
|
||||
Class<?>[] args = {java.io.ObjectOutputStream.class};
|
||||
writeObjectMethod = cl.getDeclaredMethod("writeObject", args);
|
||||
hasWriteObjectMethod = true;
|
||||
int mods = writeObjectMethod.getModifiers();
|
||||
|
@ -578,7 +579,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* ObjectInputStream so it can all the method directly.
|
||||
*/
|
||||
try {
|
||||
Class[] args = {java.io.ObjectInputStream.class};
|
||||
Class<?>[] args = {java.io.ObjectInputStream.class};
|
||||
readObjectMethod = cl.getDeclaredMethod("readObject", args);
|
||||
int mods = readObjectMethod.getModifiers();
|
||||
|
||||
|
@ -629,11 +630,11 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
if (translation != null)
|
||||
return translation;
|
||||
else {
|
||||
Class osfClass = com.sun.corba.se.impl.orbutil.ObjectStreamField.class;
|
||||
Class<?> osfClass = com.sun.corba.se.impl.orbutil.ObjectStreamField.class;
|
||||
|
||||
translation = (Object[])java.lang.reflect.Array.newInstance(osfClass, objs.length);
|
||||
Object arg[] = new Object[2];
|
||||
Class types[] = {String.class, Class.class};
|
||||
Class<?> types[] = {String.class, Class.class};
|
||||
Constructor constructor = osfClass.getDeclaredConstructor(types);
|
||||
for (int i = fields.length -1; i >= 0; i--){
|
||||
arg[0] = fields[i].getName();
|
||||
|
@ -804,7 +805,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
private static long computeStructuralUID(ObjectStreamClass_1_3_1 osc, Class cl) {
|
||||
private static long computeStructuralUID(ObjectStreamClass_1_3_1 osc, Class<?> cl) {
|
||||
ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
|
||||
|
||||
long h = 0;
|
||||
|
@ -824,7 +825,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
DataOutputStream data = new DataOutputStream(mdo);
|
||||
|
||||
// Get SUID of parent
|
||||
Class parent = cl.getSuperclass();
|
||||
Class<?> parent = cl.getSuperclass();
|
||||
if ((parent != null))
|
||||
// SerialBug 1; acc. to spec the one for
|
||||
// java.lang.object
|
||||
|
@ -910,10 +911,10 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
/**
|
||||
* Compute the JVM signature for the class.
|
||||
*/
|
||||
static String getSignature(Class clazz) {
|
||||
static String getSignature(Class<?> clazz) {
|
||||
String type = null;
|
||||
if (clazz.isArray()) {
|
||||
Class cl = clazz;
|
||||
Class<?> cl = clazz;
|
||||
int dimensions = 0;
|
||||
while (cl.isArray()) {
|
||||
dimensions++;
|
||||
|
@ -959,7 +960,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
|
||||
sb.append("(");
|
||||
|
||||
Class[] params = meth.getParameterTypes(); // avoid clone
|
||||
Class<?>[] params = meth.getParameterTypes(); // avoid clone
|
||||
for (int j = 0; j < params.length; j++) {
|
||||
sb.append(getSignature(params[j]));
|
||||
}
|
||||
|
@ -976,7 +977,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
|
||||
sb.append("(");
|
||||
|
||||
Class[] params = cons.getParameterTypes(); // avoid clone
|
||||
Class<?>[] params = cons.getParameterTypes(); // avoid clone
|
||||
for (int j = 0; j < params.length; j++) {
|
||||
sb.append(getSignature(params[j]));
|
||||
}
|
||||
|
@ -996,7 +997,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
* The entries are extended from java.lang.ref.SoftReference so the
|
||||
* gc will be able to free them if needed.
|
||||
*/
|
||||
private static ObjectStreamClass_1_3_1 findDescriptorFor(Class cl) {
|
||||
private static ObjectStreamClass_1_3_1 findDescriptorFor(Class<?> cl) {
|
||||
|
||||
int hash = cl.hashCode();
|
||||
int index = (hash & 0x7FFFFFFF) % descriptorFor.length;
|
||||
|
@ -1077,7 +1078,7 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
/*
|
||||
* Class that is a descriptor for in this virtual machine.
|
||||
*/
|
||||
private Class ofClass;
|
||||
private Class<?> ofClass;
|
||||
|
||||
/*
|
||||
* True if descriptor for a proxy class.
|
||||
|
@ -1130,22 +1131,6 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
/* Get the private static final field for serial version UID */
|
||||
// private static native long getSerialVersionUIDField(Class cl);
|
||||
|
||||
/* The Class Object for java.io.Serializable */
|
||||
private static Class classSerializable = null;
|
||||
private static Class classExternalizable = null;
|
||||
|
||||
/*
|
||||
* Resolve java.io.Serializable at load time.
|
||||
*/
|
||||
static {
|
||||
try {
|
||||
classSerializable = Class.forName("java.io.Serializable");
|
||||
classExternalizable = Class.forName("java.io.Externalizable");
|
||||
} catch (Throwable e) {
|
||||
System.err.println("Could not load java.io.Serializable or java.io.Externalizable.");
|
||||
}
|
||||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
private static final long serialVersionUID = -6120832682080437368L;
|
||||
|
||||
|
@ -1183,8 +1168,8 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
|
|||
|
||||
private static class CompareClassByName implements Comparator {
|
||||
public int compare(Object o1, Object o2) {
|
||||
Class c1 = (Class)o1;
|
||||
Class c2 = (Class)o2;
|
||||
Class<?> c1 = (Class)o1;
|
||||
Class<?> c2 = (Class)o2;
|
||||
return (c1.getName()).compareTo(c2.getName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, 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
|
||||
|
@ -36,6 +36,8 @@ import java.io.FileInputStream;
|
|||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
|
||||
/**
|
||||
* A class providing APIs for the CORBA Object Request Broker
|
||||
* features. The <code>ORB</code> class also provides
|
||||
|
@ -161,6 +163,20 @@ import java.security.PrivilegedAction;
|
|||
* <P>
|
||||
* An application or applet can be initialized in one or more ORBs.
|
||||
* ORB initialization is a bootstrap call into the CORBA world.
|
||||
*
|
||||
*
|
||||
* @implNote
|
||||
* As described above it is possible to specify, at runtime, an alternative ORBSingleton class and
|
||||
* an alternative ORB implementation class, via the system properties {@code org.omg.CORBA.ORBSingletonClass}
|
||||
* and {@code org.omg.CORBA.ORBClass} respectively.
|
||||
* The class loading strategy is organized, such that, in the case of the ORBSingleton
|
||||
* the system class loader is used to load the alternative singleton ORB.
|
||||
* Thus, it is necessary that an application's CLASSPATH
|
||||
* includes the classes for this alternative ORBSingleton, when specified.
|
||||
*
|
||||
* In the case of specifying an alternative ORB implementation class, the loading
|
||||
* strategy will use the thread context class loader, as appropriate.
|
||||
*
|
||||
* @since JDK1.2
|
||||
*/
|
||||
abstract public class ORB {
|
||||
|
@ -289,20 +305,38 @@ abstract public class ORB {
|
|||
(className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) {
|
||||
singleton = new com.sun.corba.se.impl.orb.ORBSingleton();
|
||||
} else {
|
||||
singleton = create_impl(className);
|
||||
singleton = create_impl_with_systemclassloader(className);
|
||||
}
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
|
||||
private static ORB create_impl(String className) {
|
||||
private static ORB create_impl_with_systemclassloader(String className) {
|
||||
|
||||
try {
|
||||
ReflectUtil.checkPackageAccess(className);
|
||||
ClassLoader cl = ClassLoader.getSystemClassLoader();
|
||||
Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
|
||||
Class<?> singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
|
||||
return (ORB)singletonOrbClass.newInstance();
|
||||
} catch (Throwable ex) {
|
||||
SystemException systemException = new INITIALIZE(
|
||||
"can't instantiate default ORB implementation " + className);
|
||||
systemException.initCause(ex);
|
||||
throw systemException;
|
||||
}
|
||||
}
|
||||
|
||||
private static ORB create_impl(String className) {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if (cl == null)
|
||||
cl = ClassLoader.getSystemClassLoader();
|
||||
|
||||
try {
|
||||
return (ORB) Class.forName(className, true, cl).newInstance();
|
||||
ReflectUtil.checkPackageAccess(className);
|
||||
Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
|
||||
Class<?> orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
|
||||
return (ORB)orbClass.newInstance();
|
||||
} catch (Throwable ex) {
|
||||
SystemException systemException = new INITIALIZE(
|
||||
"can't instantiate default ORB implementation " + className);
|
||||
|
@ -346,7 +380,6 @@ abstract public class ORB {
|
|||
} else {
|
||||
orb = create_impl(className);
|
||||
}
|
||||
|
||||
orb.set_parameters(args, props);
|
||||
return orb;
|
||||
}
|
||||
|
@ -377,7 +410,6 @@ abstract public class ORB {
|
|||
} else {
|
||||
orb = create_impl(className);
|
||||
}
|
||||
|
||||
orb.set_parameters(app, props);
|
||||
return orb;
|
||||
}
|
||||
|
@ -573,7 +605,7 @@ abstract public class ORB {
|
|||
try {
|
||||
// First try to load the OperationDef class
|
||||
String opDefClassName = "org.omg.CORBA.OperationDef";
|
||||
Class opDefClass = null;
|
||||
Class<?> opDefClass = null;
|
||||
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if ( cl == null )
|
||||
|
@ -583,7 +615,7 @@ abstract public class ORB {
|
|||
|
||||
// OK, we loaded OperationDef. Now try to get the
|
||||
// create_operation_list(OperationDef oper) method.
|
||||
Class[] argc = { opDefClass };
|
||||
Class<?>[] argc = { opDefClass };
|
||||
java.lang.reflect.Method meth =
|
||||
this.getClass().getMethod("create_operation_list", argc);
|
||||
|
||||
|
|
|
@ -410,3 +410,7 @@ b2fee789d23f3cdabb3db4e51af43038e5692d3a jdk9-b03
|
|||
bdc5311e1db7598589b77015119b821bf8c828bd jdk9-b05
|
||||
52377a30a3f87b62d6135706997b8c7a47366e37 jdk9-b06
|
||||
52f7edf2589d9f9d35db3008bc5377f279de9c18 jdk9-b07
|
||||
4dedef5e51ed3a36677a8ba82949fc517ad64162 jdk9-b08
|
||||
05e8f5242c26ba45d4fa947e4f4f54c058c9b522 jdk9-b09
|
||||
ebc44d040cd149d2120d69fe183a3dae7840f4b4 jdk9-b10
|
||||
783309c3a1a629a452673399dcfa83ef7eca94d8 jdk9-b11
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
# GAMMADIR - top of workspace
|
||||
# OS_FAMILY - operating system
|
||||
# VARIANT - core, compiler1, compiler2, or tiered
|
||||
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
|
||||
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
|
||||
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
|
||||
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
|
||||
#
|
||||
|
|
|
@ -122,7 +122,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
|
@ -163,6 +163,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -161,6 +161,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -73,17 +73,14 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
|
||||
# in $(GAMMADIR)/make/defs.make
|
||||
ifeq ($(HOTSPOT_BUILD_VERSION),)
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
|
||||
else
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
|
||||
endif
|
||||
|
||||
# The following variables are defined in the generated flags.make file.
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
|
||||
JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
|
||||
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
|
||||
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
|
||||
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
|
||||
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
|
||||
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
|
||||
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \
|
||||
$(JDK_VER_DEFS)
|
||||
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
|
||||
BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
|
||||
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
|
||||
|
@ -92,7 +89,6 @@ VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
|
|||
CXXFLAGS = \
|
||||
${SYSDEFS} \
|
||||
${INCLUDES} \
|
||||
${BUILD_VERSION} \
|
||||
${BUILD_TARGET} \
|
||||
${BUILD_USER} \
|
||||
${HS_LIB_ARCH} \
|
||||
|
@ -101,7 +97,7 @@ CXXFLAGS = \
|
|||
# This is VERY important! The version define must only be supplied to vm_version.o
|
||||
# If not, ccache will not re-use the cache at all, since the version string might contain
|
||||
# a time and date.
|
||||
CXXFLAGS/vm_version.o += ${JRE_VERSION}
|
||||
CXXFLAGS/vm_version.o += ${VM_VER_DEFS}
|
||||
|
||||
CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
# GAMMADIR - top of workspace
|
||||
# OS_FAMILY - operating system
|
||||
# VARIANT - core, compiler1, compiler2, or tiered
|
||||
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
|
||||
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
|
||||
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
|
||||
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
|
||||
#
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
_JVM_GetStackTraceElement
|
||||
_JVM_GetSystemPackage
|
||||
_JVM_GetSystemPackages
|
||||
_JVM_GetTemporaryDirectory
|
||||
_JVM_GetThreadStateNames
|
||||
_JVM_GetThreadStateValues
|
||||
_JVM_GetVersionInfo
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
_JVM_GetStackTraceElement
|
||||
_JVM_GetSystemPackage
|
||||
_JVM_GetSystemPackages
|
||||
_JVM_GetTemporaryDirectory
|
||||
_JVM_GetThreadStateNames
|
||||
_JVM_GetThreadStateValues
|
||||
_JVM_GetVersionInfo
|
||||
|
|
|
@ -122,7 +122,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
|
@ -163,6 +163,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -163,6 +163,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -72,17 +72,14 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
|
||||
# in $(GAMMADIR)/make/defs.make
|
||||
ifeq ($(HOTSPOT_BUILD_VERSION),)
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
|
||||
else
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
|
||||
endif
|
||||
|
||||
# The following variables are defined in the generated flags.make file.
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
|
||||
JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
|
||||
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
|
||||
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
|
||||
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
|
||||
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
|
||||
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
|
||||
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \
|
||||
$(JDK_VER_DEFS)
|
||||
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
|
||||
BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
|
||||
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
|
||||
|
@ -91,7 +88,6 @@ VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
|
|||
CXXFLAGS = \
|
||||
${SYSDEFS} \
|
||||
${INCLUDES} \
|
||||
${BUILD_VERSION} \
|
||||
${BUILD_TARGET} \
|
||||
${BUILD_USER} \
|
||||
${HS_LIB_ARCH} \
|
||||
|
@ -100,7 +96,7 @@ CXXFLAGS = \
|
|||
# This is VERY important! The version define must only be supplied to vm_version.o
|
||||
# If not, ccache will not re-use the cache at all, since the version string might contain
|
||||
# a time and date.
|
||||
CXXFLAGS/vm_version.o += ${JRE_VERSION}
|
||||
CXXFLAGS/vm_version.o += ${VM_VER_DEFS}
|
||||
|
||||
CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ ifeq ($(JVM_VARIANTS),)
|
|||
endif
|
||||
|
||||
# hotspot version definitions
|
||||
include $(GAMMADIR)/make/hotspot_version
|
||||
include $(GAMMADIR)/make/jdk_version
|
||||
|
||||
# Java versions needed
|
||||
ifeq ($(PREVIOUS_JDK_VERSION),)
|
||||
|
@ -129,6 +129,9 @@ endif
|
|||
ifeq ($(JDK_MICRO_VERSION),)
|
||||
JDK_MICRO_VERSION=$(JDK_MICRO_VER)
|
||||
endif
|
||||
ifeq ($(JDK_BUILD_NUMBER),)
|
||||
JDK_BUILD_NUMBER=0
|
||||
endif
|
||||
ifeq ($(JDK_MKTG_VERSION),)
|
||||
JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
|
||||
endif
|
||||
|
@ -146,7 +149,7 @@ ifndef JRE_RELEASE_VERSION
|
|||
endif
|
||||
|
||||
ifndef HOTSPOT_RELEASE_VERSION
|
||||
HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
|
||||
HOTSPOT_RELEASE_VERSION=$(FULL_VERSION)
|
||||
endif
|
||||
|
||||
ifdef HOTSPOT_BUILD_VERSION
|
||||
|
@ -325,7 +328,6 @@ MAKE_ARGS += BOOTDIR=$(ABS_BOOTDIR)
|
|||
MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
|
||||
MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
|
||||
MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
|
||||
MAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
|
||||
MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
|
||||
# Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 2014, 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
|
||||
|
@ -19,27 +19,18 @@
|
|||
# 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.
|
||||
#
|
||||
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# Master Hotspot version file. These values may be overridden by a control
|
||||
# Master JDK version file. These values may be overridden by a control
|
||||
# workspace build. This file format must remain compatible with both
|
||||
# GNU Makefile and Microsoft nmake formats.
|
||||
#
|
||||
|
||||
# Don't put quotes (fail windows build).
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=62
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2014
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
JDK_MINOR_VER=9
|
||||
JDK_MICRO_VER=0
|
||||
|
||||
# Previous (bootdir) JDK version
|
||||
JDK_PREVIOUS_VERSION=1.7.0
|
||||
JDK_PREVIOUS_VERSION=1.8.0
|
|
@ -36,7 +36,7 @@
|
|||
# GAMMADIR - top of workspace
|
||||
# OS_FAMILY - operating system
|
||||
# VARIANT - core, compiler1, compiler2, or tiered
|
||||
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
|
||||
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
|
||||
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
|
||||
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
|
||||
#
|
||||
|
|
|
@ -122,7 +122,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
|
@ -163,6 +163,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -163,6 +163,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -73,17 +73,14 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
|
||||
# in $(GAMMADIR)/make/defs.make
|
||||
ifeq ($(HOTSPOT_BUILD_VERSION),)
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
|
||||
else
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
|
||||
endif
|
||||
|
||||
# The following variables are defined in the generated flags.make file.
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
|
||||
JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
|
||||
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
|
||||
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
|
||||
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
|
||||
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
|
||||
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
|
||||
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \
|
||||
$(JDK_VER_DEFS)
|
||||
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
|
||||
BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
|
||||
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
|
||||
|
@ -92,7 +89,6 @@ VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
|
|||
CXXFLAGS = \
|
||||
${SYSDEFS} \
|
||||
${INCLUDES} \
|
||||
${BUILD_VERSION} \
|
||||
${BUILD_TARGET} \
|
||||
${BUILD_USER} \
|
||||
${HS_LIB_ARCH} \
|
||||
|
@ -101,7 +97,7 @@ CXXFLAGS = \
|
|||
# This is VERY important! The version define must only be supplied to vm_version.o
|
||||
# If not, ccache will not re-use the cache at all, since the version string might contain
|
||||
# a time and date.
|
||||
CXXFLAGS/vm_version.o += ${JRE_VERSION}
|
||||
CXXFLAGS/vm_version.o += ${VM_VER_DEFS}
|
||||
|
||||
CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
# GAMMADIR - top of workspace
|
||||
# OS_FAMILY - operating system
|
||||
# VARIANT - core, compiler1, compiler2, or tiered
|
||||
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
|
||||
# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
|
||||
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
|
||||
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
|
||||
#
|
||||
|
|
|
@ -163,6 +163,7 @@ SUNWprivate_1.1 {
|
|||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetTemporaryDirectory;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
|
|
|
@ -69,8 +69,13 @@ else
|
|||
endif
|
||||
|
||||
# The following variables are defined in the generated flags.make file.
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
|
||||
JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
|
||||
JDK_VER_DEFS = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
|
||||
-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
|
||||
-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
|
||||
-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
|
||||
VM_VER_DEFS = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
|
||||
-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\"" \
|
||||
$(JDK_VER_DEFS)
|
||||
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
|
||||
BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
|
||||
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
|
||||
|
@ -79,7 +84,6 @@ VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
|
|||
CXXFLAGS = \
|
||||
${SYSDEFS} \
|
||||
${INCLUDES} \
|
||||
${BUILD_VERSION} \
|
||||
${BUILD_TARGET} \
|
||||
${BUILD_USER} \
|
||||
${HS_LIB_ARCH} \
|
||||
|
@ -88,7 +92,7 @@ CXXFLAGS = \
|
|||
# This is VERY important! The version define must only be supplied to vm_version.o
|
||||
# If not, ccache will not re-use the cache at all, since the version string might contain
|
||||
# a time and date.
|
||||
CXXFLAGS/vm_version.o += ${JRE_VERSION}
|
||||
CXXFLAGS/vm_version.o += ${VM_VER_DEFS}
|
||||
|
||||
CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ VARIANT_TEXT=Tiered
|
|||
# These can be overridden via the nmake.exe command line.
|
||||
# They are overridden by RE during the control builds.
|
||||
#
|
||||
!include "$(WorkSpace)/make/hotspot_version"
|
||||
!include "$(WorkSpace)/make/jdk_version"
|
||||
|
||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||
# or make/hotspot_distro.
|
||||
|
@ -163,7 +163,7 @@ HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
|
|||
# 1.6.0-b01 will be 6.0.0.1
|
||||
# 1.6.0_01a-b02 will be 6.0.11.2
|
||||
#
|
||||
# JDK_* variables are defined in make/hotspot_version or on command line
|
||||
# JDK_* variables are defined in make/jdk_version or on command line
|
||||
#
|
||||
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
|
||||
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
|
||||
|
@ -179,13 +179,12 @@ JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
|
|||
# Hotspot Express VM FileVersion:
|
||||
# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).
|
||||
#
|
||||
# HS_* variables are defined in make/hotspot_version
|
||||
#
|
||||
HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)
|
||||
HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER)
|
||||
HS_VER=$(JDK_VER)
|
||||
HS_DOTVER=$(JDK_DOTVER)
|
||||
|
||||
!if "$(HOTSPOT_RELEASE_VERSION)" == ""
|
||||
HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
|
||||
HOTSPOT_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
!endif
|
||||
|
||||
!if "$(HOTSPOT_BUILD_VERSION)" == ""
|
||||
|
|
|
@ -179,9 +179,9 @@ LIBRARY_SUFFIX=dll
|
|||
|
||||
# next parameters are defined in $(GAMMADIR)/make/defs.make.
|
||||
MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION)
|
||||
MAKE_ARGS += JDK_MAJOR_VER=$(JDK_MAJOR_VERSION)
|
||||
MAKE_ARGS += JDK_MINOR_VER=$(JDK_MINOR_VERSION)
|
||||
MAKE_ARGS += JDK_MICRO_VER=$(JDK_MICRO_VERSION)
|
||||
MAKE_ARGS += JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION)
|
||||
MAKE_ARGS += JDK_MINOR_VERSION=$(JDK_MINOR_VERSION)
|
||||
MAKE_ARGS += JDK_MICRO_VERSION=$(JDK_MICRO_VERSION)
|
||||
|
||||
ifdef COOKED_JDK_UPDATE_VERSION
|
||||
MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION)
|
||||
|
|
|
@ -56,6 +56,10 @@ HOTSPOT_LIB_ARCH=$(BUILDARCH)
|
|||
|
||||
# The following variables are defined in the generated local.make file.
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MICRO_VERSION=\"$(JDK_MICRO_VERSION)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "JDK_BUILD_NUMBER=\"$(JDK_BUILD_NUMBER)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\""
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
|
||||
|
|
|
@ -78,24 +78,23 @@ HS_INTERNAL_NAME=jvm
|
|||
|
||||
default:: $(AdditionalTargets) $(JvmtiGeneratedFiles) $(TraceGeneratedFiles)
|
||||
|
||||
!include $(HOTSPOTWORKSPACE)/make/hotspot_version
|
||||
!include $(HOTSPOTWORKSPACE)/make/jdk_version
|
||||
|
||||
!if "$(USER_RELEASE_SUFFIX)" != ""
|
||||
HOTSPOT_BUILD_VERSION = internal-$(USER_RELEASE_SUFFIX)
|
||||
!else
|
||||
HOTSPOT_BUILD_VERSION = internal
|
||||
!endif
|
||||
!if "$(HOTSPOT_RELEASE_VERSION)" != ""
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
|
||||
!else
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)-$(HOTSPOT_BUILD_VERSION)\\\""
|
||||
!endif
|
||||
!if "$(JRE_RELEASE_VERSION)" != ""
|
||||
JRE_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\""
|
||||
!else
|
||||
JRE_RELEASE_VERSION="\\\"$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)\\\""
|
||||
!endif
|
||||
|
||||
!if "$(HOTSPOT_RELEASE_VERSION)" != ""
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
|
||||
!else
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\""
|
||||
!endif
|
||||
# Define HOTSPOT_VM_DISTRO if HOTSPOT_VM_DISTRO is set,
|
||||
# and if it is not see if we have the src/closed directory
|
||||
!if "$(HOTSPOT_VM_DISTRO)" != ""
|
||||
|
|
|
@ -127,8 +127,12 @@
|
|||
// global variables
|
||||
julong os::Bsd::_physical_memory = 0;
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
mach_timebase_info_data_t os::Bsd::_timebase_info = {0, 0};
|
||||
volatile uint64_t os::Bsd::_max_abstime = 0;
|
||||
#else
|
||||
int (*os::Bsd::_clock_gettime)(clockid_t, struct timespec *) = NULL;
|
||||
#endif
|
||||
pthread_t os::Bsd::_main_thread;
|
||||
int os::Bsd::_page_size = -1;
|
||||
|
||||
|
@ -986,13 +990,15 @@ jlong os::javaTimeMillis() {
|
|||
return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000);
|
||||
}
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifndef CLOCK_MONOTONIC
|
||||
#define CLOCK_MONOTONIC (1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
void os::Bsd::clock_init() {
|
||||
// XXXDARWIN: Investigate replacement monotonic clock
|
||||
mach_timebase_info(&_timebase_info);
|
||||
}
|
||||
#else
|
||||
void os::Bsd::clock_init() {
|
||||
|
@ -1007,10 +1013,39 @@ void os::Bsd::clock_init() {
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
jlong os::javaTimeNanos() {
|
||||
const uint64_t tm = mach_absolute_time();
|
||||
const uint64_t now = (tm * Bsd::_timebase_info.numer) / Bsd::_timebase_info.denom;
|
||||
const uint64_t prev = Bsd::_max_abstime;
|
||||
if (now <= prev) {
|
||||
return prev; // same or retrograde time;
|
||||
}
|
||||
const uint64_t obsv = Atomic::cmpxchg(now, (volatile jlong*)&Bsd::_max_abstime, prev);
|
||||
assert(obsv >= prev, "invariant"); // Monotonicity
|
||||
// If the CAS succeeded then we're done and return "now".
|
||||
// If the CAS failed and the observed value "obsv" is >= now then
|
||||
// we should return "obsv". If the CAS failed and now > obsv > prv then
|
||||
// some other thread raced this thread and installed a new value, in which case
|
||||
// we could either (a) retry the entire operation, (b) retry trying to install now
|
||||
// or (c) just return obsv. We use (c). No loop is required although in some cases
|
||||
// we might discard a higher "now" value in deference to a slightly lower but freshly
|
||||
// installed obsv value. That's entirely benign -- it admits no new orderings compared
|
||||
// to (a) or (b) -- and greatly reduces coherence traffic.
|
||||
// We might also condition (c) on the magnitude of the delta between obsv and now.
|
||||
// Avoiding excessive CAS operations to hot RW locations is critical.
|
||||
// See https://blogs.oracle.com/dave/entry/cas_and_cache_trivia_invalidate
|
||||
return (prev == obsv) ? now : obsv;
|
||||
}
|
||||
|
||||
#else // __APPLE__
|
||||
|
||||
jlong os::javaTimeNanos() {
|
||||
if (os::supports_monotonic_clock()) {
|
||||
struct timespec tp;
|
||||
int status = Bsd::clock_gettime(CLOCK_MONOTONIC, &tp);
|
||||
int status = Bsd::_clock_gettime(CLOCK_MONOTONIC, &tp);
|
||||
assert(status == 0, "gettime error");
|
||||
jlong result = jlong(tp.tv_sec) * (1000 * 1000 * 1000) + jlong(tp.tv_nsec);
|
||||
return result;
|
||||
|
@ -1023,6 +1058,8 @@ jlong os::javaTimeNanos() {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // __APPLE__
|
||||
|
||||
void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) {
|
||||
if (os::supports_monotonic_clock()) {
|
||||
info_ptr->max_value = ALL_64_BITS;
|
||||
|
|
|
@ -58,7 +58,13 @@ class Bsd {
|
|||
// For signal flags diagnostics
|
||||
static int sigflags[MAXSIGNUM];
|
||||
|
||||
#ifdef __APPLE__
|
||||
// mach_absolute_time
|
||||
static mach_timebase_info_data_t _timebase_info;
|
||||
static volatile uint64_t _max_abstime;
|
||||
#else
|
||||
static int (*_clock_gettime)(clockid_t, struct timespec *);
|
||||
#endif
|
||||
|
||||
static GrowableArray<int>* _cpu_to_node;
|
||||
|
||||
|
@ -134,10 +140,6 @@ class Bsd {
|
|||
// Real-time clock functions
|
||||
static void clock_init(void);
|
||||
|
||||
static int clock_gettime(clockid_t clock_id, struct timespec *tp) {
|
||||
return _clock_gettime ? _clock_gettime(clock_id, tp) : -1;
|
||||
}
|
||||
|
||||
// Stack repair handling
|
||||
|
||||
// none present
|
||||
|
|
|
@ -287,7 +287,11 @@ inline int os::set_sock_opt(int fd, int level, int optname,
|
|||
}
|
||||
|
||||
inline bool os::supports_monotonic_clock() {
|
||||
#ifdef __APPLE__
|
||||
return true;
|
||||
#else
|
||||
return Bsd::_clock_gettime != NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // OS_BSD_VM_OS_BSD_INLINE_HPP
|
||||
|
|
|
@ -347,11 +347,7 @@ julong os::physical_memory() {
|
|||
|
||||
static hrtime_t first_hrtime = 0;
|
||||
static const hrtime_t hrtime_hz = 1000*1000*1000;
|
||||
const int LOCK_BUSY = 1;
|
||||
const int LOCK_FREE = 0;
|
||||
const int LOCK_INVALID = -1;
|
||||
static volatile hrtime_t max_hrtime = 0;
|
||||
static volatile int max_hrtime_lock = LOCK_FREE; // Update counter with LSB as lock-in-progress
|
||||
|
||||
|
||||
void os::Solaris::initialize_system_info() {
|
||||
|
@ -1364,58 +1360,31 @@ void* os::thread_local_storage_at(int index) {
|
|||
}
|
||||
|
||||
|
||||
// gethrtime can move backwards if read from one cpu and then a different cpu
|
||||
// getTimeNanos is guaranteed to not move backward on Solaris
|
||||
// local spinloop created as faster for a CAS on an int than
|
||||
// a CAS on a 64bit jlong. Also Atomic::cmpxchg for jlong is not
|
||||
// supported on sparc v8 or pre supports_cx8 intel boxes.
|
||||
// oldgetTimeNanos for systems which do not support CAS on 64bit jlong
|
||||
// i.e. sparc v8 and pre supports_cx8 (i486) intel boxes
|
||||
inline hrtime_t oldgetTimeNanos() {
|
||||
int gotlock = LOCK_INVALID;
|
||||
hrtime_t newtime = gethrtime();
|
||||
|
||||
for (;;) {
|
||||
// grab lock for max_hrtime
|
||||
int curlock = max_hrtime_lock;
|
||||
if (curlock & LOCK_BUSY) continue;
|
||||
if (gotlock = Atomic::cmpxchg(LOCK_BUSY, &max_hrtime_lock, LOCK_FREE) != LOCK_FREE) continue;
|
||||
if (newtime > max_hrtime) {
|
||||
max_hrtime = newtime;
|
||||
} else {
|
||||
newtime = max_hrtime;
|
||||
}
|
||||
// release lock
|
||||
max_hrtime_lock = LOCK_FREE;
|
||||
return newtime;
|
||||
}
|
||||
}
|
||||
// gethrtime can move backwards if read from one cpu and then a different cpu
|
||||
// getTimeNanos is guaranteed to not move backward on Solaris
|
||||
// gethrtime() should be monotonic according to the documentation,
|
||||
// but some virtualized platforms are known to break this guarantee.
|
||||
// getTimeNanos() must be guaranteed not to move backwards, so we
|
||||
// are forced to add a check here.
|
||||
inline hrtime_t getTimeNanos() {
|
||||
if (VM_Version::supports_cx8()) {
|
||||
const hrtime_t now = gethrtime();
|
||||
// Use atomic long load since 32-bit x86 uses 2 registers to keep long.
|
||||
const hrtime_t prev = Atomic::load((volatile jlong*)&max_hrtime);
|
||||
if (now <= prev) return prev; // same or retrograde time;
|
||||
const hrtime_t obsv = Atomic::cmpxchg(now, (volatile jlong*)&max_hrtime, prev);
|
||||
assert(obsv >= prev, "invariant"); // Monotonicity
|
||||
// If the CAS succeeded then we're done and return "now".
|
||||
// If the CAS failed and the observed value "obs" is >= now then
|
||||
// we should return "obs". If the CAS failed and now > obs > prv then
|
||||
// some other thread raced this thread and installed a new value, in which case
|
||||
// we could either (a) retry the entire operation, (b) retry trying to install now
|
||||
// or (c) just return obs. We use (c). No loop is required although in some cases
|
||||
// we might discard a higher "now" value in deference to a slightly lower but freshly
|
||||
// installed obs value. That's entirely benign -- it admits no new orderings compared
|
||||
// to (a) or (b) -- and greatly reduces coherence traffic.
|
||||
// We might also condition (c) on the magnitude of the delta between obs and now.
|
||||
// Avoiding excessive CAS operations to hot RW locations is critical.
|
||||
// See http://blogs.sun.com/dave/entry/cas_and_cache_trivia_invalidate
|
||||
return (prev == obsv) ? now : obsv ;
|
||||
} else {
|
||||
return oldgetTimeNanos();
|
||||
const hrtime_t now = gethrtime();
|
||||
const hrtime_t prev = max_hrtime;
|
||||
if (now <= prev) {
|
||||
return prev; // same or retrograde time;
|
||||
}
|
||||
const hrtime_t obsv = Atomic::cmpxchg(now, (volatile jlong*)&max_hrtime, prev);
|
||||
assert(obsv >= prev, "invariant"); // Monotonicity
|
||||
// If the CAS succeeded then we're done and return "now".
|
||||
// If the CAS failed and the observed value "obsv" is >= now then
|
||||
// we should return "obsv". If the CAS failed and now > obsv > prv then
|
||||
// some other thread raced this thread and installed a new value, in which case
|
||||
// we could either (a) retry the entire operation, (b) retry trying to install now
|
||||
// or (c) just return obsv. We use (c). No loop is required although in some cases
|
||||
// we might discard a higher "now" value in deference to a slightly lower but freshly
|
||||
// installed obsv value. That's entirely benign -- it admits no new orderings compared
|
||||
// to (a) or (b) -- and greatly reduces coherence traffic.
|
||||
// We might also condition (c) on the magnitude of the delta between obsv and now.
|
||||
// Avoiding excessive CAS operations to hot RW locations is critical.
|
||||
// See https://blogs.oracle.com/dave/entry/cas_and_cache_trivia_invalidate
|
||||
return (prev == obsv) ? now : obsv;
|
||||
}
|
||||
|
||||
// Time since start-up in seconds to a fine granularity.
|
||||
|
|
|
@ -130,6 +130,13 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
|
|||
case DLL_PROCESS_DETACH:
|
||||
if(ForceTimeHighResolution)
|
||||
timeEndPeriod(1L);
|
||||
|
||||
// Workaround for issue when a custom launcher doesn't call
|
||||
// DestroyJavaVM and NMT is trying to track memory when free is
|
||||
// called from a static destructor
|
||||
if (MemTracker::is_on()) {
|
||||
MemTracker::shutdown(MemTracker::NMT_normal);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -421,6 +421,15 @@ char* java_lang_String::as_utf8_string(oop java_string, int start, int len) {
|
|||
return UNICODE::as_utf8(position, len);
|
||||
}
|
||||
|
||||
char* java_lang_String::as_utf8_string(oop java_string, int start, int len, char* buf, int buflen) {
|
||||
typeArrayOop value = java_lang_String::value(java_string);
|
||||
int offset = java_lang_String::offset(java_string);
|
||||
int length = java_lang_String::length(java_string);
|
||||
assert(start + len <= length, "just checking");
|
||||
jchar* position = value->char_at_addr(offset + start);
|
||||
return UNICODE::as_utf8(position, len, buf, buflen);
|
||||
}
|
||||
|
||||
bool java_lang_String::equals(oop java_string, jchar* chars, int len) {
|
||||
assert(java_string->klass() == SystemDictionary::String_klass(),
|
||||
"must be java_string");
|
||||
|
|
|
@ -162,6 +162,7 @@ class java_lang_String : AllStatic {
|
|||
static char* as_utf8_string(oop java_string);
|
||||
static char* as_utf8_string(oop java_string, char* buf, int buflen);
|
||||
static char* as_utf8_string(oop java_string, int start, int len);
|
||||
static char* as_utf8_string(oop java_string, int start, int len, char* buf, int buflen);
|
||||
static char* as_platform_dependent_str(Handle java_string, TRAPS);
|
||||
static jchar* as_unicode_string(oop java_string, int& length, TRAPS);
|
||||
// produce an ascii string with all other values quoted using \u####
|
||||
|
|
|
@ -1282,6 +1282,7 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
|
|||
Universe::verify(VerifyOption_G1UsePrevMarking,
|
||||
" VerifyDuringGC:(before)");
|
||||
}
|
||||
g1h->check_bitmaps("Remark Start");
|
||||
|
||||
G1CollectorPolicy* g1p = g1h->g1_policy();
|
||||
g1p->record_concurrent_mark_remark_start();
|
||||
|
@ -1330,6 +1331,7 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
|
|||
Universe::verify(VerifyOption_G1UseNextMarking,
|
||||
" VerifyDuringGC:(after)");
|
||||
}
|
||||
g1h->check_bitmaps("Remark End");
|
||||
assert(!restart_for_overflow(), "sanity");
|
||||
// Completely reset the marking state since marking completed
|
||||
set_non_marking_state();
|
||||
|
@ -1979,6 +1981,7 @@ void ConcurrentMark::cleanup() {
|
|||
Universe::verify(VerifyOption_G1UsePrevMarking,
|
||||
" VerifyDuringGC:(before)");
|
||||
}
|
||||
g1h->check_bitmaps("Cleanup Start");
|
||||
|
||||
G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy();
|
||||
g1p->record_concurrent_mark_cleanup_start();
|
||||
|
@ -2133,6 +2136,7 @@ void ConcurrentMark::cleanup() {
|
|||
Universe::verify(VerifyOption_G1UsePrevMarking,
|
||||
" VerifyDuringGC:(after)");
|
||||
}
|
||||
g1h->check_bitmaps("Cleanup End");
|
||||
|
||||
g1h->verify_region_sets_optional();
|
||||
g1h->trace_heap_after_concurrent_cycle();
|
||||
|
@ -3224,6 +3228,11 @@ void ConcurrentMark::print_stats() {
|
|||
void ConcurrentMark::abort() {
|
||||
// Clear all marks to force marking thread to do nothing
|
||||
_nextMarkBitMap->clearAll();
|
||||
|
||||
// Note we cannot clear the previous marking bitmap here
|
||||
// since VerifyDuringGC verifies the objects marked during
|
||||
// a full GC against the previous bitmap.
|
||||
|
||||
// Clear the liveness counting data
|
||||
clear_all_count_data();
|
||||
// Empty mark stack
|
||||
|
|
|
@ -768,6 +768,7 @@ G1CollectedHeap::humongous_obj_allocate_initialize_regions(uint first,
|
|||
// match new_top.
|
||||
assert(hr == NULL ||
|
||||
(hr->end() == new_end && hr->top() == new_top), "sanity");
|
||||
check_bitmaps("Humongous Region Allocation", first_hr);
|
||||
|
||||
assert(first_hr->used() == word_size * HeapWordSize, "invariant");
|
||||
_summary_bytes_used += first_hr->used();
|
||||
|
@ -1326,6 +1327,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
|||
|
||||
verify_before_gc();
|
||||
|
||||
check_bitmaps("Full GC Start");
|
||||
pre_full_gc_dump(gc_timer);
|
||||
|
||||
COMPILER2_PRESENT(DerivedPointerTable::clear());
|
||||
|
@ -1499,6 +1501,18 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
|||
|
||||
verify_after_gc();
|
||||
|
||||
// Clear the previous marking bitmap, if needed for bitmap verification.
|
||||
// Note we cannot do this when we clear the next marking bitmap in
|
||||
// ConcurrentMark::abort() above since VerifyDuringGC verifies the
|
||||
// objects marked during a full GC against the previous bitmap.
|
||||
// But we need to clear it before calling check_bitmaps below since
|
||||
// the full GC has compacted objects and updated TAMS but not updated
|
||||
// the prev bitmap.
|
||||
if (G1VerifyBitmaps) {
|
||||
((CMBitMap*) concurrent_mark()->prevMarkBitMap())->clearAll();
|
||||
}
|
||||
check_bitmaps("Full GC End");
|
||||
|
||||
// Start a new incremental collection set for the next pause
|
||||
assert(g1_policy()->collection_set() == NULL, "must be");
|
||||
g1_policy()->start_incremental_cset_building();
|
||||
|
@ -3978,6 +3992,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
|||
increment_gc_time_stamp();
|
||||
|
||||
verify_before_gc();
|
||||
check_bitmaps("GC Start");
|
||||
|
||||
COMPILER2_PRESENT(DerivedPointerTable::clear());
|
||||
|
||||
|
@ -4223,6 +4238,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
|||
increment_gc_time_stamp();
|
||||
|
||||
verify_after_gc();
|
||||
check_bitmaps("GC End");
|
||||
|
||||
assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
|
||||
ref_processor_stw()->verify_no_references_recorded();
|
||||
|
@ -5945,6 +5961,11 @@ void G1CollectedHeap::free_region(HeapRegion* hr,
|
|||
assert(!hr->is_empty(), "the region should not be empty");
|
||||
assert(free_list != NULL, "pre-condition");
|
||||
|
||||
if (G1VerifyBitmaps) {
|
||||
MemRegion mr(hr->bottom(), hr->end());
|
||||
concurrent_mark()->clearRangePrevBitmap(mr);
|
||||
}
|
||||
|
||||
// Clear the card counts for this region.
|
||||
// Note: we only need to do this if the region is not young
|
||||
// (since we don't refine cards in young regions).
|
||||
|
@ -6079,7 +6100,87 @@ void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
|
|||
void G1CollectedHeap::verify_dirty_young_regions() {
|
||||
verify_dirty_young_list(_young_list->first_region());
|
||||
}
|
||||
#endif
|
||||
|
||||
bool G1CollectedHeap::verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap,
|
||||
HeapWord* tams, HeapWord* end) {
|
||||
guarantee(tams <= end,
|
||||
err_msg("tams: "PTR_FORMAT" end: "PTR_FORMAT, tams, end));
|
||||
HeapWord* result = bitmap->getNextMarkedWordAddress(tams, end);
|
||||
if (result < end) {
|
||||
gclog_or_tty->cr();
|
||||
gclog_or_tty->print_cr("## wrong marked address on %s bitmap: "PTR_FORMAT,
|
||||
bitmap_name, result);
|
||||
gclog_or_tty->print_cr("## %s tams: "PTR_FORMAT" end: "PTR_FORMAT,
|
||||
bitmap_name, tams, end);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::verify_bitmaps(const char* caller, HeapRegion* hr) {
|
||||
CMBitMapRO* prev_bitmap = concurrent_mark()->prevMarkBitMap();
|
||||
CMBitMapRO* next_bitmap = (CMBitMapRO*) concurrent_mark()->nextMarkBitMap();
|
||||
|
||||
HeapWord* bottom = hr->bottom();
|
||||
HeapWord* ptams = hr->prev_top_at_mark_start();
|
||||
HeapWord* ntams = hr->next_top_at_mark_start();
|
||||
HeapWord* end = hr->end();
|
||||
|
||||
bool res_p = verify_no_bits_over_tams("prev", prev_bitmap, ptams, end);
|
||||
|
||||
bool res_n = true;
|
||||
// We reset mark_in_progress() before we reset _cmThread->in_progress() and in this window
|
||||
// we do the clearing of the next bitmap concurrently. Thus, we can not verify the bitmap
|
||||
// if we happen to be in that state.
|
||||
if (mark_in_progress() || !_cmThread->in_progress()) {
|
||||
res_n = verify_no_bits_over_tams("next", next_bitmap, ntams, end);
|
||||
}
|
||||
if (!res_p || !res_n) {
|
||||
gclog_or_tty->print_cr("#### Bitmap verification failed for "HR_FORMAT,
|
||||
HR_FORMAT_PARAMS(hr));
|
||||
gclog_or_tty->print_cr("#### Caller: %s", caller);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void G1CollectedHeap::check_bitmaps(const char* caller, HeapRegion* hr) {
|
||||
if (!G1VerifyBitmaps) return;
|
||||
|
||||
guarantee(verify_bitmaps(caller, hr), "bitmap verification");
|
||||
}
|
||||
|
||||
class G1VerifyBitmapClosure : public HeapRegionClosure {
|
||||
private:
|
||||
const char* _caller;
|
||||
G1CollectedHeap* _g1h;
|
||||
bool _failures;
|
||||
|
||||
public:
|
||||
G1VerifyBitmapClosure(const char* caller, G1CollectedHeap* g1h) :
|
||||
_caller(caller), _g1h(g1h), _failures(false) { }
|
||||
|
||||
bool failures() { return _failures; }
|
||||
|
||||
virtual bool doHeapRegion(HeapRegion* hr) {
|
||||
if (hr->continuesHumongous()) return false;
|
||||
|
||||
bool result = _g1h->verify_bitmaps(_caller, hr);
|
||||
if (!result) {
|
||||
_failures = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void G1CollectedHeap::check_bitmaps(const char* caller) {
|
||||
if (!G1VerifyBitmaps) return;
|
||||
|
||||
G1VerifyBitmapClosure cl(caller, this);
|
||||
heap_region_iterate(&cl);
|
||||
guarantee(!cl.failures(), "bitmap verification");
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
void G1CollectedHeap::cleanUpCardTable() {
|
||||
G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
|
||||
|
@ -6464,6 +6565,7 @@ HeapRegion* G1CollectedHeap::new_mutator_alloc_region(size_t word_size,
|
|||
if (new_alloc_region != NULL) {
|
||||
set_region_short_lived_locked(new_alloc_region);
|
||||
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Eden, young_list_full);
|
||||
check_bitmaps("Mutator Region Allocation", new_alloc_region);
|
||||
return new_alloc_region;
|
||||
}
|
||||
}
|
||||
|
@ -6530,8 +6632,10 @@ HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
|
|||
if (survivor) {
|
||||
new_alloc_region->set_survivor();
|
||||
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Survivor);
|
||||
check_bitmaps("Survivor Region Allocation", new_alloc_region);
|
||||
} else {
|
||||
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Old);
|
||||
check_bitmaps("Old Region Allocation", new_alloc_region);
|
||||
}
|
||||
bool during_im = g1_policy()->during_initial_mark_pause();
|
||||
new_alloc_region->note_start_of_copying(during_im);
|
||||
|
|
|
@ -1186,6 +1186,30 @@ public:
|
|||
void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN;
|
||||
void verify_dirty_young_regions() PRODUCT_RETURN;
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Make sure that the given bitmap has no marked objects in the
|
||||
// range [from,limit). If it does, print an error message and return
|
||||
// false. Otherwise, just return true. bitmap_name should be "prev"
|
||||
// or "next".
|
||||
bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap,
|
||||
HeapWord* from, HeapWord* limit);
|
||||
|
||||
// Verify that the prev / next bitmap range [tams,end) for the given
|
||||
// region has no marks. Return true if all is well, false if errors
|
||||
// are detected.
|
||||
bool verify_bitmaps(const char* caller, HeapRegion* hr);
|
||||
#endif // PRODUCT
|
||||
|
||||
// If G1VerifyBitmaps is set, verify that the marking bitmaps for
|
||||
// the given region do not have any spurious marks. If errors are
|
||||
// detected, print appropriate error messages and crash.
|
||||
void check_bitmaps(const char* caller, HeapRegion* hr) PRODUCT_RETURN;
|
||||
|
||||
// If G1VerifyBitmaps is set, verify that the marking bitmaps do not
|
||||
// have any spurious marks. If errors are detected, print
|
||||
// appropriate error messages and crash.
|
||||
void check_bitmaps(const char* caller) PRODUCT_RETURN;
|
||||
|
||||
// verify_region_sets() performs verification over the region
|
||||
// lists. It will be compiled in the product code to be used when
|
||||
// necessary (i.e., during heap verification).
|
||||
|
|
|
@ -191,6 +191,7 @@ public:
|
|||
|
||||
hr->note_self_forwarding_removal_start(during_initial_mark,
|
||||
during_conc_mark);
|
||||
_g1h->check_bitmaps("Self-Forwarding Ptr Removal", hr);
|
||||
|
||||
// In the common case (i.e. when there is no evacuation
|
||||
// failure) we make sure that the following is done when
|
||||
|
|
|
@ -325,11 +325,14 @@
|
|||
"evacuation pauses") \
|
||||
\
|
||||
diagnostic(bool, G1VerifyRSetsDuringFullGC, false, \
|
||||
"If true, perform verification of each heap region's " \
|
||||
"remembered set when verifying the heap during a full GC.") \
|
||||
"If true, perform verification of each heap region's " \
|
||||
"remembered set when verifying the heap during a full GC.") \
|
||||
\
|
||||
diagnostic(bool, G1VerifyHeapRegionCodeRoots, false, \
|
||||
"Verify the code root lists attached to each heap region.")
|
||||
"Verify the code root lists attached to each heap region.") \
|
||||
\
|
||||
develop(bool, G1VerifyBitmaps, false, \
|
||||
"Verifies the consistency of the marking bitmaps")
|
||||
|
||||
G1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG)
|
||||
|
||||
|
|
|
@ -488,6 +488,7 @@ void Klass::remove_unshareable_info() {
|
|||
}
|
||||
|
||||
void Klass::restore_unshareable_info(TRAPS) {
|
||||
TRACE_INIT_ID(this);
|
||||
// If an exception happened during CDS restore, some of these fields may already be
|
||||
// set. We leave the class on the CLD list, even if incomplete so that we don't
|
||||
// modify the CLD list outside a safepoint.
|
||||
|
|
|
@ -3150,11 +3150,9 @@ JNI_ENTRY(void, jni_GetStringUTFRegion(JNIEnv *env, jstring string, jsize start,
|
|||
} else {
|
||||
//%note jni_7
|
||||
if (len > 0) {
|
||||
ResourceMark rm(THREAD);
|
||||
char *utf_region = java_lang_String::as_utf8_string(s, start, len);
|
||||
int utf_len = (int)strlen(utf_region);
|
||||
memcpy(buf, utf_region, utf_len);
|
||||
buf[utf_len] = 0;
|
||||
// Assume the buffer is large enough as the JNI spec. does not require user error checking
|
||||
java_lang_String::as_utf8_string(s, start, len, buf, INT_MAX);
|
||||
// as_utf8_string null-terminates the result string
|
||||
} else {
|
||||
// JDK null-terminates the buffer even in len is zero
|
||||
if (buf != NULL) {
|
||||
|
@ -3880,6 +3878,7 @@ void TestNewSize_test();
|
|||
void TestOldSize_test();
|
||||
void TestKlass_test();
|
||||
void TestBitMap_test();
|
||||
void TestAsUtf8();
|
||||
#if INCLUDE_ALL_GCS
|
||||
void TestOldFreeSpaceCalculation_test();
|
||||
void TestG1BiasedArray_test();
|
||||
|
@ -3907,6 +3906,7 @@ void execute_internal_vm_tests() {
|
|||
run_unit_test(TestOldSize_test());
|
||||
run_unit_test(TestKlass_test());
|
||||
run_unit_test(TestBitMap_test());
|
||||
run_unit_test(TestAsUtf8());
|
||||
#if INCLUDE_VM_STRUCTS
|
||||
run_unit_test(VMStructs::test());
|
||||
#endif
|
||||
|
|
|
@ -386,6 +386,23 @@ JVM_ENTRY(jobject, JVM_InitProperties(JNIEnv *env, jobject properties))
|
|||
JVM_END
|
||||
|
||||
|
||||
/*
|
||||
* Return the temporary directory that the VM uses for the attach
|
||||
* and perf data files.
|
||||
*
|
||||
* It is important that this directory is well-known and the
|
||||
* same for all VM instances. It cannot be affected by configuration
|
||||
* variables such as java.io.tmpdir.
|
||||
*/
|
||||
JVM_ENTRY(jstring, JVM_GetTemporaryDirectory(JNIEnv *env))
|
||||
JVMWrapper("JVM_GetTemporaryDirectory");
|
||||
HandleMark hm(THREAD);
|
||||
const char* temp_dir = os::get_temp_directory();
|
||||
Handle h = java_lang_String::create_from_platform_dependent_str(temp_dir, CHECK_NULL);
|
||||
return (jstring) JNIHandles::make_local(env, h());
|
||||
JVM_END
|
||||
|
||||
|
||||
// java.lang.Runtime /////////////////////////////////////////////////////////////////////////
|
||||
|
||||
extern volatile jint vm_created;
|
||||
|
|
|
@ -1485,6 +1485,9 @@ JVM_GetManagement(jint version);
|
|||
JNIEXPORT jobject JNICALL
|
||||
JVM_InitAgentProperties(JNIEnv *env, jobject agent_props);
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
JVM_GetTemporaryDirectory(JNIEnv *env);
|
||||
|
||||
/* Generics reflection support.
|
||||
*
|
||||
* Returns information about the given class's EnclosingMethod
|
||||
|
@ -1553,12 +1556,10 @@ JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState, jintArray values);
|
|||
* ==========================================================================
|
||||
*/
|
||||
typedef struct {
|
||||
/* HotSpot Express VM version string:
|
||||
* <major>.<minor>-bxx[-<identifier>][-<debug_flavor>]
|
||||
*/
|
||||
unsigned int jvm_version; /* Consists of major.minor.0.build */
|
||||
unsigned int update_version : 8; /* 0 in HotSpot Express VM */
|
||||
unsigned int special_update_version : 8; /* 0 in HotSpot Express VM */
|
||||
/* VM version string: follows the JDK release version naming convention */
|
||||
unsigned int jvm_version; /* <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>] */
|
||||
unsigned int update_version : 8;
|
||||
unsigned int special_update_version : 8;
|
||||
unsigned int reserved1 : 16;
|
||||
unsigned int reserved2;
|
||||
|
||||
|
@ -1577,11 +1578,7 @@ typedef struct {
|
|||
|
||||
#define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
|
||||
#define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
|
||||
// Micro version is 0 in HotSpot Express VM (set in jvm.cpp).
|
||||
#define JVM_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
|
||||
/* Build number is available in all HotSpot Express VM builds.
|
||||
* It is defined in make/hotspot_version file.
|
||||
*/
|
||||
#define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
|
|
|
@ -48,6 +48,9 @@
|
|||
#ifdef TARGET_OS_FAMILY_bsd
|
||||
# include "jvm_bsd.h"
|
||||
# include <setjmp.h>
|
||||
# ifdef __APPLE__
|
||||
# include <mach/mach_time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
class AgentLibrary;
|
||||
|
|
|
@ -1218,6 +1218,7 @@ typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
|
|||
static_field(Abstract_VM_Version, _s_internal_vm_info_string, const char*) \
|
||||
static_field(Abstract_VM_Version, _vm_major_version, int) \
|
||||
static_field(Abstract_VM_Version, _vm_minor_version, int) \
|
||||
static_field(Abstract_VM_Version, _vm_micro_version, int) \
|
||||
static_field(Abstract_VM_Version, _vm_build_number, int) \
|
||||
static_field(Abstract_VM_Version, _reserve_for_allocation_prefetch, int) \
|
||||
\
|
||||
|
|
|
@ -55,6 +55,20 @@ int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
|
|||
#ifndef HOTSPOT_RELEASE_VERSION
|
||||
#error HOTSPOT_RELEASE_VERSION must be defined
|
||||
#endif
|
||||
|
||||
#ifndef JDK_MAJOR_VERSION
|
||||
#error JDK_MAJOR_VERSION must be defined
|
||||
#endif
|
||||
#ifndef JDK_MINOR_VERSION
|
||||
#error JDK_MINOR_VERSION must be defined
|
||||
#endif
|
||||
#ifndef JDK_MICRO_VERSION
|
||||
#error JDK_MICRO_VERSION must be defined
|
||||
#endif
|
||||
#ifndef JDK_BUILD_NUMBER
|
||||
#error JDK_BUILD_NUMBER must be defined
|
||||
#endif
|
||||
|
||||
#ifndef JRE_RELEASE_VERSION
|
||||
#error JRE_RELEASE_VERSION must be defined
|
||||
#endif
|
||||
|
@ -68,39 +82,44 @@ int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
|
|||
#define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
|
||||
#endif
|
||||
|
||||
// HOTSPOT_RELEASE_VERSION must follow the release version naming convention
|
||||
// <major_ver>.<minor_ver>-b<nn>[-<identifier>][-<debug_target>]
|
||||
// HOTSPOT_RELEASE_VERSION follows the JDK release version naming convention
|
||||
// <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
|
||||
int Abstract_VM_Version::_vm_major_version = 0;
|
||||
int Abstract_VM_Version::_vm_minor_version = 0;
|
||||
int Abstract_VM_Version::_vm_micro_version = 0;
|
||||
int Abstract_VM_Version::_vm_build_number = 0;
|
||||
bool Abstract_VM_Version::_initialized = false;
|
||||
int Abstract_VM_Version::_parallel_worker_threads = 0;
|
||||
bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
|
||||
|
||||
#ifdef ASSERT
|
||||
static void assert_digits(const char * s, const char * message) {
|
||||
for (int i = 0; s[i] != '\0'; i++) {
|
||||
assert(isdigit(s[i]), message);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void set_version_field(int * version_field, const char * version_str,
|
||||
const char * const assert_msg) {
|
||||
if (version_str != NULL && *version_str != '\0') {
|
||||
DEBUG_ONLY(assert_digits(version_str, assert_msg));
|
||||
*version_field = atoi(version_str);
|
||||
}
|
||||
}
|
||||
|
||||
void Abstract_VM_Version::initialize() {
|
||||
if (_initialized) {
|
||||
return;
|
||||
}
|
||||
char* vm_version = os::strdup(HOTSPOT_RELEASE_VERSION);
|
||||
|
||||
// Expecting the next vm_version format:
|
||||
// <major_ver>.<minor_ver>-b<nn>[-<identifier>]
|
||||
char* vm_major_ver = vm_version;
|
||||
assert(isdigit(vm_major_ver[0]),"wrong vm major version number");
|
||||
char* vm_minor_ver = strchr(vm_major_ver, '.');
|
||||
assert(vm_minor_ver != NULL && isdigit(vm_minor_ver[1]),"wrong vm minor version number");
|
||||
vm_minor_ver[0] = '\0'; // terminate vm_major_ver
|
||||
vm_minor_ver += 1;
|
||||
char* vm_build_num = strchr(vm_minor_ver, '-');
|
||||
assert(vm_build_num != NULL && vm_build_num[1] == 'b' && isdigit(vm_build_num[2]),"wrong vm build number");
|
||||
vm_build_num[0] = '\0'; // terminate vm_minor_ver
|
||||
vm_build_num += 2;
|
||||
set_version_field(&_vm_major_version, JDK_MAJOR_VERSION, "bad major version");
|
||||
set_version_field(&_vm_minor_version, JDK_MINOR_VERSION, "bad minor version");
|
||||
set_version_field(&_vm_micro_version, JDK_MICRO_VERSION, "bad micro version");
|
||||
int offset = (JDK_BUILD_NUMBER != NULL && JDK_BUILD_NUMBER[0] == 'b') ? 1 : 0;
|
||||
set_version_field(&_vm_build_number, JDK_BUILD_NUMBER + offset,
|
||||
"bad build number");
|
||||
|
||||
_vm_major_version = atoi(vm_major_ver);
|
||||
_vm_minor_version = atoi(vm_minor_ver);
|
||||
_vm_build_number = atoi(vm_build_num);
|
||||
|
||||
os::free(vm_version);
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
|
@ -276,6 +295,7 @@ const char *Abstract_VM_Version::vm_build_user() {
|
|||
unsigned int Abstract_VM_Version::jvm_version() {
|
||||
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
|
||||
((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
|
||||
((Abstract_VM_Version::vm_micro_version() & 0xFF) << 8) |
|
||||
(Abstract_VM_Version::vm_build_number() & 0xFF);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ class Abstract_VM_Version: AllStatic {
|
|||
static unsigned int _logical_processors_per_package;
|
||||
static int _vm_major_version;
|
||||
static int _vm_minor_version;
|
||||
static int _vm_micro_version;
|
||||
static int _vm_build_number;
|
||||
static bool _initialized;
|
||||
static int _parallel_worker_threads;
|
||||
|
@ -68,6 +69,7 @@ class Abstract_VM_Version: AllStatic {
|
|||
|
||||
static int vm_major_version() { assert(_initialized, "not initialized"); return _vm_major_version; }
|
||||
static int vm_minor_version() { assert(_initialized, "not initialized"); return _vm_minor_version; }
|
||||
static int vm_micro_version() { assert(_initialized, "not initialized"); return _vm_micro_version; }
|
||||
static int vm_build_number() { assert(_initialized, "not initialized"); return _vm_build_number; }
|
||||
|
||||
// Gets the jvm_version_info.jvm_version defined in jvm.h
|
||||
|
|
|
@ -785,7 +785,7 @@ void MemTracker::Tracker::record(address old_addr, address new_addr, size_t size
|
|||
MEMFLAGS flags, address pc) {
|
||||
assert(old_addr != NULL && new_addr != NULL, "Sanity check");
|
||||
assert(_op == Realloc || _op == NoOp, "Wrong call");
|
||||
if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp) {
|
||||
if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp && !MemTracker::shutdown_in_progress()) {
|
||||
assert(_seq > 0, "Need pre-reserve sequence number");
|
||||
if (_need_thread_critical_lock) {
|
||||
ThreadCritical tc;
|
||||
|
@ -811,7 +811,7 @@ void MemTracker::Tracker::record(address addr, size_t size, MEMFLAGS flags, addr
|
|||
// OOM already?
|
||||
if (addr == NULL) return;
|
||||
|
||||
if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp) {
|
||||
if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp && !MemTracker::shutdown_in_progress()) {
|
||||
bool pre_reserved_seq = (_seq != 0);
|
||||
address pc = CALLER_CALLER_PC;
|
||||
MEMFLAGS orig_flags = flags;
|
||||
|
|
|
@ -329,23 +329,19 @@ int UNICODE::utf8_length(jchar* base, int length) {
|
|||
|
||||
char* UNICODE::as_utf8(jchar* base, int length) {
|
||||
int utf8_len = utf8_length(base, length);
|
||||
u_char* result = NEW_RESOURCE_ARRAY(u_char, utf8_len + 1);
|
||||
u_char* p = result;
|
||||
for (int index = 0; index < length; index++) {
|
||||
p = utf8_write(p, base[index]);
|
||||
}
|
||||
*p = '\0';
|
||||
assert(p == &result[utf8_len], "length prediction must be correct");
|
||||
return (char*) result;
|
||||
u_char* buf = NEW_RESOURCE_ARRAY(u_char, utf8_len + 1);
|
||||
char* result = as_utf8(base, length, (char*) buf, utf8_len + 1);
|
||||
assert((int) strlen(result) == utf8_len, "length prediction must be correct");
|
||||
return result;
|
||||
}
|
||||
|
||||
char* UNICODE::as_utf8(jchar* base, int length, char* buf, int buflen) {
|
||||
u_char* p = (u_char*)buf;
|
||||
u_char* end = (u_char*)buf + buflen;
|
||||
for (int index = 0; index < length; index++) {
|
||||
jchar c = base[index];
|
||||
if (p + utf8_size(c) >= end) break; // string is truncated
|
||||
p = utf8_write(p, base[index]);
|
||||
buflen -= utf8_size(c);
|
||||
if (buflen <= 0) break; // string is truncated
|
||||
p = utf8_write(p, c);
|
||||
}
|
||||
*p = '\0';
|
||||
return buf;
|
||||
|
@ -389,3 +385,29 @@ void UNICODE::as_quoted_ascii(const jchar* base, int length, char* buf, int bufl
|
|||
}
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void TestAsUtf8() {
|
||||
char res[60];
|
||||
jchar str[20];
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
str[i] = 0x0800; // char that is 2B in UTF-16 but 3B in UTF-8
|
||||
}
|
||||
str[19] = (jchar)'\0';
|
||||
|
||||
// The resulting string in UTF-8 is 3*19 bytes long, but should be truncated
|
||||
UNICODE::as_utf8(str, 19, res, 10);
|
||||
assert(strlen(res) == 9, "string should be truncated here");
|
||||
|
||||
UNICODE::as_utf8(str, 19, res, 18);
|
||||
assert(strlen(res) == 15, "string should be truncated here");
|
||||
|
||||
UNICODE::as_utf8(str, 19, res, 20);
|
||||
assert(strlen(res) == 18, "string should be truncated here");
|
||||
|
||||
// Test with an "unbounded" buffer
|
||||
UNICODE::as_utf8(str, 19, res, INT_MAX);
|
||||
assert(strlen(res) == 3*19, "string should end here");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -250,3 +250,7 @@ fb92ed0399424193f444489ad49a16748816dc12 jdk9-b03
|
|||
b92a20e303d24c74078888cd7084b14d7626d48f jdk9-b05
|
||||
46e4951b2a267e98341613a3b796f2c7554eb831 jdk9-b06
|
||||
389f4094fd603c17e215997b0b40171179629007 jdk9-b07
|
||||
3b360a77658e6b3ac150dd7cdbff1a7abe855afc jdk9-b08
|
||||
f93a792fe37279d4d37aea86a99f3abbdc6fe79b jdk9-b09
|
||||
4ce98701efe3b28f6ce3ab23385445731e968af7 jdk9-b10
|
||||
6b4280dceb00642f54d5bc1c2cb7d34c99a04992 jdk9-b11
|
||||
|
|
|
@ -35,15 +35,15 @@ DISABLE_JAXP_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-ser
|
|||
# The generate new bytecode uses the new compiler for to generate bytecode
|
||||
# for the new jdk that is being built. The code compiled by this setup
|
||||
# cannot necessarily be run with the boot jdk.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
|
||||
JVM := $(JAVA), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXP_WARNINGS) -g, \
|
||||
FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXP_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_JAXP, \
|
||||
SETUP := GENERATE_NEWBYTECODE_DEBUG, \
|
||||
SETUP := GENERATE_NEWBYTECODE, \
|
||||
SRC := $(JAXP_TOPDIR)/src, \
|
||||
CLEAN := .properties, \
|
||||
BIN := $(JAXP_OUTPUTDIR)/classes, \
|
||||
|
|
|
@ -57,7 +57,7 @@ public final class SecuritySupport {
|
|||
return securitySupport;
|
||||
}
|
||||
|
||||
static ClassLoader getContextClassLoader() {
|
||||
public static ClassLoader getContextClassLoader() {
|
||||
return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ClassLoader cl = null;
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -19,7 +20,7 @@
|
|||
*/
|
||||
package com.sun.org.apache.xerces.internal.xpointer;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
|
||||
import com.sun.org.apache.xerces.internal.util.SymbolTable;
|
||||
|
@ -38,9 +39,8 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler;
|
|||
* @xerces.internal
|
||||
*
|
||||
* @version $Id: ElementSchemePointer.java,v 1.4 2009/06/11 23:51:50 joehw Exp $
|
||||
*
|
||||
*/
|
||||
class ElementSchemePointer implements XPointerPart {
|
||||
final class ElementSchemePointer implements XPointerPart {
|
||||
|
||||
// Fields
|
||||
|
||||
|
@ -346,15 +346,17 @@ class ElementSchemePointer implements XPointerPart {
|
|||
|
||||
// Donot check for empty elements if the empty element is
|
||||
// a child of a found parent element
|
||||
//if (!fIsElementFound) {
|
||||
if (checkMatch()) {
|
||||
fIsElementFound = true;
|
||||
if (checkMatch()) {
|
||||
if (!fIsElementFound) {
|
||||
fWasOnlyEmptyElementFound = true;
|
||||
} else {
|
||||
fIsElementFound = false;
|
||||
fWasOnlyEmptyElementFound = false;
|
||||
}
|
||||
//}
|
||||
|
||||
fIsElementFound = true;
|
||||
} else {
|
||||
fIsElementFound = false;
|
||||
fWasOnlyEmptyElementFound = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -526,7 +528,7 @@ class ElementSchemePointer implements XPointerPart {
|
|||
|
||||
private SymbolTable fSymbolTable;
|
||||
|
||||
private Hashtable fTokenNames = new Hashtable();
|
||||
private HashMap<Integer, String> fTokenNames = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -548,16 +550,7 @@ class ElementSchemePointer implements XPointerPart {
|
|||
* @return String The token string
|
||||
*/
|
||||
private String getTokenString(int token) {
|
||||
return (String) fTokenNames.get(new Integer(token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the token String
|
||||
* @param token The index of the token
|
||||
* @return String The token string
|
||||
*/
|
||||
private Integer getToken(int token) {
|
||||
return (Integer) fTokenNames.get(new Integer(token));
|
||||
return fTokenNames.get(new Integer(token));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -566,12 +559,11 @@ class ElementSchemePointer implements XPointerPart {
|
|||
* @param token The token string
|
||||
*/
|
||||
private void addToken(String tokenStr) {
|
||||
Integer tokenInt = (Integer) fTokenNames.get(tokenStr);
|
||||
if (tokenInt == null) {
|
||||
tokenInt = new Integer(fTokenNames.size());
|
||||
if (!fTokenNames.containsValue(tokenStr)) {
|
||||
Integer tokenInt = new Integer(fTokenNames.size());
|
||||
fTokenNames.put(tokenInt, tokenStr);
|
||||
addToken(tokenInt.intValue());
|
||||
}
|
||||
addToken(tokenInt.intValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -17,6 +18,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xerces.internal.xpointer;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.impl.Constants;
|
||||
|
@ -37,9 +39,8 @@ import com.sun.org.apache.xerces.internal.xs.XSTypeDefinition;
|
|||
* in document order that has a matching NCName as an identifier.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
class ShortHandPointer implements XPointerPart {
|
||||
final class ShortHandPointer implements XPointerPart {
|
||||
|
||||
// The name of the ShortHand pointer
|
||||
private String fShortHandPointer;
|
||||
|
@ -261,7 +262,7 @@ class ShortHandPointer implements XPointerPart {
|
|||
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerPart#isChildFragmentResolved()
|
||||
*/
|
||||
public boolean isChildFragmentResolved() {
|
||||
return fIsFragmentResolved & ( fMatchingChildCount > 0);
|
||||
return fIsFragmentResolved && ( fMatchingChildCount > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -17,6 +18,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xerces.internal.xpointer;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
@ -31,7 +33,7 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException;
|
|||
* implementation and reported as resource errors.
|
||||
*
|
||||
*/
|
||||
class XPointerErrorHandler implements XMLErrorHandler {
|
||||
final class XPointerErrorHandler implements XMLErrorHandler {
|
||||
|
||||
//
|
||||
// Data
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -17,10 +18,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xerces.internal.xpointer;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.impl.Constants;
|
||||
import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
|
||||
|
@ -32,6 +34,7 @@ import com.sun.org.apache.xerces.internal.xinclude.XIncludeNamespaceSupport;
|
|||
import com.sun.org.apache.xerces.internal.xni.Augmentations;
|
||||
import com.sun.org.apache.xerces.internal.xni.QName;
|
||||
import com.sun.org.apache.xerces.internal.xni.XMLAttributes;
|
||||
import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
|
||||
import com.sun.org.apache.xerces.internal.xni.XMLString;
|
||||
import com.sun.org.apache.xerces.internal.xni.XNIException;
|
||||
import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
|
||||
|
@ -64,8 +67,8 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
XPointerProcessor {
|
||||
|
||||
// Fields
|
||||
// A Vector of XPointerParts
|
||||
protected Vector fXPointerParts = null;
|
||||
// An ArrayList of XPointerParts
|
||||
protected ArrayList<XPointerPart> fXPointerParts = null;
|
||||
|
||||
// The current XPointerPart
|
||||
protected XPointerPart fXPointerPart = null;
|
||||
|
@ -102,7 +105,7 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
public XPointerHandler() {
|
||||
super();
|
||||
|
||||
fXPointerParts = new Vector();
|
||||
fXPointerParts = new ArrayList<>();
|
||||
fSymbolTable = new SymbolTable();
|
||||
}
|
||||
|
||||
|
@ -110,13 +113,17 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
XMLErrorHandler errorHandler, XMLErrorReporter errorReporter) {
|
||||
super();
|
||||
|
||||
fXPointerParts = new Vector();
|
||||
fXPointerParts = new ArrayList<>();
|
||||
fSymbolTable = symbolTable;
|
||||
fErrorHandler = errorHandler;
|
||||
fXPointerErrorReporter = errorReporter;
|
||||
//fErrorReporter = errorReporter; // The XInclude ErrorReporter
|
||||
}
|
||||
|
||||
public void setDocumentHandler(XMLDocumentHandler handler) {
|
||||
fDocumentHandler = handler;
|
||||
}
|
||||
|
||||
// ************************************************************************
|
||||
// Implementation of the XPointerProcessor interface.
|
||||
// ************************************************************************
|
||||
|
@ -300,7 +307,7 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
// in the XPointer expression until a matching element is found.
|
||||
for (int i = 0; i < fXPointerParts.size(); i++) {
|
||||
|
||||
fXPointerPart = (XPointerPart) fXPointerParts.get(i);
|
||||
fXPointerPart = fXPointerParts.get(i);
|
||||
|
||||
if (fXPointerPart.resolveXPointer(element, attributes, augs,
|
||||
event)) {
|
||||
|
@ -430,11 +437,11 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a Vector of XPointerPart objects
|
||||
* Returns an ArrayList of XPointerPart objects
|
||||
*
|
||||
* @return A Vector of XPointerPart objects.
|
||||
* @return An ArrayList of XPointerPart objects.
|
||||
*/
|
||||
public Vector getPointerParts() {
|
||||
public ArrayList<XPointerPart> getPointerParts() {
|
||||
return fXPointerParts;
|
||||
}
|
||||
|
||||
|
@ -480,7 +487,7 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
|
||||
private SymbolTable fSymbolTable;
|
||||
|
||||
private Hashtable fTokenNames = new Hashtable();
|
||||
private HashMap<Integer, String> fTokenNames = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -508,7 +515,7 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
* @return String The token string
|
||||
*/
|
||||
private String getTokenString(int token) {
|
||||
return (String) fTokenNames.get(new Integer(token));
|
||||
return fTokenNames.get(new Integer(token));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -517,12 +524,11 @@ public final class XPointerHandler extends XIncludeHandler implements
|
|||
* @param token The token string
|
||||
*/
|
||||
private void addToken(String tokenStr) {
|
||||
Integer tokenInt = (Integer) fTokenNames.get(tokenStr);
|
||||
if (tokenInt == null) {
|
||||
tokenInt = new Integer(fTokenNames.size());
|
||||
if (!fTokenNames.containsValue(tokenStr)) {
|
||||
Integer tokenInt = new Integer(fTokenNames.size());
|
||||
fTokenNames.put(tokenInt, tokenStr);
|
||||
addToken(tokenInt.intValue());
|
||||
}
|
||||
addToken(tokenInt.intValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -17,6 +18,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xerces.internal.xpointer;
|
||||
|
||||
import java.util.Locale;
|
||||
|
@ -34,7 +36,7 @@ import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
|
|||
*
|
||||
* @version $Id: XPointerMessageFormatter.java,v 1.5 2010-11-01 04:40:26 joehw Exp $
|
||||
*/
|
||||
class XPointerMessageFormatter implements MessageFormatter {
|
||||
final class XPointerMessageFormatter implements MessageFormatter {
|
||||
|
||||
public static final String XPOINTER_DOMAIN = "http://www.w3.org/TR/XPTR";
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -17,6 +18,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xerces.internal.xpointer;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.xni.Augmentations;
|
||||
|
@ -49,7 +51,7 @@ public interface XPointerPart {
|
|||
* Provides scheme specific parsing of a XPointer expression i.e.
|
||||
* the PointerPart or ShortHandPointer.
|
||||
*
|
||||
* @param xpointer A String representing the PointerPart or ShortHandPointer.
|
||||
* @param part A String representing the PointerPart or ShortHandPointer.
|
||||
* @throws XNIException Thrown if the PointerPart string does not conform to
|
||||
* the syntax defined by its scheme.
|
||||
*
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -34,7 +35,6 @@ import com.sun.org.apache.xerces.internal.xni.XNIException;
|
|||
*
|
||||
* @xerces.internal
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface XPointerProcessor {
|
||||
|
||||
|
@ -56,7 +56,6 @@ public interface XPointerProcessor {
|
|||
* @throws XNIException Thrown if the xpointer string does not conform to
|
||||
* the XPointer Framework syntax or the syntax of the pointer part does
|
||||
* not conform to its definition for its scheme.
|
||||
*
|
||||
*/
|
||||
public void parseXPointer(String xpointer) throws XNIException;
|
||||
|
||||
|
@ -74,7 +73,6 @@ public interface XPointerProcessor {
|
|||
* 2 - An empty element call
|
||||
* @return true if the element was resolved by the xpointer
|
||||
* @throws XNIException Thrown to signal an error
|
||||
*
|
||||
*/
|
||||
public boolean resolveXPointer(QName element, XMLAttributes attributes,
|
||||
Augmentations augs, int event) throws XNIException;
|
||||
|
@ -86,7 +84,6 @@ public interface XPointerProcessor {
|
|||
* @return True if the xpointer expression matches a node/fragment in the resource
|
||||
* else returns false.
|
||||
* @throws XNIException Thrown to signal an error
|
||||
*
|
||||
*/
|
||||
public boolean isFragmentResolved() throws XNIException;
|
||||
|
||||
|
@ -97,7 +94,6 @@ public interface XPointerProcessor {
|
|||
* @return True if the xpointer expression matches a fragment in the resource
|
||||
* else returns false.
|
||||
* @throws XNIException Thrown to signal an error
|
||||
*
|
||||
*/
|
||||
public boolean isXPointerResolved() throws XNIException;
|
||||
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
*/
|
||||
package com.sun.org.apache.xml.internal.serializer;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.Utils;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -29,19 +34,11 @@ import java.io.UnsupportedEncodingException;
|
|||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.PropertyResourceBundle;
|
||||
import java.util.ResourceBundle;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
import javax.xml.transform.TransformerException;
|
||||
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.Utils;
|
||||
import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
|
||||
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
|
||||
/**
|
||||
* This class provides services that tell if a character should have
|
||||
* special treatement, such as entity reference substitution or normalization
|
||||
|
@ -176,13 +173,19 @@ final class CharInfo
|
|||
// file
|
||||
// 3) try treating the resource a URI
|
||||
|
||||
if (internal) {
|
||||
try {
|
||||
try {
|
||||
if (internal) {
|
||||
// Load entity property files by using PropertyResourceBundle,
|
||||
// cause of security issure for applets
|
||||
entities = PropertyResourceBundle.getBundle(entitiesResource);
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
} else {
|
||||
ClassLoader cl = SecuritySupport.getContextClassLoader();
|
||||
if (cl != null) {
|
||||
entities = PropertyResourceBundle.getBundle(entitiesResource,
|
||||
Locale.getDefault(), cl);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
|
||||
if (entities != null) {
|
||||
Enumeration keys = entities.getKeys();
|
||||
|
@ -198,6 +201,7 @@ final class CharInfo
|
|||
set(S_CARRIAGERETURN);
|
||||
} else {
|
||||
InputStream is = null;
|
||||
String err = null;
|
||||
|
||||
// Load user specified resource file by using URL loading, it
|
||||
// requires a valid URI as parameter
|
||||
|
@ -205,18 +209,22 @@ final class CharInfo
|
|||
if (internal) {
|
||||
is = CharInfo.class.getResourceAsStream(entitiesResource);
|
||||
} else {
|
||||
ClassLoader cl = ObjectFactory.findClassLoader();
|
||||
if (cl == null) {
|
||||
is = ClassLoader.getSystemResourceAsStream(entitiesResource);
|
||||
} else {
|
||||
is = cl.getResourceAsStream(entitiesResource);
|
||||
ClassLoader cl = SecuritySupport.getContextClassLoader();
|
||||
if (cl != null) {
|
||||
try {
|
||||
is = cl.getResourceAsStream(entitiesResource);
|
||||
} catch (Exception e) {
|
||||
err = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (is == null) {
|
||||
try {
|
||||
URL url = new URL(entitiesResource);
|
||||
is = url.openStream();
|
||||
} catch (Exception e) {}
|
||||
} catch (Exception e) {
|
||||
err = e.getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,7 +232,7 @@ final class CharInfo
|
|||
throw new RuntimeException(
|
||||
Utils.messages.createMessage(
|
||||
MsgKey.ER_RESOURCE_COULD_NOT_FIND,
|
||||
new Object[] {entitiesResource, entitiesResource}));
|
||||
new Object[] {entitiesResource, err}));
|
||||
}
|
||||
|
||||
// Fix Bugzilla#4000: force reading in UTF-8
|
||||
|
@ -456,64 +464,56 @@ final class CharInfo
|
|||
return isCleanTextASCII[value];
|
||||
}
|
||||
|
||||
// In the future one might want to use the array directly and avoid
|
||||
// the method call, but I think the JIT alreay inlines this well enough
|
||||
// so don't do it (for now) - bjm
|
||||
// public final boolean[] getASCIIClean()
|
||||
// {
|
||||
// return isCleanTextASCII;
|
||||
// }
|
||||
|
||||
|
||||
private static CharInfo getCharInfoBasedOnPrivilege(
|
||||
final String entitiesFileName, final String method,
|
||||
final boolean internal){
|
||||
return (CharInfo) AccessController.doPrivileged(
|
||||
new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return new CharInfo(entitiesFileName,
|
||||
method, internal);}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory that reads in a resource file that describes the mapping of
|
||||
* characters to entity references.
|
||||
* Read an internal resource file that describes the mapping of
|
||||
* characters to entity references; Construct a CharInfo object.
|
||||
*
|
||||
* Resource files must be encoded in UTF-8 and have a format like:
|
||||
* <pre>
|
||||
* # First char # is a comment
|
||||
* Entity numericValue
|
||||
* quot 34
|
||||
* amp 38
|
||||
* </pre>
|
||||
* (Note: Why don't we just switch to .properties files? Oct-01 -sc)
|
||||
*
|
||||
* @param entitiesResource Name of entities resource file that should
|
||||
* be loaded, which describes that mapping of characters to entity references.
|
||||
* @param method the output method type, which should be one of "xml", "html", "text"...
|
||||
* @param entitiesFileName Name of entities resource file that should
|
||||
* be loaded, which describes the mapping of characters to entity references.
|
||||
* @param method the output method type, which should be one of "xml", "html", and "text".
|
||||
* @return an instance of CharInfo
|
||||
*
|
||||
* @xsl.usage internal
|
||||
*/
|
||||
static CharInfo getCharInfo(String entitiesFileName, String method)
|
||||
static CharInfo getCharInfoInternal(String entitiesFileName, String method)
|
||||
{
|
||||
CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName);
|
||||
if (charInfo != null) {
|
||||
return charInfo;
|
||||
}
|
||||
|
||||
// try to load it internally - cache
|
||||
try {
|
||||
charInfo = getCharInfoBasedOnPrivilege(entitiesFileName,
|
||||
method, true);
|
||||
m_getCharInfoCache.put(entitiesFileName, charInfo);
|
||||
return charInfo;
|
||||
} catch (Exception e) {}
|
||||
charInfo = new CharInfo(entitiesFileName, method, true);
|
||||
m_getCharInfoCache.put(entitiesFileName, charInfo);
|
||||
return charInfo;
|
||||
}
|
||||
|
||||
// try to load it externally - do not cache
|
||||
/**
|
||||
* Constructs a CharInfo object using the following process to try reading
|
||||
* the entitiesFileName parameter:
|
||||
*
|
||||
* 1) attempt to load it as a ResourceBundle
|
||||
* 2) try using the class loader to find the specified file
|
||||
* 3) try opening it as an URI
|
||||
*
|
||||
* In case of 2 and 3, the resource file must be encoded in UTF-8 and have the
|
||||
* following format:
|
||||
* <pre>
|
||||
* # First char # is a comment
|
||||
* Entity numericValue
|
||||
* quot 34
|
||||
* amp 38
|
||||
* </pre>
|
||||
*
|
||||
* @param entitiesFileName Name of entities resource file that should
|
||||
* be loaded, which describes the mapping of characters to entity references.
|
||||
* @param method the output method type, which should be one of "xml", "html", and "text".
|
||||
* @return an instance of CharInfo
|
||||
*/
|
||||
static CharInfo getCharInfo(String entitiesFileName, String method)
|
||||
{
|
||||
try {
|
||||
return getCharInfoBasedOnPrivilege(entitiesFileName,
|
||||
method, false);
|
||||
return new CharInfo(entitiesFileName, method, false);
|
||||
} catch (Exception e) {}
|
||||
|
||||
String absoluteEntitiesFileName;
|
||||
|
@ -530,8 +530,7 @@ final class CharInfo
|
|||
}
|
||||
}
|
||||
|
||||
return getCharInfoBasedOnPrivilege(entitiesFileName,
|
||||
method, false);
|
||||
return new CharInfo(absoluteEntitiesFileName, method, false);
|
||||
}
|
||||
|
||||
/** Table of user-specified char infos. */
|
||||
|
|
|
@ -60,7 +60,7 @@ public final class ToHTMLStream extends ToStream
|
|||
*/
|
||||
private static final CharInfo m_htmlcharInfo =
|
||||
// new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE);
|
||||
CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML);
|
||||
CharInfo.getCharInfoInternal(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML);
|
||||
|
||||
/** A digital search trie for fast, case insensitive lookup of ElemDesc objects. */
|
||||
static final Trie m_elementFlags = new Trie();
|
||||
|
|
|
@ -58,7 +58,7 @@ public final class ToXMLStream extends ToStream
|
|||
*/
|
||||
private static CharInfo m_xmlcharInfo =
|
||||
// new CharInfo(CharInfo.XML_ENTITIES_RESOURCE);
|
||||
CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML);
|
||||
CharInfo.getCharInfoInternal(CharInfo.XML_ENTITIES_RESOURCE, Method.XML);
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
|
|
|
@ -253,3 +253,7 @@ da44a8bdf1f3fdd518e7d785d60cc1b15983b176 jdk9-b04
|
|||
eae966c8133fec0a8bf9e16d1274a4ede3c0fb52 jdk9-b05
|
||||
cf0a6e41670f990414cd337000ad5f3bd1908073 jdk9-b06
|
||||
856a9132f506cafe2f251c1a16a0b14e4d16048d jdk9-b07
|
||||
2d9f4166e0be68aa43c5f4fd0f8d34768e11f652 jdk9-b08
|
||||
c9e8bb8c1144a966ca7b481142c6b5e55d14a29c jdk9-b09
|
||||
9af43f4d215f6f19b1767f6ac66da931b8ee9535 jdk9-b10
|
||||
1f953ba7db2b535e19f0354abfee6d67605e0684 jdk9-b11
|
||||
|
|
|
@ -35,21 +35,21 @@ DISABLE_JAXWS_WARNINGS := -Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,
|
|||
# The generate new bytecode uses the new compiler for to generate bytecode
|
||||
# for the new jdk that is being built. The code compiled by this setup
|
||||
# cannot necessarily be run with the boot jdk.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
|
||||
JVM := $(JAVA), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g, \
|
||||
FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_JAF, \
|
||||
SETUP := GENERATE_NEWBYTECODE_DEBUG, \
|
||||
SETUP := GENERATE_NEWBYTECODE, \
|
||||
SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes, \
|
||||
CLEAN := .properties, \
|
||||
BIN := $(JAXWS_OUTPUTDIR)/jaf_classes))
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_JAXWS, \
|
||||
SETUP := GENERATE_NEWBYTECODE_DEBUG, \
|
||||
SETUP := GENERATE_NEWBYTECODE, \
|
||||
SRC := $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
|
||||
BIN := $(JAXWS_OUTPUTDIR)/jaxws_classes, \
|
||||
COPY := .xsd, \
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
|
||||
package javax.activation;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
|
||||
/**
|
||||
* The CommandMap class provides an interface to a registry of
|
||||
|
@ -38,6 +41,8 @@ package javax.activation;
|
|||
*/
|
||||
public abstract class CommandMap {
|
||||
private static CommandMap defaultCommandMap = null;
|
||||
private static Map<ClassLoader,CommandMap> map =
|
||||
new WeakHashMap<ClassLoader,CommandMap>();
|
||||
|
||||
/**
|
||||
* Get the default CommandMap.
|
||||
|
@ -56,11 +61,18 @@ public abstract class CommandMap {
|
|||
*
|
||||
* @return the CommandMap
|
||||
*/
|
||||
public static CommandMap getDefaultCommandMap() {
|
||||
if (defaultCommandMap == null)
|
||||
defaultCommandMap = new MailcapCommandMap();
|
||||
public static synchronized CommandMap getDefaultCommandMap() {
|
||||
if (defaultCommandMap != null)
|
||||
return defaultCommandMap;
|
||||
|
||||
return defaultCommandMap;
|
||||
// fetch per-thread-context-class-loader default
|
||||
ClassLoader tccl = SecuritySupport.getContextClassLoader();
|
||||
CommandMap def = map.get(tccl);
|
||||
if (def == null) {
|
||||
def = new MailcapCommandMap();
|
||||
map.put(tccl, def);
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +83,7 @@ public abstract class CommandMap {
|
|||
* @exception SecurityException if the caller doesn't have permission
|
||||
* to change the default
|
||||
*/
|
||||
public static void setDefaultCommandMap(CommandMap commandMap) {
|
||||
public static synchronized void setDefaultCommandMap(CommandMap commandMap) {
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
if (security != null) {
|
||||
try {
|
||||
|
@ -79,13 +91,16 @@ public abstract class CommandMap {
|
|||
security.checkSetFactory();
|
||||
} catch (SecurityException ex) {
|
||||
// otherwise, we also allow it if this code and the
|
||||
// factory come from the same class loader (e.g.,
|
||||
// factory come from the same (non-system) class loader (e.g.,
|
||||
// the JAF classes were loaded with the applet classes).
|
||||
if (CommandMap.class.getClassLoader() !=
|
||||
if (CommandMap.class.getClassLoader() == null ||
|
||||
CommandMap.class.getClassLoader() !=
|
||||
commandMap.getClass().getClassLoader())
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
// remove any per-thread-context-class-loader CommandMap
|
||||
map.remove(SecuritySupport.getContextClassLoader());
|
||||
defaultCommandMap = commandMap;
|
||||
}
|
||||
|
||||
|
|
|
@ -368,7 +368,12 @@ public class DataHandler implements Transferable {
|
|||
// if it's not set, set it...
|
||||
if (transferFlavors == emptyFlavors)
|
||||
transferFlavors = getDataContentHandler().getTransferDataFlavors();
|
||||
return transferFlavors;
|
||||
|
||||
if (transferFlavors == emptyFlavors)
|
||||
return transferFlavors;
|
||||
else
|
||||
return transferFlavors.clone();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
package javax.activation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/**
|
||||
* The FileTypeMap is an abstract class that provides a data typing
|
||||
|
@ -48,6 +50,8 @@ import java.io.File;
|
|||
public abstract class FileTypeMap {
|
||||
|
||||
private static FileTypeMap defaultMap = null;
|
||||
private static Map<ClassLoader,FileTypeMap> map =
|
||||
new WeakHashMap<ClassLoader,FileTypeMap>();
|
||||
|
||||
/**
|
||||
* The default constructor.
|
||||
|
@ -78,11 +82,11 @@ public abstract class FileTypeMap {
|
|||
* Sets the default FileTypeMap for the system. This instance
|
||||
* will be returned to callers of getDefaultFileTypeMap.
|
||||
*
|
||||
* @param map The FileTypeMap.
|
||||
* @param fileTypeMap The FileTypeMap.
|
||||
* @exception SecurityException if the caller doesn't have permission
|
||||
* to change the default
|
||||
*/
|
||||
public static void setDefaultFileTypeMap(FileTypeMap map) {
|
||||
public static synchronized void setDefaultFileTypeMap(FileTypeMap fileTypeMap) {
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
if (security != null) {
|
||||
try {
|
||||
|
@ -90,14 +94,17 @@ public abstract class FileTypeMap {
|
|||
security.checkSetFactory();
|
||||
} catch (SecurityException ex) {
|
||||
// otherwise, we also allow it if this code and the
|
||||
// factory come from the same class loader (e.g.,
|
||||
// factory come from the same (non-system) class loader (e.g.,
|
||||
// the JAF classes were loaded with the applet classes).
|
||||
if (FileTypeMap.class.getClassLoader() !=
|
||||
map.getClass().getClassLoader())
|
||||
if (FileTypeMap.class.getClassLoader() == null ||
|
||||
FileTypeMap.class.getClassLoader() !=
|
||||
fileTypeMap.getClass().getClassLoader())
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
defaultMap = map;
|
||||
// remove any per-thread-context-class-loader FileTypeMap
|
||||
map.remove(SecuritySupport.getContextClassLoader());
|
||||
defaultMap = fileTypeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,10 +116,17 @@ public abstract class FileTypeMap {
|
|||
* @return The default FileTypeMap
|
||||
* @see javax.activation.FileTypeMap#setDefaultFileTypeMap
|
||||
*/
|
||||
public static FileTypeMap getDefaultFileTypeMap() {
|
||||
// XXX - probably should be synchronized
|
||||
if (defaultMap == null)
|
||||
defaultMap = new MimetypesFileTypeMap();
|
||||
return defaultMap;
|
||||
public static synchronized FileTypeMap getDefaultFileTypeMap() {
|
||||
if (defaultMap != null)
|
||||
return defaultMap;
|
||||
|
||||
// fetch per-thread-context-class-loader default
|
||||
ClassLoader tccl = SecuritySupport.getContextClassLoader();
|
||||
FileTypeMap def = map.get(tccl);
|
||||
if (def == null) {
|
||||
def = new MimetypesFileTypeMap();
|
||||
map.put(tccl, def);
|
||||
}
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,11 +120,7 @@ import com.sun.activation.registries.LogSupport;
|
|||
public class MailcapCommandMap extends CommandMap {
|
||||
/*
|
||||
* We manage a collection of databases, searched in order.
|
||||
* The default database is shared between all instances
|
||||
* of this class.
|
||||
* XXX - Can we safely share more databases between instances?
|
||||
*/
|
||||
private static MailcapFile defDB = null;
|
||||
private MailcapFile[] DB;
|
||||
private static final int PROG = 0; // programmatically added entries
|
||||
|
||||
|
@ -164,14 +160,10 @@ public class MailcapCommandMap extends CommandMap {
|
|||
loadAllResources(dbv, "META-INF/mailcap");
|
||||
|
||||
LogSupport.log("MailcapCommandMap: load DEF");
|
||||
synchronized (MailcapCommandMap.class) {
|
||||
// see if another instance has created this yet.
|
||||
if (defDB == null)
|
||||
defDB = loadResource("/META-INF/mailcap.default");
|
||||
}
|
||||
mf = loadResource("/META-INF/mailcap.default");
|
||||
|
||||
if (defDB != null)
|
||||
dbv.add(defDB);
|
||||
if (mf != null)
|
||||
dbv.add(mf);
|
||||
|
||||
DB = new MailcapFile[dbv.size()];
|
||||
DB = (MailcapFile[])dbv.toArray(DB);
|
||||
|
|
|
@ -69,11 +69,7 @@ import com.sun.activation.registries.LogSupport;
|
|||
public class MimetypesFileTypeMap extends FileTypeMap {
|
||||
/*
|
||||
* We manage a collection of databases, searched in order.
|
||||
* The default database is shared between all instances
|
||||
* of this class.
|
||||
* XXX - Can we safely share more databases between instances?
|
||||
*/
|
||||
private static MimeTypeFile defDB = null;
|
||||
private MimeTypeFile[] DB;
|
||||
private static final int PROG = 0; // programmatically added entries
|
||||
|
||||
|
@ -114,14 +110,10 @@ public class MimetypesFileTypeMap extends FileTypeMap {
|
|||
loadAllResources(dbv, "META-INF/mime.types");
|
||||
|
||||
LogSupport.log("MimetypesFileTypeMap: load DEF");
|
||||
synchronized (MimetypesFileTypeMap.class) {
|
||||
// see if another instance has created this yet.
|
||||
if (defDB == null)
|
||||
defDB = loadResource("/META-INF/mimetypes.default");
|
||||
}
|
||||
mf = loadResource("/META-INF/mimetypes.default");
|
||||
|
||||
if (defDB != null)
|
||||
dbv.addElement(defDB);
|
||||
if (mf != null)
|
||||
dbv.addElement(mf);
|
||||
|
||||
DB = new MimeTypeFile[dbv.size()];
|
||||
dbv.copyInto(DB);
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.ws.wsdl.parser;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/**
|
||||
* Simple utility ensuring that the value is cached only in case it is non-internal implementation
|
||||
*/
|
||||
abstract class ContextClassloaderLocal<V> {
|
||||
|
||||
private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
|
||||
|
||||
private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
|
||||
|
||||
public V get() throws Error {
|
||||
ClassLoader tccl = getContextClassLoader();
|
||||
V instance = CACHE.get(tccl);
|
||||
if (instance == null) {
|
||||
instance = createNewInstance();
|
||||
CACHE.put(tccl, instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void set(V instance) {
|
||||
CACHE.put(getContextClassLoader(), instance);
|
||||
}
|
||||
|
||||
protected abstract V initialValue() throws Exception;
|
||||
|
||||
private V createNewInstance() {
|
||||
try {
|
||||
return initialValue();
|
||||
} catch (Exception e) {
|
||||
throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String format(String property, Object... args) {
|
||||
String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
|
||||
return MessageFormat.format(text, args);
|
||||
}
|
||||
|
||||
private static ClassLoader getContextClassLoader() {
|
||||
return (ClassLoader)
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ClassLoader cl = null;
|
||||
try {
|
||||
cl = Thread.currentThread().getContextClassLoader();
|
||||
} catch (SecurityException ex) {
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Copyright (c) 2014, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -60,12 +60,10 @@ import java.util.Set;
|
|||
*/
|
||||
public class Internalizer {
|
||||
|
||||
private static final XPathFactory xpf = XmlUtil.newXPathFactory(true);
|
||||
private final XPath xpath = xpf.newXPath();
|
||||
private final XPath xpath = xpf.get().newXPath();
|
||||
private final DOMForest forest;
|
||||
private final ErrorReceiver errorReceiver;
|
||||
|
||||
|
||||
public Internalizer(DOMForest forest, WsimportOptions options, ErrorReceiver errorReceiver) {
|
||||
this.forest = forest;
|
||||
this.errorReceiver = errorReceiver;
|
||||
|
@ -77,6 +75,12 @@ public class Internalizer {
|
|||
}
|
||||
}
|
||||
|
||||
private static final ContextClassloaderLocal<XPathFactory> xpf = new ContextClassloaderLocal<XPathFactory>() {
|
||||
@Override
|
||||
protected XPathFactory initialValue() throws Exception {
|
||||
return XPathFactory.newInstance();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Validates attributes of a <JAXWS:bindings> element.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -54,8 +54,14 @@ import java.util.Map;
|
|||
public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler {
|
||||
|
||||
// xml security enabled always, xpath used for parsing "part" attribute
|
||||
private static final XPathFactory xpf = XmlUtil.newXPathFactory(true);
|
||||
private final XPath xpath = xpf.newXPath();
|
||||
private static final ContextClassloaderLocal<XPathFactory> xpf = new ContextClassloaderLocal<XPathFactory>() {
|
||||
@Override
|
||||
protected XPathFactory initialValue() throws Exception {
|
||||
return XPathFactory.newInstance();
|
||||
}
|
||||
};
|
||||
|
||||
private final XPath xpath = xpf.get().newXPath();
|
||||
|
||||
public JAXWSBindingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
|
||||
super(extensionHandlerMap);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -76,8 +76,6 @@ class Internalizer {
|
|||
|
||||
private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/";
|
||||
|
||||
private static XPathFactory xpf = null;
|
||||
|
||||
private final XPath xpath;
|
||||
|
||||
/**
|
||||
|
@ -99,12 +97,7 @@ class Internalizer {
|
|||
this.errorHandler = forest.getErrorHandler();
|
||||
this.forest = forest;
|
||||
this.enableSCD = enableSCD;
|
||||
synchronized (this) {
|
||||
if (xpf == null) {
|
||||
xpf = XmlFactory.createXPathFactory(disableSecureProcessing);
|
||||
}
|
||||
}
|
||||
xpath = xpf.newXPath();
|
||||
xpath = XmlFactory.createXPathFactory(disableSecureProcessing).newXPath();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -170,7 +163,6 @@ class Internalizer {
|
|||
if( a.getLocalName().equals("multiple") ) //
|
||||
continue;
|
||||
|
||||
|
||||
// TODO: flag error for this undefined attribute
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -27,9 +27,14 @@ package com.sun.xml.internal.bind;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import javax.xml.bind.DatatypeConverterInterface;
|
||||
|
@ -356,7 +361,7 @@ public final class DatatypeConverterImpl implements DatatypeConverterInterface {
|
|||
|
||||
public static GregorianCalendar _parseDateTime(CharSequence s) {
|
||||
String val = WhiteSpaceProcessor.trim(s).toString();
|
||||
return datatypeFactory.newXMLGregorianCalendar(val).toGregorianCalendar();
|
||||
return getDatatypeFactory().newXMLGregorianCalendar(val).toGregorianCalendar();
|
||||
}
|
||||
|
||||
public static String _printDateTime(Calendar val) {
|
||||
|
@ -722,14 +727,30 @@ public final class DatatypeConverterImpl implements DatatypeConverterInterface {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
private static final DatatypeFactory datatypeFactory;
|
||||
|
||||
static {
|
||||
try {
|
||||
datatypeFactory = DatatypeFactory.newInstance();
|
||||
} catch (DatatypeConfigurationException e) {
|
||||
throw new Error(e);
|
||||
private static final Map<ClassLoader, DatatypeFactory> DF_CACHE = Collections.synchronizedMap(new WeakHashMap<ClassLoader, DatatypeFactory>());
|
||||
|
||||
public static DatatypeFactory getDatatypeFactory() {
|
||||
ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
|
||||
public ClassLoader run() {
|
||||
return Thread.currentThread().getContextClassLoader();
|
||||
}
|
||||
});
|
||||
DatatypeFactory df = DF_CACHE.get(tccl);
|
||||
if (df == null) {
|
||||
synchronized (DatatypeConverterImpl.class) {
|
||||
df = DF_CACHE.get(tccl);
|
||||
if (df == null) { // to prevent multiple initialization
|
||||
try {
|
||||
df = DatatypeFactory.newInstance();
|
||||
} catch (DatatypeConfigurationException e) {
|
||||
throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e);
|
||||
}
|
||||
DF_CACHE.put(tccl, df);
|
||||
}
|
||||
}
|
||||
}
|
||||
return df;
|
||||
}
|
||||
|
||||
private static final class CalendarFormatter {
|
||||
|
@ -1045,7 +1066,7 @@ public final class DatatypeConverterImpl implements DatatypeConverterInterface {
|
|||
|
||||
@Deprecated
|
||||
public Calendar parseTime(String lexicalXSDTime) {
|
||||
return datatypeFactory.newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar();
|
||||
return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
@ -1055,7 +1076,7 @@ public final class DatatypeConverterImpl implements DatatypeConverterInterface {
|
|||
|
||||
@Deprecated
|
||||
public Calendar parseDate(String lexicalXSDDate) {
|
||||
return datatypeFactory.newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar();
|
||||
return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
|
@ -23,38 +23,26 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package javax.swing.text.html.parser;
|
||||
package com.sun.xml.internal.bind;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* Simple class to load resources using the 1.2
|
||||
* security model. Since the html support is loaded
|
||||
* lazily, it's resources are potentially fetched with
|
||||
* applet code in the call stack. By providing this
|
||||
* functionality in a class that is only built on 1.2,
|
||||
* reflection can be used from the code that is also
|
||||
* built on 1.1 to call this functionality (and avoid
|
||||
* the evils of preprocessing). This functionality
|
||||
* is called from ParserDelegator.getResourceAsStream.
|
||||
*
|
||||
* @author Timothy Prinzing
|
||||
* Message resources
|
||||
*/
|
||||
class ResourceLoader implements java.security.PrivilegedAction {
|
||||
enum Messages {
|
||||
FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args
|
||||
;
|
||||
|
||||
ResourceLoader(String name) {
|
||||
this.name = name;
|
||||
private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return format();
|
||||
}
|
||||
|
||||
public Object run() {
|
||||
Object o = ParserDelegator.class.getResourceAsStream(name);
|
||||
return o;
|
||||
public String format( Object... args ) {
|
||||
return MessageFormat.format( rb.getString(name()), args );
|
||||
}
|
||||
|
||||
public static InputStream getResourceAsStream(String name) {
|
||||
java.security.PrivilegedAction a = new ResourceLoader(name);
|
||||
return (InputStream) java.security.AccessController.doPrivileged(a);
|
||||
}
|
||||
|
||||
private String name;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#
|
||||
# Copyright (c) 2014, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
FAILED_TO_INITIALE_DATATYPE_FACTORY = \
|
||||
Failed to initialize JAXP 1.3 DatatypeFactory class.
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -60,7 +60,6 @@ enum Messages {
|
|||
PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY, // 2 args
|
||||
|
||||
INVALID_XML_ENUM_VALUE, // 2 arg
|
||||
FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args
|
||||
NO_IMAGE_WRITER, // 1 arg
|
||||
|
||||
ILLEGAL_MIME_TYPE, // 2 args
|
||||
|
|
|
@ -63,9 +63,7 @@ import javax.imageio.ImageWriter;
|
|||
import javax.imageio.stream.ImageOutputStream;
|
||||
import javax.xml.bind.ValidationEvent;
|
||||
import javax.xml.bind.helpers.ValidationEventImpl;
|
||||
import javax.xml.datatype.DatatypeConfigurationException;
|
||||
import javax.xml.datatype.DatatypeConstants;
|
||||
import javax.xml.datatype.DatatypeFactory;
|
||||
import javax.xml.datatype.Duration;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
import javax.xml.namespace.QName;
|
||||
|
@ -574,7 +572,8 @@ public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<
|
|||
|
||||
public XMLGregorianCalendar parse(CharSequence lexical) throws SAXException {
|
||||
try {
|
||||
return datatypeFactory.newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396)
|
||||
return DatatypeConverterImpl.getDatatypeFactory()
|
||||
.newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396)
|
||||
} catch (Exception e) {
|
||||
UnmarshallingContext.getInstance().handleError(e);
|
||||
return null;
|
||||
|
@ -844,7 +843,7 @@ public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<
|
|||
|
||||
public Duration parse(CharSequence lexical) {
|
||||
TODO.checkSpec("JSR222 Issue #42");
|
||||
return datatypeFactory.newDuration(lexical.toString());
|
||||
return DatatypeConverterImpl.getDatatypeFactory().newDuration(lexical.toString());
|
||||
}
|
||||
});
|
||||
primaryList.add(
|
||||
|
@ -885,21 +884,6 @@ public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Cached instance of {@link DatatypeFactory} to create
|
||||
* {@link XMLGregorianCalendar} and {@link Duration}.
|
||||
*/
|
||||
private static final DatatypeFactory datatypeFactory = init();
|
||||
|
||||
private static DatatypeFactory init() {
|
||||
try {
|
||||
return DatatypeFactory.newInstance();
|
||||
} catch (DatatypeConfigurationException e) {
|
||||
throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkXmlGregorianCalendarFieldRef(QName type,
|
||||
XMLGregorianCalendar cal)throws javax.xml.bind.MarshalException{
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
|
|
@ -128,14 +128,6 @@ public final class JAXBContextImpl extends JAXBRIContext {
|
|||
*/
|
||||
private final Map<TypeReference,Bridge> bridges = new LinkedHashMap<TypeReference,Bridge>();
|
||||
|
||||
/**
|
||||
* Shared instance of {@link TransformerFactory}.
|
||||
* Lock before use, because a {@link TransformerFactory} is not thread-safe
|
||||
* whereas {@link JAXBContextImpl} is.
|
||||
* Lazily created.
|
||||
*/
|
||||
private volatile static SAXTransformerFactory tf;
|
||||
|
||||
/**
|
||||
* Shared instance of {@link DocumentBuilder}.
|
||||
* Lock before use. Lazily created.
|
||||
|
@ -705,13 +697,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
|
|||
*/
|
||||
static Transformer createTransformer(boolean disableSecureProcessing) {
|
||||
try {
|
||||
if (tf==null) {
|
||||
synchronized(JAXBContextImpl.class) {
|
||||
if (tf==null) {
|
||||
tf = (SAXTransformerFactory)XmlFactory.createTransformerFactory(disableSecureProcessing);
|
||||
}
|
||||
}
|
||||
}
|
||||
SAXTransformerFactory tf = (SAXTransformerFactory)XmlFactory.createTransformerFactory(disableSecureProcessing);
|
||||
return tf.newTransformer();
|
||||
} catch (TransformerConfigurationException e) {
|
||||
throw new Error(e); // impossible
|
||||
|
@ -723,13 +709,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
|
|||
*/
|
||||
public static TransformerHandler createTransformerHandler(boolean disableSecureProcessing) {
|
||||
try {
|
||||
if (tf==null) {
|
||||
synchronized(JAXBContextImpl.class) {
|
||||
if (tf==null) {
|
||||
tf = (SAXTransformerFactory)XmlFactory.createTransformerFactory(disableSecureProcessing);
|
||||
}
|
||||
}
|
||||
}
|
||||
SAXTransformerFactory tf = (SAXTransformerFactory)XmlFactory.createTransformerFactory(disableSecureProcessing);
|
||||
return tf.newTransformerHandler();
|
||||
} catch (TransformerConfigurationException e) {
|
||||
throw new Error(e); // impossible
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -58,6 +58,7 @@ enum Messages {
|
|||
FAILED_TO_GENERATE_SCHEMA, // 0 args
|
||||
ERROR_PROCESSING_SCHEMA, // 0 args
|
||||
ILLEGAL_CONTENT, // 2 args
|
||||
FAILED_TO_INITIALE_DATATYPE_FACTORY, // 2 args
|
||||
;
|
||||
|
||||
private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -153,7 +153,6 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reference to FI's XMLStreamWriter class, if FI can be loaded.
|
||||
*/
|
||||
|
@ -162,9 +161,8 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl {
|
|||
|
||||
private static Class initFIStAXWriterClass() {
|
||||
try {
|
||||
ClassLoader loader = getClassLoader();
|
||||
Class llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter", true, loader);
|
||||
Class sds = loader.loadClass("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer");
|
||||
Class<?> llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter");
|
||||
Class<?> sds = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer");
|
||||
// Check if StAXDocumentSerializer implements LowLevelFastInfosetStreamWriter
|
||||
if (llfisw.isAssignableFrom(sds))
|
||||
return sds;
|
||||
|
@ -179,8 +177,7 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl {
|
|||
try {
|
||||
if (FI_STAX_WRITER_CLASS == null)
|
||||
return null;
|
||||
ClassLoader loader = getClassLoader();
|
||||
Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput", true, loader);
|
||||
Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput");
|
||||
return c.getConstructor(FI_STAX_WRITER_CLASS, JAXBContextImpl.class);
|
||||
} catch (Throwable e) {
|
||||
return null;
|
||||
|
@ -195,8 +192,7 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl {
|
|||
|
||||
private static Class initStAXExWriterClass() {
|
||||
try {
|
||||
ClassLoader loader = getClassLoader();
|
||||
return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx",true,loader);
|
||||
return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx");
|
||||
} catch (Throwable e) {
|
||||
return null;
|
||||
}
|
||||
|
@ -204,20 +200,11 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl {
|
|||
|
||||
private static Constructor<? extends XmlOutput> initStAXExOutputClass() {
|
||||
try {
|
||||
ClassLoader loader = getClassLoader();
|
||||
Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput",true, loader);
|
||||
Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput");
|
||||
return c.getConstructor(STAXEX_WRITER_CLASS);
|
||||
} catch (Throwable e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static ClassLoader getClassLoader() {
|
||||
ClassLoader cl = SecureLoader.getClassClassLoader(UnmarshallerImpl.class);
|
||||
if (cl == null) {
|
||||
cl = SecureLoader.getContextClassLoader();
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2014, 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
|
||||
|
@ -38,3 +38,6 @@ NO_SETTER = \
|
|||
NO_GETTER = \
|
||||
The property has a setter "{0}" but no getter. \
|
||||
For marshaller, please define getters.
|
||||
|
||||
INVALID_XML_ENUM_VALUE = \
|
||||
"{0}" is not a valid value for {1}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
|
@ -336,9 +336,8 @@ class StAXStreamConnector extends StAXConnector {
|
|||
|
||||
private static Class initFIStAXReaderClass() {
|
||||
try {
|
||||
ClassLoader cl = getClassLoader();
|
||||
Class fisr = cl.loadClass("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader");
|
||||
Class sdp = cl.loadClass("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser");
|
||||
Class<?> fisr = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader");
|
||||
Class<?> sdp = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser");
|
||||
// Check if StAXDocumentParser implements FastInfosetStreamReader
|
||||
if (fisr.isAssignableFrom(sdp))
|
||||
return sdp;
|
||||
|
@ -354,7 +353,7 @@ class StAXStreamConnector extends StAXConnector {
|
|||
if (FI_STAX_READER_CLASS == null)
|
||||
return null;
|
||||
|
||||
Class c = getClassLoader().loadClass(
|
||||
Class c = Class.forName(
|
||||
"com.sun.xml.internal.bind.v2.runtime.unmarshaller.FastInfosetConnector");
|
||||
return c.getConstructor(FI_STAX_READER_CLASS,XmlVisitor.class);
|
||||
} catch (Throwable e) {
|
||||
|
@ -370,7 +369,7 @@ class StAXStreamConnector extends StAXConnector {
|
|||
|
||||
private static Class initStAXExReader() {
|
||||
try {
|
||||
return getClassLoader().loadClass("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx");
|
||||
return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx");
|
||||
} catch (Throwable e) {
|
||||
return null;
|
||||
}
|
||||
|
@ -378,19 +377,11 @@ class StAXStreamConnector extends StAXConnector {
|
|||
|
||||
private static Constructor<? extends StAXConnector> initStAXExConnector() {
|
||||
try {
|
||||
Class c = getClassLoader().loadClass("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector");
|
||||
Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector");
|
||||
return c.getConstructor(STAX_EX_READER_CLASS,XmlVisitor.class);
|
||||
} catch (Throwable e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static ClassLoader getClassLoader() {
|
||||
ClassLoader cl = SecureLoader.getClassClassLoader(UnmarshallerImpl.class);
|
||||
if (cl == null) {
|
||||
cl = SecureLoader.getContextClassLoader();
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,61 +62,6 @@ public class AttachmentPartImpl extends AttachmentPart {
|
|||
Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
|
||||
"com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
|
||||
|
||||
static {
|
||||
try {
|
||||
CommandMap map = CommandMap.getDefaultCommandMap();
|
||||
if (map instanceof MailcapCommandMap) {
|
||||
MailcapCommandMap mailMap = (MailcapCommandMap) map;
|
||||
String hndlrStr = ";;x-java-content-handler=";
|
||||
mailMap.addMailcap(
|
||||
"text/xml"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
|
||||
mailMap.addMailcap(
|
||||
"application/xml"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
|
||||
mailMap.addMailcap(
|
||||
"application/fastinfoset"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler");
|
||||
/* Image DataContentHandler handles all image types
|
||||
mailMap.addMailcap(
|
||||
"image/jpeg"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.JpegDataContentHandler");
|
||||
mailMap.addMailcap(
|
||||
"image/gif"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.GifDataContentHandler"); */
|
||||
/*mailMap.addMailcap(
|
||||
"multipart/*"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");*/
|
||||
mailMap.addMailcap(
|
||||
"image/*"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler");
|
||||
mailMap.addMailcap(
|
||||
"text/plain"
|
||||
+ hndlrStr
|
||||
+ "com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler");
|
||||
} else {
|
||||
throw new SOAPExceptionImpl("Default CommandMap is not a MailcapCommandMap");
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
log.log(
|
||||
Level.SEVERE,
|
||||
"SAAJ0508.soap.cannot.register.handlers",
|
||||
t);
|
||||
if (t instanceof RuntimeException) {
|
||||
throw (RuntimeException) t;
|
||||
} else {
|
||||
throw new RuntimeException(t.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final MimeHeaders headers;
|
||||
private MimeBodyPart rawContent = null;
|
||||
private DataHandler dataHandler = null;
|
||||
|
@ -126,6 +71,12 @@ public class AttachmentPartImpl extends AttachmentPart {
|
|||
|
||||
public AttachmentPartImpl() {
|
||||
headers = new MimeHeaders();
|
||||
|
||||
// initialization from here should cover most of cases;
|
||||
// if not, it would be necessary to call
|
||||
// AttachmentPartImpl.initializeJavaActivationHandlers()
|
||||
// explicitly by programmer
|
||||
initializeJavaActivationHandlers();
|
||||
}
|
||||
|
||||
public AttachmentPartImpl(MIMEPart part) {
|
||||
|
@ -619,4 +570,43 @@ public class AttachmentPartImpl extends AttachmentPart {
|
|||
return headers;
|
||||
}
|
||||
|
||||
public static void initializeJavaActivationHandlers() {
|
||||
// DataHandler.writeTo() may search for DCH. So adding some default ones.
|
||||
try {
|
||||
CommandMap map = CommandMap.getDefaultCommandMap();
|
||||
if (map instanceof MailcapCommandMap) {
|
||||
MailcapCommandMap mailMap = (MailcapCommandMap) map;
|
||||
|
||||
// registering our DCH since javamail's DCH doesn't handle
|
||||
if (!cmdMapInitialized(mailMap)) {
|
||||
mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
|
||||
mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
|
||||
mailMap.addMailcap("application/fastinfoset;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler");
|
||||
mailMap.addMailcap("multipart/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");
|
||||
mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler");
|
||||
mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler");
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
// ignore the exception.
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) {
|
||||
|
||||
// checking fastinfoset handler, since this one is specific to SAAJ
|
||||
CommandInfo[] commands = mailMap.getAllCommands("application/fastinfoset");
|
||||
if (commands == null || commands.length == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String saajClassName = "com.sun.xml.internal.ws.binding.FastInfosetDataContentHandler";
|
||||
for (CommandInfo command : commands) {
|
||||
String commandClass = command.getCommandClass();
|
||||
if (saajClassName.equals(commandClass)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.messaging.saaj.soap;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/**
|
||||
* Simple utility ensuring that the value is cached only in case it is non-internal implementation
|
||||
*/
|
||||
abstract class ContextClassloaderLocal<V> {
|
||||
|
||||
private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
|
||||
|
||||
private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
|
||||
|
||||
public V get() throws Error {
|
||||
ClassLoader tccl = getContextClassLoader();
|
||||
V instance = CACHE.get(tccl);
|
||||
if (instance == null) {
|
||||
instance = createNewInstance();
|
||||
CACHE.put(tccl, instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void set(V instance) {
|
||||
CACHE.put(getContextClassLoader(), instance);
|
||||
}
|
||||
|
||||
protected abstract V initialValue() throws Exception;
|
||||
|
||||
private V createNewInstance() {
|
||||
try {
|
||||
return initialValue();
|
||||
} catch (Exception e) {
|
||||
throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String format(String property, Object... args) {
|
||||
String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
|
||||
return MessageFormat.format(text, args);
|
||||
}
|
||||
|
||||
private static ClassLoader getContextClassLoader() {
|
||||
return (ClassLoader)
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ClassLoader cl = null;
|
||||
try {
|
||||
cl = Thread.currentThread().getContextClassLoader();
|
||||
} catch (SecurityException ex) {
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Copyright (c) 2014, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue