--- a/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
bbe43d712fe08e650808d774861b256ccb34e500 jdk8-b102
30a1d677a20c6a95f98043d8f20ce570304e3818 jdk8-b103
b5ed503c26ad38869c247c5e32debec217fd056b jdk8-b104
+589f4fdc584e373a47cde0162e9eceec9165c381 jdk8-b105
+514b0b69fb9683ef52062fd962a3e0644431f64d jdk8-b106
--- a/.hgtags-top-repo Wed Sep 04 19:58:16 2013 +0530
+++ b/.hgtags-top-repo Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
5eb3c1dc348f72a7f84f7d9d07834e8bbe09a799 jdk8-b102
b7e64be81c8a7690703df5711f4fc2375da8a9cb jdk8-b103
96c1b9b7524b52c3fcefc90ffad4c767396727c8 jdk8-b104
+5166118c59178b5d31001bc4058e92486ee07d9b jdk8-b105
+8e7b4d9fb00fdf1334376aeac050c9bca6d1b383 jdk8-b106
--- a/NewMakefile.gmk Wed Sep 04 19:58:16 2013 +0530
+++ b/NewMakefile.gmk Fri Sep 06 14:20:58 2013 -0700
@@ -69,11 +69,11 @@
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
- $(MAKE) -p -q -f common/makefiles/Main.gmk SPEC=$(firstword $(SPEC)) | \
+ $(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
$(all_phony_targets):
- $(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
+ @$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
.PHONY: $(all_phony_targets)
@@ -98,6 +98,7 @@
$(info . # corba and jdk)
$(info . make all # Compile everything, all repos and images)
$(info . make images # Create complete j2sdk and j2re images)
+ $(info . make docs # Create javadocs)
$(info . make overlay-images # Create limited images for sparc 64 bit platforms)
$(info . make profiles # Create complete j2re compact profile images)
$(info . make bootcycle-images # Build images twice, second time with newly build JDK)
@@ -109,7 +110,7 @@
$(info . make test # Run tests, default is all tests (see TEST below))
$(info )
$(info Targets for specific components)
- $(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
+ $(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, nashorn, images, overlay-images, docs or test))
$(info . make <component> # Build <component> and everything it depends on. )
$(info . make <component>-only # Build <component> only, without dependencies. This)
$(info . # is faster but can result in incorrect build results!)
--- a/README-builds.html Wed Sep 04 19:58:16 2013 +0530
+++ b/README-builds.html Fri Sep 06 14:20:58 2013 -0700
@@ -1210,19 +1210,18 @@
<blockquote>
<p>
- <b>Q:</b> The <code>configure</code> file looks horrible!
+ <b>Q:</b> The <code>generated-configure.sh</code> file looks horrible!
How are you going to edit it?
<br>
- <b>A:</b> The <code>configure</code> file is generated (think
+ <b>A:</b> The <code>generated-configure.sh</code> file is generated (think
"compiled") by the autoconf tools. The source code is
- in <code>configure.ac</code> various .m4 files in common/autoconf,
- which are
- much more readable.
+ in <code>configure.ac</code> and various .m4 files in common/autoconf,
+ which are much more readable.
</p>
<p>
<b>Q:</b>
- Why is the <code>configure</code> file checked in,
+ Why is the <code>generated-configure.sh</code> file checked in,
if it is generated?
<br>
<b>A:</b>
@@ -1237,13 +1236,29 @@
<p>
<b>Q:</b>
Do you require a specific version of autoconf for regenerating
- <code>configure</code>?
+ <code>generated-configure.sh</code>?
<br>
<b>A:</b>
- Currently, no, but this will likely be the case when things have
- settled down a bit more. (The reason for this is to avoid
- large spurious changes in <code>configure</code>
- in commits that made small changes to <code>configure.ac</code>).
+ Yes, version 2.69 is required and should be easy
+ enough to aquire on all supported operating
+ systems. The reason for this is to avoid
+ large spurious changes in <code>generated-configure.sh</code>.
+ </p>
+
+ <p>
+ <b>Q:</b>
+ How do you regenerate <code>generated-configure.sh</code>
+ after making changes to the input files?
+ <br>
+ <b>A:</b>
+ Regnerating <code>generated-configure.sh</code>
+ should always be done using the
+ script <code>common/autoconf/autogen.sh</code> to
+ ensure that the correct files get updated. This
+ script should also be run after mercurial tries to
+ merge <code>generated-configure.sh</code> as a
+ merge of the generated file is not guaranteed to
+ be correct.
</p>
<p>
--- a/common/autoconf/autogen.sh Wed Sep 04 19:58:16 2013 +0530
+++ b/common/autoconf/autogen.sh Fri Sep 06 14:20:58 2013 -0700
@@ -44,10 +44,8 @@
custom_hook=$custom_script_dir/custom-hook.m4
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
-AUTOCONF_267="`which autoconf-2.67 2> /dev/null | grep -v '^no autoconf-2.67 in'`"
echo "Autoconf found: ${AUTOCONF}"
-echo "Autoconf-2.67 found: ${AUTOCONF_267}"
if test "x${AUTOCONF}" = x; then
echo You need autoconf installed to be able to regenerate the configure script
@@ -55,10 +53,6 @@
exit 1
fi
-if test "x${AUTOCONF_267}" != x; then
- AUTOCONF=${AUTOCONF_267};
-fi
-
echo Generating generated-configure.sh with ${AUTOCONF}
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh
rm -rf autom4te.cache
--- a/common/autoconf/configure.ac Wed Sep 04 19:58:16 2013 +0530
+++ b/common/autoconf/configure.ac Fri Sep 06 14:20:58 2013 -0700
@@ -30,7 +30,7 @@
###############################################################################
-AC_PREREQ([2.61])
+AC_PREREQ([2.69])
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
AC_CONFIG_AUX_DIR([build-aux])
--- a/common/autoconf/generated-configure.sh Wed Sep 04 19:58:16 2013 +0530
+++ b/common/autoconf/generated-configure.sh Fri Sep 06 14:20:58 2013 -0700
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
+# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
#
# Report bugs to <build-dev@openjdk.java.net>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -91,6 +89,7 @@
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -135,6 +134,31 @@
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -168,7 +192,8 @@
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -213,14 +238,25 @@
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -323,6 +359,14 @@
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -444,6 +488,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -478,16 +526,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -499,28 +547,8 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1462,7 +1490,7 @@
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1513,8 +1541,6 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1898,9 +1924,9 @@
if $ac_init_version; then
cat <<\_ACEOF
OpenJDK configure jdk8
-generated by GNU Autoconf 2.67
-
-Copyright (C) 2010 Free Software Foundation, Inc.
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1944,7 +1970,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1982,7 +2008,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
@@ -2020,7 +2046,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_objc_try_compile
@@ -2057,7 +2083,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -2094,7 +2120,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_cpp
@@ -2107,10 +2133,10 @@
ac_fn_cxx_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2177,7 +2203,7 @@
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2186,7 +2212,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_header_mongrel
@@ -2227,7 +2253,7 @@
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_run
@@ -2241,7 +2267,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2259,7 +2285,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_header_compile
@@ -2280,7 +2306,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2296,7 +2323,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2322,7 +2350,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2338,7 +2367,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2372,7 +2402,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2436,7 +2467,7 @@
rm -f conftest.val
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_compute_int
@@ -2468,7 +2499,7 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2482,7 +2513,7 @@
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
@@ -2495,7 +2526,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2550,7 +2581,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_func
@@ -2563,7 +2594,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2581,7 +2612,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
cat >config.log <<_ACEOF
@@ -2589,7 +2620,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by OpenJDK $as_me jdk8, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2847,7 +2878,7 @@
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -3433,7 +3464,7 @@
pulse)
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
x11)
- PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
+ PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
* )
@@ -3452,11 +3483,11 @@
cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype2)
- PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
+ PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
- PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
+ PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
* )
@@ -3787,7 +3818,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1376579640
+DATE_WHEN_GENERATED=1378914658
###############################################################################
#
@@ -3825,7 +3856,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_BASENAME+set}" = set; then :
+if ${ac_cv_path_BASENAME+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BASENAME in
@@ -3839,7 +3870,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3884,7 +3915,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_BASH+set}" = set; then :
+if ${ac_cv_path_BASH+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BASH in
@@ -3898,7 +3929,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3943,7 +3974,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CAT+set}" = set; then :
+if ${ac_cv_path_CAT+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CAT in
@@ -3957,7 +3988,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4002,7 +4033,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHMOD+set}" = set; then :
+if ${ac_cv_path_CHMOD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHMOD in
@@ -4016,7 +4047,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4061,7 +4092,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CMP+set}" = set; then :
+if ${ac_cv_path_CMP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CMP in
@@ -4075,7 +4106,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4120,7 +4151,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_COMM+set}" = set; then :
+if ${ac_cv_path_COMM+:} false; then :
$as_echo_n "(cached) " >&6
else
case $COMM in
@@ -4134,7 +4165,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4179,7 +4210,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CP+set}" = set; then :
+if ${ac_cv_path_CP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CP in
@@ -4193,7 +4224,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4238,7 +4269,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CPIO+set}" = set; then :
+if ${ac_cv_path_CPIO+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CPIO in
@@ -4252,7 +4283,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4297,7 +4328,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CUT+set}" = set; then :
+if ${ac_cv_path_CUT+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CUT in
@@ -4311,7 +4342,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4356,7 +4387,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DATE+set}" = set; then :
+if ${ac_cv_path_DATE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $DATE in
@@ -4370,7 +4401,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4415,7 +4446,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DIFF+set}" = set; then :
+if ${ac_cv_path_DIFF+:} false; then :
$as_echo_n "(cached) " >&6
else
case $DIFF in
@@ -4429,7 +4460,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4474,7 +4505,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DIRNAME+set}" = set; then :
+if ${ac_cv_path_DIRNAME+:} false; then :
$as_echo_n "(cached) " >&6
else
case $DIRNAME in
@@ -4488,7 +4519,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4533,7 +4564,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ECHO+set}" = set; then :
+if ${ac_cv_path_ECHO+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ECHO in
@@ -4547,7 +4578,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4592,7 +4623,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_EXPR+set}" = set; then :
+if ${ac_cv_path_EXPR+:} false; then :
$as_echo_n "(cached) " >&6
else
case $EXPR in
@@ -4606,7 +4637,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4651,7 +4682,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_FILE+set}" = set; then :
+if ${ac_cv_path_FILE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $FILE in
@@ -4665,7 +4696,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4710,7 +4741,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_FIND+set}" = set; then :
+if ${ac_cv_path_FIND+:} false; then :
$as_echo_n "(cached) " >&6
else
case $FIND in
@@ -4724,7 +4755,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4769,7 +4800,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HEAD+set}" = set; then :
+if ${ac_cv_path_HEAD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $HEAD in
@@ -4783,7 +4814,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4828,7 +4859,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LN+set}" = set; then :
+if ${ac_cv_path_LN+:} false; then :
$as_echo_n "(cached) " >&6
else
case $LN in
@@ -4842,7 +4873,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4887,7 +4918,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LS+set}" = set; then :
+if ${ac_cv_path_LS+:} false; then :
$as_echo_n "(cached) " >&6
else
case $LS in
@@ -4901,7 +4932,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4946,7 +4977,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MKDIR+set}" = set; then :
+if ${ac_cv_path_MKDIR+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MKDIR in
@@ -4960,7 +4991,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5005,7 +5036,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MKTEMP+set}" = set; then :
+if ${ac_cv_path_MKTEMP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MKTEMP in
@@ -5019,7 +5050,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5064,7 +5095,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MV+set}" = set; then :
+if ${ac_cv_path_MV+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MV in
@@ -5078,7 +5109,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5123,7 +5154,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PRINTF+set}" = set; then :
+if ${ac_cv_path_PRINTF+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PRINTF in
@@ -5137,7 +5168,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5182,7 +5213,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_RM+set}" = set; then :
+if ${ac_cv_path_RM+:} false; then :
$as_echo_n "(cached) " >&6
else
case $RM in
@@ -5196,7 +5227,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5241,7 +5272,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SH+set}" = set; then :
+if ${ac_cv_path_SH+:} false; then :
$as_echo_n "(cached) " >&6
else
case $SH in
@@ -5255,7 +5286,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5300,7 +5331,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SORT+set}" = set; then :
+if ${ac_cv_path_SORT+:} false; then :
$as_echo_n "(cached) " >&6
else
case $SORT in
@@ -5314,7 +5345,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5359,7 +5390,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TAIL+set}" = set; then :
+if ${ac_cv_path_TAIL+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TAIL in
@@ -5373,7 +5404,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5418,7 +5449,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TAR+set}" = set; then :
+if ${ac_cv_path_TAR+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TAR in
@@ -5432,7 +5463,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5477,7 +5508,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TEE+set}" = set; then :
+if ${ac_cv_path_TEE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TEE in
@@ -5491,7 +5522,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5536,7 +5567,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TOUCH+set}" = set; then :
+if ${ac_cv_path_TOUCH+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TOUCH in
@@ -5550,7 +5581,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5595,7 +5626,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TR+set}" = set; then :
+if ${ac_cv_path_TR+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TR in
@@ -5609,7 +5640,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5654,7 +5685,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UNAME+set}" = set; then :
+if ${ac_cv_path_UNAME+:} false; then :
$as_echo_n "(cached) " >&6
else
case $UNAME in
@@ -5668,7 +5699,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5713,7 +5744,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UNIQ+set}" = set; then :
+if ${ac_cv_path_UNIQ+:} false; then :
$as_echo_n "(cached) " >&6
else
case $UNIQ in
@@ -5727,7 +5758,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5772,7 +5803,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_WC+set}" = set; then :
+if ${ac_cv_path_WC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $WC in
@@ -5786,7 +5817,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5831,7 +5862,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_WHICH+set}" = set; then :
+if ${ac_cv_path_WHICH+:} false; then :
$as_echo_n "(cached) " >&6
else
case $WHICH in
@@ -5845,7 +5876,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5890,7 +5921,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XARGS+set}" = set; then :
+if ${ac_cv_path_XARGS+:} false; then :
$as_echo_n "(cached) " >&6
else
case $XARGS in
@@ -5904,7 +5935,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5950,7 +5981,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -5962,7 +5993,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6000,7 +6031,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -6014,7 +6045,7 @@
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -6075,7 +6106,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -6092,7 +6123,7 @@
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -6154,7 +6185,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -6171,7 +6202,7 @@
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
@@ -6233,7 +6264,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -6253,7 +6284,7 @@
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -6319,7 +6350,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_NAWK+set}" = set; then :
+if ${ac_cv_path_NAWK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $NAWK in
@@ -6333,7 +6364,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6383,7 +6414,7 @@
set dummy cygpath; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CYGPATH+set}" = set; then :
+if ${ac_cv_path_CYGPATH+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CYGPATH in
@@ -6397,7 +6428,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6423,7 +6454,7 @@
set dummy readlink; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READLINK+set}" = set; then :
+if ${ac_cv_path_READLINK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $READLINK in
@@ -6437,7 +6468,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6463,7 +6494,7 @@
set dummy df; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DF+set}" = set; then :
+if ${ac_cv_path_DF+:} false; then :
$as_echo_n "(cached) " >&6
else
case $DF in
@@ -6477,7 +6508,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6503,7 +6534,7 @@
set dummy SetFile; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SETFILE+set}" = set; then :
+if ${ac_cv_path_SETFILE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $SETFILE in
@@ -6517,7 +6548,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6549,7 +6580,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
@@ -6565,7 +6596,7 @@
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -6583,7 +6614,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
@@ -6598,7 +6629,7 @@
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -6616,7 +6647,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
+if ${ac_cv_target+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$target_alias" = x; then
@@ -6631,7 +6662,7 @@
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
@@ -6744,6 +6775,18 @@
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
+ s390)
+ VAR_CPU=s390
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ s390x)
+ VAR_CPU=s390x
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
@@ -6852,6 +6895,18 @@
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
+ s390)
+ VAR_CPU=s390
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ s390x)
+ VAR_CPU=s390x
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
@@ -8157,7 +8212,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
+if ${ac_cv_prog_PKGHANDLER+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PKGHANDLER"; then
@@ -8169,7 +8224,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PKGHANDLER="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8522,7 +8577,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
+if ${ac_cv_path_CHECK_GMAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_GMAKE in
@@ -8536,7 +8591,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8876,7 +8931,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
+if ${ac_cv_path_CHECK_MAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_MAKE in
@@ -8890,7 +8945,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9235,7 +9290,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
+if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_TOOLSDIR_GMAKE in
@@ -9249,7 +9304,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9588,7 +9643,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
+if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_TOOLSDIR_MAKE in
@@ -9602,7 +9657,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9984,7 +10039,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UNZIP+set}" = set; then :
+if ${ac_cv_path_UNZIP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $UNZIP in
@@ -9998,7 +10053,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10043,7 +10098,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ZIP+set}" = set; then :
+if ${ac_cv_path_ZIP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ZIP in
@@ -10057,7 +10112,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10102,7 +10157,7 @@
set dummy ldd; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LDD+set}" = set; then :
+if ${ac_cv_path_LDD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $LDD in
@@ -10116,7 +10171,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10148,7 +10203,7 @@
set dummy otool; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OTOOL+set}" = set; then :
+if ${ac_cv_path_OTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
case $OTOOL in
@@ -10162,7 +10217,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10193,7 +10248,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READELF+set}" = set; then :
+if ${ac_cv_path_READELF+:} false; then :
$as_echo_n "(cached) " >&6
else
case $READELF in
@@ -10207,7 +10262,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10236,7 +10291,7 @@
set dummy hg; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HG+set}" = set; then :
+if ${ac_cv_path_HG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $HG in
@@ -10250,7 +10305,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10276,7 +10331,7 @@
set dummy stat; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_STAT+set}" = set; then :
+if ${ac_cv_path_STAT+:} false; then :
$as_echo_n "(cached) " >&6
else
case $STAT in
@@ -10290,7 +10345,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10316,7 +10371,7 @@
set dummy time; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TIME+set}" = set; then :
+if ${ac_cv_path_TIME+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TIME in
@@ -10330,7 +10385,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10369,7 +10424,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_COMM+set}" = set; then :
+if ${ac_cv_path_COMM+:} false; then :
$as_echo_n "(cached) " >&6
else
case $COMM in
@@ -10383,7 +10438,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10431,7 +10486,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XATTR+set}" = set; then :
+if ${ac_cv_path_XATTR+:} false; then :
$as_echo_n "(cached) " >&6
else
case $XATTR in
@@ -10445,7 +10500,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10487,7 +10542,7 @@
set dummy codesign; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CODESIGN+set}" = set; then :
+if ${ac_cv_path_CODESIGN+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CODESIGN in
@@ -10501,7 +10556,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10551,7 +10606,7 @@
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
@@ -10565,7 +10620,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10594,7 +10649,7 @@
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
@@ -10608,7 +10663,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10767,7 +10822,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
+if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$BDEPS_UNZIP"; then
@@ -10779,7 +10834,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_BDEPS_UNZIP="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10813,7 +10868,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
+if ${ac_cv_prog_BDEPS_FTP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$BDEPS_FTP"; then
@@ -10825,7 +10880,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_BDEPS_FTP="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12109,7 +12164,7 @@
set dummy javac; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
+if ${ac_cv_path_JAVAC_CHECK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $JAVAC_CHECK in
@@ -12123,7 +12178,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12149,7 +12204,7 @@
set dummy java; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
+if ${ac_cv_path_JAVA_CHECK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $JAVA_CHECK in
@@ -12163,7 +12218,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -16478,7 +16533,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JTREGEXE+set}" = set; then :
+if ${ac_cv_path_JTREGEXE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $JTREGEXE in
@@ -16492,7 +16547,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -16546,7 +16601,7 @@
set dummy link; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
+if ${ac_cv_path_CYGWIN_LINK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CYGWIN_LINK in
@@ -16560,7 +16615,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -17989,7 +18044,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_BUILD_CC+set}" = set; then :
+if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CC in
@@ -18003,7 +18058,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -18300,7 +18355,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
+if ${ac_cv_path_BUILD_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CXX in
@@ -18314,7 +18369,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -18609,7 +18664,7 @@
set dummy ld; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_BUILD_LD+set}" = set; then :
+if ${ac_cv_path_BUILD_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_LD in
@@ -18623,7 +18678,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19116,7 +19171,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
+if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TOOLS_DIR_CC in
@@ -19130,7 +19185,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19168,7 +19223,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
+if ${ac_cv_path_POTENTIAL_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $POTENTIAL_CC in
@@ -19182,7 +19237,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19581,7 +19636,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
+if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PROPER_COMPILER_CC"; then
@@ -19593,7 +19648,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19625,7 +19680,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_PROPER_COMPILER_CC"; then
@@ -19637,7 +19692,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20075,7 +20130,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -20087,7 +20142,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20119,7 +20174,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -20131,7 +20186,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20172,7 +20227,7 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -20287,7 +20342,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -20330,7 +20385,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -20389,7 +20444,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
@@ -20400,7 +20455,7 @@
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20441,7 +20496,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -20451,7 +20506,7 @@
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20488,7 +20543,7 @@
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -20566,7 +20621,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -20575,8 +20630,7 @@
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -20689,7 +20743,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
+if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $TOOLS_DIR_CXX in
@@ -20703,7 +20757,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20741,7 +20795,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
+if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $POTENTIAL_CXX in
@@ -20755,7 +20809,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21154,7 +21208,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
+if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PROPER_COMPILER_CXX"; then
@@ -21166,7 +21220,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21198,7 +21252,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
@@ -21210,7 +21264,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21652,7 +21706,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -21664,7 +21718,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21696,7 +21750,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -21708,7 +21762,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21774,7 +21828,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -21811,7 +21865,7 @@
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -21909,7 +21963,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJC+set}" = set; then :
+if ${ac_cv_prog_OBJC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OBJC"; then
@@ -21921,7 +21975,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21953,7 +22007,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJC"; then
@@ -21965,7 +22019,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22029,7 +22083,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
-if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
+if ${ac_cv_objc_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22066,7 +22120,7 @@
ac_save_OBJCFLAGS=$OBJCFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
-if test "${ac_cv_prog_objc_g+set}" = set; then :
+if ${ac_cv_prog_objc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_objc_werror_flag=$ac_objc_werror_flag
@@ -22442,7 +22496,7 @@
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
@@ -22454,7 +22508,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22482,7 +22536,7 @@
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
@@ -22494,7 +22548,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22824,7 +22878,7 @@
set dummy link; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINLD+set}" = set; then :
+if ${ac_cv_prog_WINLD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$WINLD"; then
@@ -22837,7 +22891,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
ac_prog_rejected=yes
continue
@@ -23163,7 +23217,7 @@
set dummy mt; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_MT+set}" = set; then :
+if ${ac_cv_prog_MT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$MT"; then
@@ -23176,7 +23230,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
ac_prog_rejected=yes
continue
@@ -23484,7 +23538,7 @@
set dummy rc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RC+set}" = set; then :
+if ${ac_cv_prog_RC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RC"; then
@@ -23497,7 +23551,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
ac_prog_rejected=yes
continue
@@ -23876,7 +23930,7 @@
set dummy lib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINAR+set}" = set; then :
+if ${ac_cv_prog_WINAR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$WINAR"; then
@@ -23888,7 +23942,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_WINAR="lib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -24182,7 +24236,7 @@
set dummy dumpbin; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$DUMPBIN"; then
@@ -24194,7 +24248,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="dumpbin"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -24501,7 +24555,7 @@
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -24617,7 +24671,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
@@ -24901,7 +24955,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
@@ -25017,7 +25071,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
@@ -25319,7 +25373,7 @@
set dummy as; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_AS+set}" = set; then :
+if ${ac_cv_path_AS+:} false; then :
$as_echo_n "(cached) " >&6
else
case $AS in
@@ -25333,7 +25387,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -25631,7 +25685,7 @@
set dummy nm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_NM+set}" = set; then :
+if ${ac_cv_path_NM+:} false; then :
$as_echo_n "(cached) " >&6
else
case $NM in
@@ -25645,7 +25699,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -25937,7 +25991,7 @@
set dummy gnm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GNM+set}" = set; then :
+if ${ac_cv_path_GNM+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GNM in
@@ -25951,7 +26005,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -26243,7 +26297,7 @@
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_STRIP+set}" = set; then :
+if ${ac_cv_path_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $STRIP in
@@ -26257,7 +26311,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -26549,7 +26603,7 @@
set dummy mcs; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MCS+set}" = set; then :
+if ${ac_cv_path_MCS+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MCS in
@@ -26563,7 +26617,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -26857,7 +26911,7 @@
set dummy ${ac_tool_prefix}nm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NM+set}" = set; then :
+if ${ac_cv_prog_NM+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
@@ -26869,7 +26923,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NM="${ac_tool_prefix}nm"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -26897,7 +26951,7 @@
set dummy nm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NM+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_NM"; then
@@ -26909,7 +26963,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NM="nm"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -27217,7 +27271,7 @@
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -27229,7 +27283,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -27257,7 +27311,7 @@
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -27269,7 +27323,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -27582,7 +27636,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
+if ${ac_cv_prog_OBJCOPY+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OBJCOPY"; then
@@ -27594,7 +27648,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -27626,7 +27680,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJCOPY"; then
@@ -27638,7 +27692,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -27953,7 +28007,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OBJDUMP"; then
@@ -27965,7 +28019,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -27997,7 +28051,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJDUMP"; then
@@ -28009,7 +28063,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -28321,7 +28375,7 @@
set dummy lipo; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LIPO+set}" = set; then :
+if ${ac_cv_path_LIPO+:} false; then :
$as_echo_n "(cached) " >&6
else
case $LIPO in
@@ -28335,7 +28389,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -28638,7 +28692,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -28813,7 +28867,7 @@
for ac_header in stdio.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdio_h" = x""yes; then :
+if test "x$ac_cv_header_stdio_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDIO_H 1
_ACEOF
@@ -28842,7 +28896,7 @@
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
$as_echo_n "checking size of int *... " >&6; }
-if test "${ac_cv_sizeof_int_p+set}" = set; then :
+if ${ac_cv_sizeof_int_p+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
@@ -28852,7 +28906,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int *)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int_p=0
fi
@@ -28899,7 +28953,7 @@
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
+if ${ac_cv_c_bigendian+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_bigendian=unknown
@@ -30075,8 +30129,8 @@
have_x=disabled
else
case $x_includes,$x_libraries in #(
- *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
$as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
@@ -30353,7 +30407,7 @@
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30387,14 +30441,14 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30428,7 +30482,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi
@@ -30447,14 +30501,14 @@
# The functions gethostbyname, getservbyname, and inet_addr are
# in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
fi
if test $ac_cv_func_gethostbyname = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30488,14 +30542,14 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi
if test $ac_cv_lib_nsl_gethostbyname = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30529,7 +30583,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi
@@ -30544,14 +30598,14 @@
# must be given before -lnsl if both are needed. We assume that
# if connect needs -lnsl, so does gethostbyname.
ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = x""yes; then :
+if test "x$ac_cv_func_connect" = xyes; then :
fi
if test $ac_cv_func_connect = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
$as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then :
+if ${ac_cv_lib_socket_connect+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30585,7 +30639,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+if test "x$ac_cv_lib_socket_connect" = xyes; then :
X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi
@@ -30593,14 +30647,14 @@
# Guillermo Gomez says -lposix is necessary on A/UX.
ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = x""yes; then :
+if test "x$ac_cv_func_remove" = xyes; then :
fi
if test $ac_cv_func_remove = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
$as_echo_n "checking for remove in -lposix... " >&6; }
-if test "${ac_cv_lib_posix_remove+set}" = set; then :
+if ${ac_cv_lib_posix_remove+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30634,7 +30688,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
$as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+if test "x$ac_cv_lib_posix_remove" = xyes; then :
X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi
@@ -30642,14 +30696,14 @@
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = x""yes; then :
+if test "x$ac_cv_func_shmat" = xyes; then :
fi
if test $ac_cv_func_shmat = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
$as_echo_n "checking for shmat in -lipc... " >&6; }
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+if ${ac_cv_lib_ipc_shmat+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30683,7 +30737,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi
@@ -30701,7 +30755,7 @@
# John Interrante, Karl Berry
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30735,7 +30789,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi
@@ -30816,7 +30870,7 @@
CFLAGS="$CFLAGS $X_CFLAGS"
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
-for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
+for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
@@ -30869,7 +30923,7 @@
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi
- as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
+ as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
fi
@@ -31753,7 +31807,7 @@
LDFLAGS="$FREETYPE2_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
-if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
+if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -31787,7 +31841,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
-if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
+if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
FREETYPE2_FOUND=true
else
as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
@@ -32075,7 +32129,7 @@
for ac_header in alsa/asoundlib.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
+if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ALSA_ASOUNDLIB_H 1
_ACEOF
@@ -32134,7 +32188,7 @@
USE_EXTERNAL_LIBJPEG=true
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
$as_echo_n "checking for main in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_main+set}" = set; then :
+if ${ac_cv_lib_jpeg_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32162,7 +32216,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
$as_echo "$ac_cv_lib_jpeg_main" >&6; }
-if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
+if test "x$ac_cv_lib_jpeg_main" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJPEG 1
_ACEOF
@@ -32211,7 +32265,7 @@
USE_EXTERNAL_LIBGIF=false
elif test "x${with_giflib}" = "xsystem"; then
ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
-if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
+if test "x$ac_cv_header_gif_lib_h" = xyes; then :
else
as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
@@ -32220,7 +32274,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
-if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
+if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32254,7 +32308,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
-if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
+if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGIF 1
_ACEOF
@@ -32286,7 +32340,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
$as_echo_n "checking for compress in -lz... " >&6; }
-if test "${ac_cv_lib_z_compress+set}" = set; then :
+if ${ac_cv_lib_z_compress+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32320,7 +32374,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
$as_echo "$ac_cv_lib_z_compress" >&6; }
-if test "x$ac_cv_lib_z_compress" = x""yes; then :
+if test "x$ac_cv_lib_z_compress" = xyes; then :
ZLIB_FOUND=yes
else
ZLIB_FOUND=no
@@ -32413,7 +32467,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
+if ${ac_cv_lib_m_cos+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32447,7 +32501,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
+if test "x$ac_cv_lib_m_cos" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBM 1
_ACEOF
@@ -32471,7 +32525,7 @@
LIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32505,7 +32559,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBDL 1
_ACEOF
@@ -32735,7 +32789,7 @@
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
@@ -32751,7 +32805,7 @@
set dummy llvm-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$LLVM_CONFIG"; then
@@ -32763,7 +32817,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LLVM_CONFIG="llvm-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -33367,7 +33421,7 @@
set dummy ccache; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CCACHE+set}" = set; then :
+if ${ac_cv_path_CCACHE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CCACHE in
@@ -33381,7 +33435,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -33629,10 +33683,21 @@
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -33664,7 +33729,7 @@
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -33765,6 +33830,7 @@
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -33960,16 +34026,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -34029,28 +34095,16 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -34072,7 +34126,7 @@
# values after options handling.
ac_log="
This file was extended by OpenJDK $as_me jdk8, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -34135,10 +34189,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
OpenJDK config.status jdk8
-configured by $0, generated by GNU Autoconf 2.67,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -34227,7 +34281,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -34264,7 +34318,7 @@
"$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
"$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -34286,9 +34340,10 @@
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -34296,12 +34351,13 @@
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -34323,7 +34379,7 @@
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -34351,7 +34407,7 @@
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -34399,7 +34455,7 @@
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -34431,7 +34487,7 @@
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
@@ -34465,7 +34521,7 @@
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -34477,8 +34533,8 @@
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -34579,7 +34635,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -34598,7 +34654,7 @@
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -34607,7 +34663,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -34633,8 +34689,8 @@
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -34759,21 +34815,22 @@
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
@@ -34784,20 +34841,20 @@
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
+ mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
--- a/common/autoconf/help.m4 Wed Sep 04 19:58:16 2013 +0530
+++ b/common/autoconf/help.m4 Fri Sep 06 14:20:58 2013 -0700
@@ -83,7 +83,7 @@
pulse)
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
x11)
- PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
+ PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
* )
@@ -102,11 +102,11 @@
cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype2)
- PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
+ PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
- PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
+ PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
* )
--- a/common/autoconf/libraries.m4 Wed Sep 04 19:58:16 2013 +0530
+++ b/common/autoconf/libraries.m4 Fri Sep 06 14:20:58 2013 -0700
@@ -185,7 +185,7 @@
CFLAGS="$CFLAGS $X_CFLAGS"
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
-AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
+AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
[X11_A_OK=yes],
[X11_A_OK=no; break],
[ # include <X11/Xlib.h>
@@ -197,7 +197,7 @@
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
HELP_MSG_MISSING_DEPENDENCY([x11])
- AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG])
+ AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
fi
AC_SUBST(X_CFLAGS)
--- a/common/autoconf/platform.m4 Wed Sep 04 19:58:16 2013 +0530
+++ b/common/autoconf/platform.m4 Fri Sep 06 14:20:58 2013 -0700
@@ -60,6 +60,18 @@
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
+ s390)
+ VAR_CPU=s390
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ s390x)
+ VAR_CPU=s390x
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
--- a/common/makefiles/Main.gmk Wed Sep 04 19:58:16 2013 +0530
+++ b/common/makefiles/Main.gmk Fri Sep 06 14:20:58 2013 -0700
@@ -183,7 +183,7 @@
test: images test-only
test-only: start-make
@$(call TargetEnter)
- @($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) JPRT_JAVA_HOME=$(JDK_IMAGE_DIR) ALT_OUTPUTDIR=$(OUTPUT_ROOT) CONCURRENCY=$(JOBS) $(TEST)) || true
+ @($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) ALT_OUTPUTDIR=$(OUTPUT_ROOT) CONCURRENCY=$(JOBS) $(TEST)) || true
@$(call TargetExit)
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
@@ -242,7 +242,7 @@
.PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install test docs
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only test-only docs-only
-.PHONY: all clean dist-clean bootcycle-images start-make
+.PHONY: default all clean dist-clean bootcycle-images start-make
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-docs clean-test clean-overlay-images clean-bootcycle-build
.PHONY: profiles profiles-only profiles-oscheck
--- a/corba/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/corba/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
528c7e76eaeee022817ee085668459bc97cf5665 jdk8-b102
49c4a777fdfd648d4c3fffc940fdb97a23108ca8 jdk8-b103
d411c60a8c2fe8fdc572af907775e90f7eefd513 jdk8-b104
+4e38de7c767e34104fa147b5b346d9fe6b731279 jdk8-b105
+2e3a056c84a71eba78945c18b05397858ffd7ad0 jdk8-b106
--- a/hotspot/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -371,3 +371,7 @@
580430d131ccd475e2f2ad4006531b8c4813d102 hs25-b46
104743074675359cfbf7f4dcd9ab2a5974a16627 jdk8-b104
c1604d5885a6f2adc0bcea2fa142a8f6bafad2f0 hs25-b47
+acac3bde66b2c22791c257a8d99611d6d08c6713 jdk8-b105
+18b4798adbc42c6fa16f5ecb7d5cd3ca130754bf hs25-b48
+aed585cafc0d9655726af6d1e1081d1c94cb3b5c jdk8-b106
+50794d8ac11c9579b41dec4de23b808fef9f34a1 hs25-b49
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java Fri Sep 06 14:20:58 2013 -0700
@@ -354,9 +354,16 @@
public boolean getIsMarkedDependent() { return isMarkedDependent.getValue(this) != 0; }
public long getVtableLen() { return vtableLen.getValue(this); }
public long getItableLen() { return itableLen.getValue(this); }
- public Symbol getGenericSignature() { return getConstants().getSymbolAt(genericSignatureIndex.getValue(this)); }
public long majorVersion() { return majorVersion.getValue(this); }
public long minorVersion() { return minorVersion.getValue(this); }
+ public Symbol getGenericSignature() {
+ long index = genericSignatureIndex.getValue(this);
+ if (index != 0) {
+ return getConstants().getSymbolAt(index);
+ } else {
+ return null;
+ }
+ }
// "size helper" == instance size in words
public long getSizeHelper() {
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js Fri Sep 06 14:20:58 2013 -0700
@@ -35,8 +35,9 @@
sapkg.code = sapkg.hotspot.code;
sapkg.compiler = sapkg.hotspot.compiler;
-// 'debugger' is a JavaScript keyword :-(
-// sapkg.debugger = sapkg.hotspot.debugger;
+// 'debugger' is a JavaScript keyword, but ES5 relaxes the
+// restriction of using keywords as property name
+sapkg.debugger = sapkg.hotspot.debugger;
sapkg.interpreter = sapkg.hotspot.interpreter;
sapkg.jdi = sapkg.hotspot.jdi;
@@ -116,27 +117,36 @@
return args;
}
+ // Handle __has__ specially to avoid metacircularity problems
+ // when called from __get__.
+ // Calling
+ // this.__has__(name)
+ // will in turn call
+ // this.__call__('__has__', name)
+ // which is not handled below
+ function __has__(name) {
+ if (typeof(name) == 'number') {
+ return so["has(int)"](name);
+ } else {
+ if (name == '__wrapped__') {
+ return true;
+ } else if (so["has(java.lang.String)"](name)) {
+ return true;
+ } else if (name.equals('toString')) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
if (so instanceof sapkg.utilities.soql.ScriptObject) {
return new JSAdapter() {
- __getIds__: function() {
- return so.getIds();
+ __getIds__: function() {
+ return so.getIds();
},
- __has__ : function(name) {
- if (typeof(name) == 'number') {
- return so["has(int)"](name);
- } else {
- if (name == '__wrapped__') {
- return true;
- } else if (so["has(java.lang.String)"](name)) {
- return true;
- } else if (name.equals('toString')) {
- return true;
- } else {
- return false;
- }
- }
- },
+ __has__ : __has__,
__delete__ : function(name) {
if (typeof(name) == 'number') {
@@ -147,7 +157,8 @@
},
__get__ : function(name) {
- if (! this.__has__(name)) {
+ // don't call this.__has__(name); see comments above function __has__
+ if (! __has__.call(this, name)) {
return undefined;
}
if (typeof(name) == 'number') {
@@ -162,7 +173,7 @@
var args = prepareArgsArray(arguments);
var r;
try {
- r = value.call(args);
+ r = value.call(Java.to(args, 'java.lang.Object[]'));
} catch (e) {
println("call to " + name + " failed!");
throw e;
@@ -204,6 +215,18 @@
}
// define "writeln" and "write" if not defined
+ if (typeof(println) == 'undefined') {
+ println = function (str) {
+ java.lang.System.out.println(String(str));
+ }
+ }
+
+ if (typeof(print) == 'undefined') {
+ print = function (str) {
+ java.lang.System.out.print(String(str));
+ }
+ }
+
if (typeof(writeln) == 'undefined') {
writeln = println;
}
@@ -235,7 +258,7 @@
this.jclasses = function() {
forEachKlass(function (clazz) {
- writeln(clazz.getName().asString() + " @" + clazz.getHandle().toString());
+ writeln(clazz.getName().asString() + " @" + clazz.getAddress().toString());
});
}
registerCommand("classes", "classes", "jclasses");
@@ -490,14 +513,14 @@
function forEachKlass(callback) {
var VisitorClass = sapkg.memory.SystemDictionary.ClassVisitor;
var visitor = new VisitorClass() { visit: callback };
- sa.sysDict["classesDo(sun.jvm.hotspot.memory.SystemDictionary$ClassVisitor)"](visitor);
+ sa.sysDict["classesDo(sun.jvm.hotspot.memory.SystemDictionary.ClassVisitor)"](visitor);
}
// iterate system dictionary for each 'Klass' and initiating loader
function forEachKlassAndLoader(callback) {
var VisitorClass = sapkg.memory.SystemDictionary.ClassAndLoaderVisitor;
var visitor = new VisitorClass() { visit: callback };
- sa.sysDict["classesDo(sun.jvm.hotspot.memory.SystemDictionary$ClassAndLoaderVisitor)"](visitor);
+ sa.sysDict["classesDo(sun.jvm.hotspot.memory.SystemDictionary.ClassAndLoaderVisitor)"](visitor);
}
// iterate system dictionary for each primitive array klass
@@ -522,7 +545,12 @@
// iterates Java heap for each Oop
function forEachOop(callback) {
- sa.objHeap.iterate(new sapkg.oops.HeapVisitor() { doObj: callback });
+ function empty() { }
+ sa.objHeap.iterate(new sapkg.oops.HeapVisitor() {
+ prologue: empty,
+ doObj: callback,
+ epilogue: empty
+ });
}
// iterates Java heap for each Oop of given 'klass'.
@@ -536,8 +564,14 @@
if (includeSubtypes == undefined) {
includeSubtypes = true;
}
+
+ function empty() { }
sa.objHeap.iterateObjectsOfKlass(
- new sapkg.oops.HeapVisitor() { doObj: callback },
+ new sapkg.oops.HeapVisitor() {
+ prologue: empty,
+ doObj: callback,
+ epilogue: empty
+ },
klass, includeSubtypes);
}
@@ -746,9 +780,9 @@
// ignore;
continue;
} else {
- // some type names have ':'. replace to make it as a
+ // some type names have ':', '<', '>', '*', ' '. replace to make it as a
// JavaScript identifier
- tmp.name = tmp.name.replace(':', '_').replace('<', '_').replace('>', '_').replace('*', '_').replace(' ', '_');
+ tmp.name = ("" + tmp.name).replace(/[:<>* ]/g, '_');
eval("function read" + tmp.name + "(addr) {" +
" return readVMType('" + tmp.name + "', addr);}");
eval("function print" + tmp.name + "(addr) {" +
--- a/hotspot/make/bsd/makefiles/gcc.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/bsd/makefiles/gcc.make Fri Sep 06 14:20:58 2013 -0700
@@ -129,16 +129,21 @@
# We only use precompiled headers for the JVM build
CFLAGS += $(VM_PCH_FLAG)
-
- # There are some files which don't like precompiled headers
- # The following files are build with 'OPT_CFLAGS/NOOPT' (-O0) in the opt build.
- # But Clang doesn't support a precompiled header which was compiled with -O3
- # to be used in a compilation unit which uses '-O0'. We could also prepare an
- # extra '-O0' PCH file for the opt build and use it here, but it's probably
- # not worth the effort as long as only two files need this special handling.
+
+ # The following files are compiled at various optimization
+ # levels due to optimization issues encountered at the
+ # 'OPT_CFLAGS_DEFAULT' level. The Clang compiler issues a compile
+ # time error if there is an optimization level specification
+ # skew between the PCH file and the C++ file. Especially if the
+ # PCH file is compiled at a higher optimization level than
+ # the C++ file. One solution might be to prepare extra optimization
+ # level specific PCH files for the opt build and use them here, but
+ # it's probably not worth the effort as long as only a few files
+ # need this special handling.
PCH_FLAG/loopTransform.o = $(PCH_FLAG/NO_PCH)
PCH_FLAG/sharedRuntimeTrig.o = $(PCH_FLAG/NO_PCH)
PCH_FLAG/sharedRuntimeTrans.o = $(PCH_FLAG/NO_PCH)
+ PCH_FLAG/unsafe.o = $(PCH_FLAG/NO_PCH)
endif
else # ($(USE_CLANG), true)
@@ -306,6 +311,7 @@
ifeq ($(USE_CLANG), true)
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
+ OPT_CFLAGS/unsafe.o += -O1
endif
else
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
--- a/hotspot/make/hotspot_version Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/hotspot_version Fri Sep 06 14:20:58 2013 -0700
@@ -35,7 +35,7 @@
HS_MAJOR_VER=25
HS_MINOR_VER=0
-HS_BUILD_NUMBER=47
+HS_BUILD_NUMBER=49
JDK_MAJOR_VER=1
JDK_MINOR_VER=8
--- a/hotspot/make/linux/makefiles/amd64.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/linux/makefiles/amd64.make Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2013, 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
@@ -31,9 +31,4 @@
CFLAGS += -D_LP64=1
-# The serviceability agent relies on frame pointer (%rbp) to walk thread stack
-ifndef USE_SUNCC
- CFLAGS += -fno-omit-frame-pointer
-endif
-
OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/hotspot/make/linux/makefiles/gcc.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/linux/makefiles/gcc.make Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2013, 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
@@ -398,3 +398,10 @@
ifdef MINIMIZE_RAM_USAGE
CFLAGS += -DMINIMIZE_RAM_USAGE
endif
+
+# Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack.
+# Explicitly specify -fno-omit-frame-pointer because it is off by default
+# starting with gcc 4.6.
+ifndef USE_SUNCC
+ CFLAGS += -fno-omit-frame-pointer
+endif
--- a/hotspot/make/windows/build_vm_def.sh Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/build_vm_def.sh Fri Sep 06 14:20:58 2013 -0700
@@ -42,8 +42,6 @@
MKS_HOME=`dirname "$SH"`
fi
-echo "EXPORTS" > vm1.def
-
AWK="$MKS_HOME/awk.exe"
if [ ! -e $AWK ]; then
AWK="$MKS_HOME/gawk.exe"
@@ -55,6 +53,22 @@
RM="$MKS_HOME/rm.exe"
DUMPBIN="link.exe /dump"
+if [ "$1" = "-nosa" ]; then
+ echo EXPORTS > vm.def
+ echo ""
+ echo "***"
+ echo "*** Not building SA: BUILD_WIN_SA != 1"
+ echo "*** C++ Vtables NOT included in vm.def"
+ echo "*** This jvm.dll will NOT work properly with SA."
+ echo "***"
+ echo "*** When in doubt, set BUILD_WIN_SA=1, clean and rebuild."
+ echo "***"
+ echo ""
+ exit
+fi
+
+echo "EXPORTS" > vm1.def
+
# When called from IDE the first param should contain the link version, otherwise may be nill
if [ "x$1" != "x" ]; then
LD_VER="$1"
--- a/hotspot/make/windows/create.bat Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/create.bat Fri Sep 06 14:20:58 2013 -0700
@@ -82,6 +82,7 @@
echo **************************************************************
set ProjectFile=%HotSpotBuildSpace%\jvm.vcproj
+echo MSC_VER = "%MSC_VER%"
if "%MSC_VER%" == "1200" (
set ProjectFile=%HotSpotBuildSpace%\jvm.dsp
echo Will generate VC6 project {unsupported}
@@ -96,11 +97,17 @@
echo Will generate VC10 {Visual Studio 2010}
set ProjectFile=%HotSpotBuildSpace%\jvm.vcxproj
) else (
+if "%MSC_VER%" == "1700" (
+echo Will generate VC10 {compatible with Visual Studio 2012}
+echo After opening in VS 2012, click "Update" when prompted.
+set ProjectFile=%HotSpotBuildSpace%\jvm.vcxproj
+) else (
echo Will generate VC7 project {Visual Studio 2003 .NET}
)
)
)
)
+)
echo %ProjectFile%
echo **************************************************************
--- a/hotspot/make/windows/makefiles/debug.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/makefiles/debug.make Fri Sep 06 14:20:58 2013 -0700
@@ -49,9 +49,6 @@
# Force resources to be rebuilt every time
$(Res_Files): FORCE
-vm.def: $(Obj_Files)
- sh $(WorkSpace)/make/windows/build_vm_def.sh
-
$(AOUT): $(Res_Files) $(Obj_Files) vm.def
$(LD) @<<
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
--- a/hotspot/make/windows/makefiles/fastdebug.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/makefiles/fastdebug.make Fri Sep 06 14:20:58 2013 -0700
@@ -48,9 +48,6 @@
# Force resources to be rebuilt every time
$(Res_Files): FORCE
-vm.def: $(Obj_Files)
- sh $(WorkSpace)/make/windows/build_vm_def.sh
-
$(AOUT): $(Res_Files) $(Obj_Files) vm.def
$(LD) @<<
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
--- a/hotspot/make/windows/makefiles/product.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/makefiles/product.make Fri Sep 06 14:20:58 2013 -0700
@@ -51,9 +51,6 @@
# Force resources to be rebuilt every time
$(Res_Files): FORCE
-vm.def: $(Obj_Files)
- sh $(WorkSpace)/make/windows/build_vm_def.sh
-
$(AOUT): $(Res_Files) $(Obj_Files) vm.def
$(LD) @<<
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
--- a/hotspot/make/windows/makefiles/projectcreator.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/makefiles/projectcreator.make Fri Sep 06 14:20:58 2013 -0700
@@ -92,6 +92,10 @@
-disablePch getThread_windows_$(Platform_arch).cpp \
-disablePch_compiler2 opcodes.cpp
+!if "$(BUILD_WIN_SA)" != "1"
+BUILD_VM_DEF_FLAG=-nosa
+!endif
+
# Common options for the IDE builds for c1, and c2
ProjectCreatorIDEOptions=\
$(ProjectCreatorIDEOptions) \
@@ -104,7 +108,7 @@
-jdkTargetRoot $(HOTSPOTJDKDIST) \
-define ALIGN_STACK_FRAMES \
-define VM_LITTLE_ENDIAN \
- -prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) set JAVA_HOME=$(HOTSPOTJDKDIST) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LD_VER)" \
+ -prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) set JAVA_HOME=$(HOTSPOTJDKDIST) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(BUILD_VM_DEF_FLAG) $(LD_VER)" \
-ignoreFile jsig.c \
-ignoreFile jvmtiEnvRecommended.cpp \
-ignoreFile jvmtiEnvStub.cpp \
--- a/hotspot/make/windows/makefiles/rules.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/makefiles/rules.make Fri Sep 06 14:20:58 2013 -0700
@@ -69,6 +69,13 @@
VcVersion=VC10
ProjectFile=jvm.vcxproj
+!elseif "$(MSC_VER)" == "1700"
+# This is VS2012, but it loads VS10 projects just fine (and will
+# upgrade them automatically to VS2012 format).
+
+VcVersion=VC10
+ProjectFile=jvm.vcxproj
+
!else
VcVersion=VC7
--- a/hotspot/make/windows/makefiles/vm.make Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/make/windows/makefiles/vm.make Fri Sep 06 14:20:58 2013 -0700
@@ -393,3 +393,11 @@
_build_pch_file.obj:
@echo #include "precompiled.hpp" > ../generated/_build_pch_file.cpp
$(CXX) $(CXX_FLAGS) /Fp"vm.pch" /Yc"precompiled.hpp" /c ../generated/_build_pch_file.cpp
+
+!if "$(BUILD_WIN_SA)" != "1"
+BUILD_VM_DEF_FLAG=-nosa
+!endif
+
+vm.def: $(Obj_Files)
+ sh $(WorkSpace)/make/windows/build_vm_def.sh $(BUILD_VM_DEF_FLAG)
+
--- a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -307,7 +307,7 @@
assert(a_byte == *start++, "should be the same code");
}
#endif
- } else if (_id == load_mirror_id) {
+ } else if (_id == load_mirror_id || _id == load_appendix_id) {
// produce a copy of the load mirror instruction for use by the being initialized case
#ifdef ASSERT
address start = __ pc();
@@ -384,6 +384,7 @@
case access_field_id: target = Runtime1::entry_for(Runtime1::access_field_patching_id); break;
case load_klass_id: target = Runtime1::entry_for(Runtime1::load_klass_patching_id); reloc_type = relocInfo::metadata_type; break;
case load_mirror_id: target = Runtime1::entry_for(Runtime1::load_mirror_patching_id); reloc_type = relocInfo::oop_type; break;
+ case load_appendix_id: target = Runtime1::entry_for(Runtime1::load_appendix_patching_id); reloc_type = relocInfo::oop_type; break;
default: ShouldNotReachHere();
}
__ bind(call_patch);
@@ -397,7 +398,7 @@
ce->add_call_info_here(_info);
__ br(Assembler::always, false, Assembler::pt, _patch_site_entry);
__ delayed()->nop();
- if (_id == load_klass_id || _id == load_mirror_id) {
+ if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
CodeSection* cs = __ code_section();
address pc = (address)_pc_start;
RelocIterator iter(cs, pc, pc + 1);
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -520,7 +520,7 @@
void LIR_Assembler::jobject2reg_with_patching(Register reg, CodeEmitInfo *info) {
// Allocate a new index in table to hold the object once it's been patched
int oop_index = __ oop_recorder()->allocate_oop_index(NULL);
- PatchingStub* patch = new PatchingStub(_masm, PatchingStub::load_mirror_id, oop_index);
+ PatchingStub* patch = new PatchingStub(_masm, patching_id(info), oop_index);
AddressLiteral addrlit(NULL, oop_Relocation::spec(oop_index));
assert(addrlit.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
--- a/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -804,6 +804,12 @@
}
break;
+ case load_appendix_patching_id:
+ { __ set_info("load_appendix_patching", dont_gc_arguments);
+ oop_maps = generate_patching(sasm, CAST_FROM_FN_PTR(address, move_appendix_patching));
+ }
+ break;
+
case dtrace_object_alloc_id:
{ // O0: object
__ set_info("dtrace_object_alloc", dont_gc_arguments);
--- a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -402,6 +402,7 @@
case access_field_id: target = Runtime1::entry_for(Runtime1::access_field_patching_id); break;
case load_klass_id: target = Runtime1::entry_for(Runtime1::load_klass_patching_id); reloc_type = relocInfo::metadata_type; break;
case load_mirror_id: target = Runtime1::entry_for(Runtime1::load_mirror_patching_id); reloc_type = relocInfo::oop_type; break;
+ case load_appendix_id: target = Runtime1::entry_for(Runtime1::load_appendix_patching_id); reloc_type = relocInfo::oop_type; break;
default: ShouldNotReachHere();
}
__ bind(call_patch);
@@ -419,7 +420,7 @@
for (int j = __ offset() ; j < jmp_off + 5 ; j++ ) {
__ nop();
}
- if (_id == load_klass_id || _id == load_mirror_id) {
+ if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
CodeSection* cs = __ code_section();
RelocIterator iter(cs, (address)_pc_start, (address)(_pc_start + 1));
relocInfo::change_reloc_info_for_address(&iter, (address) _pc_start, reloc_type, relocInfo::none);
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -362,7 +362,7 @@
void LIR_Assembler::jobject2reg_with_patching(Register reg, CodeEmitInfo* info) {
jobject o = NULL;
- PatchingStub* patch = new PatchingStub(_masm, PatchingStub::load_mirror_id);
+ PatchingStub* patch = new PatchingStub(_masm, patching_id(info));
__ movoop(reg, o);
patching_epilog(patch, lir_patch_normal, reg, info);
}
--- a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1499,6 +1499,13 @@
}
break;
+ case load_appendix_patching_id:
+ { StubFrame f(sasm, "load_appendix_patching", dont_gc_arguments);
+ // we should set up register map
+ oop_maps = generate_patching(sasm, CAST_FROM_FN_PTR(address, move_appendix_patching));
+ }
+ break;
+
case dtrace_object_alloc_id:
{ // rax,: object
StubFrame f(sasm, "dtrace_object_alloc", dont_gc_arguments);
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -642,13 +642,14 @@
#endif
#ifdef __APPLE__
-static uint64_t locate_unique_thread_id() {
+static uint64_t locate_unique_thread_id(mach_port_t mach_thread_port) {
// Additional thread_id used to correlate threads in SA
thread_identifier_info_data_t m_ident_info;
mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT;
- thread_info(::mach_thread_self(), THREAD_IDENTIFIER_INFO,
+ thread_info(mach_thread_port, THREAD_IDENTIFIER_INFO,
(thread_info_t) &m_ident_info, &count);
+
return m_ident_info.thread_id;
}
#endif
@@ -679,9 +680,14 @@
}
#ifdef __APPLE__
- // thread_id is mach thread on macos
- osthread->set_thread_id(::mach_thread_self());
- osthread->set_unique_thread_id(locate_unique_thread_id());
+ // thread_id is mach thread on macos, which pthreads graciously caches and provides for us
+ mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self());
+ guarantee(thread_id != 0, "thread id missing from pthreads");
+ osthread->set_thread_id(thread_id);
+
+ uint64_t unique_thread_id = locate_unique_thread_id(thread_id);
+ guarantee(unique_thread_id != 0, "unique thread id was not found");
+ osthread->set_unique_thread_id(unique_thread_id);
#else
// thread_id is pthread_id on BSD
osthread->set_thread_id(::pthread_self());
@@ -843,8 +849,14 @@
// Store pthread info into the OSThread
#ifdef __APPLE__
- osthread->set_thread_id(::mach_thread_self());
- osthread->set_unique_thread_id(locate_unique_thread_id());
+ // thread_id is mach thread on macos, which pthreads graciously caches and provides for us
+ mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self());
+ guarantee(thread_id != 0, "just checking");
+ osthread->set_thread_id(thread_id);
+
+ uint64_t unique_thread_id = locate_unique_thread_id(thread_id);
+ guarantee(unique_thread_id != 0, "just checking");
+ osthread->set_unique_thread_id(unique_thread_id);
#else
osthread->set_thread_id(::pthread_self());
#endif
@@ -1115,7 +1127,7 @@
intx os::current_thread_id() {
#ifdef __APPLE__
- return (intx)::mach_thread_self();
+ return (intx)::pthread_mach_thread_np(::pthread_self());
#else
return (intx)::pthread_self();
#endif
@@ -2313,7 +2325,9 @@
}
-char* os::reserve_memory_special(size_t bytes, char* req_addr, bool exec) {
+char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr, bool exec) {
+ fatal("This code is not used or maintained.");
+
// "exec" is passed in but not used. Creating the shared image for
// the code cache doesn't have an SHM_X executable permission to check.
assert(UseLargePages && UseSHM, "only for SHM large pages");
@@ -3275,11 +3289,15 @@
// and if UserSignalHandler is installed all bets are off
if (CheckJNICalls) {
if (libjsig_is_loaded) {
- tty->print_cr("Info: libjsig is activated, all active signal checking is disabled");
+ if (PrintJNIResolving) {
+ tty->print_cr("Info: libjsig is activated, all active signal checking is disabled");
+ }
check_signals = false;
}
if (AllowUserSignalHandlers) {
- tty->print_cr("Info: AllowUserSignalHandlers is activated, all active signal checking is disabled");
+ if (PrintJNIResolving) {
+ tty->print_cr("Info: AllowUserSignalHandlers is activated, all active signal checking is disabled");
+ }
check_signals = false;
}
}
@@ -4736,3 +4754,8 @@
return n;
}
+#ifndef PRODUCT
+void TestReserveMemorySpecial_test() {
+ // No tests available for this platform
+}
+#endif
--- a/hotspot/src/os/linux/vm/globals_linux.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/linux/vm/globals_linux.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -40,6 +40,9 @@
product(bool, UseHugeTLBFS, false, \
"Use MAP_HUGETLB for large pages") \
\
+ product(bool, UseTransparentHugePages, false, \
+ "Use MADV_HUGEPAGE for large pages") \
+ \
product(bool, LoadExecStackDllInVMThread, true, \
"Load DLLs with executable-stack attribute in the VM Thread") \
\
--- a/hotspot/src/os/linux/vm/os_linux.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -2720,36 +2720,7 @@
int os::Linux::commit_memory_impl(char* addr, size_t size,
size_t alignment_hint, bool exec) {
- int err;
- if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) {
- int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
- uintptr_t res =
- (uintptr_t) ::mmap(addr, size, prot,
- MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_HUGETLB,
- -1, 0);
- if (res != (uintptr_t) MAP_FAILED) {
- if (UseNUMAInterleaving) {
- numa_make_global(addr, size);
- }
- return 0;
- }
-
- err = errno; // save errno from mmap() call above
-
- if (!recoverable_mmap_error(err)) {
- // However, it is not clear that this loss of our reserved mapping
- // happens with large pages on Linux or that we cannot recover
- // from the loss. For now, we just issue a warning and we don't
- // call vm_exit_out_of_memory(). This issue is being tracked by
- // JBS-8007074.
- warn_fail_commit_memory(addr, size, alignment_hint, exec, err);
-// vm_exit_out_of_memory(size, OOM_MMAP_ERROR,
-// "committing reserved memory.");
- }
- // Fall through and try to use small pages
- }
-
- err = os::Linux::commit_memory_impl(addr, size, exec);
+ int err = os::Linux::commit_memory_impl(addr, size, exec);
if (err == 0) {
realign_memory(addr, size, alignment_hint);
}
@@ -2774,7 +2745,7 @@
}
void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
- if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) {
+ if (UseTransparentHugePages && alignment_hint > (size_t)vm_page_size()) {
// We don't check the return value: madvise(MADV_HUGEPAGE) may not
// be supported or the memory may already be backed by huge pages.
::madvise(addr, bytes, MADV_HUGEPAGE);
@@ -2787,7 +2758,7 @@
// uncommitted at all. We don't do anything in this case to avoid creating a segment with
// small pages on top of the SHM segment. This method always works for small pages, so we
// allow that in any case.
- if (alignment_hint <= (size_t)os::vm_page_size() || !UseSHM) {
+ if (alignment_hint <= (size_t)os::vm_page_size() || can_commit_large_page_memory()) {
commit_memory(addr, bytes, alignment_hint, !ExecMem);
}
}
@@ -2796,7 +2767,19 @@
Linux::numa_interleave_memory(addr, bytes);
}
+// Define for numa_set_bind_policy(int). Setting the argument to 0 will set the
+// bind policy to MPOL_PREFERRED for the current thread.
+#define USE_MPOL_PREFERRED 0
+
void os::numa_make_local(char *addr, size_t bytes, int lgrp_hint) {
+ // To make NUMA and large pages more robust when both enabled, we need to ease
+ // the requirements on where the memory should be allocated. MPOL_BIND is the
+ // default policy and it will force memory to be allocated on the specified
+ // node. Changing this to MPOL_PREFERRED will prefer to allocate the memory on
+ // the specified node, but will not force it. Using this policy will prevent
+ // getting SIGBUS when trying to allocate large pages on NUMA nodes with no
+ // free large pages.
+ Linux::numa_set_bind_policy(USE_MPOL_PREFERRED);
Linux::numa_tonode_memory(addr, bytes, lgrp_hint);
}
@@ -2898,6 +2881,8 @@
libnuma_dlsym(handle, "numa_tonode_memory")));
set_numa_interleave_memory(CAST_TO_FN_PTR(numa_interleave_memory_func_t,
libnuma_dlsym(handle, "numa_interleave_memory")));
+ set_numa_set_bind_policy(CAST_TO_FN_PTR(numa_set_bind_policy_func_t,
+ libnuma_dlsym(handle, "numa_set_bind_policy")));
if (numa_available() != -1) {
@@ -2964,6 +2949,7 @@
os::Linux::numa_available_func_t os::Linux::_numa_available;
os::Linux::numa_tonode_memory_func_t os::Linux::_numa_tonode_memory;
os::Linux::numa_interleave_memory_func_t os::Linux::_numa_interleave_memory;
+os::Linux::numa_set_bind_policy_func_t os::Linux::_numa_set_bind_policy;
unsigned long* os::Linux::_numa_all_nodes;
bool os::pd_uncommit_memory(char* addr, size_t size) {
@@ -2972,6 +2958,53 @@
return res != (uintptr_t) MAP_FAILED;
}
+static
+address get_stack_commited_bottom(address bottom, size_t size) {
+ address nbot = bottom;
+ address ntop = bottom + size;
+
+ size_t page_sz = os::vm_page_size();
+ unsigned pages = size / page_sz;
+
+ unsigned char vec[1];
+ unsigned imin = 1, imax = pages + 1, imid;
+ int mincore_return_value;
+
+ while (imin < imax) {
+ imid = (imax + imin) / 2;
+ nbot = ntop - (imid * page_sz);
+
+ // Use a trick with mincore to check whether the page is mapped or not.
+ // mincore sets vec to 1 if page resides in memory and to 0 if page
+ // is swapped output but if page we are asking for is unmapped
+ // it returns -1,ENOMEM
+ mincore_return_value = mincore(nbot, page_sz, vec);
+
+ if (mincore_return_value == -1) {
+ // Page is not mapped go up
+ // to find first mapped page
+ if (errno != EAGAIN) {
+ assert(errno == ENOMEM, "Unexpected mincore errno");
+ imax = imid;
+ }
+ } else {
+ // Page is mapped go down
+ // to find first not mapped page
+ imin = imid + 1;
+ }
+ }
+
+ nbot = nbot + page_sz;
+
+ // Adjust stack bottom one page up if last checked page is not mapped
+ if (mincore_return_value == -1) {
+ nbot = nbot + page_sz;
+ }
+
+ return nbot;
+}
+
+
// Linux uses a growable mapping for the stack, and if the mapping for
// the stack guard pages is not removed when we detach a thread the
// stack cannot grow beyond the pages where the stack guard was
@@ -2986,59 +3019,37 @@
// So, we need to know the extent of the stack mapping when
// create_stack_guard_pages() is called.
-// Find the bounds of the stack mapping. Return true for success.
-//
// We only need this for stacks that are growable: at the time of
// writing thread stacks don't use growable mappings (i.e. those
// creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this
// only applies to the main thread.
-static
-bool get_stack_bounds(uintptr_t *bottom, uintptr_t *top) {
-
- char buf[128];
- int fd, sz;
-
- if ((fd = ::open("/proc/self/maps", O_RDONLY)) < 0) {
- return false;
- }
-
- const char kw[] = "[stack]";
- const int kwlen = sizeof(kw)-1;
-
- // Address part of /proc/self/maps couldn't be more than 128 bytes
- while ((sz = os::get_line_chars(fd, buf, sizeof(buf))) > 0) {
- if (sz > kwlen && ::memcmp(buf+sz-kwlen, kw, kwlen) == 0) {
- // Extract addresses
- if (sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
- uintptr_t sp = (uintptr_t) __builtin_frame_address(0);
- if (sp >= *bottom && sp <= *top) {
- ::close(fd);
- return true;
- }
- }
- }
- }
-
- ::close(fd);
- return false;
-}
-
-
// If the (growable) stack mapping already extends beyond the point
// where we're going to put our guard pages, truncate the mapping at
// that point by munmap()ping it. This ensures that when we later
// munmap() the guard pages we don't leave a hole in the stack
-// mapping. This only affects the main/initial thread, but guard
-// against future OS changes
+// mapping. This only affects the main/initial thread
+
bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
- uintptr_t stack_extent, stack_base;
- bool chk_bounds = NOT_DEBUG(os::Linux::is_initial_thread()) DEBUG_ONLY(true);
- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
- assert(os::Linux::is_initial_thread(),
- "growable stack in non-initial thread");
- if (stack_extent < (uintptr_t)addr)
- ::munmap((void*)stack_extent, (uintptr_t)addr - stack_extent);
+
+ if (os::Linux::is_initial_thread()) {
+ // As we manually grow stack up to bottom inside create_attached_thread(),
+ // it's likely that os::Linux::initial_thread_stack_bottom is mapped and
+ // we don't need to do anything special.
+ // Check it first, before calling heavy function.
+ uintptr_t stack_extent = (uintptr_t) os::Linux::initial_thread_stack_bottom();
+ unsigned char vec[1];
+
+ if (mincore((address)stack_extent, os::vm_page_size(), vec) == -1) {
+ // Fallback to slow path on all errors, including EAGAIN
+ stack_extent = (uintptr_t) get_stack_commited_bottom(
+ os::Linux::initial_thread_stack_bottom(),
+ (size_t)addr - stack_extent);
+ }
+
+ if (stack_extent < (uintptr_t)addr) {
+ ::munmap((void*)stack_extent, (uintptr_t)(addr - stack_extent));
+ }
}
return os::commit_memory(addr, size, !ExecMem);
@@ -3047,13 +3058,13 @@
// If this is a growable mapping, remove the guard pages entirely by
// munmap()ping them. If not, just call uncommit_memory(). This only
// affects the main/initial thread, but guard against future OS changes
+// It's safe to always unmap guard pages for initial thread because we
+// always place it right after end of the mapped region
+
bool os::remove_stack_guard_pages(char* addr, size_t size) {
uintptr_t stack_extent, stack_base;
- bool chk_bounds = NOT_DEBUG(os::Linux::is_initial_thread()) DEBUG_ONLY(true);
- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
- assert(os::Linux::is_initial_thread(),
- "growable stack in non-initial thread");
-
+
+ if (os::Linux::is_initial_thread()) {
return ::munmap(addr, size) == 0;
}
@@ -3157,11 +3168,31 @@
return linux_mprotect(addr, size, PROT_READ|PROT_WRITE);
}
+bool os::Linux::transparent_huge_pages_sanity_check(bool warn, size_t page_size) {
+ bool result = false;
+ void *p = mmap(NULL, page_size * 2, PROT_READ|PROT_WRITE,
+ MAP_ANONYMOUS|MAP_PRIVATE,
+ -1, 0);
+ if (p != MAP_FAILED) {
+ void *aligned_p = align_ptr_up(p, page_size);
+
+ result = madvise(aligned_p, page_size, MADV_HUGEPAGE) == 0;
+
+ munmap(p, page_size * 2);
+ }
+
+ if (warn && !result) {
+ warning("TransparentHugePages is not supported by the operating system.");
+ }
+
+ return result;
+}
+
bool os::Linux::hugetlbfs_sanity_check(bool warn, size_t page_size) {
bool result = false;
- void *p = mmap (NULL, page_size, PROT_READ|PROT_WRITE,
- MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB,
- -1, 0);
+ void *p = mmap(NULL, page_size, PROT_READ|PROT_WRITE,
+ MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB,
+ -1, 0);
if (p != MAP_FAILED) {
// We don't know if this really is a huge page or not.
@@ -3182,12 +3213,10 @@
}
fclose(fp);
}
- munmap (p, page_size);
- if (result)
- return true;
- }
-
- if (warn) {
+ munmap(p, page_size);
+ }
+
+ if (warn && !result) {
warning("HugeTLBFS is not supported by the operating system.");
}
@@ -3235,82 +3264,114 @@
static size_t _large_page_size = 0;
-void os::large_page_init() {
- if (!UseLargePages) {
- UseHugeTLBFS = false;
- UseSHM = false;
- return;
- }
-
- if (FLAG_IS_DEFAULT(UseHugeTLBFS) && FLAG_IS_DEFAULT(UseSHM)) {
- // If UseLargePages is specified on the command line try both methods,
- // if it's default, then try only HugeTLBFS.
- if (FLAG_IS_DEFAULT(UseLargePages)) {
- UseHugeTLBFS = true;
- } else {
- UseHugeTLBFS = UseSHM = true;
- }
- }
-
- if (LargePageSizeInBytes) {
- _large_page_size = LargePageSizeInBytes;
- } else {
- // large_page_size on Linux is used to round up heap size. x86 uses either
- // 2M or 4M page, depending on whether PAE (Physical Address Extensions)
- // mode is enabled. AMD64/EM64T uses 2M page in 64bit mode. IA64 can use
- // page as large as 256M.
- //
- // Here we try to figure out page size by parsing /proc/meminfo and looking
- // for a line with the following format:
- // Hugepagesize: 2048 kB
- //
- // If we can't determine the value (e.g. /proc is not mounted, or the text
- // format has been changed), we'll use the largest page size supported by
- // the processor.
+size_t os::Linux::find_large_page_size() {
+ size_t large_page_size = 0;
+
+ // large_page_size on Linux is used to round up heap size. x86 uses either
+ // 2M or 4M page, depending on whether PAE (Physical Address Extensions)
+ // mode is enabled. AMD64/EM64T uses 2M page in 64bit mode. IA64 can use
+ // page as large as 256M.
+ //
+ // Here we try to figure out page size by parsing /proc/meminfo and looking
+ // for a line with the following format:
+ // Hugepagesize: 2048 kB
+ //
+ // If we can't determine the value (e.g. /proc is not mounted, or the text
+ // format has been changed), we'll use the largest page size supported by
+ // the processor.
#ifndef ZERO
- _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M)
- ARM_ONLY(2 * M) PPC_ONLY(4 * M);
+ large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M)
+ ARM_ONLY(2 * M) PPC_ONLY(4 * M);
#endif // ZERO
- FILE *fp = fopen("/proc/meminfo", "r");
- if (fp) {
- while (!feof(fp)) {
- int x = 0;
- char buf[16];
- if (fscanf(fp, "Hugepagesize: %d", &x) == 1) {
- if (x && fgets(buf, sizeof(buf), fp) && strcmp(buf, " kB\n") == 0) {
- _large_page_size = x * K;
- break;
- }
- } else {
- // skip to next line
- for (;;) {
- int ch = fgetc(fp);
- if (ch == EOF || ch == (int)'\n') break;
- }
+ FILE *fp = fopen("/proc/meminfo", "r");
+ if (fp) {
+ while (!feof(fp)) {
+ int x = 0;
+ char buf[16];
+ if (fscanf(fp, "Hugepagesize: %d", &x) == 1) {
+ if (x && fgets(buf, sizeof(buf), fp) && strcmp(buf, " kB\n") == 0) {
+ large_page_size = x * K;
+ break;
+ }
+ } else {
+ // skip to next line
+ for (;;) {
+ int ch = fgetc(fp);
+ if (ch == EOF || ch == (int)'\n') break;
}
}
- fclose(fp);
}
- }
-
- // print a warning if any large page related flag is specified on command line
- bool warn_on_failure = !FLAG_IS_DEFAULT(UseHugeTLBFS);
-
+ fclose(fp);
+ }
+
+ if (!FLAG_IS_DEFAULT(LargePageSizeInBytes) && LargePageSizeInBytes != large_page_size) {
+ warning("Setting LargePageSizeInBytes has no effect on this OS. Large page size is "
+ SIZE_FORMAT "%s.", byte_size_in_proper_unit(large_page_size),
+ proper_unit_for_byte_size(large_page_size));
+ }
+
+ return large_page_size;
+}
+
+size_t os::Linux::setup_large_page_size() {
+ _large_page_size = Linux::find_large_page_size();
const size_t default_page_size = (size_t)Linux::page_size();
if (_large_page_size > default_page_size) {
_page_sizes[0] = _large_page_size;
_page_sizes[1] = default_page_size;
_page_sizes[2] = 0;
}
- UseHugeTLBFS = UseHugeTLBFS &&
- Linux::hugetlbfs_sanity_check(warn_on_failure, _large_page_size);
-
- if (UseHugeTLBFS)
+
+ return _large_page_size;
+}
+
+bool os::Linux::setup_large_page_type(size_t page_size) {
+ if (FLAG_IS_DEFAULT(UseHugeTLBFS) &&
+ FLAG_IS_DEFAULT(UseSHM) &&
+ FLAG_IS_DEFAULT(UseTransparentHugePages)) {
+ // If UseLargePages is specified on the command line try all methods,
+ // if it's default, then try only UseTransparentHugePages.
+ if (FLAG_IS_DEFAULT(UseLargePages)) {
+ UseTransparentHugePages = true;
+ } else {
+ UseHugeTLBFS = UseTransparentHugePages = UseSHM = true;
+ }
+ }
+
+ if (UseTransparentHugePages) {
+ bool warn_on_failure = !FLAG_IS_DEFAULT(UseTransparentHugePages);
+ if (transparent_huge_pages_sanity_check(warn_on_failure, page_size)) {
+ UseHugeTLBFS = false;
+ UseSHM = false;
+ return true;
+ }
+ UseTransparentHugePages = false;
+ }
+
+ if (UseHugeTLBFS) {
+ bool warn_on_failure = !FLAG_IS_DEFAULT(UseHugeTLBFS);
+ if (hugetlbfs_sanity_check(warn_on_failure, page_size)) {
+ UseSHM = false;
+ return true;
+ }
+ UseHugeTLBFS = false;
+ }
+
+ return UseSHM;
+}
+
+void os::large_page_init() {
+ if (!UseLargePages) {
+ UseHugeTLBFS = false;
+ UseTransparentHugePages = false;
UseSHM = false;
-
- UseLargePages = UseHugeTLBFS || UseSHM;
+ return;
+ }
+
+ size_t large_page_size = Linux::setup_large_page_size();
+ UseLargePages = Linux::setup_large_page_type(large_page_size);
set_coredump_filter();
}
@@ -3319,16 +3380,22 @@
#define SHM_HUGETLB 04000
#endif
-char* os::reserve_memory_special(size_t bytes, char* req_addr, bool exec) {
+char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment, char* req_addr, bool exec) {
// "exec" is passed in but not used. Creating the shared image for
// the code cache doesn't have an SHM_X executable permission to check.
assert(UseLargePages && UseSHM, "only for SHM large pages");
+ assert(is_ptr_aligned(req_addr, os::large_page_size()), "Unaligned address");
+
+ if (!is_size_aligned(bytes, os::large_page_size()) || alignment > os::large_page_size()) {
+ return NULL; // Fallback to small pages.
+ }
key_t key = IPC_PRIVATE;
char *addr;
bool warn_on_failure = UseLargePages &&
(!FLAG_IS_DEFAULT(UseLargePages) ||
+ !FLAG_IS_DEFAULT(UseSHM) ||
!FLAG_IS_DEFAULT(LargePageSizeInBytes)
);
char msg[128];
@@ -3376,42 +3443,219 @@
return NULL;
}
- if ((addr != NULL) && UseNUMAInterleaving) {
- numa_make_global(addr, bytes);
- }
-
- // The memory is committed
- MemTracker::record_virtual_memory_reserve_and_commit((address)addr, bytes, mtNone, CALLER_PC);
+ return addr;
+}
+
+static void warn_on_large_pages_failure(char* req_addr, size_t bytes, int error) {
+ assert(error == ENOMEM, "Only expect to fail if no memory is available");
+
+ bool warn_on_failure = UseLargePages &&
+ (!FLAG_IS_DEFAULT(UseLargePages) ||
+ !FLAG_IS_DEFAULT(UseHugeTLBFS) ||
+ !FLAG_IS_DEFAULT(LargePageSizeInBytes));
+
+ if (warn_on_failure) {
+ char msg[128];
+ jio_snprintf(msg, sizeof(msg), "Failed to reserve large pages memory req_addr: "
+ PTR_FORMAT " bytes: " SIZE_FORMAT " (errno = %d).", req_addr, bytes, error);
+ warning(msg);
+ }
+}
+
+char* os::Linux::reserve_memory_special_huge_tlbfs_only(size_t bytes, char* req_addr, bool exec) {
+ assert(UseLargePages && UseHugeTLBFS, "only for Huge TLBFS large pages");
+ assert(is_size_aligned(bytes, os::large_page_size()), "Unaligned size");
+ assert(is_ptr_aligned(req_addr, os::large_page_size()), "Unaligned address");
+
+ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
+ char* addr = (char*)::mmap(req_addr, bytes, prot,
+ MAP_PRIVATE|MAP_ANONYMOUS|MAP_HUGETLB,
+ -1, 0);
+
+ if (addr == MAP_FAILED) {
+ warn_on_large_pages_failure(req_addr, bytes, errno);
+ return NULL;
+ }
+
+ assert(is_ptr_aligned(addr, os::large_page_size()), "Must be");
return addr;
}
+char* os::Linux::reserve_memory_special_huge_tlbfs_mixed(size_t bytes, size_t alignment, char* req_addr, bool exec) {
+ size_t large_page_size = os::large_page_size();
+
+ assert(bytes >= large_page_size, "Shouldn't allocate large pages for small sizes");
+
+ // Allocate small pages.
+
+ char* start;
+ if (req_addr != NULL) {
+ assert(is_ptr_aligned(req_addr, alignment), "Must be");
+ assert(is_size_aligned(bytes, alignment), "Must be");
+ start = os::reserve_memory(bytes, req_addr);
+ assert(start == NULL || start == req_addr, "Must be");
+ } else {
+ start = os::reserve_memory_aligned(bytes, alignment);
+ }
+
+ if (start == NULL) {
+ return NULL;
+ }
+
+ assert(is_ptr_aligned(start, alignment), "Must be");
+
+ // os::reserve_memory_special will record this memory area.
+ // Need to release it here to prevent overlapping reservations.
+ MemTracker::record_virtual_memory_release((address)start, bytes);
+
+ char* end = start + bytes;
+
+ // Find the regions of the allocated chunk that can be promoted to large pages.
+ char* lp_start = (char*)align_ptr_up(start, large_page_size);
+ char* lp_end = (char*)align_ptr_down(end, large_page_size);
+
+ size_t lp_bytes = lp_end - lp_start;
+
+ assert(is_size_aligned(lp_bytes, large_page_size), "Must be");
+
+ if (lp_bytes == 0) {
+ // The mapped region doesn't even span the start and the end of a large page.
+ // Fall back to allocate a non-special area.
+ ::munmap(start, end - start);
+ return NULL;
+ }
+
+ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
+
+
+ void* result;
+
+ if (start != lp_start) {
+ result = ::mmap(start, lp_start - start, prot,
+ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,
+ -1, 0);
+ if (result == MAP_FAILED) {
+ ::munmap(lp_start, end - lp_start);
+ return NULL;
+ }
+ }
+
+ result = ::mmap(lp_start, lp_bytes, prot,
+ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED|MAP_HUGETLB,
+ -1, 0);
+ if (result == MAP_FAILED) {
+ warn_on_large_pages_failure(req_addr, bytes, errno);
+ // If the mmap above fails, the large pages region will be unmapped and we
+ // have regions before and after with small pages. Release these regions.
+ //
+ // | mapped | unmapped | mapped |
+ // ^ ^ ^ ^
+ // start lp_start lp_end end
+ //
+ ::munmap(start, lp_start - start);
+ ::munmap(lp_end, end - lp_end);
+ return NULL;
+ }
+
+ if (lp_end != end) {
+ result = ::mmap(lp_end, end - lp_end, prot,
+ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,
+ -1, 0);
+ if (result == MAP_FAILED) {
+ ::munmap(start, lp_end - start);
+ return NULL;
+ }
+ }
+
+ return start;
+}
+
+char* os::Linux::reserve_memory_special_huge_tlbfs(size_t bytes, size_t alignment, char* req_addr, bool exec) {
+ assert(UseLargePages && UseHugeTLBFS, "only for Huge TLBFS large pages");
+ assert(is_ptr_aligned(req_addr, alignment), "Must be");
+ assert(is_power_of_2(alignment), "Must be");
+ assert(is_power_of_2(os::large_page_size()), "Must be");
+ assert(bytes >= os::large_page_size(), "Shouldn't allocate large pages for small sizes");
+
+ if (is_size_aligned(bytes, os::large_page_size()) && alignment <= os::large_page_size()) {
+ return reserve_memory_special_huge_tlbfs_only(bytes, req_addr, exec);
+ } else {
+ return reserve_memory_special_huge_tlbfs_mixed(bytes, alignment, req_addr, exec);
+ }
+}
+
+char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr, bool exec) {
+ assert(UseLargePages, "only for large pages");
+
+ char* addr;
+ if (UseSHM) {
+ addr = os::Linux::reserve_memory_special_shm(bytes, alignment, req_addr, exec);
+ } else {
+ assert(UseHugeTLBFS, "must be");
+ addr = os::Linux::reserve_memory_special_huge_tlbfs(bytes, alignment, req_addr, exec);
+ }
+
+ if (addr != NULL) {
+ if (UseNUMAInterleaving) {
+ numa_make_global(addr, bytes);
+ }
+
+ // The memory is committed
+ MemTracker::record_virtual_memory_reserve_and_commit((address)addr, bytes, mtNone, CALLER_PC);
+ }
+
+ return addr;
+}
+
+bool os::Linux::release_memory_special_shm(char* base, size_t bytes) {
+ // detaching the SHM segment will also delete it, see reserve_memory_special_shm()
+ return shmdt(base) == 0;
+}
+
+bool os::Linux::release_memory_special_huge_tlbfs(char* base, size_t bytes) {
+ return pd_release_memory(base, bytes);
+}
+
bool os::release_memory_special(char* base, size_t bytes) {
+ assert(UseLargePages, "only for large pages");
+
MemTracker::Tracker tkr = MemTracker::get_virtual_memory_release_tracker();
- // detaching the SHM segment will also delete it, see reserve_memory_special()
- int rslt = shmdt(base);
- if (rslt == 0) {
+
+ bool res;
+ if (UseSHM) {
+ res = os::Linux::release_memory_special_shm(base, bytes);
+ } else {
+ assert(UseHugeTLBFS, "must be");
+ res = os::Linux::release_memory_special_huge_tlbfs(base, bytes);
+ }
+
+ if (res) {
tkr.record((address)base, bytes);
- return true;
} else {
tkr.discard();
- return false;
- }
+ }
+
+ return res;
}
size_t os::large_page_size() {
return _large_page_size;
}
-// HugeTLBFS allows application to commit large page memory on demand;
-// with SysV SHM the entire memory region must be allocated as shared
+// With SysV SHM the entire memory region must be allocated as shared
// memory.
+// HugeTLBFS allows application to commit large page memory on demand.
+// However, when committing memory with HugeTLBFS fails, the region
+// that was supposed to be committed will lose the old reservation
+// and allow other threads to steal that memory region. Because of this
+// behavior we can't commit HugeTLBFS memory.
bool os::can_commit_large_page_memory() {
- return UseHugeTLBFS;
+ return UseTransparentHugePages;
}
bool os::can_execute_large_page_memory() {
- return UseHugeTLBFS;
+ return UseTransparentHugePages || UseHugeTLBFS;
}
// Reserve memory at an arbitrary address, only if that area is
@@ -4563,21 +4807,23 @@
UseNUMA = false;
}
}
- // With SHM large pages we cannot uncommit a page, so there's not way
+ // With SHM and HugeTLBFS large pages we cannot uncommit a page, so there's no way
// we can make the adaptive lgrp chunk resizing work. If the user specified
- // both UseNUMA and UseLargePages (or UseSHM) on the command line - warn and
+ // both UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn and
// disable adaptive resizing.
- if (UseNUMA && UseLargePages && UseSHM) {
- if (!FLAG_IS_DEFAULT(UseNUMA)) {
- if (FLAG_IS_DEFAULT(UseLargePages) && FLAG_IS_DEFAULT(UseSHM)) {
+ if (UseNUMA && UseLargePages && !can_commit_large_page_memory()) {
+ if (FLAG_IS_DEFAULT(UseNUMA)) {
+ UseNUMA = false;
+ } else {
+ if (FLAG_IS_DEFAULT(UseLargePages) &&
+ FLAG_IS_DEFAULT(UseSHM) &&
+ FLAG_IS_DEFAULT(UseHugeTLBFS)) {
UseLargePages = false;
} else {
- warning("UseNUMA is not fully compatible with SHM large pages, disabling adaptive resizing");
+ warning("UseNUMA is not fully compatible with SHM/HugeTLBFS large pages, disabling adaptive resizing");
UseAdaptiveSizePolicy = false;
UseAdaptiveNUMAChunkSizing = false;
}
- } else {
- UseNUMA = false;
}
}
if (!UseNUMA && ForceNUMA) {
@@ -5848,3 +6094,149 @@
}
#endif // JAVASE_EMBEDDED
+
+
+/////////////// Unit tests ///////////////
+
+#ifndef PRODUCT
+
+#define test_log(...) \
+ do {\
+ if (VerboseInternalVMTests) { \
+ tty->print_cr(__VA_ARGS__); \
+ tty->flush(); \
+ }\
+ } while (false)
+
+class TestReserveMemorySpecial : AllStatic {
+ public:
+ static void small_page_write(void* addr, size_t size) {
+ size_t page_size = os::vm_page_size();
+
+ char* end = (char*)addr + size;
+ for (char* p = (char*)addr; p < end; p += page_size) {
+ *p = 1;
+ }
+ }
+
+ static void test_reserve_memory_special_huge_tlbfs_only(size_t size) {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+
+ test_log("test_reserve_memory_special_huge_tlbfs_only(" SIZE_FORMAT ")", size);
+
+ char* addr = os::Linux::reserve_memory_special_huge_tlbfs_only(size, NULL, false);
+
+ if (addr != NULL) {
+ small_page_write(addr, size);
+
+ os::Linux::release_memory_special_huge_tlbfs(addr, size);
+ }
+ }
+
+ static void test_reserve_memory_special_huge_tlbfs_only() {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+
+ size_t lp = os::large_page_size();
+
+ for (size_t size = lp; size <= lp * 10; size += lp) {
+ test_reserve_memory_special_huge_tlbfs_only(size);
+ }
+ }
+
+ static void test_reserve_memory_special_huge_tlbfs_mixed(size_t size, size_t alignment) {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+
+ test_log("test_reserve_memory_special_huge_tlbfs_mixed(" SIZE_FORMAT ", " SIZE_FORMAT ")",
+ size, alignment);
+
+ assert(size >= os::large_page_size(), "Incorrect input to test");
+
+ char* addr = os::Linux::reserve_memory_special_huge_tlbfs_mixed(size, alignment, NULL, false);
+
+ if (addr != NULL) {
+ small_page_write(addr, size);
+
+ os::Linux::release_memory_special_huge_tlbfs(addr, size);
+ }
+ }
+
+ static void test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(size_t size) {
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) {
+ test_reserve_memory_special_huge_tlbfs_mixed(size, alignment);
+ }
+ }
+
+ static void test_reserve_memory_special_huge_tlbfs_mixed() {
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp + ag);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp + lp / 2);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2 + ag);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2 - ag);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2 + lp / 2);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 10);
+ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 10 + lp / 2);
+ }
+
+ static void test_reserve_memory_special_huge_tlbfs() {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+
+ test_reserve_memory_special_huge_tlbfs_only();
+ test_reserve_memory_special_huge_tlbfs_mixed();
+ }
+
+ static void test_reserve_memory_special_shm(size_t size, size_t alignment) {
+ if (!UseSHM) {
+ return;
+ }
+
+ test_log("test_reserve_memory_special_shm(" SIZE_FORMAT ", " SIZE_FORMAT ")", size, alignment);
+
+ char* addr = os::Linux::reserve_memory_special_shm(size, alignment, NULL, false);
+
+ if (addr != NULL) {
+ assert(is_ptr_aligned(addr, alignment), "Check");
+ assert(is_ptr_aligned(addr, os::large_page_size()), "Check");
+
+ small_page_write(addr, size);
+
+ os::Linux::release_memory_special_shm(addr, size);
+ }
+ }
+
+ static void test_reserve_memory_special_shm() {
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ for (size_t size = ag; size < lp * 3; size += ag) {
+ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) {
+ test_reserve_memory_special_shm(size, alignment);
+ }
+ }
+ }
+
+ static void test() {
+ test_reserve_memory_special_huge_tlbfs();
+ test_reserve_memory_special_shm();
+ }
+};
+
+void TestReserveMemorySpecial_test() {
+ TestReserveMemorySpecial::test();
+}
+
+#endif
--- a/hotspot/src/os/linux/vm/os_linux.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/linux/vm/os_linux.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -32,6 +32,7 @@
class Linux {
friend class os;
+ friend class TestReserveMemorySpecial;
// For signal-chaining
#define MAXSIGNUM 32
@@ -92,8 +93,21 @@
static void rebuild_cpu_to_node_map();
static GrowableArray<int>* cpu_to_node() { return _cpu_to_node; }
+ static size_t find_large_page_size();
+ static size_t setup_large_page_size();
+
+ static bool setup_large_page_type(size_t page_size);
+ static bool transparent_huge_pages_sanity_check(bool warn, size_t pages_size);
static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
+ static char* reserve_memory_special_shm(size_t bytes, size_t alignment, char* req_addr, bool exec);
+ static char* reserve_memory_special_huge_tlbfs(size_t bytes, size_t alignment, char* req_addr, bool exec);
+ static char* reserve_memory_special_huge_tlbfs_only(size_t bytes, char* req_addr, bool exec);
+ static char* reserve_memory_special_huge_tlbfs_mixed(size_t bytes, size_t alignment, char* req_addr, bool exec);
+
+ static bool release_memory_special_shm(char* base, size_t bytes);
+ static bool release_memory_special_huge_tlbfs(char* base, size_t bytes);
+
static void print_full_memory_info(outputStream* st);
static void print_distro_info(outputStream* st);
static void print_libversion_info(outputStream* st);
@@ -221,6 +235,7 @@
typedef int (*numa_available_func_t)(void);
typedef int (*numa_tonode_memory_func_t)(void *start, size_t size, int node);
typedef void (*numa_interleave_memory_func_t)(void *start, size_t size, unsigned long *nodemask);
+ typedef void (*numa_set_bind_policy_func_t)(int policy);
static sched_getcpu_func_t _sched_getcpu;
static numa_node_to_cpus_func_t _numa_node_to_cpus;
@@ -228,6 +243,7 @@
static numa_available_func_t _numa_available;
static numa_tonode_memory_func_t _numa_tonode_memory;
static numa_interleave_memory_func_t _numa_interleave_memory;
+ static numa_set_bind_policy_func_t _numa_set_bind_policy;
static unsigned long* _numa_all_nodes;
static void set_sched_getcpu(sched_getcpu_func_t func) { _sched_getcpu = func; }
@@ -236,6 +252,7 @@
static void set_numa_available(numa_available_func_t func) { _numa_available = func; }
static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; }
static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; }
+ static void set_numa_set_bind_policy(numa_set_bind_policy_func_t func) { _numa_set_bind_policy = func; }
static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; }
static int sched_getcpu_syscall(void);
public:
@@ -253,6 +270,11 @@
_numa_interleave_memory(start, size, _numa_all_nodes);
}
}
+ static void numa_set_bind_policy(int policy) {
+ if (_numa_set_bind_policy != NULL) {
+ _numa_set_bind_policy(policy);
+ }
+ }
static int get_node_by_cpu(int cpu_id);
};
--- a/hotspot/src/os/posix/vm/os_posix.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/posix/vm/os_posix.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 1999, 2013, 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
@@ -30,6 +30,8 @@
#include <unistd.h>
#include <sys/resource.h>
#include <sys/utsname.h>
+#include <pthread.h>
+#include <signal.h>
// Check core dump limit and report possible place where core can be found
@@ -260,6 +262,55 @@
return ::fdopen(fd, mode);
}
+void* os::get_default_process_handle() {
+ return (void*)::dlopen(NULL, RTLD_LAZY);
+}
+
+// Builds a platform dependent Agent_OnLoad_<lib_name> function name
+// which is used to find statically linked in agents.
+// Parameters:
+// sym_name: Symbol in library we are looking for
+// lib_name: Name of library to look in, NULL for shared libs.
+// is_absolute_path == true if lib_name is absolute path to agent
+// such as "/a/b/libL.so"
+// == false if only the base name of the library is passed in
+// such as "L"
+char* os::build_agent_function_name(const char *sym_name, const char *lib_name,
+ bool is_absolute_path) {
+ char *agent_entry_name;
+ size_t len;
+ size_t name_len;
+ size_t prefix_len = strlen(JNI_LIB_PREFIX);
+ size_t suffix_len = strlen(JNI_LIB_SUFFIX);
+ const char *start;
+
+ if (lib_name != NULL) {
+ len = name_len = strlen(lib_name);
+ if (is_absolute_path) {
+ // Need to strip path, prefix and suffix
+ if ((start = strrchr(lib_name, *os::file_separator())) != NULL) {
+ lib_name = ++start;
+ }
+ if (len <= (prefix_len + suffix_len)) {
+ return NULL;
+ }
+ lib_name += prefix_len;
+ name_len = strlen(lib_name) - suffix_len;
+ }
+ }
+ len = (lib_name != NULL ? name_len : 0) + strlen(sym_name) + 2;
+ agent_entry_name = NEW_C_HEAP_ARRAY_RETURN_NULL(char, len, mtThread);
+ if (agent_entry_name == NULL) {
+ return NULL;
+ }
+ strcpy(agent_entry_name, sym_name);
+ if (lib_name != NULL) {
+ strcat(agent_entry_name, "_");
+ strncat(agent_entry_name, lib_name, name_len);
+ }
+ return agent_entry_name;
+}
+
os::WatcherThreadCrashProtection::WatcherThreadCrashProtection() {
assert(Thread::current()->is_Watcher_thread(), "Must be WatcherThread");
}
@@ -271,11 +322,17 @@
* The callback is supposed to provide the method that should be protected.
*/
bool os::WatcherThreadCrashProtection::call(os::CrashProtectionCallback& cb) {
+ sigset_t saved_sig_mask;
+
assert(Thread::current()->is_Watcher_thread(), "Only for WatcherThread");
assert(!WatcherThread::watcher_thread()->has_crash_protection(),
"crash_protection already set?");
- if (sigsetjmp(_jmpbuf, 1) == 0) {
+ // we cannot rely on sigsetjmp/siglongjmp to save/restore the signal mask
+ // since on at least some systems (OS X) siglongjmp will restore the mask
+ // for the process, not the thread
+ pthread_sigmask(0, NULL, &saved_sig_mask);
+ if (sigsetjmp(_jmpbuf, 0) == 0) {
// make sure we can see in the signal handler that we have crash protection
// installed
WatcherThread::watcher_thread()->set_crash_protection(this);
@@ -285,6 +342,7 @@
return true;
}
// this happens when we siglongjmp() back
+ pthread_sigmask(SIG_SETMASK, &saved_sig_mask, NULL);
WatcherThread::watcher_thread()->set_crash_protection(NULL);
return false;
}
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -3385,7 +3385,7 @@
return true;
}
-char* os::reserve_memory_special(size_t size, char* addr, bool exec) {
+char* os::reserve_memory_special(size_t size, size_t alignment, char* addr, bool exec) {
fatal("os::reserve_memory_special should not be called on Solaris.");
return NULL;
}
@@ -6601,3 +6601,9 @@
return strlen(buffer);
}
+
+#ifndef PRODUCT
+void TestReserveMemorySpecial_test() {
+ // No tests available for this platform
+}
+#endif
--- a/hotspot/src/os/windows/vm/os_windows.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os/windows/vm/os_windows.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -3156,7 +3156,12 @@
return true;
}
-char* os::reserve_memory_special(size_t bytes, char* addr, bool exec) {
+char* os::reserve_memory_special(size_t bytes, size_t alignment, char* addr, bool exec) {
+ assert(UseLargePages, "only for large pages");
+
+ if (!is_size_aligned(bytes, os::large_page_size()) || alignment > os::large_page_size()) {
+ return NULL; // Fallback to small pages.
+ }
const DWORD prot = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
const DWORD flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
@@ -5394,6 +5399,75 @@
return true;
}
+void* os::get_default_process_handle() {
+ return (void*)GetModuleHandle(NULL);
+}
+
+// Builds a platform dependent Agent_OnLoad_<lib_name> function name
+// which is used to find statically linked in agents.
+// Additionally for windows, takes into account __stdcall names.
+// Parameters:
+// sym_name: Symbol in library we are looking for
+// lib_name: Name of library to look in, NULL for shared libs.
+// is_absolute_path == true if lib_name is absolute path to agent
+// such as "C:/a/b/L.dll"
+// == false if only the base name of the library is passed in
+// such as "L"
+char* os::build_agent_function_name(const char *sym_name, const char *lib_name,
+ bool is_absolute_path) {
+ char *agent_entry_name;
+ size_t len;
+ size_t name_len;
+ size_t prefix_len = strlen(JNI_LIB_PREFIX);
+ size_t suffix_len = strlen(JNI_LIB_SUFFIX);
+ const char *start;
+
+ if (lib_name != NULL) {
+ len = name_len = strlen(lib_name);
+ if (is_absolute_path) {
+ // Need to strip path, prefix and suffix
+ if ((start = strrchr(lib_name, *os::file_separator())) != NULL) {
+ lib_name = ++start;
+ } else {
+ // Need to check for C:
+ if ((start = strchr(lib_name, ':')) != NULL) {
+ lib_name = ++start;
+ }
+ }
+ if (len <= (prefix_len + suffix_len)) {
+ return NULL;
+ }
+ lib_name += prefix_len;
+ name_len = strlen(lib_name) - suffix_len;
+ }
+ }
+ len = (lib_name != NULL ? name_len : 0) + strlen(sym_name) + 2;
+ agent_entry_name = NEW_C_HEAP_ARRAY_RETURN_NULL(char, len, mtThread);
+ if (agent_entry_name == NULL) {
+ return NULL;
+ }
+ if (lib_name != NULL) {
+ const char *p = strrchr(sym_name, '@');
+ if (p != NULL && p != sym_name) {
+ // sym_name == _Agent_OnLoad@XX
+ strncpy(agent_entry_name, sym_name, (p - sym_name));
+ agent_entry_name[(p-sym_name)] = '\0';
+ // agent_entry_name == _Agent_OnLoad
+ strcat(agent_entry_name, "_");
+ strncat(agent_entry_name, lib_name, name_len);
+ strcat(agent_entry_name, p);
+ // agent_entry_name == _Agent_OnLoad_lib_name@XX
+ } else {
+ strcpy(agent_entry_name, sym_name);
+ strcat(agent_entry_name, "_");
+ strncat(agent_entry_name, lib_name, name_len);
+ }
+ } else {
+ strcpy(agent_entry_name, sym_name);
+ }
+ return agent_entry_name;
+}
+
#else
// Kernel32 API
typedef BOOL (WINAPI* SwitchToThread_Fn)(void);
@@ -5638,3 +5712,9 @@
}
#endif
+
+#ifndef PRODUCT
+void TestReserveMemorySpecial_test() {
+ // No tests available for this platform
+}
+#endif
--- a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -44,6 +44,6 @@
define_pd_global(intx, CompilerThreadStackSize, 0);
// Used on 64 bit platforms for UseCompressedOops base address
-define_pd_global(uintx,HeapBaseMinAddress, 256*M);
+define_pd_global(uintx,HeapBaseMinAddress, 2*G);
#endif // OS_CPU_SOLARIS_X86_VM_GLOBALS_SOLARIS_X86_HPP
--- a/hotspot/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/CallSite.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/CallSite.java Fri Sep 06 14:20:58 2013 -0700
@@ -106,10 +106,12 @@
" (" + getMethod().getBytes() + " bytes) " + getReason());
}
}
+ stream.printf(" (end time: %6.4f", getTimeStamp());
if (getEndNodes() > 0) {
- stream.printf(" (end time: %6.4f nodes: %d live: %d)", getTimeStamp(), getEndNodes(), getEndLiveNodes());
+ stream.printf(" nodes: %d live: %d", getEndNodes(), getEndLiveNodes());
}
- stream.println("");
+ stream.println(")");
+
if (getReceiver() != null) {
emit(stream, indent + 4);
// stream.println("type profile " + method.holder + " -> " + receiver + " (" +
--- a/hotspot/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Fri Sep 06 14:20:58 2013 -0700
@@ -207,7 +207,12 @@
}
String search(Attributes attr, String name) {
- return search(attr, name, null);
+ String result = attr.getValue(name);
+ if (result != null) {
+ return result;
+ } else {
+ throw new InternalError("can't find " + name);
+ }
}
String search(Attributes attr, String name, String defaultValue) {
@@ -215,13 +220,7 @@
if (result != null) {
return result;
}
- if (defaultValue != null) {
- return defaultValue;
- }
- for (int i = 0; i < attr.getLength(); i++) {
- System.out.println(attr.getQName(i) + " " + attr.getValue(attr.getQName(i)));
- }
- throw new InternalError("can't find " + name);
+ return defaultValue;
}
int indent = 0;
@@ -268,17 +267,18 @@
Phase p = new Phase(search(atts, "name"),
Double.parseDouble(search(atts, "stamp")),
Integer.parseInt(search(atts, "nodes", "0")),
- Integer.parseInt(search(atts, "live")));
+ Integer.parseInt(search(atts, "live", "0")));
phaseStack.push(p);
} else if (qname.equals("phase_done")) {
Phase p = phaseStack.pop();
- if (! p.getId().equals(search(atts, "name"))) {
+ String phaseName = search(atts, "name", null);
+ if (phaseName != null && !p.getId().equals(phaseName)) {
System.out.println("phase: " + p.getId());
throw new InternalError("phase name mismatch");
}
p.setEnd(Double.parseDouble(search(atts, "stamp")));
p.setEndNodes(Integer.parseInt(search(atts, "nodes", "0")));
- p.setEndLiveNodes(Integer.parseInt(search(atts, "live")));
+ p.setEndLiveNodes(Integer.parseInt(search(atts, "live", "0")));
compile.getPhases().add(p);
} else if (qname.equals("task")) {
compile = new Compilation(Integer.parseInt(search(atts, "compile_id", "-1")));
@@ -413,8 +413,8 @@
}
} else if (qname.equals("parse_done")) {
CallSite call = scopes.pop();
- call.setEndNodes(Integer.parseInt(search(atts, "nodes", "1")));
- call.setEndLiveNodes(Integer.parseInt(search(atts, "live", "1")));
+ call.setEndNodes(Integer.parseInt(search(atts, "nodes", "0")));
+ call.setEndLiveNodes(Integer.parseInt(search(atts, "live", "0")));
call.setTimeStamp(Double.parseDouble(search(atts, "stamp")));
scopes.push(call);
}
--- a/hotspot/src/share/vm/adlc/arena.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/adlc/arena.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -24,7 +24,7 @@
#include "adlc.hpp"
-void* Chunk::operator new(size_t requested_size, size_t length) {
+void* Chunk::operator new(size_t requested_size, size_t length) throw() {
return CHeapObj::operator new(requested_size + length);
}
@@ -163,7 +163,7 @@
//-----------------------------------------------------------------------------
// CHeapObj
-void* CHeapObj::operator new(size_t size){
+void* CHeapObj::operator new(size_t size) throw() {
return (void *) malloc(size);
}
--- a/hotspot/src/share/vm/adlc/arena.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/adlc/arena.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -42,7 +42,7 @@
class CHeapObj {
public:
- void* operator new(size_t size);
+ void* operator new(size_t size) throw();
void operator delete(void* p);
void* new_array(size_t size);
};
@@ -53,7 +53,7 @@
class ValueObj {
public:
- void* operator new(size_t size);
+ void* operator new(size_t size) throw();
void operator delete(void* p);
};
@@ -61,7 +61,7 @@
class AllStatic {
public:
- void* operator new(size_t size);
+ void* operator new(size_t size) throw();
void operator delete(void* p);
};
@@ -70,7 +70,7 @@
// Linked list of raw memory chunks
class Chunk: public CHeapObj {
public:
- void* operator new(size_t size, size_t length);
+ void* operator new(size_t size, size_t length) throw();
void operator delete(void* p, size_t length);
Chunk(size_t length);
--- a/hotspot/src/share/vm/adlc/main.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/adlc/main.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -485,7 +485,7 @@
// VS2005 has its own definition, identical to this one.
#if !defined(_WIN32) || defined(_WIN64) || _MSC_VER < 1400
-void *operator new( size_t size, int, const char *, int ) {
+void *operator new( size_t size, int, const char *, int ) throw() {
return ::operator new( size );
}
#endif
--- a/hotspot/src/share/vm/adlc/output_c.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/adlc/output_c.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1095,7 +1095,7 @@
fprintf(fp, " // Identify previous instruction if inside this block\n");
fprintf(fp, " if( ");
print_block_index(fp, inst_position);
- fprintf(fp, " > 0 ) {\n Node *n = block->_nodes.at(");
+ fprintf(fp, " > 0 ) {\n Node *n = block->get_node(");
print_block_index(fp, inst_position);
fprintf(fp, ");\n inst%d = (n->is_Mach()) ? ", inst_position);
fprintf(fp, "n->as_Mach() : NULL;\n }\n");
--- a/hotspot/src/share/vm/asm/codeBuffer.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/asm/codeBuffer.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -296,8 +296,8 @@
// CodeBuffers must be allocated on the stack except for a single
// special case during expansion which is handled internally. This
// is done to guarantee proper cleanup of resources.
- void* operator new(size_t size) { return ResourceObj::operator new(size); }
- void operator delete(void* p) { ShouldNotCallThis(); }
+ void* operator new(size_t size) throw() { return ResourceObj::operator new(size); }
+ void operator delete(void* p) { ShouldNotCallThis(); }
public:
typedef int csize_t; // code size type; would be size_t except for history
--- a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -364,7 +364,8 @@
enum PatchID {
access_field_id,
load_klass_id,
- load_mirror_id
+ load_mirror_id,
+ load_appendix_id
};
enum constants {
patch_info_size = 3
@@ -417,7 +418,7 @@
}
NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start());
n_move->set_offset(field_offset);
- } else if (_id == load_klass_id || _id == load_mirror_id) {
+ } else if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
assert(_obj != noreg, "must have register object for load_klass/load_mirror");
#ifdef ASSERT
// verify that we're pointing at a NativeMovConstReg
--- a/hotspot/src/share/vm/c1/c1_Compilation.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_Compilation.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -74,16 +74,19 @@
private:
JavaThread* _thread;
CompileLog* _log;
+ TimerName _timer;
public:
PhaseTraceTime(TimerName timer)
- : TraceTime("", &timers[timer], CITime || CITimeEach, Verbose), _log(NULL) {
+ : TraceTime("", &timers[timer], CITime || CITimeEach, Verbose),
+ _log(NULL), _timer(timer)
+ {
if (Compilation::current() != NULL) {
_log = Compilation::current()->log();
}
if (_log != NULL) {
- _log->begin_head("phase name='%s'", timer_name[timer]);
+ _log->begin_head("phase name='%s'", timer_name[_timer]);
_log->stamp();
_log->end_head();
}
@@ -91,7 +94,7 @@
~PhaseTraceTime() {
if (_log != NULL)
- _log->done("phase");
+ _log->done("phase name='%s'", timer_name[_timer]);
}
};
--- a/hotspot/src/share/vm/c1/c1_Compilation.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_Compilation.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -279,8 +279,8 @@
// Base class for objects allocated by the compiler in the compilation arena
class CompilationResourceObj ALLOCATION_SUPER_CLASS_SPEC {
public:
- void* operator new(size_t size) { return Compilation::current()->arena()->Amalloc(size); }
- void* operator new(size_t size, Arena* arena) {
+ void* operator new(size_t size) throw() { return Compilation::current()->arena()->Amalloc(size); }
+ void* operator new(size_t size, Arena* arena) throw() {
return arena->Amalloc(size);
}
void operator delete(void* p) {} // nothing to do
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1583,7 +1583,7 @@
ObjectType* obj_type = obj->type()->as_ObjectType();
if (obj_type->is_constant() && !PatchALot) {
ciObject* const_oop = obj_type->constant_value();
- if (!const_oop->is_null_object()) {
+ if (!const_oop->is_null_object() && const_oop->is_loaded()) {
if (field->is_constant()) {
ciConstant field_val = field->constant_value_of(const_oop);
BasicType field_type = field_val.basic_type();
@@ -1667,9 +1667,8 @@
const Bytecodes::Code bc_raw = stream()->cur_bc_raw();
assert(declared_signature != NULL, "cannot be null");
- // FIXME bail out for now
- if (Bytecodes::has_optional_appendix(bc_raw) && !will_link) {
- BAILOUT("unlinked call site (FIXME needs patching or recompile support)");
+ if (!C1PatchInvokeDynamic && Bytecodes::has_optional_appendix(bc_raw) && !will_link) {
+ BAILOUT("unlinked call site (C1PatchInvokeDynamic is off)");
}
// we have to make sure the argument size (incl. the receiver)
@@ -1713,10 +1712,23 @@
code = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokespecial;
break;
}
+ } else {
+ if (bc_raw == Bytecodes::_invokehandle) {
+ assert(!will_link, "should come here only for unlinked call");
+ code = Bytecodes::_invokespecial;
+ }
}
// Push appendix argument (MethodType, CallSite, etc.), if one.
- if (stream()->has_appendix()) {
+ bool patch_for_appendix = false;
+ int patching_appendix_arg = 0;
+ if (C1PatchInvokeDynamic &&
+ (Bytecodes::has_optional_appendix(bc_raw) && (!will_link || PatchALot))) {
+ Value arg = append(new Constant(new ObjectConstant(compilation()->env()->unloaded_ciinstance()), copy_state_before()));
+ apush(arg);
+ patch_for_appendix = true;
+ patching_appendix_arg = (will_link && stream()->has_appendix()) ? 0 : 1;
+ } else if (stream()->has_appendix()) {
ciObject* appendix = stream()->get_appendix();
Value arg = append(new Constant(new ObjectConstant(appendix)));
apush(arg);
@@ -1732,7 +1744,8 @@
if (UseCHA && DeoptC1 && klass->is_loaded() && target->is_loaded() &&
!(// %%% FIXME: Are both of these relevant?
target->is_method_handle_intrinsic() ||
- target->is_compiled_lambda_form())) {
+ target->is_compiled_lambda_form()) &&
+ !patch_for_appendix) {
Value receiver = NULL;
ciInstanceKlass* receiver_klass = NULL;
bool type_is_exact = false;
@@ -1850,7 +1863,8 @@
// check if we could do inlining
if (!PatchALot && Inline && klass->is_loaded() &&
(klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
- && target->is_loaded()) {
+ && target->is_loaded()
+ && !patch_for_appendix) {
// callee is known => check if we have static binding
assert(target->is_loaded(), "callee must be known");
if (code == Bytecodes::_invokestatic ||
@@ -1901,7 +1915,7 @@
code == Bytecodes::_invokespecial ||
code == Bytecodes::_invokevirtual ||
code == Bytecodes::_invokeinterface;
- Values* args = state()->pop_arguments(target->arg_size_no_receiver());
+ Values* args = state()->pop_arguments(target->arg_size_no_receiver() + patching_appendix_arg);
Value recv = has_receiver ? apop() : NULL;
int vtable_index = Method::invalid_vtable_index;
--- a/hotspot/src/share/vm/c1/c1_Instruction.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -323,7 +323,7 @@
}
public:
- void* operator new(size_t size) {
+ void* operator new(size_t size) throw() {
Compilation* c = Compilation::current();
void* res = c->arena()->Amalloc(size);
((Instruction*)res)->_id = c->get_next_id();
@@ -1611,7 +1611,7 @@
friend class SuxAndWeightAdjuster;
public:
- void* operator new(size_t size) {
+ void* operator new(size_t size) throw() {
Compilation* c = Compilation::current();
void* res = c->arena()->Amalloc(size);
((BlockBegin*)res)->_id = c->get_next_id();
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1211,8 +1211,6 @@
bool is_invokedynamic() const { return code() == lir_dynamic_call; }
bool is_method_handle_invoke() const {
return
- is_invokedynamic() // An invokedynamic is always a MethodHandle call site.
- ||
method()->is_compiled_lambda_form() // Java-generated adapter
||
method()->is_method_handle_intrinsic(); // JVM-generated MH intrinsic
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -93,12 +93,23 @@
default:
ShouldNotReachHere();
}
+ } else if (patch->id() == PatchingStub::load_appendix_id) {
+ Bytecodes::Code bc_raw = info->scope()->method()->raw_code_at_bci(info->stack()->bci());
+ assert(Bytecodes::has_optional_appendix(bc_raw), "unexpected appendix resolution");
} else {
ShouldNotReachHere();
}
#endif
}
+PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {
+ IRScope* scope = info->scope();
+ Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci());
+ if (Bytecodes::has_optional_appendix(bc_raw)) {
+ return PatchingStub::load_appendix_id;
+ }
+ return PatchingStub::load_mirror_id;
+}
//---------------------------------------------------------------
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -119,6 +119,8 @@
void comp_op(LIR_Condition condition, LIR_Opr src, LIR_Opr result, LIR_Op2* op);
+ PatchingStub::PatchID patching_id(CodeEmitInfo* info);
+
public:
LIR_Assembler(Compilation* c);
~LIR_Assembler();
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -819,6 +819,7 @@
KlassHandle init_klass(THREAD, NULL); // klass needed by load_klass_patching code
KlassHandle load_klass(THREAD, NULL); // klass needed by load_klass_patching code
Handle mirror(THREAD, NULL); // oop needed by load_mirror_patching code
+ Handle appendix(THREAD, NULL); // oop needed by appendix_patching code
bool load_klass_or_mirror_patch_id =
(stub_id == Runtime1::load_klass_patching_id || stub_id == Runtime1::load_mirror_patching_id);
@@ -888,10 +889,32 @@
mirror = Handle(THREAD, m);
}
break;
- default: Unimplemented();
+ default: fatal("unexpected bytecode for load_klass_or_mirror_patch_id");
}
// convert to handle
load_klass = KlassHandle(THREAD, k);
+ } else if (stub_id == load_appendix_patching_id) {
+ Bytecode_invoke bytecode(caller_method, bci);
+ Bytecodes::Code bc = bytecode.invoke_code();
+
+ CallInfo info;
+ constantPoolHandle pool(thread, caller_method->constants());
+ int index = bytecode.index();
+ LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
+ appendix = info.resolved_appendix();
+ switch (bc) {
+ case Bytecodes::_invokehandle: {
+ int cache_index = ConstantPool::decode_cpcache_index(index, true);
+ assert(cache_index >= 0 && cache_index < pool->cache()->length(), "unexpected cache index");
+ pool->cache()->entry_at(cache_index)->set_method_handle(pool, info);
+ break;
+ }
+ case Bytecodes::_invokedynamic: {
+ pool->invokedynamic_cp_cache_entry_at(index)->set_dynamic_call(pool, info);
+ break;
+ }
+ default: fatal("unexpected bytecode for load_appendix_patching_id");
+ }
} else {
ShouldNotReachHere();
}
@@ -992,8 +1015,8 @@
n_copy->data() == (intptr_t)Universe::non_oop_word(),
"illegal init value");
if (stub_id == Runtime1::load_klass_patching_id) {
- assert(load_klass() != NULL, "klass not set");
- n_copy->set_data((intx) (load_klass()));
+ assert(load_klass() != NULL, "klass not set");
+ n_copy->set_data((intx) (load_klass()));
} else {
assert(mirror() != NULL, "klass not set");
n_copy->set_data((intx) (mirror()));
@@ -1002,43 +1025,55 @@
if (TracePatching) {
Disassembler::decode(copy_buff, copy_buff + *byte_count, tty);
}
+ }
+ } else if (stub_id == Runtime1::load_appendix_patching_id) {
+ NativeMovConstReg* n_copy = nativeMovConstReg_at(copy_buff);
+ assert(n_copy->data() == 0 ||
+ n_copy->data() == (intptr_t)Universe::non_oop_word(),
+ "illegal init value");
+ n_copy->set_data((intx) (appendix()));
-#if defined(SPARC) || defined(PPC)
- // Update the location in the nmethod with the proper
- // metadata. When the code was generated, a NULL was stuffed
- // in the metadata table and that table needs to be update to
- // have the right value. On intel the value is kept
- // directly in the instruction instead of in the metadata
- // table, so set_data above effectively updated the value.
- nmethod* nm = CodeCache::find_nmethod(instr_pc);
- assert(nm != NULL, "invalid nmethod_pc");
- RelocIterator mds(nm, copy_buff, copy_buff + 1);
- bool found = false;
- while (mds.next() && !found) {
- if (mds.type() == relocInfo::oop_type) {
- assert(stub_id == Runtime1::load_mirror_patching_id, "wrong stub id");
- oop_Relocation* r = mds.oop_reloc();
- oop* oop_adr = r->oop_addr();
- *oop_adr = mirror();
- r->fix_oop_relocation();
- found = true;
- } else if (mds.type() == relocInfo::metadata_type) {
- assert(stub_id == Runtime1::load_klass_patching_id, "wrong stub id");
- metadata_Relocation* r = mds.metadata_reloc();
- Metadata** metadata_adr = r->metadata_addr();
- *metadata_adr = load_klass();
- r->fix_metadata_relocation();
- found = true;
- }
- }
- assert(found, "the metadata must exist!");
-#endif
-
+ if (TracePatching) {
+ Disassembler::decode(copy_buff, copy_buff + *byte_count, tty);
}
} else {
ShouldNotReachHere();
}
+#if defined(SPARC) || defined(PPC)
+ if (load_klass_or_mirror_patch_id ||
+ stub_id == Runtime1::load_appendix_patching_id) {
+ // Update the location in the nmethod with the proper
+ // metadata. When the code was generated, a NULL was stuffed
+ // in the metadata table and that table needs to be update to
+ // have the right value. On intel the value is kept
+ // directly in the instruction instead of in the metadata
+ // table, so set_data above effectively updated the value.
+ nmethod* nm = CodeCache::find_nmethod(instr_pc);
+ assert(nm != NULL, "invalid nmethod_pc");
+ RelocIterator mds(nm, copy_buff, copy_buff + 1);
+ bool found = false;
+ while (mds.next() && !found) {
+ if (mds.type() == relocInfo::oop_type) {
+ assert(stub_id == Runtime1::load_mirror_patching_id ||
+ stub_id == Runtime1::load_appendix_patching_id, "wrong stub id");
+ oop_Relocation* r = mds.oop_reloc();
+ oop* oop_adr = r->oop_addr();
+ *oop_adr = stub_id == Runtime1::load_mirror_patching_id ? mirror() : appendix();
+ r->fix_oop_relocation();
+ found = true;
+ } else if (mds.type() == relocInfo::metadata_type) {
+ assert(stub_id == Runtime1::load_klass_patching_id, "wrong stub id");
+ metadata_Relocation* r = mds.metadata_reloc();
+ Metadata** metadata_adr = r->metadata_addr();
+ *metadata_adr = load_klass();
+ r->fix_metadata_relocation();
+ found = true;
+ }
+ }
+ assert(found, "the metadata must exist!");
+ }
+#endif
if (do_patch) {
// replace instructions
// first replace the tail, then the call
@@ -1077,7 +1112,8 @@
ICache::invalidate_range(instr_pc, *byte_count);
NativeGeneralJump::replace_mt_safe(instr_pc, copy_buff);
- if (load_klass_or_mirror_patch_id) {
+ if (load_klass_or_mirror_patch_id ||
+ stub_id == Runtime1::load_appendix_patching_id) {
relocInfo::relocType rtype =
(stub_id == Runtime1::load_klass_patching_id) ?
relocInfo::metadata_type :
@@ -1118,7 +1154,8 @@
// If we are patching in a non-perm oop, make sure the nmethod
// is on the right list.
- if (ScavengeRootsInCode && mirror.not_null() && mirror()->is_scavengable()) {
+ if (ScavengeRootsInCode && ((mirror.not_null() && mirror()->is_scavengable()) ||
+ (appendix.not_null() && appendix->is_scavengable()))) {
MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag);
nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
guarantee(nm != NULL, "only nmethods can contain non-perm oops");
@@ -1179,6 +1216,24 @@
return caller_is_deopted();
}
+int Runtime1::move_appendix_patching(JavaThread* thread) {
+//
+// NOTE: we are still in Java
+//
+ Thread* THREAD = thread;
+ debug_only(NoHandleMark nhm;)
+ {
+ // Enter VM mode
+
+ ResetNoHandleMark rnhm;
+ patch_code(thread, load_appendix_patching_id);
+ }
+ // Back in JAVA, use no oops DON'T safepoint
+
+ // Return true if calling code is deoptimized
+
+ return caller_is_deopted();
+}
//
// Entry point for compiled code. We want to patch a nmethod.
// We don't do a normal VM transition here because we want to
--- a/hotspot/src/share/vm/c1/c1_Runtime1.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -67,6 +67,7 @@
stub(access_field_patching) \
stub(load_klass_patching) \
stub(load_mirror_patching) \
+ stub(load_appendix_patching) \
stub(g1_pre_barrier_slow) \
stub(g1_post_barrier_slow) \
stub(fpu2long_stub) \
@@ -160,6 +161,7 @@
static int access_field_patching(JavaThread* thread);
static int move_klass_patching(JavaThread* thread);
static int move_mirror_patching(JavaThread* thread);
+ static int move_appendix_patching(JavaThread* thread);
static void patch_code(JavaThread* thread, StubID stub_id);
--- a/hotspot/src/share/vm/c1/c1_globals.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_globals.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -25,4 +25,4 @@
#include "precompiled.hpp"
#include "c1/c1_globals.hpp"
-C1_FLAGS(MATERIALIZE_DEVELOPER_FLAG, MATERIALIZE_PD_DEVELOPER_FLAG, MATERIALIZE_PRODUCT_FLAG, MATERIALIZE_PD_PRODUCT_FLAG, MATERIALIZE_NOTPRODUCT_FLAG)
+C1_FLAGS(MATERIALIZE_DEVELOPER_FLAG, MATERIALIZE_PD_DEVELOPER_FLAG, MATERIALIZE_PRODUCT_FLAG, MATERIALIZE_PD_PRODUCT_FLAG, MATERIALIZE_DIAGNOSTIC_FLAG, MATERIALIZE_NOTPRODUCT_FLAG)
--- a/hotspot/src/share/vm/c1/c1_globals.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/c1/c1_globals.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -54,7 +54,7 @@
//
// Defines all global flags used by the client compiler.
//
-#define C1_FLAGS(develop, develop_pd, product, product_pd, notproduct) \
+#define C1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct) \
\
/* Printing */ \
notproduct(bool, PrintC1Statistics, false, \
@@ -333,15 +333,19 @@
"Use CHA and exact type results at call sites when updating MDOs")\
\
product(bool, C1UpdateMethodData, trueInTiered, \
- "Update MethodData*s in Tier1-generated code") \
+ "Update MethodData*s in Tier1-generated code") \
\
develop(bool, PrintCFGToFile, false, \
"print control flow graph to a separate file during compilation") \
\
+ diagnostic(bool, C1PatchInvokeDynamic, true, \
+ "Patch invokedynamic appendix not known at compile time") \
+ \
+ \
// Read default values for c1 globals
-C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_NOTPRODUCT_FLAG)
+C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG)
#endif // SHARE_VM_C1_C1_GLOBALS_HPP
--- a/hotspot/src/share/vm/ci/ciEnv.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1150,6 +1150,10 @@
record_method_not_compilable("out of memory");
}
+ciInstance* ciEnv::unloaded_ciinstance() {
+ GUARDED_VM_ENTRY(return _factory->get_unloaded_object_constant();)
+}
+
void ciEnv::dump_replay_data(outputStream* out) {
VM_ENTRY_MARK;
MutexLocker ml(Compile_lock);
--- a/hotspot/src/share/vm/ci/ciEnv.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -400,6 +400,7 @@
static ciInstanceKlass* unloaded_ciinstance_klass() {
return _unloaded_ciinstance_klass;
}
+ ciInstance* unloaded_ciinstance();
ciKlass* find_system_klass(ciSymbol* klass_name);
// Note: To find a class from its name string, use ciSymbol::make,
--- a/hotspot/src/share/vm/ci/ciInstance.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/ci/ciInstance.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -60,10 +60,10 @@
//
// Constant value of a field.
ciConstant ciInstance::field_value(ciField* field) {
- assert(is_loaded() &&
- field->holder()->is_loaded() &&
- klass()->is_subclass_of(field->holder()),
- "invalid access");
+ assert(is_loaded(), "invalid access - must be loaded");
+ assert(field->holder()->is_loaded(), "invalid access - holder must be loaded");
+ assert(klass()->is_subclass_of(field->holder()), "invalid access - must be subclass");
+
VM_ENTRY_MARK;
ciConstant result;
Handle obj = get_oop();
--- a/hotspot/src/share/vm/ci/ciMethod.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -177,6 +177,10 @@
address bcp = code() + bci;
return Bytecodes::java_code_at(NULL, bcp);
}
+ Bytecodes::Code raw_code_at_bci(int bci) {
+ address bcp = code() + bci;
+ return Bytecodes::code_at(NULL, bcp);
+ }
BCEscapeAnalyzer *get_bcea();
ciMethodBlocks *get_method_blocks();
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -563,7 +563,10 @@
return get_unloaded_instance(ciEnv::_MethodType_klass->as_instance_klass());
}
-
+ciInstance* ciObjectFactory::get_unloaded_object_constant() {
+ if (ciEnv::_Object_klass == NULL) return NULL;
+ return get_unloaded_instance(ciEnv::_Object_klass->as_instance_klass());
+}
//------------------------------------------------------------------
// ciObjectFactory::get_empty_methodData
--- a/hotspot/src/share/vm/ci/ciObjectFactory.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -131,6 +131,8 @@
ciInstance* get_unloaded_method_type_constant(ciSymbol* signature);
+ ciInstance* get_unloaded_object_constant();
+
// Get the ciMethodData representing the methodData for a method
// with none.
ciMethodData* get_empty_methodData();
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -28,7 +28,6 @@
#include "classfile/classLoaderData.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/defaultMethods.hpp"
-#include "classfile/genericSignatures.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
@@ -3039,35 +3038,6 @@
return annotations;
}
-
-#ifdef ASSERT
-static void parseAndPrintGenericSignatures(
- instanceKlassHandle this_klass, TRAPS) {
- assert(ParseAllGenericSignatures == true, "Shouldn't call otherwise");
- ResourceMark rm;
-
- if (this_klass->generic_signature() != NULL) {
- using namespace generic;
- ClassDescriptor* spec = ClassDescriptor::parse_generic_signature(this_klass(), CHECK);
-
- tty->print_cr("Parsing %s", this_klass->generic_signature()->as_C_string());
- spec->print_on(tty);
-
- for (int i = 0; i < this_klass->methods()->length(); ++i) {
- Method* m = this_klass->methods()->at(i);
- MethodDescriptor* method_spec = MethodDescriptor::parse_generic_signature(m, spec);
- Symbol* sig = m->generic_signature();
- if (sig == NULL) {
- sig = m->signature();
- }
- tty->print_cr("Parsing %s", sig->as_C_string());
- method_spec->print_on(tty);
- }
- }
-}
-#endif // def ASSERT
-
-
instanceKlassHandle ClassFileParser::parse_super_class(int super_class_index,
TRAPS) {
instanceKlassHandle super_klass;
@@ -4060,12 +4030,6 @@
java_lang_Class::create_mirror(this_klass, protection_domain, CHECK_(nullHandle));
-#ifdef ASSERT
- if (ParseAllGenericSignatures) {
- parseAndPrintGenericSignatures(this_klass, CHECK_(nullHandle));
- }
-#endif
-
// Generate any default methods - default methods are interface methods
// that have a default implementation. This is new with Lambda project.
if (has_default_methods && !access_flags.is_interface() &&
--- a/hotspot/src/share/vm/classfile/classLoader.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -197,7 +197,7 @@
}
-ClassFileStream* ClassPathDirEntry::open_stream(const char* name) {
+ClassFileStream* ClassPathDirEntry::open_stream(const char* name, TRAPS) {
// construct full path name
char path[JVM_MAXPATHLEN];
if (jio_snprintf(path, sizeof(path), "%s%s%s", _dir, os::file_separator(), name) == -1) {
@@ -240,7 +240,7 @@
FREE_C_HEAP_ARRAY(char, _zip_name, mtClass);
}
-ClassFileStream* ClassPathZipEntry::open_stream(const char* name) {
+ClassFileStream* ClassPathZipEntry::open_stream(const char* name, TRAPS) {
// enable call to C land
JavaThread* thread = JavaThread::current();
ThreadToNativeFromVM ttn(thread);
@@ -284,24 +284,24 @@
}
}
-LazyClassPathEntry::LazyClassPathEntry(char* path, struct stat st) : ClassPathEntry() {
+LazyClassPathEntry::LazyClassPathEntry(char* path, const struct stat* st) : ClassPathEntry() {
_path = strdup(path);
- _st = st;
+ _st = *st;
_meta_index = NULL;
_resolved_entry = NULL;
+ _has_error = false;
}
bool LazyClassPathEntry::is_jar_file() {
return ((_st.st_mode & S_IFREG) == S_IFREG);
}
-ClassPathEntry* LazyClassPathEntry::resolve_entry() {
+ClassPathEntry* LazyClassPathEntry::resolve_entry(TRAPS) {
if (_resolved_entry != NULL) {
return (ClassPathEntry*) _resolved_entry;
}
ClassPathEntry* new_entry = NULL;
- ClassLoader::create_class_path_entry(_path, _st, &new_entry, false);
- assert(new_entry != NULL, "earlier code should have caught this");
+ new_entry = ClassLoader::create_class_path_entry(_path, &_st, false, CHECK_NULL);
{
ThreadCritical tc;
if (_resolved_entry == NULL) {
@@ -314,12 +314,21 @@
return (ClassPathEntry*) _resolved_entry;
}
-ClassFileStream* LazyClassPathEntry::open_stream(const char* name) {
+ClassFileStream* LazyClassPathEntry::open_stream(const char* name, TRAPS) {
if (_meta_index != NULL &&
!_meta_index->may_contain(name)) {
return NULL;
}
- return resolve_entry()->open_stream(name);
+ if (_has_error) {
+ return NULL;
+ }
+ ClassPathEntry* cpe = resolve_entry(THREAD);
+ if (cpe == NULL) {
+ _has_error = true;
+ return NULL;
+ } else {
+ return cpe->open_stream(name, THREAD);
+ }
}
bool LazyClassPathEntry::is_lazy() {
@@ -465,20 +474,19 @@
}
}
-void ClassLoader::create_class_path_entry(char *path, struct stat st, ClassPathEntry **new_entry, bool lazy) {
+ClassPathEntry* ClassLoader::create_class_path_entry(char *path, const struct stat* st, bool lazy, TRAPS) {
JavaThread* thread = JavaThread::current();
if (lazy) {
- *new_entry = new LazyClassPathEntry(path, st);
- return;
+ return new LazyClassPathEntry(path, st);
}
- if ((st.st_mode & S_IFREG) == S_IFREG) {
+ ClassPathEntry* new_entry = NULL;
+ if ((st->st_mode & S_IFREG) == S_IFREG) {
// Regular file, should be a zip file
// Canonicalized filename
char canonical_path[JVM_MAXPATHLEN];
if (!get_canonical_path(path, canonical_path, JVM_MAXPATHLEN)) {
// This matches the classic VM
- EXCEPTION_MARK;
- THROW_MSG(vmSymbols::java_io_IOException(), "Bad pathname");
+ THROW_MSG_(vmSymbols::java_io_IOException(), "Bad pathname", NULL);
}
char* error_msg = NULL;
jzfile* zip;
@@ -489,7 +497,7 @@
zip = (*ZipOpen)(canonical_path, &error_msg);
}
if (zip != NULL && error_msg == NULL) {
- *new_entry = new ClassPathZipEntry(zip, path);
+ new_entry = new ClassPathZipEntry(zip, path);
if (TraceClassLoading) {
tty->print_cr("[Opened %s]", path);
}
@@ -504,16 +512,16 @@
msg = NEW_RESOURCE_ARRAY(char, len); ;
jio_snprintf(msg, len - 1, "error in opening JAR file <%s> %s", error_msg, path);
}
- EXCEPTION_MARK;
- THROW_MSG(vmSymbols::java_lang_ClassNotFoundException(), msg);
+ THROW_MSG_(vmSymbols::java_lang_ClassNotFoundException(), msg, NULL);
}
} else {
// Directory
- *new_entry = new ClassPathDirEntry(path);
+ new_entry = new ClassPathDirEntry(path);
if (TraceClassLoading) {
tty->print_cr("[Path %s]", path);
}
}
+ return new_entry;
}
@@ -572,13 +580,14 @@
}
}
-void ClassLoader::update_class_path_entry_list(const char *path,
+void ClassLoader::update_class_path_entry_list(char *path,
bool check_for_duplicates) {
struct stat st;
- if (os::stat((char *)path, &st) == 0) {
+ if (os::stat(path, &st) == 0) {
// File or directory found
ClassPathEntry* new_entry = NULL;
- create_class_path_entry((char *)path, st, &new_entry, LazyBootClassLoader);
+ Thread* THREAD = Thread::current();
+ new_entry = create_class_path_entry(path, &st, LazyBootClassLoader, CHECK);
// The kernel VM adds dynamically to the end of the classloader path and
// doesn't reorder the bootclasspath which would break java.lang.Package
// (see PackageInfo).
@@ -897,7 +906,7 @@
PerfClassTraceTime::CLASS_LOAD);
ClassPathEntry* e = _first_entry;
while (e != NULL) {
- stream = e->open_stream(name);
+ stream = e->open_stream(name, CHECK_NULL);
if (stream != NULL) {
break;
}
@@ -1257,11 +1266,16 @@
}
void LazyClassPathEntry::compile_the_world(Handle loader, TRAPS) {
- resolve_entry()->compile_the_world(loader, CHECK);
+ ClassPathEntry* cpe = resolve_entry(THREAD);
+ if (cpe != NULL) {
+ cpe->compile_the_world(loader, CHECK);
+ }
}
bool LazyClassPathEntry::is_rt_jar() {
- return resolve_entry()->is_rt_jar();
+ Thread* THREAD = Thread::current();
+ ClassPathEntry* cpe = resolve_entry(THREAD);
+ return (cpe != NULL) ? cpe->is_jar_file() : false;
}
void ClassLoader::compile_the_world() {
--- a/hotspot/src/share/vm/classfile/classLoader.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -63,7 +63,7 @@
ClassPathEntry();
// Attempt to locate file_name through this class path entry.
// Returns a class file parsing stream if successfull.
- virtual ClassFileStream* open_stream(const char* name) = 0;
+ virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0;
// Debugging
NOT_PRODUCT(virtual void compile_the_world(Handle loader, TRAPS) = 0;)
NOT_PRODUCT(virtual bool is_rt_jar() = 0;)
@@ -77,7 +77,7 @@
bool is_jar_file() { return false; }
const char* name() { return _dir; }
ClassPathDirEntry(char* dir);
- ClassFileStream* open_stream(const char* name);
+ ClassFileStream* open_stream(const char* name, TRAPS);
// Debugging
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
NOT_PRODUCT(bool is_rt_jar();)
@@ -107,7 +107,7 @@
const char* name() { return _zip_name; }
ClassPathZipEntry(jzfile* zip, const char* zip_name);
~ClassPathZipEntry();
- ClassFileStream* open_stream(const char* name);
+ ClassFileStream* open_stream(const char* name, TRAPS);
void contents_do(void f(const char* name, void* context), void* context);
// Debugging
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
@@ -125,13 +125,14 @@
char* _path; // dir or file
struct stat _st;
MetaIndex* _meta_index;
+ bool _has_error;
volatile ClassPathEntry* _resolved_entry;
- ClassPathEntry* resolve_entry();
+ ClassPathEntry* resolve_entry(TRAPS);
public:
bool is_jar_file();
const char* name() { return _path; }
- LazyClassPathEntry(char* path, struct stat st);
- ClassFileStream* open_stream(const char* name);
+ LazyClassPathEntry(char* path, const struct stat* st);
+ ClassFileStream* open_stream(const char* name, TRAPS);
void set_meta_index(MetaIndex* meta_index) { _meta_index = meta_index; }
virtual bool is_lazy();
// Debugging
@@ -207,14 +208,15 @@
static void setup_meta_index();
static void setup_bootstrap_search_path();
static void load_zip_library();
- static void create_class_path_entry(char *path, struct stat st, ClassPathEntry **new_entry, bool lazy);
+ static ClassPathEntry* create_class_path_entry(char *path, const struct stat* st,
+ bool lazy, TRAPS);
// Canonicalizes path names, so strcmp will work properly. This is mainly
// to avoid confusing the zip library
static bool get_canonical_path(char* orig, char* out, int len);
public:
// Used by the kernel jvm.
- static void update_class_path_entry_list(const char *path,
+ static void update_class_path_entry_list(char *path,
bool check_for_duplicates);
static void print_bootclasspath();
--- a/hotspot/src/share/vm/classfile/defaultMethods.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/classfile/defaultMethods.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -25,7 +25,6 @@
#include "precompiled.hpp"
#include "classfile/bytecodeAssembler.hpp"
#include "classfile/defaultMethods.hpp"
-#include "classfile/genericSignatures.hpp"
#include "classfile/symbolTable.hpp"
#include "memory/allocation.hpp"
#include "memory/metadataFactory.hpp"
@@ -75,14 +74,6 @@
}
};
-class ContextMark : public PseudoScopeMark {
- private:
- generic::Context::Mark _mark;
- public:
- ContextMark(const generic::Context::Mark& cm) : _mark(cm) {}
- virtual void destroy() { _mark.destroy(); }
-};
-
#ifndef PRODUCT
static void print_slot(outputStream* str, Symbol* name, Symbol* signature) {
ResourceMark rm;
@@ -503,38 +494,6 @@
return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
}
-// A generic method family contains a set of all methods that implement a single
-// language-level method. Because of erasure, these methods may have different
-// signatures. As members of the set are collected while walking over the
-// hierarchy, they are tagged with a qualification state. The qualification
-// state for an erased method is set to disqualified if there exists a path
-// from the root of hierarchy to the method that contains an interleaving
-// language-equivalent method defined in an interface.
-class GenericMethodFamily : public MethodFamily {
- private:
-
- generic::MethodDescriptor* _descriptor; // language-level description
-
- public:
-
- GenericMethodFamily(generic::MethodDescriptor* canonical_desc)
- : _descriptor(canonical_desc) {}
-
- generic::MethodDescriptor* descriptor() const { return _descriptor; }
-
- bool descriptor_matches(generic::MethodDescriptor* md, generic::Context* ctx) {
- return descriptor()->covariant_match(md, ctx);
- }
-
-#ifndef PRODUCT
- Symbol* get_generic_sig() const {
-
- generic::Context ctx(NULL); // empty, as _descriptor already canonicalized
- TempNewSymbol sig = descriptor()->reify_signature(&ctx, Thread::current());
- return sig;
- }
-#endif // ndef PRODUCT
-};
class StateRestorer;
@@ -571,26 +530,6 @@
StateRestorer* record_method_and_dq_further(Method* mo);
};
-
-// StatefulGenericMethodFamily is a wrapper around GenericMethodFamily that maintains the
-// qualification state during hierarchy visitation, and applies that state
-// when adding members to the GenericMethodFamily.
-class StatefulGenericMethodFamily : public StatefulMethodFamily {
-
- public:
- StatefulGenericMethodFamily(generic::MethodDescriptor* md, generic::Context* ctx)
- : StatefulMethodFamily(new GenericMethodFamily(md->canonicalize(ctx))) {
-
- }
- GenericMethodFamily* get_method_family() {
- return (GenericMethodFamily*)_method_family;
- }
-
- bool descriptor_matches(generic::MethodDescriptor* md, generic::Context* ctx) {
- return get_method_family()->descriptor_matches(md, ctx);
- }
-};
-
class StateRestorer : public PseudoScopeMark {
private:
StatefulMethodFamily* _method;
@@ -616,39 +555,6 @@
return mark;
}
-class StatefulGenericMethodFamilies : public ResourceObj {
- private:
- GrowableArray<StatefulGenericMethodFamily*> _methods;
-
- public:
- StatefulGenericMethodFamily* find_matching(
- generic::MethodDescriptor* md, generic::Context* ctx) {
- for (int i = 0; i < _methods.length(); ++i) {
- StatefulGenericMethodFamily* existing = _methods.at(i);
- if (existing->descriptor_matches(md, ctx)) {
- return existing;
- }
- }
- return NULL;
- }
-
- StatefulGenericMethodFamily* find_matching_or_create(
- generic::MethodDescriptor* md, generic::Context* ctx) {
- StatefulGenericMethodFamily* method = find_matching(md, ctx);
- if (method == NULL) {
- method = new StatefulGenericMethodFamily(md, ctx);
- _methods.append(method);
- }
- return method;
- }
-
- void extract_families_into(GrowableArray<GenericMethodFamily*>* array) {
- for (int i = 0; i < _methods.length(); ++i) {
- array->append(_methods.at(i)->get_method_family());
- }
- }
-};
-
// Represents a location corresponding to a vtable slot for methods that
// neither the class nor any of it's ancestors provide an implementaion.
// Default methods may be present to fill this slot.
@@ -779,146 +685,11 @@
};
-// Iterates over the type hierarchy looking for all methods with a specific
-// method name. The result of this is a set of method families each of
-// which is populated with a set of methods that implement the same
-// language-level signature.
-class FindMethodsByGenericSig : public HierarchyVisitor<FindMethodsByGenericSig> {
- private:
- // Context data
- Thread* THREAD;
- generic::DescriptorCache* _cache;
- Symbol* _method_name;
- generic::Context* _ctx;
- StatefulGenericMethodFamilies _families;
- public:
-
- FindMethodsByGenericSig(generic::DescriptorCache* cache, Symbol* name,
- generic::Context* ctx, Thread* thread) :
- _cache(cache), _method_name(name), _ctx(ctx), THREAD(thread) {}
-
- void get_discovered_families(GrowableArray<GenericMethodFamily*>* methods) {
- _families.extract_families_into(methods);
- }
-
- void* new_node_data(InstanceKlass* cls) { return new PseudoScope(); }
- void free_node_data(void* node_data) {
- PseudoScope::cast(node_data)->destroy();
- }
-
- bool visit() {
- PseudoScope* scope = PseudoScope::cast(current_data());
- InstanceKlass* klass = current_class();
- InstanceKlass* sub = current_depth() > 0 ? class_at_depth(1) : NULL;
-
- ContextMark* cm = new ContextMark(_ctx->mark());
- scope->add_mark(cm); // will restore context when scope is freed
-
- _ctx->apply_type_arguments(sub, klass, THREAD);
-
- int start, end = 0;
- start = klass->find_method_by_name(_method_name, &end);
- if (start != -1) {
- for (int i = start; i < end; ++i) {
- Method* m = klass->methods()->at(i);
- // This gets the method's parameter list with its generic type
- // parameters resolved
- generic::MethodDescriptor* md = _cache->descriptor_for(m, THREAD);
-
- // Find all methods on this hierarchy that match this method
- // (name, signature). This class collects other families of this
- // method name.
- StatefulGenericMethodFamily* family =
- _families.find_matching_or_create(md, _ctx);
-
- if (klass->is_interface()) {
- // ???
- StateRestorer* restorer = family->record_method_and_dq_further(m);
- scope->add_mark(restorer);
- } else {
- // This is the rule that methods in classes "win" (bad word) over
- // methods in interfaces. This works because of single inheritance
- family->set_target_if_empty(m);
- }
- }
- }
- return true;
- }
-};
-
-#ifndef PRODUCT
-static void print_generic_families(
- GrowableArray<GenericMethodFamily*>* methods, Symbol* match) {
- streamIndentor si(tty, 4);
- if (methods->length() == 0) {
- tty->indent();
- tty->print_cr("No Logical Method found");
- }
- for (int i = 0; i < methods->length(); ++i) {
- tty->indent();
- GenericMethodFamily* lm = methods->at(i);
- if (lm->contains_signature(match)) {
- tty->print_cr("<Matching>");
- } else {
- tty->print_cr("<Non-Matching>");
- }
- lm->print_sig_on(tty, lm->get_generic_sig(), 1);
- }
-}
-#endif // ndef PRODUCT
static void create_overpasses(
GrowableArray<EmptyVtableSlot*>* slots, InstanceKlass* klass, TRAPS);
-static void generate_generic_defaults(
- InstanceKlass* klass, GrowableArray<EmptyVtableSlot*>* empty_slots,
- EmptyVtableSlot* slot, int current_slot_index, TRAPS) {
-
- if (slot->is_bound()) {
-#ifndef PRODUCT
- if (TraceDefaultMethods) {
- streamIndentor si(tty, 4);
- tty->indent().print_cr("Already bound to logical method:");
- GenericMethodFamily* lm = (GenericMethodFamily*)(slot->get_binding());
- lm->print_sig_on(tty, lm->get_generic_sig(), 1);
- }
-#endif // ndef PRODUCT
- return; // covered by previous processing
- }
-
- generic::DescriptorCache cache;
-
- generic::Context ctx(&cache);
- FindMethodsByGenericSig visitor(&cache, slot->name(), &ctx, CHECK);
- visitor.run(klass);
-
- GrowableArray<GenericMethodFamily*> discovered_families;
- visitor.get_discovered_families(&discovered_families);
-
-#ifndef PRODUCT
- if (TraceDefaultMethods) {
- print_generic_families(&discovered_families, slot->signature());
- }
-#endif // ndef PRODUCT
-
- // Find and populate any other slots that match the discovered families
- for (int j = current_slot_index; j < empty_slots->length(); ++j) {
- EmptyVtableSlot* open_slot = empty_slots->at(j);
-
- if (slot->name() == open_slot->name()) {
- for (int k = 0; k < discovered_families.length(); ++k) {
- GenericMethodFamily* lm = discovered_families.at(k);
-
- if (lm->contains_signature(open_slot->signature())) {
- lm->determine_target(klass, CHECK);
- open_slot->bind_family(lm);
- }
- }
- }
- }
-}
-
static void generate_erased_defaults(
InstanceKlass* klass, GrowableArray<EmptyVtableSlot*>* empty_slots,
EmptyVtableSlot* slot, TRAPS) {
@@ -943,21 +714,14 @@
//
// First if finds any name/signature slots that need any implementation (either
// because they are miranda or a superclass's implementation is an overpass
-// itself). For each slot, iterate over the hierarchy, using generic signature
-// information to partition any methods that match the name into method families
-// where each family contains methods whose signatures are equivalent at the
-// language level (i.e., their reified parameters match and return values are
-// covariant). Check those sets to see if they contain a signature that matches
-// the slot we're looking at (if we're lucky, there might be other empty slots
-// that we can fill using the same analysis).
+// itself). For each slot, iterate over the hierarchy, to see if they contain a
+// signature that matches the slot we are looking at.
//
// For each slot filled, we generate an overpass method that either calls the
// unique default method candidate using invokespecial, or throws an exception
// (in the case of no default method candidates, or more than one valid
-// candidate). These methods are then added to the class's method list. If
-// the method set we're using contains methods (qualified or not) with a
-// different runtime signature than the method we're creating, then we have to
-// create bridges with those signatures too.
+// candidate). These methods are then added to the class's method list.
+// The JVM does not create bridges nor handle generic signatures here.
void DefaultMethods::generate_default_methods(
InstanceKlass* klass, GrowableArray<Method*>* mirandas, TRAPS) {
@@ -997,11 +761,7 @@
}
#endif // ndef PRODUCT
- if (ParseGenericDefaults) {
- generate_generic_defaults(klass, empty_slots, slot, i, CHECK);
- } else {
- generate_erased_defaults(klass, empty_slots, slot, CHECK);
- }
+ generate_erased_defaults(klass, empty_slots, slot, CHECK);
}
#ifndef PRODUCT
if (TraceDefaultMethods) {
@@ -1019,13 +779,13 @@
}
/**
- * Generic analysis was used upon interface '_target' and found a unique
- * default method candidate with generic signature '_method_desc'. This
+ * Interface inheritance rules were used to find a unique default method
+ * candidate for the resolved class. This
* method is only viable if it would also be in the set of default method
* candidates if we ran a full analysis on the current class.
*
* The only reason that the method would not be in the set of candidates for
- * the current class is if that there's another covariantly matching method
+ * the current class is if that there's another matching method
* which is "more specific" than the found method -- i.e., one could find a
* path in the interface hierarchy in which the matching method appears
* before we get to '_target'.
@@ -1110,49 +870,6 @@
: ShadowChecker(thread, name, holder, target) {}
};
-class GenericShadowChecker : public ShadowChecker {
- private:
- generic::DescriptorCache* _cache;
- generic::MethodDescriptor* _method_desc;
-
- bool path_has_shadow() {
- generic::Context ctx(_cache);
-
- for (int i = current_depth() - 1; i > 0; --i) {
- InstanceKlass* ik = class_at_depth(i);
- InstanceKlass* sub = class_at_depth(i + 1);
- ctx.apply_type_arguments(sub, ik, THREAD);
-
- if (ik->is_interface()) {
- int end;
- int start = ik->find_method_by_name(_method_name, &end);
- if (start != -1) {
- for (int j = start; j < end; ++j) {
- Method* mo = ik->methods()->at(j);
- generic::MethodDescriptor* md = _cache->descriptor_for(mo, THREAD);
- if (_method_desc->covariant_match(md, &ctx)) {
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public:
-
- GenericShadowChecker(generic::DescriptorCache* cache, Thread* thread,
- Symbol* name, InstanceKlass* holder, generic::MethodDescriptor* desc,
- InstanceKlass* target)
- : ShadowChecker(thread, name, holder, target) {
- _cache = cache;
- _method_desc = desc;
- }
-};
-
-
-
// Find the unique qualified candidate from the perspective of the super_class
// which is the resolved_klass, which must be an immediate superinterface
// of klass
@@ -1166,103 +883,48 @@
if (family != NULL) {
family->determine_target(current_class, CHECK_NULL); // get target from current_class
- }
- if (family->has_target()) {
- Method* target = family->get_selected_target();
- InstanceKlass* holder = InstanceKlass::cast(target->method_holder());
+ if (family->has_target()) {
+ Method* target = family->get_selected_target();
+ InstanceKlass* holder = InstanceKlass::cast(target->method_holder());
- // Verify that the identified method is valid from the context of
- // the current class, which is the caller class for invokespecial
- // link resolution, i.e. ensure there it is not shadowed.
- // You can use invokespecial to disambiguate interface methods, but
- // you can not use it to skip over an interface method that would shadow it.
- ErasedShadowChecker checker(THREAD, target->name(), holder, super_class);
- checker.run(current_class);
+ // Verify that the identified method is valid from the context of
+ // the current class, which is the caller class for invokespecial
+ // link resolution, i.e. ensure there it is not shadowed.
+ // You can use invokespecial to disambiguate interface methods, but
+ // you can not use it to skip over an interface method that would shadow it.
+ ErasedShadowChecker checker(THREAD, target->name(), holder, super_class);
+ checker.run(current_class);
- if (checker.found_shadow()) {
+ if (checker.found_shadow()) {
#ifndef PRODUCT
- if (TraceDefaultMethods) {
- tty->print_cr(" Only candidate found was shadowed.");
- }
+ if (TraceDefaultMethods) {
+ tty->print_cr(" Only candidate found was shadowed.");
+ }
#endif // ndef PRODUCT
- THROW_MSG_(vmSymbols::java_lang_AbstractMethodError(),
- "Accessible default method not found", NULL);
- } else {
+ THROW_MSG_(vmSymbols::java_lang_AbstractMethodError(),
+ "Accessible default method not found", NULL);
+ } else {
#ifndef PRODUCT
- if (TraceDefaultMethods) {
- family->print_sig_on(tty, target->signature(), 1);
- }
+ if (TraceDefaultMethods) {
+ family->print_sig_on(tty, target->signature(), 1);
+ }
#endif // ndef PRODUCT
- return target;
- }
+ return target;
+ }
+ } else {
+ assert(family->throws_exception(), "must have target or throw");
+ THROW_MSG_(vmSymbols::java_lang_AbstractMethodError(),
+ family->get_exception_message()->as_C_string(), NULL);
+ }
} else {
- assert(family->throws_exception(), "must have target or throw");
- THROW_MSG_(vmSymbols::java_lang_AbstractMethodError(),
- family->get_exception_message()->as_C_string(), NULL);
+ // no method found
+ ResourceMark rm(THREAD);
+ THROW_MSG_(vmSymbols::java_lang_NoSuchMethodError(),
+ Method::name_and_sig_as_C_string(current_class,
+ method_name, sig), NULL);
}
}
-
-// super_class is assumed to be the direct super of current_class
-Method* find_generic_super_default( InstanceKlass* current_class,
- InstanceKlass* super_class,
- Symbol* method_name, Symbol* sig, TRAPS) {
- generic::DescriptorCache cache;
- generic::Context ctx(&cache);
-
- // Prime the initial generic context for current -> super_class
- ctx.apply_type_arguments(current_class, super_class, CHECK_NULL);
-
- FindMethodsByGenericSig visitor(&cache, method_name, &ctx, CHECK_NULL);
- visitor.run(super_class);
-
- GrowableArray<GenericMethodFamily*> families;
- visitor.get_discovered_families(&families);
-
-#ifndef PRODUCT
- if (TraceDefaultMethods) {
- print_generic_families(&families, sig);
- }
-#endif // ndef PRODUCT
-
- GenericMethodFamily* selected_family = NULL;
-
- for (int i = 0; i < families.length(); ++i) {
- GenericMethodFamily* lm = families.at(i);
- if (lm->contains_signature(sig)) {
- lm->determine_target(current_class, CHECK_NULL);
- selected_family = lm;
- }
- }
-
- if (selected_family->has_target()) {
- Method* target = selected_family->get_selected_target();
- InstanceKlass* holder = InstanceKlass::cast(target->method_holder());
-
- // Verify that the identified method is valid from the context of
- // the current class
- GenericShadowChecker checker(&cache, THREAD, target->name(),
- holder, selected_family->descriptor(), super_class);
- checker.run(current_class);
-
- if (checker.found_shadow()) {
-#ifndef PRODUCT
- if (TraceDefaultMethods) {
- tty->print_cr(" Only candidate found was shadowed.");
- }
-#endif // ndef PRODUCT
- THROW_MSG_(vmSymbols::java_lang_AbstractMethodError(),
- "Accessible default method not found", NULL);
- } else {
- return target;
- }
- } else {
- assert(selected_family->throws_exception(), "must have target or throw");
- THROW_MSG_(vmSymbols::java_lang_AbstractMethodError(),
- selected_family->get_exception_message()->as_C_string(), NULL);
- }
-}
-
// This is called during linktime when we find an invokespecial call that
// refers to a direct superinterface. It indicates that we should find the
// default method in the hierarchy of that superinterface, and if that method
@@ -1296,13 +958,8 @@
assert(super_class->is_interface(), "only call for default methods");
Method* target = NULL;
- if (ParseGenericDefaults) {
- target = find_generic_super_default(current_class, super_class,
- method_name, sig, CHECK_NULL);
- } else {
- target = find_erased_super_default(current_class, super_class,
- method_name, sig, CHECK_NULL);
- }
+ target = find_erased_super_default(current_class, super_class,
+ method_name, sig, CHECK_NULL);
#ifndef PRODUCT
if (target != NULL) {
--- a/hotspot/src/share/vm/classfile/genericSignatures.cpp Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1279 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-
-#include "classfile/genericSignatures.hpp"
-#include "classfile/symbolTable.hpp"
-#include "classfile/systemDictionary.hpp"
-#include "memory/resourceArea.hpp"
-
-namespace generic {
-
-// Helper class for parsing the generic signature Symbol in klass and methods
-class DescriptorStream : public ResourceObj {
- private:
- Symbol* _symbol;
- int _offset;
- int _mark;
- const char* _parse_error;
-
- void set_parse_error(const char* error) {
- assert(error != NULL, "Can't set NULL error string");
- _parse_error = error;
- }
-
- public:
- DescriptorStream(Symbol* sym)
- : _symbol(sym), _offset(0), _mark(-1), _parse_error(NULL) {}
-
- const char* parse_error() const {
- return _parse_error;
- }
-
- bool at_end() { return _offset >= _symbol->utf8_length(); }
-
- char peek() {
- if (at_end()) {
- set_parse_error("Peeking past end of signature");
- return '\0';
- } else {
- return _symbol->byte_at(_offset);
- }
- }
-
- char read() {
- if (at_end()) {
- set_parse_error("Reading past end of signature");
- return '\0';
- } else {
- return _symbol->byte_at(_offset++);
- }
- }
-
- void read(char expected) {
- char c = read();
- assert_char(c, expected, 0);
- }
-
- void assert_char(char c, char expected, int pos = -1) {
- if (c != expected) {
- const char* fmt = "Parse error at %d: expected %c but got %c";
- size_t len = strlen(fmt) + 5;
- char* buffer = NEW_RESOURCE_ARRAY(char, len);
- jio_snprintf(buffer, len, fmt, _offset + pos, expected, c);
- set_parse_error(buffer);
- }
- }
-
- void push(char c) {
- assert(c == _symbol->byte_at(_offset - 1), "Pushing back wrong value");
- --_offset;
- }
-
- void expect_end() {
- if (!at_end()) {
- set_parse_error("Unexpected data trailing signature");
- }
- }
-
- bool has_mark() { return _mark != -1; }
-
- void set_mark() {
- _mark = _offset;
- }
-
- Identifier* identifier_from_mark() {
- assert(has_mark(), "Mark should be set");
- if (!has_mark()) {
- set_parse_error("Expected mark to be set");
- return NULL;
- } else {
- Identifier* id = new Identifier(_symbol, _mark, _offset - 1);
- _mark = -1;
- return id;
- }
- }
-};
-
-
-#define CHECK_FOR_PARSE_ERROR() \
- if (STREAM->parse_error() != NULL) { \
- if (VerifyGenericSignatures) { \
- fatal(STREAM->parse_error()); \
- } \
- return NULL; \
- } (void)0
-
-#define READ() STREAM->read(); CHECK_FOR_PARSE_ERROR()
-#define PEEK() STREAM->peek(); CHECK_FOR_PARSE_ERROR()
-#define PUSH(c) STREAM->push(c)
-#define EXPECT(c) STREAM->read(c); CHECK_FOR_PARSE_ERROR()
-#define EXPECTED(c, ch) STREAM->assert_char(c, ch); CHECK_FOR_PARSE_ERROR()
-#define EXPECT_END() STREAM->expect_end(); CHECK_FOR_PARSE_ERROR()
-
-#define CHECK_STREAM STREAM); CHECK_FOR_PARSE_ERROR(); ((void)0
-
-#ifndef PRODUCT
-void Identifier::print_on(outputStream* str) const {
- for (int i = _begin; i < _end; ++i) {
- str->print("%c", (char)_sym->byte_at(i));
- }
-}
-#endif // ndef PRODUCT
-
-bool Identifier::equals(Identifier* other) {
- if (_sym == other->_sym && _begin == other->_begin && _end == other->_end) {
- return true;
- } else if (_end - _begin != other->_end - other->_begin) {
- return false;
- } else {
- size_t len = _end - _begin;
- char* addr = ((char*)_sym->bytes()) + _begin;
- char* oaddr = ((char*)other->_sym->bytes()) + other->_begin;
- return strncmp(addr, oaddr, len) == 0;
- }
-}
-
-bool Identifier::equals(Symbol* sym) {
- Identifier id(sym, 0, sym->utf8_length());
- return equals(&id);
-}
-
-/**
- * A formal type parameter may be found in the the enclosing class, but it could
- * also come from an enclosing method or outer class, in the case of inner-outer
- * classes or anonymous classes. For example:
- *
- * class Outer<T,V> {
- * class Inner<W> {
- * void m(T t, V v, W w);
- * }
- * }
- *
- * In this case, the type variables in m()'s signature are not all found in the
- * immediate enclosing class (Inner). class Inner has only type parameter W,
- * but it's outer_class field will reference Outer's descriptor which contains
- * T & V (no outer_method in this case).
- *
- * If you have an anonymous class, it has both an enclosing method *and* an
- * enclosing class where type parameters can be declared:
- *
- * class MOuter<T> {
- * <V> void bar(V v) {
- * Runnable r = new Runnable() {
- * public void run() {}
- * public void foo(T t, V v) { ... }
- * };
- * }
- * }
- *
- * In this case, foo will be a member of some class, Runnable$1, which has no
- * formal parameters itself, but has an outer_method (bar()) which provides
- * type parameter V, and an outer class MOuter with type parameter T.
- *
- * It is also possible that the outer class is itself an inner class to some
- * other class (or an anonymous class with an enclosing method), so we need to
- * follow the outer_class/outer_method chain to it's end when looking for a
- * type parameter.
- */
-TypeParameter* Descriptor::find_type_parameter(Identifier* id, int* depth) {
-
- int current_depth = 0;
-
- MethodDescriptor* outer_method = as_method_signature();
- ClassDescriptor* outer_class = as_class_signature();
-
- if (outer_class == NULL) { // 'this' is a method signature; use the holder
- outer_class = outer_method->outer_class();
- }
-
- while (outer_method != NULL || outer_class != NULL) {
- if (outer_method != NULL) {
- for (int i = 0; i < outer_method->type_parameters().length(); ++i) {
- TypeParameter* p = outer_method->type_parameters().at(i);
- if (p->identifier()->equals(id)) {
- *depth = -1; // indicates this this is a method parameter
- return p;
- }
- }
- }
- if (outer_class != NULL) {
- for (int i = 0; i < outer_class->type_parameters().length(); ++i) {
- TypeParameter* p = outer_class->type_parameters().at(i);
- if (p->identifier()->equals(id)) {
- *depth = current_depth;
- return p;
- }
- }
- outer_method = outer_class->outer_method();
- outer_class = outer_class->outer_class();
- ++current_depth;
- }
- }
-
- if (VerifyGenericSignatures) {
- fatal("Could not resolve identifier");
- }
-
- return NULL;
-}
-
-ClassDescriptor* ClassDescriptor::parse_generic_signature(Klass* klass, TRAPS) {
- return parse_generic_signature(klass, NULL, CHECK_NULL);
-}
-
-ClassDescriptor* ClassDescriptor::parse_generic_signature(
- Klass* klass, Symbol* original_name, TRAPS) {
-
- InstanceKlass* ik = InstanceKlass::cast(klass);
- Symbol* sym = ik->generic_signature();
-
- ClassDescriptor* spec;
-
- if (sym == NULL || (spec = ClassDescriptor::parse_generic_signature(sym)) == NULL) {
- spec = ClassDescriptor::placeholder(ik);
- }
-
- u2 outer_index = get_outer_class_index(ik, CHECK_NULL);
- if (outer_index != 0) {
- if (original_name == NULL) {
- original_name = ik->name();
- }
- Handle class_loader = Handle(THREAD, ik->class_loader());
- Handle protection_domain = Handle(THREAD, ik->protection_domain());
-
- Symbol* outer_name = ik->constants()->klass_name_at(outer_index);
- Klass* outer = SystemDictionary::find(
- outer_name, class_loader, protection_domain, CHECK_NULL);
- if (outer == NULL && !THREAD->is_Compiler_thread()) {
- if (outer_name == ik->super()->name()) {
- outer = SystemDictionary::resolve_super_or_fail(original_name, outer_name,
- class_loader, protection_domain,
- false, CHECK_NULL);
- }
- else {
- outer = SystemDictionary::resolve_or_fail(outer_name, class_loader,
- protection_domain, false, CHECK_NULL);
- }
- }
-
- InstanceKlass* outer_ik;
- ClassDescriptor* outer_spec = NULL;
- if (outer == NULL) {
- outer_spec = ClassDescriptor::placeholder(ik);
- assert(false, "Outer class not loaded and not loadable from here");
- } else {
- outer_ik = InstanceKlass::cast(outer);
- outer_spec = parse_generic_signature(outer, original_name, CHECK_NULL);
- }
- spec->set_outer_class(outer_spec);
-
- u2 encl_method_idx = ik->enclosing_method_method_index();
- if (encl_method_idx != 0 && outer_ik != NULL) {
- ConstantPool* cp = ik->constants();
- u2 name_index = cp->name_ref_index_at(encl_method_idx);
- u2 sig_index = cp->signature_ref_index_at(encl_method_idx);
- Symbol* name = cp->symbol_at(name_index);
- Symbol* sig = cp->symbol_at(sig_index);
- Method* m = outer_ik->find_method(name, sig);
- if (m != NULL) {
- Symbol* gsig = m->generic_signature();
- if (gsig != NULL) {
- MethodDescriptor* gms = MethodDescriptor::parse_generic_signature(gsig, outer_spec);
- spec->set_outer_method(gms);
- }
- } else if (VerifyGenericSignatures) {
- ResourceMark rm;
- stringStream ss;
- ss.print("Could not find method %s %s in class %s",
- name->as_C_string(), sig->as_C_string(), outer_name->as_C_string());
- fatal(ss.as_string());
- }
- }
- }
-
- spec->bind_variables_to_parameters();
- return spec;
-}
-
-ClassDescriptor* ClassDescriptor::placeholder(InstanceKlass* klass) {
- GrowableArray<TypeParameter*> formals;
- GrowableArray<ClassType*> interfaces;
- ClassType* super_type = NULL;
-
- Klass* super_klass = klass->super();
- if (super_klass != NULL) {
- InstanceKlass* super = InstanceKlass::cast(super_klass);
- super_type = ClassType::from_symbol(super->name());
- }
-
- for (int i = 0; i < klass->local_interfaces()->length(); ++i) {
- InstanceKlass* iface = InstanceKlass::cast(klass->local_interfaces()->at(i));
- interfaces.append(ClassType::from_symbol(iface->name()));
- }
- return new ClassDescriptor(formals, super_type, interfaces);
-}
-
-ClassDescriptor* ClassDescriptor::parse_generic_signature(Symbol* sym) {
-
- DescriptorStream ds(sym);
- DescriptorStream* STREAM = &ds;
-
- GrowableArray<TypeParameter*> parameters(8);
- char c = READ();
- if (c == '<') {
- c = READ();
- while (c != '>') {
- PUSH(c);
- TypeParameter* ftp = TypeParameter::parse_generic_signature(CHECK_STREAM);
- parameters.append(ftp);
- c = READ();
- }
- } else {
- PUSH(c);
- }
-
- EXPECT('L');
- ClassType* super = ClassType::parse_generic_signature(CHECK_STREAM);
-
- GrowableArray<ClassType*> signatures(2);
- while (!STREAM->at_end()) {
- EXPECT('L');
- ClassType* iface = ClassType::parse_generic_signature(CHECK_STREAM);
- signatures.append(iface);
- }
-
- EXPECT_END();
-
- return new ClassDescriptor(parameters, super, signatures);
-}
-
-#ifndef PRODUCT
-void ClassDescriptor::print_on(outputStream* str) const {
- str->indent().print_cr("ClassDescriptor {");
- {
- streamIndentor si(str);
- if (_type_parameters.length() > 0) {
- str->indent().print_cr("Formals {");
- {
- streamIndentor si(str);
- for (int i = 0; i < _type_parameters.length(); ++i) {
- _type_parameters.at(i)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- }
- if (_super != NULL) {
- str->indent().print_cr("Superclass: ");
- {
- streamIndentor si(str);
- _super->print_on(str);
- }
- }
- if (_interfaces.length() > 0) {
- str->indent().print_cr("SuperInterfaces: {");
- {
- streamIndentor si(str);
- for (int i = 0; i < _interfaces.length(); ++i) {
- _interfaces.at(i)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- }
- if (_outer_method != NULL) {
- str->indent().print_cr("Outer Method: {");
- {
- streamIndentor si(str);
- _outer_method->print_on(str);
- }
- str->indent().print_cr("}");
- }
- if (_outer_class != NULL) {
- str->indent().print_cr("Outer Class: {");
- {
- streamIndentor si(str);
- _outer_class->print_on(str);
- }
- str->indent().print_cr("}");
- }
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-ClassType* ClassDescriptor::interface_desc(Symbol* sym) {
- for (int i = 0; i < _interfaces.length(); ++i) {
- if (_interfaces.at(i)->identifier()->equals(sym)) {
- return _interfaces.at(i);
- }
- }
- if (VerifyGenericSignatures) {
- fatal("Did not find expected interface");
- }
- return NULL;
-}
-
-void ClassDescriptor::bind_variables_to_parameters() {
- if (_outer_class != NULL) {
- _outer_class->bind_variables_to_parameters();
- }
- if (_outer_method != NULL) {
- _outer_method->bind_variables_to_parameters();
- }
- for (int i = 0; i < _type_parameters.length(); ++i) {
- _type_parameters.at(i)->bind_variables_to_parameters(this, i);
- }
- if (_super != NULL) {
- _super->bind_variables_to_parameters(this);
- }
- for (int i = 0; i < _interfaces.length(); ++i) {
- _interfaces.at(i)->bind_variables_to_parameters(this);
- }
-}
-
-ClassDescriptor* ClassDescriptor::canonicalize(Context* ctx) {
-
- GrowableArray<TypeParameter*> type_params(_type_parameters.length());
- for (int i = 0; i < _type_parameters.length(); ++i) {
- type_params.append(_type_parameters.at(i)->canonicalize(ctx, 0));
- }
-
- ClassDescriptor* outer = _outer_class == NULL ? NULL :
- _outer_class->canonicalize(ctx);
-
- ClassType* super = _super == NULL ? NULL : _super->canonicalize(ctx, 0);
-
- GrowableArray<ClassType*> interfaces(_interfaces.length());
- for (int i = 0; i < _interfaces.length(); ++i) {
- interfaces.append(_interfaces.at(i)->canonicalize(ctx, 0));
- }
-
- MethodDescriptor* md = _outer_method == NULL ? NULL :
- _outer_method->canonicalize(ctx);
-
- return new ClassDescriptor(type_params, super, interfaces, outer, md);
-}
-
-u2 ClassDescriptor::get_outer_class_index(InstanceKlass* klass, TRAPS) {
- int inner_index = InstanceKlass::inner_class_inner_class_info_offset;
- int outer_index = InstanceKlass::inner_class_outer_class_info_offset;
- int name_offset = InstanceKlass::inner_class_inner_name_offset;
- int next_offset = InstanceKlass::inner_class_next_offset;
-
- if (klass->inner_classes() == NULL || klass->inner_classes()->length() == 0) {
- // No inner class info => no declaring class
- return 0;
- }
-
- Array<u2>* i_icls = klass->inner_classes();
- ConstantPool* i_cp = klass->constants();
- int i_length = i_icls->length();
-
- // Find inner_klass attribute
- for (int i = 0; i + next_offset < i_length; i += next_offset) {
- u2 ioff = i_icls->at(i + inner_index);
- u2 ooff = i_icls->at(i + outer_index);
- u2 noff = i_icls->at(i + name_offset);
- if (ioff != 0) {
- // Check to see if the name matches the class we're looking for
- // before attempting to find the class.
- if (i_cp->klass_name_at_matches(klass, ioff) && ooff != 0) {
- return ooff;
- }
- }
- }
-
- // It may be anonymous; try for that.
- u2 encl_method_class_idx = klass->enclosing_method_class_index();
- if (encl_method_class_idx != 0) {
- return encl_method_class_idx;
- }
-
- return 0;
-}
-
-MethodDescriptor* MethodDescriptor::parse_generic_signature(Method* m, ClassDescriptor* outer) {
- Symbol* generic_sig = m->generic_signature();
- MethodDescriptor* md = NULL;
- if (generic_sig == NULL || (md = parse_generic_signature(generic_sig, outer)) == NULL) {
- md = parse_generic_signature(m->signature(), outer);
- }
- assert(md != NULL, "Could not parse method signature");
- md->bind_variables_to_parameters();
- return md;
-}
-
-MethodDescriptor* MethodDescriptor::parse_generic_signature(Symbol* sym, ClassDescriptor* outer) {
-
- DescriptorStream ds(sym);
- DescriptorStream* STREAM = &ds;
-
- GrowableArray<TypeParameter*> params(8);
- char c = READ();
- if (c == '<') {
- c = READ();
- while (c != '>') {
- PUSH(c);
- TypeParameter* ftp = TypeParameter::parse_generic_signature(CHECK_STREAM);
- params.append(ftp);
- c = READ();
- }
- } else {
- PUSH(c);
- }
-
- EXPECT('(');
-
- GrowableArray<Type*> parameters(8);
- c = READ();
- while (c != ')') {
- PUSH(c);
- Type* arg = Type::parse_generic_signature(CHECK_STREAM);
- parameters.append(arg);
- c = READ();
- }
-
- Type* rt = Type::parse_generic_signature(CHECK_STREAM);
-
- GrowableArray<Type*> throws;
- while (!STREAM->at_end()) {
- EXPECT('^');
- Type* spec = Type::parse_generic_signature(CHECK_STREAM);
- throws.append(spec);
- }
-
- return new MethodDescriptor(params, outer, parameters, rt, throws);
-}
-
-void MethodDescriptor::bind_variables_to_parameters() {
- for (int i = 0; i < _type_parameters.length(); ++i) {
- _type_parameters.at(i)->bind_variables_to_parameters(this, i);
- }
- for (int i = 0; i < _parameters.length(); ++i) {
- _parameters.at(i)->bind_variables_to_parameters(this);
- }
- _return_type->bind_variables_to_parameters(this);
- for (int i = 0; i < _throws.length(); ++i) {
- _throws.at(i)->bind_variables_to_parameters(this);
- }
-}
-
-bool MethodDescriptor::covariant_match(MethodDescriptor* other, Context* ctx) {
-
- if (_parameters.length() == other->_parameters.length()) {
- for (int i = 0; i < _parameters.length(); ++i) {
- if (!_parameters.at(i)->covariant_match(other->_parameters.at(i), ctx)) {
- return false;
- }
- }
-
- if (_return_type->as_primitive() != NULL) {
- return _return_type->covariant_match(other->_return_type, ctx);
- } else {
- // return type is a reference
- return other->_return_type->as_class() != NULL ||
- other->_return_type->as_variable() != NULL ||
- other->_return_type->as_array() != NULL;
- }
- } else {
- return false;
- }
-}
-
-MethodDescriptor* MethodDescriptor::canonicalize(Context* ctx) {
-
- GrowableArray<TypeParameter*> type_params(_type_parameters.length());
- for (int i = 0; i < _type_parameters.length(); ++i) {
- type_params.append(_type_parameters.at(i)->canonicalize(ctx, 0));
- }
-
- ClassDescriptor* outer = _outer_class == NULL ? NULL :
- _outer_class->canonicalize(ctx);
-
- GrowableArray<Type*> params(_parameters.length());
- for (int i = 0; i < _parameters.length(); ++i) {
- params.append(_parameters.at(i)->canonicalize(ctx, 0));
- }
-
- Type* rt = _return_type->canonicalize(ctx, 0);
-
- GrowableArray<Type*> throws(_throws.length());
- for (int i = 0; i < _throws.length(); ++i) {
- throws.append(_throws.at(i)->canonicalize(ctx, 0));
- }
-
- return new MethodDescriptor(type_params, outer, params, rt, throws);
-}
-
-#ifndef PRODUCT
-TempNewSymbol MethodDescriptor::reify_signature(Context* ctx, TRAPS) {
- stringStream ss(256);
-
- ss.print("(");
- for (int i = 0; i < _parameters.length(); ++i) {
- _parameters.at(i)->reify_signature(&ss, ctx);
- }
- ss.print(")");
- _return_type->reify_signature(&ss, ctx);
- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
-}
-
-void MethodDescriptor::print_on(outputStream* str) const {
- str->indent().print_cr("MethodDescriptor {");
- {
- streamIndentor si(str);
- if (_type_parameters.length() > 0) {
- str->indent().print_cr("Formals: {");
- {
- streamIndentor si(str);
- for (int i = 0; i < _type_parameters.length(); ++i) {
- _type_parameters.at(i)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- }
- str->indent().print_cr("Parameters: {");
- {
- streamIndentor si(str);
- for (int i = 0; i < _parameters.length(); ++i) {
- _parameters.at(i)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- str->indent().print_cr("Return Type: ");
- {
- streamIndentor si(str);
- _return_type->print_on(str);
- }
-
- if (_throws.length() > 0) {
- str->indent().print_cr("Throws: {");
- {
- streamIndentor si(str);
- for (int i = 0; i < _throws.length(); ++i) {
- _throws.at(i)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- }
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-TypeParameter* TypeParameter::parse_generic_signature(DescriptorStream* STREAM) {
- STREAM->set_mark();
- char c = READ();
- while (c != ':') {
- c = READ();
- }
-
- Identifier* id = STREAM->identifier_from_mark();
-
- ClassType* class_bound = NULL;
- GrowableArray<ClassType*> interface_bounds(8);
-
- c = READ();
- if (c != '>') {
- if (c != ':') {
- EXPECTED(c, 'L');
- class_bound = ClassType::parse_generic_signature(CHECK_STREAM);
- c = READ();
- }
-
- while (c == ':') {
- EXPECT('L');
- ClassType* fts = ClassType::parse_generic_signature(CHECK_STREAM);
- interface_bounds.append(fts);
- c = READ();
- }
- }
- PUSH(c);
-
- return new TypeParameter(id, class_bound, interface_bounds);
-}
-
-void TypeParameter::bind_variables_to_parameters(Descriptor* sig, int position) {
- if (_class_bound != NULL) {
- _class_bound->bind_variables_to_parameters(sig);
- }
- for (int i = 0; i < _interface_bounds.length(); ++i) {
- _interface_bounds.at(i)->bind_variables_to_parameters(sig);
- }
- _position = position;
-}
-
-Type* TypeParameter::resolve(
- Context* ctx, int inner_depth, int ctx_depth) {
-
- if (inner_depth == -1) {
- // This indicates that the parameter is a method type parameter, which
- // isn't resolveable using the class hierarchy context
- return bound();
- }
-
- ClassType* provider = ctx->at_depth(ctx_depth);
- if (provider != NULL) {
- for (int i = 0; i < inner_depth && provider != NULL; ++i) {
- provider = provider->outer_class();
- }
- if (provider != NULL) {
- TypeArgument* arg = provider->type_argument_at(_position);
- if (arg != NULL) {
- Type* value = arg->lower_bound();
- return value->canonicalize(ctx, ctx_depth + 1);
- }
- }
- }
-
- return bound();
-}
-
-TypeParameter* TypeParameter::canonicalize(Context* ctx, int ctx_depth) {
- ClassType* bound = _class_bound == NULL ? NULL :
- _class_bound->canonicalize(ctx, ctx_depth);
-
- GrowableArray<ClassType*> ifaces(_interface_bounds.length());
- for (int i = 0; i < _interface_bounds.length(); ++i) {
- ifaces.append(_interface_bounds.at(i)->canonicalize(ctx, ctx_depth));
- }
-
- TypeParameter* ret = new TypeParameter(_identifier, bound, ifaces);
- ret->_position = _position;
- return ret;
-}
-
-ClassType* TypeParameter::bound() {
- if (_class_bound != NULL) {
- return _class_bound;
- }
-
- if (_interface_bounds.length() == 1) {
- return _interface_bounds.at(0);
- }
-
- return ClassType::java_lang_Object(); // TODO: investigate this case
-}
-
-#ifndef PRODUCT
-void TypeParameter::print_on(outputStream* str) const {
- str->indent().print_cr("Formal: {");
- {
- streamIndentor si(str);
-
- str->indent().print("Identifier: ");
- _identifier->print_on(str);
- str->print_cr("");
- if (_class_bound != NULL) {
- str->indent().print_cr("Class Bound: ");
- streamIndentor si(str);
- _class_bound->print_on(str);
- }
- if (_interface_bounds.length() > 0) {
- str->indent().print_cr("Interface Bounds: {");
- {
- streamIndentor si(str);
- for (int i = 0; i < _interface_bounds.length(); ++i) {
- _interface_bounds.at(i)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- }
- str->indent().print_cr("Ordinal Position: %d", _position);
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-Type* Type::parse_generic_signature(DescriptorStream* STREAM) {
- char c = READ();
- switch (c) {
- case 'L':
- return ClassType::parse_generic_signature(CHECK_STREAM);
- case 'T':
- return TypeVariable::parse_generic_signature(CHECK_STREAM);
- case '[':
- return ArrayType::parse_generic_signature(CHECK_STREAM);
- default:
- return new PrimitiveType(c);
- }
-}
-
-Identifier* ClassType::parse_generic_signature_simple(GrowableArray<TypeArgument*>* args,
- bool* has_inner, DescriptorStream* STREAM) {
- STREAM->set_mark();
-
- char c = READ();
- while (c != ';' && c != '.' && c != '<') { c = READ(); }
- Identifier* id = STREAM->identifier_from_mark();
-
- if (c == '<') {
- c = READ();
- while (c != '>') {
- PUSH(c);
- TypeArgument* arg = TypeArgument::parse_generic_signature(CHECK_STREAM);
- args->append(arg);
- c = READ();
- }
- c = READ();
- }
-
- *has_inner = (c == '.');
- if (!(*has_inner)) {
- EXPECTED(c, ';');
- }
-
- return id;
-}
-
-ClassType* ClassType::parse_generic_signature(DescriptorStream* STREAM) {
- return parse_generic_signature(NULL, CHECK_STREAM);
-}
-
-ClassType* ClassType::parse_generic_signature(ClassType* outer, DescriptorStream* STREAM) {
- GrowableArray<TypeArgument*> args;
- ClassType* gct = NULL;
- bool has_inner = false;
-
- Identifier* id = parse_generic_signature_simple(&args, &has_inner, STREAM);
- if (id != NULL) {
- gct = new ClassType(id, args, outer);
-
- if (has_inner) {
- gct = parse_generic_signature(gct, CHECK_STREAM);
- }
- }
- return gct;
-}
-
-ClassType* ClassType::from_symbol(Symbol* sym) {
- assert(sym != NULL, "Must not be null");
- GrowableArray<TypeArgument*> args;
- Identifier* id = new Identifier(sym, 0, sym->utf8_length());
- return new ClassType(id, args, NULL);
-}
-
-ClassType* ClassType::java_lang_Object() {
- return from_symbol(vmSymbols::java_lang_Object());
-}
-
-void ClassType::bind_variables_to_parameters(Descriptor* sig) {
- for (int i = 0; i < _type_arguments.length(); ++i) {
- _type_arguments.at(i)->bind_variables_to_parameters(sig);
- }
- if (_outer_class != NULL) {
- _outer_class->bind_variables_to_parameters(sig);
- }
-}
-
-TypeArgument* ClassType::type_argument_at(int i) {
- if (i >= 0 && i < _type_arguments.length()) {
- return _type_arguments.at(i);
- } else {
- return NULL;
- }
-}
-
-#ifndef PRODUCT
-void ClassType::reify_signature(stringStream* ss, Context* ctx) {
- ss->print("L");
- _identifier->print_on(ss);
- ss->print(";");
-}
-
-void ClassType::print_on(outputStream* str) const {
- str->indent().print_cr("Class {");
- {
- streamIndentor si(str);
- str->indent().print("Name: ");
- _identifier->print_on(str);
- str->print_cr("");
- if (_type_arguments.length() != 0) {
- str->indent().print_cr("Type Arguments: {");
- {
- streamIndentor si(str);
- for (int j = 0; j < _type_arguments.length(); ++j) {
- _type_arguments.at(j)->print_on(str);
- }
- }
- str->indent().print_cr("}");
- }
- if (_outer_class != NULL) {
- str->indent().print_cr("Outer Class: ");
- streamIndentor sir(str);
- _outer_class->print_on(str);
- }
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-bool ClassType::covariant_match(Type* other, Context* ctx) {
-
- if (other == this) {
- return true;
- }
-
- TypeVariable* variable = other->as_variable();
- if (variable != NULL) {
- other = variable->resolve(ctx, 0);
- }
-
- ClassType* outer = outer_class();
- ClassType* other_class = other->as_class();
-
- if (other_class == NULL ||
- (outer == NULL) != (other_class->outer_class() == NULL)) {
- return false;
- }
-
- if (!_identifier->equals(other_class->_identifier)) {
- return false;
- }
-
- if (outer != NULL && !outer->covariant_match(other_class->outer_class(), ctx)) {
- return false;
- }
-
- return true;
-}
-
-ClassType* ClassType::canonicalize(Context* ctx, int ctx_depth) {
-
- GrowableArray<TypeArgument*> args(_type_arguments.length());
- for (int i = 0; i < _type_arguments.length(); ++i) {
- args.append(_type_arguments.at(i)->canonicalize(ctx, ctx_depth));
- }
-
- ClassType* outer = _outer_class == NULL ? NULL :
- _outer_class->canonicalize(ctx, ctx_depth);
-
- return new ClassType(_identifier, args, outer);
-}
-
-TypeVariable* TypeVariable::parse_generic_signature(DescriptorStream* STREAM) {
- STREAM->set_mark();
- char c = READ();
- while (c != ';') {
- c = READ();
- }
- Identifier* id = STREAM->identifier_from_mark();
-
- return new TypeVariable(id);
-}
-
-void TypeVariable::bind_variables_to_parameters(Descriptor* sig) {
- _parameter = sig->find_type_parameter(_id, &_inner_depth);
- if (VerifyGenericSignatures && _parameter == NULL) {
- fatal("Could not find formal parameter");
- }
-}
-
-Type* TypeVariable::resolve(Context* ctx, int ctx_depth) {
- if (parameter() != NULL) {
- return parameter()->resolve(ctx, inner_depth(), ctx_depth);
- } else {
- if (VerifyGenericSignatures) {
- fatal("Type variable matches no parameter");
- }
- return NULL;
- }
-}
-
-bool TypeVariable::covariant_match(Type* other, Context* ctx) {
-
- if (other == this) {
- return true;
- }
-
- Context my_context(NULL); // empty, results in erasure
- Type* my_type = resolve(&my_context, 0);
- if (my_type == NULL) {
- return false;
- }
-
- return my_type->covariant_match(other, ctx);
-}
-
-Type* TypeVariable::canonicalize(Context* ctx, int ctx_depth) {
- return resolve(ctx, ctx_depth);
-}
-
-#ifndef PRODUCT
-void TypeVariable::reify_signature(stringStream* ss, Context* ctx) {
- Type* type = resolve(ctx, 0);
- if (type != NULL) {
- type->reify_signature(ss, ctx);
- }
-}
-
-void TypeVariable::print_on(outputStream* str) const {
- str->indent().print_cr("Type Variable {");
- {
- streamIndentor si(str);
- str->indent().print("Name: ");
- _id->print_on(str);
- str->print_cr("");
- str->indent().print_cr("Inner depth: %d", _inner_depth);
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-ArrayType* ArrayType::parse_generic_signature(DescriptorStream* STREAM) {
- Type* base = Type::parse_generic_signature(CHECK_STREAM);
- return new ArrayType(base);
-}
-
-void ArrayType::bind_variables_to_parameters(Descriptor* sig) {
- assert(_base != NULL, "Invalid base");
- _base->bind_variables_to_parameters(sig);
-}
-
-bool ArrayType::covariant_match(Type* other, Context* ctx) {
- assert(_base != NULL, "Invalid base");
-
- if (other == this) {
- return true;
- }
-
- ArrayType* other_array = other->as_array();
- return (other_array != NULL && _base->covariant_match(other_array->_base, ctx));
-}
-
-ArrayType* ArrayType::canonicalize(Context* ctx, int ctx_depth) {
- assert(_base != NULL, "Invalid base");
- return new ArrayType(_base->canonicalize(ctx, ctx_depth));
-}
-
-#ifndef PRODUCT
-void ArrayType::reify_signature(stringStream* ss, Context* ctx) {
- assert(_base != NULL, "Invalid base");
- ss->print("[");
- _base->reify_signature(ss, ctx);
-}
-
-void ArrayType::print_on(outputStream* str) const {
- str->indent().print_cr("Array {");
- {
- streamIndentor si(str);
- _base->print_on(str);
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-bool PrimitiveType::covariant_match(Type* other, Context* ctx) {
-
- PrimitiveType* other_prim = other->as_primitive();
- return (other_prim != NULL && _type == other_prim->_type);
-}
-
-PrimitiveType* PrimitiveType::canonicalize(Context* ctx, int ctxd) {
- return this;
-}
-
-#ifndef PRODUCT
-void PrimitiveType::reify_signature(stringStream* ss, Context* ctx) {
- ss->print("%c", _type);
-}
-
-void PrimitiveType::print_on(outputStream* str) const {
- str->indent().print_cr("Primitive: '%c'", _type);
-}
-#endif // ndef PRODUCT
-
-void PrimitiveType::bind_variables_to_parameters(Descriptor* sig) {
-}
-
-TypeArgument* TypeArgument::parse_generic_signature(DescriptorStream* STREAM) {
- char c = READ();
- Type* type = NULL;
-
- switch (c) {
- case '*':
- return new TypeArgument(ClassType::java_lang_Object(), NULL);
- break;
- default:
- PUSH(c);
- // fall-through
- case '+':
- case '-':
- type = Type::parse_generic_signature(CHECK_STREAM);
- if (c == '+') {
- return new TypeArgument(type, NULL);
- } else if (c == '-') {
- return new TypeArgument(ClassType::java_lang_Object(), type);
- } else {
- return new TypeArgument(type, type);
- }
- }
-}
-
-void TypeArgument::bind_variables_to_parameters(Descriptor* sig) {
- assert(_lower_bound != NULL, "Invalid lower bound");
- _lower_bound->bind_variables_to_parameters(sig);
- if (_upper_bound != NULL && _upper_bound != _lower_bound) {
- _upper_bound->bind_variables_to_parameters(sig);
- }
-}
-
-bool TypeArgument::covariant_match(TypeArgument* other, Context* ctx) {
- assert(_lower_bound != NULL, "Invalid lower bound");
-
- if (other == this) {
- return true;
- }
-
- if (!_lower_bound->covariant_match(other->lower_bound(), ctx)) {
- return false;
- }
- return true;
-}
-
-TypeArgument* TypeArgument::canonicalize(Context* ctx, int ctx_depth) {
- assert(_lower_bound != NULL, "Invalid lower bound");
- Type* lower = _lower_bound->canonicalize(ctx, ctx_depth);
- Type* upper = NULL;
-
- if (_upper_bound == _lower_bound) {
- upper = lower;
- } else if (_upper_bound != NULL) {
- upper = _upper_bound->canonicalize(ctx, ctx_depth);
- }
-
- return new TypeArgument(lower, upper);
-}
-
-#ifndef PRODUCT
-void TypeArgument::print_on(outputStream* str) const {
- str->indent().print_cr("TypeArgument {");
- {
- streamIndentor si(str);
- if (_lower_bound != NULL) {
- str->indent().print("Lower bound: ");
- _lower_bound->print_on(str);
- }
- if (_upper_bound != NULL) {
- str->indent().print("Upper bound: ");
- _upper_bound->print_on(str);
- }
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-void Context::Mark::destroy() {
- if (is_active()) {
- _context->reset_to_mark(_marked_size);
- }
- deactivate();
-}
-
-void Context::apply_type_arguments(
- InstanceKlass* current, InstanceKlass* super, TRAPS) {
- assert(_cache != NULL, "Cannot use an empty context");
- ClassType* spec = NULL;
- if (current != NULL) {
- ClassDescriptor* descriptor = _cache->descriptor_for(current, CHECK);
- if (super == current->super()) {
- spec = descriptor->super();
- } else {
- spec = descriptor->interface_desc(super->name());
- }
- if (spec != NULL) {
- _type_arguments.push(spec);
- }
- }
-}
-
-void Context::reset_to_mark(int size) {
- _type_arguments.trunc_to(size);
-}
-
-ClassType* Context::at_depth(int i) const {
- if (i < _type_arguments.length()) {
- return _type_arguments.at(_type_arguments.length() - 1 - i);
- }
- return NULL;
-}
-
-#ifndef PRODUCT
-void Context::print_on(outputStream* str) const {
- str->indent().print_cr("Context {");
- for (int i = 0; i < _type_arguments.length(); ++i) {
- streamIndentor si(str);
- str->indent().print("leval %d: ", i);
- ClassType* ct = at_depth(i);
- if (ct == NULL) {
- str->print_cr("<empty>");
- continue;
- } else {
- str->print_cr("{");
- }
-
- for (int j = 0; j < ct->type_arguments_length(); ++j) {
- streamIndentor si(str);
- TypeArgument* ta = ct->type_argument_at(j);
- Type* bound = ta->lower_bound();
- bound->print_on(str);
- }
- str->indent().print_cr("}");
- }
- str->indent().print_cr("}");
-}
-#endif // ndef PRODUCT
-
-ClassDescriptor* DescriptorCache::descriptor_for(InstanceKlass* ik, TRAPS) {
-
- ClassDescriptor** existing = _class_descriptors.get(ik);
- if (existing == NULL) {
- ClassDescriptor* cd = ClassDescriptor::parse_generic_signature(ik, CHECK_NULL);
- _class_descriptors.put(ik, cd);
- return cd;
- } else {
- return *existing;
- }
-}
-
-MethodDescriptor* DescriptorCache::descriptor_for(
- Method* mh, ClassDescriptor* cd, TRAPS) {
- assert(mh != NULL && cd != NULL, "Should not be NULL");
- MethodDescriptor** existing = _method_descriptors.get(mh);
- if (existing == NULL) {
- MethodDescriptor* md = MethodDescriptor::parse_generic_signature(mh, cd);
- _method_descriptors.put(mh, md);
- return md;
- } else {
- return *existing;
- }
-}
-MethodDescriptor* DescriptorCache::descriptor_for(Method* mh, TRAPS) {
- ClassDescriptor* cd = descriptor_for(
- InstanceKlass::cast(mh->method_holder()), CHECK_NULL);
- return descriptor_for(mh, cd, THREAD);
-}
-
-} // namespace generic
--- a/hotspot/src/share/vm/classfile/genericSignatures.hpp Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_CLASSFILE_GENERICSIGNATURES_HPP
-#define SHARE_VM_CLASSFILE_GENERICSIGNATURES_HPP
-
-#include "classfile/symbolTable.hpp"
-#include "memory/allocation.hpp"
-#include "runtime/signature.hpp"
-#include "utilities/growableArray.hpp"
-#include "utilities/resourceHash.hpp"
-
-class stringStream;
-
-namespace generic {
-
-class Identifier;
-class ClassDescriptor;
-class MethodDescriptor;
-
-class TypeParameter; // a formal type parameter declared in generic signatures
-class TypeArgument; // The "type value" passed to fill parameters in supertypes
-class TypeVariable; // A usage of a type parameter as a value
-/**
- * Example:
- *
- * <T, V> class Foo extends Bar<String> { int m(V v) {} }
- * ^^^^^^ ^^^^^^ ^^
- * type parameters type argument type variable
- *
- * Note that a type variable could be passed as an argument too:
- * <T, V> class Foo extends Bar<T> { int m(V v) {} }
- * ^^^
- * type argument's value is a type variable
- */
-
-
-class Type;
-class ClassType;
-class ArrayType;
-class PrimitiveType;
-class Context;
-class DescriptorCache;
-
-class DescriptorStream;
-
-class Identifier : public ResourceObj {
- private:
- Symbol* _sym;
- int _begin;
- int _end;
-
- public:
- Identifier(Symbol* sym, int begin, int end) :
- _sym(sym), _begin(begin), _end(end) {}
-
- bool equals(Identifier* other);
- bool equals(Symbol* sym);
-
-#ifndef PRODUCT
- void print_on(outputStream* str) const;
-#endif // ndef PRODUCT
-};
-
-class Descriptor : public ResourceObj {
- protected:
- GrowableArray<TypeParameter*> _type_parameters;
- ClassDescriptor* _outer_class;
-
- Descriptor(GrowableArray<TypeParameter*>& params,
- ClassDescriptor* outer)
- : _type_parameters(params), _outer_class(outer) {}
-
- public:
-
- ClassDescriptor* outer_class() { return _outer_class; }
- void set_outer_class(ClassDescriptor* sig) { _outer_class = sig; }
-
- virtual ClassDescriptor* as_class_signature() { return NULL; }
- virtual MethodDescriptor* as_method_signature() { return NULL; }
-
- bool is_class_signature() { return as_class_signature() != NULL; }
- bool is_method_signature() { return as_method_signature() != NULL; }
-
- GrowableArray<TypeParameter*>& type_parameters() {
- return _type_parameters;
- }
-
- TypeParameter* find_type_parameter(Identifier* id, int* param_depth);
-
- virtual void bind_variables_to_parameters() = 0;
-
-#ifndef PRODUCT
- virtual void print_on(outputStream* str) const = 0;
-#endif
-};
-
-class ClassDescriptor : public Descriptor {
- private:
- ClassType* _super;
- GrowableArray<ClassType*> _interfaces;
- MethodDescriptor* _outer_method;
-
- ClassDescriptor(GrowableArray<TypeParameter*>& ftp, ClassType* scs,
- GrowableArray<ClassType*>& sis, ClassDescriptor* outer_class = NULL,
- MethodDescriptor* outer_method = NULL)
- : Descriptor(ftp, outer_class), _super(scs), _interfaces(sis),
- _outer_method(outer_method) {}
-
- static u2 get_outer_class_index(InstanceKlass* k, TRAPS);
- static ClassDescriptor* parse_generic_signature(Klass* k, Symbol* original_name, TRAPS);
-
- public:
-
- virtual ClassDescriptor* as_class_signature() { return this; }
-
- MethodDescriptor* outer_method() { return _outer_method; }
- void set_outer_method(MethodDescriptor* m) { _outer_method = m; }
-
- ClassType* super() { return _super; }
- ClassType* interface_desc(Symbol* sym);
-
- static ClassDescriptor* parse_generic_signature(Klass* k, TRAPS);
- static ClassDescriptor* parse_generic_signature(Symbol* sym);
-
- // For use in superclass chains in positions where this is no generic info
- static ClassDescriptor* placeholder(InstanceKlass* klass);
-
-#ifndef PRODUCT
- void print_on(outputStream* str) const;
-#endif
-
- ClassDescriptor* canonicalize(Context* ctx);
-
- // Linking sets the position index in any contained TypeVariable type
- // to correspond to the location of that identifier in the formal type
- // parameters.
- void bind_variables_to_parameters();
-};
-
-class MethodDescriptor : public Descriptor {
- private:
- GrowableArray<Type*> _parameters;
- Type* _return_type;
- GrowableArray<Type*> _throws;
-
- MethodDescriptor(GrowableArray<TypeParameter*>& ftp, ClassDescriptor* outer,
- GrowableArray<Type*>& sigs, Type* rt, GrowableArray<Type*>& throws)
- : Descriptor(ftp, outer), _parameters(sigs), _return_type(rt),
- _throws(throws) {}
-
- public:
-
- static MethodDescriptor* parse_generic_signature(Method* m, ClassDescriptor* outer);
- static MethodDescriptor* parse_generic_signature(Symbol* sym, ClassDescriptor* outer);
-
- MethodDescriptor* as_method_signature() { return this; }
-
- // Performs generic analysis on the method parameters to determine
- // if both methods refer to the same argument types.
- bool covariant_match(MethodDescriptor* other, Context* ctx);
-
- // Returns a new method descriptor with all generic variables
- // removed and replaced with whatever is indicated using the Context.
- MethodDescriptor* canonicalize(Context* ctx);
-
- void bind_variables_to_parameters();
-
-#ifndef PRODUCT
- TempNewSymbol reify_signature(Context* ctx, TRAPS);
- void print_on(outputStream* str) const;
-#endif
-};
-
-class TypeParameter : public ResourceObj {
- private:
- Identifier* _identifier;
- ClassType* _class_bound;
- GrowableArray<ClassType*> _interface_bounds;
-
- // The position is the ordinal location of the parameter within the
- // formal parameter list (excluding outer classes). It is only set for
- // formal type parameters that are associated with a class -- method
- // type parameters are left as -1. When resolving a generic variable to
- // find the actual type, this index is used to access the generic type
- // argument in the provided context object.
- int _position; // Assigned during variable linking
-
- TypeParameter(Identifier* id, ClassType* class_bound,
- GrowableArray<ClassType*>& interface_bounds) :
- _identifier(id), _class_bound(class_bound),
- _interface_bounds(interface_bounds), _position(-1) {}
-
- public:
- static TypeParameter* parse_generic_signature(DescriptorStream* str);
-
- ClassType* bound();
- int position() { return _position; }
-
- void bind_variables_to_parameters(Descriptor* sig, int position);
- Identifier* identifier() { return _identifier; }
-
- Type* resolve(Context* ctx, int inner_depth, int ctx_depth);
- TypeParameter* canonicalize(Context* ctx, int ctx_depth);
-
-#ifndef PRODUCT
- void print_on(outputStream* str) const;
-#endif
-};
-
-class Type : public ResourceObj {
- public:
- static Type* parse_generic_signature(DescriptorStream* str);
-
- virtual ClassType* as_class() { return NULL; }
- virtual TypeVariable* as_variable() { return NULL; }
- virtual ArrayType* as_array() { return NULL; }
- virtual PrimitiveType* as_primitive() { return NULL; }
-
- virtual bool covariant_match(Type* gt, Context* ctx) = 0;
- virtual Type* canonicalize(Context* ctx, int ctx_depth) = 0;
-
- virtual void bind_variables_to_parameters(Descriptor* sig) = 0;
-
-#ifndef PRODUCT
- virtual void reify_signature(stringStream* ss, Context* ctx) = 0;
- virtual void print_on(outputStream* str) const = 0;
-#endif
-};
-
-class ClassType : public Type {
- friend class ClassDescriptor;
- protected:
- Identifier* _identifier;
- GrowableArray<TypeArgument*> _type_arguments;
- ClassType* _outer_class;
-
- ClassType(Identifier* identifier,
- GrowableArray<TypeArgument*>& args,
- ClassType* outer)
- : _identifier(identifier), _type_arguments(args), _outer_class(outer) {}
-
- // Returns true if there are inner classes to read
- static Identifier* parse_generic_signature_simple(
- GrowableArray<TypeArgument*>* args,
- bool* has_inner, DescriptorStream* str);
-
- static ClassType* parse_generic_signature(ClassType* outer,
- DescriptorStream* str);
- static ClassType* from_symbol(Symbol* sym);
-
- public:
- ClassType* as_class() { return this; }
-
- static ClassType* parse_generic_signature(DescriptorStream* str);
- static ClassType* java_lang_Object();
-
- Identifier* identifier() { return _identifier; }
- int type_arguments_length() { return _type_arguments.length(); }
- TypeArgument* type_argument_at(int i);
-
- virtual ClassType* outer_class() { return _outer_class; }
-
- bool covariant_match(Type* gt, Context* ctx);
- ClassType* canonicalize(Context* ctx, int context_depth);
-
- void bind_variables_to_parameters(Descriptor* sig);
-
-#ifndef PRODUCT
- void reify_signature(stringStream* ss, Context* ctx);
- void print_on(outputStream* str) const;
-#endif
-};
-
-class TypeVariable : public Type {
- private:
- Identifier* _id;
- TypeParameter* _parameter; // assigned during linking
-
- // how many steps "out" from inner classes, -1 if method
- int _inner_depth;
-
- TypeVariable(Identifier* id)
- : _id(id), _parameter(NULL), _inner_depth(0) {}
-
- public:
- TypeVariable* as_variable() { return this; }
-
- static TypeVariable* parse_generic_signature(DescriptorStream* str);
-
- Identifier* identifier() { return _id; }
- TypeParameter* parameter() { return _parameter; }
- int inner_depth() { return _inner_depth; }
-
- void bind_variables_to_parameters(Descriptor* sig);
-
- Type* resolve(Context* ctx, int ctx_depth);
- bool covariant_match(Type* gt, Context* ctx);
- Type* canonicalize(Context* ctx, int ctx_depth);
-
-#ifndef PRODUCT
- void reify_signature(stringStream* ss, Context* ctx);
- void print_on(outputStream* str) const;
-#endif
-};
-
-class ArrayType : public Type {
- private:
- Type* _base;
-
- ArrayType(Type* base) : _base(base) {}
-
- public:
- ArrayType* as_array() { return this; }
-
- static ArrayType* parse_generic_signature(DescriptorStream* str);
-
- bool covariant_match(Type* gt, Context* ctx);
- ArrayType* canonicalize(Context* ctx, int ctx_depth);
-
- void bind_variables_to_parameters(Descriptor* sig);
-
-#ifndef PRODUCT
- void reify_signature(stringStream* ss, Context* ctx);
- void print_on(outputStream* str) const;
-#endif
-};
-
-class PrimitiveType : public Type {
- friend class Type;
- private:
- char _type; // includes V for void
-
- PrimitiveType(char& type) : _type(type) {}
-
- public:
- PrimitiveType* as_primitive() { return this; }
-
- bool covariant_match(Type* gt, Context* ctx);
- PrimitiveType* canonicalize(Context* ctx, int ctx_depth);
-
- void bind_variables_to_parameters(Descriptor* sig);
-
-#ifndef PRODUCT
- void reify_signature(stringStream* ss, Context* ctx);
- void print_on(outputStream* str) const;
-#endif
-};
-
-class TypeArgument : public ResourceObj {
- private:
- Type* _lower_bound;
- Type* _upper_bound; // may be null or == _lower_bound
-
- TypeArgument(Type* lower_bound, Type* upper_bound)
- : _lower_bound(lower_bound), _upper_bound(upper_bound) {}
-
- public:
-
- static TypeArgument* parse_generic_signature(DescriptorStream* str);
-
- Type* lower_bound() { return _lower_bound; }
- Type* upper_bound() { return _upper_bound; }
-
- void bind_variables_to_parameters(Descriptor* sig);
- TypeArgument* canonicalize(Context* ctx, int ctx_depth);
-
- bool covariant_match(TypeArgument* a, Context* ctx);
-
-#ifndef PRODUCT
- void print_on(outputStream* str) const;
-#endif
-};
-
-
-class Context : public ResourceObj {
- private:
- DescriptorCache* _cache;
- GrowableArray<ClassType*> _type_arguments;
-
- void reset_to_mark(int size);
-
- public:
- // When this object goes out of scope or 'destroy' is
- // called, then the application of the type to the
- // context is wound-back (unless it's been deactivated).
- class Mark : public StackObj {
- private:
- mutable Context* _context;
- int _marked_size;
-
- bool is_active() const { return _context != NULL; }
- void deactivate() const { _context = NULL; }
-
- public:
- Mark() : _context(NULL), _marked_size(0) {}
- Mark(Context* ctx, int sz) : _context(ctx), _marked_size(sz) {}
- Mark(const Mark& m) : _context(m._context), _marked_size(m._marked_size) {
- m.deactivate(); // Ownership is transferred
- }
-
- Mark& operator=(const Mark& cm) {
- destroy();
- _context = cm._context;
- _marked_size = cm._marked_size;
- cm.deactivate();
- return *this;
- }
-
- void destroy();
- ~Mark() { destroy(); }
- };
-
- Context(DescriptorCache* cache) : _cache(cache) {}
-
- Mark mark() { return Mark(this, _type_arguments.length()); }
- void apply_type_arguments(InstanceKlass* current, InstanceKlass* super,TRAPS);
-
- ClassType* at_depth(int i) const;
-
-#ifndef PRODUCT
- void print_on(outputStream* str) const;
-#endif
-};
-
-/**
- * Contains a cache of descriptors for classes and methods so they can be
- * looked-up instead of reparsing each time they are needed.
- */
-class DescriptorCache : public ResourceObj {
- private:
- ResourceHashtable<InstanceKlass*, ClassDescriptor*> _class_descriptors;
- ResourceHashtable<Method*, MethodDescriptor*> _method_descriptors;
-
- public:
- ClassDescriptor* descriptor_for(InstanceKlass* ikh, TRAPS);
-
- MethodDescriptor* descriptor_for(Method* mh, ClassDescriptor* cd, TRAPS);
- // Class descriptor derived from method holder
- MethodDescriptor* descriptor_for(Method* mh, TRAPS);
-};
-
-} // namespace generic
-
-#endif // SHARE_VM_CLASSFILE_GENERICSIGNATURES_HPP
-
--- a/hotspot/src/share/vm/classfile/verifier.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -188,6 +188,10 @@
bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {
Symbol* name = klass->name();
Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass();
+ Klass* lambda_magic_klass = SystemDictionary::lambda_MagicLambdaImpl_klass();
+
+ bool is_reflect = refl_magic_klass != NULL && klass->is_subtype_of(refl_magic_klass);
+ bool is_lambda = lambda_magic_klass != NULL && klass->is_subtype_of(lambda_magic_klass);
return (should_verify_for(klass->class_loader(), should_verify_class) &&
// return if the class is a bootstrapping class
@@ -210,9 +214,9 @@
// sun/reflect/SerializationConstructorAccessor.
// NOTE: this is called too early in the bootstrapping process to be
// guarded by Universe::is_gte_jdk14x_version()/UseNewReflection.
- (refl_magic_klass == NULL ||
- !klass->is_subtype_of(refl_magic_klass) ||
- VerifyReflectionBytecodes)
+ // Also for lambda generated code, gte jdk8
+ (!is_reflect || VerifyReflectionBytecodes) &&
+ (!is_lambda || VerifyLambdaBytecodes)
);
}
@@ -2318,9 +2322,6 @@
types = 1 << JVM_CONSTANT_InvokeDynamic;
break;
case Bytecodes::_invokespecial:
- types = (1 << JVM_CONSTANT_InterfaceMethodref) |
- (1 << JVM_CONSTANT_Methodref);
- break;
case Bytecodes::_invokestatic:
types = (_klass->major_version() < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ?
(1 << JVM_CONSTANT_Methodref) :
--- a/hotspot/src/share/vm/code/codeBlob.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/codeBlob.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -245,7 +245,7 @@
}
-void* BufferBlob::operator new(size_t s, unsigned size) {
+void* BufferBlob::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size);
return p;
}
@@ -347,14 +347,14 @@
}
-void* RuntimeStub::operator new(size_t s, unsigned size) {
+void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size, true);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
}
// operator new shared by all singletons:
-void* SingletonBlob::operator new(size_t s, unsigned size) {
+void* SingletonBlob::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size, true);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
--- a/hotspot/src/share/vm/code/codeBlob.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/codeBlob.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -209,7 +209,7 @@
BufferBlob(const char* name, int size);
BufferBlob(const char* name, int size, CodeBuffer* cb);
- void* operator new(size_t s, unsigned size);
+ void* operator new(size_t s, unsigned size) throw();
public:
// Creation
@@ -283,7 +283,7 @@
bool caller_must_gc_arguments
);
- void* operator new(size_t s, unsigned size);
+ void* operator new(size_t s, unsigned size) throw();
public:
// Creation
@@ -321,7 +321,7 @@
friend class VMStructs;
protected:
- void* operator new(size_t s, unsigned size);
+ void* operator new(size_t s, unsigned size) throw();
public:
SingletonBlob(
--- a/hotspot/src/share/vm/code/debugInfoRec.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/debugInfoRec.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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,7 +38,7 @@
int _length; // number of bytes in the stream
int _hash; // hash of stream bytes (for quicker reuse)
- void* operator new(size_t ignore, DebugInformationRecorder* dir) {
+ void* operator new(size_t ignore, DebugInformationRecorder* dir) throw() {
assert(ignore == sizeof(DIR_Chunk), "");
if (dir->_next_chunk >= dir->_next_chunk_limit) {
const int CHUNK = 100;
--- a/hotspot/src/share/vm/code/nmethod.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/nmethod.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -93,18 +93,21 @@
#endif
bool nmethod::is_compiled_by_c1() const {
- if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
- if (is_native_method()) return false;
+ if (compiler() == NULL) {
+ return false;
+ }
return compiler()->is_c1();
}
bool nmethod::is_compiled_by_c2() const {
- if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
- if (is_native_method()) return false;
+ if (compiler() == NULL) {
+ return false;
+ }
return compiler()->is_c2();
}
bool nmethod::is_compiled_by_shark() const {
- if (is_native_method()) return false;
- assert(compiler() != NULL, "must be");
+ if (compiler() == NULL) {
+ return false;
+ }
return compiler()->is_shark();
}
@@ -800,7 +803,7 @@
}
#endif // def HAVE_DTRACE_H
-void* nmethod::operator new(size_t size, int nmethod_size) throw () {
+void* nmethod::operator new(size_t size, int nmethod_size) throw() {
// Not critical, may return null if there is too little continuous memory
return CodeCache::allocate(nmethod_size);
}
@@ -1401,6 +1404,9 @@
// nmethods aren't scanned for GC.
_oops_are_stale = true;
#endif
+ // the Method may be reclaimed by class unloading now that the
+ // nmethod is in zombie state
+ set_method(NULL);
} else {
assert(state == not_entrant, "other cases may need to be handled differently");
}
--- a/hotspot/src/share/vm/code/nmethod.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/nmethod.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -265,7 +265,7 @@
int comp_level);
// helper methods
- void* operator new(size_t size, int nmethod_size);
+ void* operator new(size_t size, int nmethod_size) throw();
const char* reloc_string_for(u_char* begin, u_char* end);
// Returns true if this thread changed the state of the nmethod or
--- a/hotspot/src/share/vm/code/relocInfo.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/relocInfo.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -677,7 +677,7 @@
}
public:
- void* operator new(size_t size, const RelocationHolder& holder) {
+ void* operator new(size_t size, const RelocationHolder& holder) throw() {
if (size > sizeof(holder._relocbuf)) guarantee_size();
assert((void* const *)holder.reloc() == &holder._relocbuf[0], "ptrs must agree");
return holder.reloc();
--- a/hotspot/src/share/vm/code/vtableStubs.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/vtableStubs.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -49,7 +49,7 @@
static int num_vtable_chunks = 0;
-void* VtableStub::operator new(size_t size, int code_size) {
+void* VtableStub::operator new(size_t size, int code_size) throw() {
assert(size == sizeof(VtableStub), "mismatched size");
num_vtable_chunks++;
// compute real VtableStub size (rounded to nearest word)
--- a/hotspot/src/share/vm/code/vtableStubs.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/code/vtableStubs.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -46,7 +46,7 @@
bool _is_vtable_stub; // True if vtable stub, false, is itable stub
/* code follows here */ // The vtableStub code
- void* operator new(size_t size, int code_size);
+ void* operator new(size_t size, int code_size) throw();
VtableStub(bool is_vtable_stub, int index)
: _next(NULL), _is_vtable_stub(is_vtable_stub),
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1718,7 +1718,7 @@
CodeCache::print_summary(&s, detailed);
}
ttyLocker ttyl;
- tty->print_cr(s.as_string());
+ tty->print(s.as_string());
}
// ------------------------------------------------------------------
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -3460,7 +3460,9 @@
void ConcurrentMarkSweepGeneration::shrink(size_t bytes) {
assert_locked_or_safepoint(Heap_lock);
size_t size = ReservedSpace::page_align_size_down(bytes);
- if (size > 0) {
+ // Only shrink if a compaction was done so that all the free space
+ // in the generation is in a contiguous block at the end.
+ if (size > 0 && did_compact()) {
shrink_by(size);
}
}
@@ -8696,9 +8698,10 @@
assert(inFreeRange(), "Should only be called if currently in a free range.");
HeapWord* const eob = ((HeapWord*)fc) + chunk_size;
assert(_sp->used_region().contains(eob - 1),
- err_msg("eob = " PTR_FORMAT " out of bounds wrt _sp = [" PTR_FORMAT "," PTR_FORMAT ")"
+ err_msg("eob = " PTR_FORMAT " eob-1 = " PTR_FORMAT " _limit = " PTR_FORMAT
+ " out of bounds wrt _sp = [" PTR_FORMAT "," PTR_FORMAT ")"
" when examining fc = " PTR_FORMAT "(" SIZE_FORMAT ")",
- _limit, _sp->bottom(), _sp->end(), fc, chunk_size));
+ eob, eob-1, _limit, _sp->bottom(), _sp->end(), fc, chunk_size));
if (eob >= _limit) {
assert(eob == _limit || fc->is_free(), "Only a free chunk should allow us to cross over the limit");
if (CMSTraceSweeper) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -981,7 +981,8 @@
if (should_try_gc) {
bool succeeded;
- result = do_collection_pause(word_size, gc_count_before, &succeeded);
+ result = do_collection_pause(word_size, gc_count_before, &succeeded,
+ GCCause::_g1_inc_collection_pause);
if (result != NULL) {
assert(succeeded, "only way to get back a non-NULL result");
return result;
@@ -1106,7 +1107,8 @@
// enough space for the allocation to succeed after the pause.
bool succeeded;
- result = do_collection_pause(word_size, gc_count_before, &succeeded);
+ result = do_collection_pause(word_size, gc_count_before, &succeeded,
+ GCCause::_g1_humongous_allocation);
if (result != NULL) {
assert(succeeded, "only way to get back a non-NULL result");
return result;
@@ -2006,10 +2008,12 @@
size_t init_byte_size = collector_policy()->initial_heap_byte_size();
size_t max_byte_size = collector_policy()->max_heap_byte_size();
+ size_t heap_alignment = collector_policy()->max_alignment();
// Ensure that the sizes are properly aligned.
Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap");
Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap");
+ Universe::check_alignment(max_byte_size, heap_alignment, "g1 heap");
_cg1r = new ConcurrentG1Refine(this);
@@ -2026,12 +2030,8 @@
// If this happens then we could end up using a non-optimal
// compressed oops mode.
- // Since max_byte_size is aligned to the size of a heap region (checked
- // above).
- Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap");
-
ReservedSpace heap_rs = Universe::reserve_heap(max_byte_size,
- HeapRegion::GrainBytes);
+ heap_alignment);
// It is important to do this in a way such that concurrent readers can't
// temporarily think something is in the heap. (I've actually seen this
@@ -2493,11 +2493,11 @@
void G1CollectedHeap::register_concurrent_cycle_end() {
if (_concurrent_cycle_started) {
- _gc_timer_cm->register_gc_end(os::elapsed_counter());
-
if (_cm->has_aborted()) {
_gc_tracer_cm->report_concurrent_mode_failure();
}
+
+ _gc_timer_cm->register_gc_end(os::elapsed_counter());
_gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions());
_concurrent_cycle_started = false;
@@ -3700,14 +3700,15 @@
HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
unsigned int gc_count_before,
- bool* succeeded) {
+ bool* succeeded,
+ GCCause::Cause gc_cause) {
assert_heap_not_locked_and_not_at_safepoint();
g1_policy()->record_stop_world_start();
VM_G1IncCollectionPause op(gc_count_before,
word_size,
false, /* should_initiate_conc_mark */
g1_policy()->max_pause_time_ms(),
- GCCause::_g1_inc_collection_pause);
+ gc_cause);
VMThread::execute(&op);
HeapWord* result = op.result();
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -776,9 +776,10 @@
// it has to be read while holding the Heap_lock. Currently, both
// methods that call do_collection_pause() release the Heap_lock
// before the call, so it's easy to read gc_count_before just before.
- HeapWord* do_collection_pause(size_t word_size,
- unsigned int gc_count_before,
- bool* succeeded);
+ HeapWord* do_collection_pause(size_t word_size,
+ unsigned int gc_count_before,
+ bool* succeeded,
+ GCCause::Cause gc_cause);
// The guts of the incremental collection pause, executed by the vm
// thread. It returns false if it is unable to do the collection due
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -168,7 +168,15 @@
// Set up the region size and associated fields. Given that the
// policy is created before the heap, we have to set this up here,
// so it's done as soon as possible.
- HeapRegion::setup_heap_region_size(Arguments::min_heap_size());
+
+ // It would have been natural to pass initial_heap_byte_size() and
+ // max_heap_byte_size() to setup_heap_region_size() but those have
+ // not been set up at this point since they should be aligned with
+ // the region size. So, there is a circular dependency here. We base
+ // the region size on the heap size, but the heap size should be
+ // aligned with the region size. To get around this we use the
+ // unaligned values for the heap.
+ HeapRegion::setup_heap_region_size(InitialHeapSize, MaxHeapSize);
HeapRegionRemSet::setup_remset_size();
G1ErgoVerbose::initialize();
@@ -313,7 +321,8 @@
void G1CollectorPolicy::initialize_flags() {
set_min_alignment(HeapRegion::GrainBytes);
size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name());
- set_max_alignment(MAX2(card_table_alignment, min_alignment()));
+ size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
+ set_max_alignment(MAX3(card_table_alignment, min_alignment(), page_size));
if (SurvivorRatio < 1) {
vm_exit_during_initialization("Invalid survivor ratio specified");
}
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -149,18 +149,11 @@
// many regions in the heap (based on the min heap size).
#define TARGET_REGION_NUMBER 2048
-void HeapRegion::setup_heap_region_size(uintx min_heap_size) {
- // region_size in bytes
+void HeapRegion::setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size) {
uintx region_size = G1HeapRegionSize;
if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
- // We base the automatic calculation on the min heap size. This
- // can be problematic if the spread between min and max is quite
- // wide, imagine -Xms128m -Xmx32g. But, if we decided it based on
- // the max size, the region size might be way too large for the
- // min size. Either way, some users might have to set the region
- // size manually for some -Xms / -Xmx combos.
-
- region_size = MAX2(min_heap_size / TARGET_REGION_NUMBER,
+ size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
+ region_size = MAX2(average_heap_size / TARGET_REGION_NUMBER,
(uintx) MIN_REGION_SIZE);
}
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -361,7 +361,7 @@
// CardsPerRegion). All those fields are considered constant
// throughout the JVM's execution, therefore they should only be set
// up once during initialization time.
- static void setup_heap_region_size(uintx min_heap_size);
+ static void setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size);
enum ClaimValues {
InitialClaimValue = 0,
--- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -70,9 +70,6 @@
guarantee(target_pause_time_ms > 0.0,
err_msg("target_pause_time_ms = %1.6lf should be positive",
target_pause_time_ms));
- guarantee(word_size == 0 || gc_cause == GCCause::_g1_inc_collection_pause,
- "we can only request an allocation if the GC cause is for "
- "an incremental GC pause");
_gc_cause = gc_cause;
}
--- a/hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,7 @@
#include "gc_implementation/shared/gcTrace.hpp"
#include "gc_implementation/shared/gcWhen.hpp"
#include "gc_implementation/shared/copyFailedInfo.hpp"
+#include "runtime/os.hpp"
#include "trace/tracing.hpp"
#include "trace/traceBackend.hpp"
#if INCLUDE_ALL_GCS
@@ -54,11 +55,12 @@
}
void GCTracer::send_reference_stats_event(ReferenceType type, size_t count) const {
- EventGCReferenceStatistics e;
+ EventGCReferenceStatistics e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_shared_gc_info.id());
e.set_type((u1)type);
e.set_count(count);
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
@@ -105,20 +107,22 @@
}
void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const {
- EventPromotionFailed e;
+ EventPromotionFailed e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_shared_gc_info.id());
e.set_data(to_trace_struct(pf_info));
e.set_thread(pf_info.thread()->thread_id());
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
// Common to CMS and G1
void OldGCTracer::send_concurrent_mode_failure_event() {
- EventConcurrentModeFailure e;
+ EventConcurrentModeFailure e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_shared_gc_info.id());
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
@@ -136,7 +140,7 @@
}
void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
- EventEvacuationInfo e;
+ EventEvacuationInfo e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_shared_gc_info.id());
e.set_cSetRegions(info->collectionset_regions());
@@ -147,15 +151,17 @@
e.set_allocRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_copied());
e.set_bytesCopied(info->bytes_copied());
e.set_regionsFreed(info->regions_freed());
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
void G1NewTracer::send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const {
- EventEvacuationFailed e;
+ EventEvacuationFailed e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_shared_gc_info.id());
e.set_data(to_trace_struct(ef_info));
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
@@ -189,12 +195,13 @@
void visit(const GCHeapSummary* heap_summary) const {
const VirtualSpaceSummary& heap_space = heap_summary->heap();
- EventGCHeapSummary e;
+ EventGCHeapSummary e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_id);
e.set_when((u1)_when);
e.set_heapSpace(to_trace_struct(heap_space));
e.set_heapUsed(heap_summary->used());
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
@@ -209,7 +216,7 @@
const SpaceSummary& from_space = ps_heap_summary->from();
const SpaceSummary& to_space = ps_heap_summary->to();
- EventPSHeapSummary e;
+ EventPSHeapSummary e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_id);
e.set_when((u1)_when);
@@ -220,6 +227,7 @@
e.set_edenSpace(to_trace_struct(ps_heap_summary->eden()));
e.set_fromSpace(to_trace_struct(ps_heap_summary->from()));
e.set_toSpace(to_trace_struct(ps_heap_summary->to()));
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
@@ -241,13 +249,14 @@
}
void GCTracer::send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const {
- EventMetaspaceSummary e;
+ EventMetaspaceSummary e(UNTIMED);
if (e.should_commit()) {
e.set_gcId(_shared_gc_info.id());
e.set_when((u1) when);
e.set_metaspace(to_trace_struct(meta_space_summary.meta_space()));
e.set_dataSpace(to_trace_struct(meta_space_summary.data_space()));
e.set_classSpace(to_trace_struct(meta_space_summary.class_space()));
+ e.set_endtime(os::elapsed_counter());
e.commit();
}
}
@@ -282,8 +291,6 @@
default: /* Ignore sending this phase */ break;
}
}
-
-#undef send_phase
};
void GCTracer::send_phase_events(TimePartitions* time_partitions) const {
--- a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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
@@ -144,9 +144,9 @@
_padded_avg(0.0), _deviation(0.0), _padding(padding) {}
// Placement support
- void* operator new(size_t ignored, void* p) { return p; }
+ void* operator new(size_t ignored, void* p) throw() { return p; }
// Allocator
- void* operator new(size_t size) { return CHeapObj<mtGC>::operator new(size); }
+ void* operator new(size_t size) throw() { return CHeapObj<mtGC>::operator new(size); }
// Accessor
float padded_average() const { return _padded_avg; }
--- a/hotspot/src/share/vm/libadt/port.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/libadt/port.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -163,8 +163,8 @@
extern void *safe_calloc (const char *file, unsigned line, unsigned nitems, unsigned size);
extern void *safe_realloc(const char *file, unsigned line, void *ptr, unsigned size);
extern char *safe_strdup (const char *file, unsigned line, const char *src);
-inline void *operator new( size_t size ) { return malloc(size); }
-inline void operator delete( void *ptr ) { free(ptr); }
+inline void *operator new( size_t size ) throw() { return malloc(size); }
+inline void operator delete( void *ptr ) { free(ptr); }
#endif
//-----------------------------------------------------------------------------
--- a/hotspot/src/share/vm/memory/allocation.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/allocation.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -49,19 +49,19 @@
# include "os_bsd.inline.hpp"
#endif
-void* StackObj::operator new(size_t size) { ShouldNotCallThis(); return 0; }
-void StackObj::operator delete(void* p) { ShouldNotCallThis(); }
-void* StackObj::operator new [](size_t size) { ShouldNotCallThis(); return 0; }
-void StackObj::operator delete [](void* p) { ShouldNotCallThis(); }
+void* StackObj::operator new(size_t size) throw() { ShouldNotCallThis(); return 0; }
+void StackObj::operator delete(void* p) { ShouldNotCallThis(); }
+void* StackObj::operator new [](size_t size) throw() { ShouldNotCallThis(); return 0; }
+void StackObj::operator delete [](void* p) { ShouldNotCallThis(); }
-void* _ValueObj::operator new(size_t size) { ShouldNotCallThis(); return 0; }
-void _ValueObj::operator delete(void* p) { ShouldNotCallThis(); }
-void* _ValueObj::operator new [](size_t size) { ShouldNotCallThis(); return 0; }
-void _ValueObj::operator delete [](void* p) { ShouldNotCallThis(); }
+void* _ValueObj::operator new(size_t size) throw() { ShouldNotCallThis(); return 0; }
+void _ValueObj::operator delete(void* p) { ShouldNotCallThis(); }
+void* _ValueObj::operator new [](size_t size) throw() { ShouldNotCallThis(); return 0; }
+void _ValueObj::operator delete [](void* p) { ShouldNotCallThis(); }
void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data,
size_t word_size, bool read_only,
- MetaspaceObj::Type type, TRAPS) {
+ MetaspaceObj::Type type, TRAPS) throw() {
// Klass has it's own operator new
return Metaspace::allocate(loader_data, word_size, read_only,
type, CHECK_NULL);
@@ -80,7 +80,7 @@
st->print(" {"INTPTR_FORMAT"}", this);
}
-void* ResourceObj::operator new(size_t size, allocation_type type, MEMFLAGS flags) {
+void* ResourceObj::operator new(size_t size, allocation_type type, MEMFLAGS flags) throw() {
address res;
switch (type) {
case C_HEAP:
@@ -97,12 +97,12 @@
return res;
}
-void* ResourceObj::operator new [](size_t size, allocation_type type, MEMFLAGS flags) {
+void* ResourceObj::operator new [](size_t size, allocation_type type, MEMFLAGS flags) throw() {
return (address) operator new(size, type, flags);
}
void* ResourceObj::operator new(size_t size, const std::nothrow_t& nothrow_constant,
- allocation_type type, MEMFLAGS flags) {
+ allocation_type type, MEMFLAGS flags) throw() {
//should only call this with std::nothrow, use other operator new() otherwise
address res;
switch (type) {
@@ -121,7 +121,7 @@
}
void* ResourceObj::operator new [](size_t size, const std::nothrow_t& nothrow_constant,
- allocation_type type, MEMFLAGS flags) {
+ allocation_type type, MEMFLAGS flags) throw() {
return (address)operator new(size, nothrow_constant, type, flags);
}
@@ -370,7 +370,7 @@
//--------------------------------------------------------------------------------------
// Chunk implementation
-void* Chunk::operator new (size_t requested_size, AllocFailType alloc_failmode, size_t length) {
+void* Chunk::operator new (size_t requested_size, AllocFailType alloc_failmode, size_t length) throw() {
// requested_size is equal to sizeof(Chunk) but in order for the arena
// allocations to come out aligned as expected the size must be aligned
// to expected arena alignment.
@@ -478,18 +478,18 @@
NOT_PRODUCT(Atomic::dec(&_instance_count);)
}
-void* Arena::operator new(size_t size) {
+void* Arena::operator new(size_t size) throw() {
assert(false, "Use dynamic memory type binding");
return NULL;
}
-void* Arena::operator new (size_t size, const std::nothrow_t& nothrow_constant) {
+void* Arena::operator new (size_t size, const std::nothrow_t& nothrow_constant) throw() {
assert(false, "Use dynamic memory type binding");
return NULL;
}
// dynamic memory type binding
-void* Arena::operator new(size_t size, MEMFLAGS flags) {
+void* Arena::operator new(size_t size, MEMFLAGS flags) throw() {
#ifdef ASSERT
void* p = (void*)AllocateHeap(size, flags|otArena, CALLER_PC);
if (PrintMallocFree) trace_heap_malloc(size, "Arena-new", p);
@@ -499,7 +499,7 @@
#endif
}
-void* Arena::operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) {
+void* Arena::operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) throw() {
#ifdef ASSERT
void* p = os::malloc(size, flags|otArena, CALLER_PC);
if (PrintMallocFree) trace_heap_malloc(size, "Arena-new", p);
@@ -688,22 +688,22 @@
// define ALLOW_OPERATOR_NEW_USAGE for platform on which global operator new allowed.
//
#ifndef ALLOW_OPERATOR_NEW_USAGE
-void* operator new(size_t size){
+void* operator new(size_t size) throw() {
assert(false, "Should not call global operator new");
return 0;
}
-void* operator new [](size_t size){
+void* operator new [](size_t size) throw() {
assert(false, "Should not call global operator new[]");
return 0;
}
-void* operator new(size_t size, const std::nothrow_t& nothrow_constant){
+void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() {
assert(false, "Should not call global operator new");
return 0;
}
-void* operator new [](size_t size, std::nothrow_t& nothrow_constant){
+void* operator new [](size_t size, std::nothrow_t& nothrow_constant) throw() {
assert(false, "Should not call global operator new[]");
return 0;
}
--- a/hotspot/src/share/vm/memory/allocation.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/allocation.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -204,12 +204,12 @@
template <MEMFLAGS F> class CHeapObj ALLOCATION_SUPER_CLASS_SPEC {
public:
- _NOINLINE_ void* operator new(size_t size, address caller_pc = 0);
+ _NOINLINE_ void* operator new(size_t size, address caller_pc = 0) throw();
_NOINLINE_ void* operator new (size_t size, const std::nothrow_t& nothrow_constant,
- address caller_pc = 0);
- _NOINLINE_ void* operator new [](size_t size, address caller_pc = 0);
+ address caller_pc = 0) throw();
+ _NOINLINE_ void* operator new [](size_t size, address caller_pc = 0) throw();
_NOINLINE_ void* operator new [](size_t size, const std::nothrow_t& nothrow_constant,
- address caller_pc = 0);
+ address caller_pc = 0) throw();
void operator delete(void* p);
void operator delete [] (void* p);
};
@@ -219,9 +219,9 @@
class StackObj ALLOCATION_SUPER_CLASS_SPEC {
private:
- void* operator new(size_t size);
+ void* operator new(size_t size) throw();
void operator delete(void* p);
- void* operator new [](size_t size);
+ void* operator new [](size_t size) throw();
void operator delete [](void* p);
};
@@ -245,9 +245,9 @@
//
class _ValueObj {
private:
- void* operator new(size_t size);
+ void* operator new(size_t size) throw();
void operator delete(void* p);
- void* operator new [](size_t size);
+ void* operator new [](size_t size) throw();
void operator delete [](void* p);
};
@@ -316,7 +316,7 @@
void* operator new(size_t size, ClassLoaderData* loader_data,
size_t word_size, bool read_only,
- Type type, Thread* thread);
+ Type type, Thread* thread) throw();
// can't use TRAPS from this header file.
void operator delete(void* p) { ShouldNotCallThis(); }
};
@@ -339,7 +339,7 @@
Chunk* _next; // Next Chunk in list
const size_t _len; // Size of this Chunk
public:
- void* operator new(size_t size, AllocFailType alloc_failmode, size_t length);
+ void* operator new(size_t size, AllocFailType alloc_failmode, size_t length) throw();
void operator delete(void* p);
Chunk(size_t length);
@@ -422,12 +422,12 @@
char* hwm() const { return _hwm; }
// new operators
- void* operator new (size_t size);
- void* operator new (size_t size, const std::nothrow_t& nothrow_constant);
+ void* operator new (size_t size) throw();
+ void* operator new (size_t size, const std::nothrow_t& nothrow_constant) throw();
// dynamic memory type tagging
- void* operator new(size_t size, MEMFLAGS flags);
- void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags);
+ void* operator new(size_t size, MEMFLAGS flags) throw();
+ void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) throw();
void operator delete(void* p);
// Fast allocate in the arena. Common case is: pointer test + increment.
@@ -583,44 +583,44 @@
#endif // ASSERT
public:
- void* operator new(size_t size, allocation_type type, MEMFLAGS flags);
- void* operator new [](size_t size, allocation_type type, MEMFLAGS flags);
+ void* operator new(size_t size, allocation_type type, MEMFLAGS flags) throw();
+ void* operator new [](size_t size, allocation_type type, MEMFLAGS flags) throw();
void* operator new(size_t size, const std::nothrow_t& nothrow_constant,
- allocation_type type, MEMFLAGS flags);
+ allocation_type type, MEMFLAGS flags) throw();
void* operator new [](size_t size, const std::nothrow_t& nothrow_constant,
- allocation_type type, MEMFLAGS flags);
+ allocation_type type, MEMFLAGS flags) throw();
- void* operator new(size_t size, Arena *arena) {
+ void* operator new(size_t size, Arena *arena) throw() {
address res = (address)arena->Amalloc(size);
DEBUG_ONLY(set_allocation_type(res, ARENA);)
return res;
}
- void* operator new [](size_t size, Arena *arena) {
+ void* operator new [](size_t size, Arena *arena) throw() {
address res = (address)arena->Amalloc(size);
DEBUG_ONLY(set_allocation_type(res, ARENA);)
return res;
}
- void* operator new(size_t size) {
+ void* operator new(size_t size) throw() {
address res = (address)resource_allocate_bytes(size);
DEBUG_ONLY(set_allocation_type(res, RESOURCE_AREA);)
return res;
}
- void* operator new(size_t size, const std::nothrow_t& nothrow_constant) {
+ void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() {
address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL);
DEBUG_ONLY(if (res != NULL) set_allocation_type(res, RESOURCE_AREA);)
return res;
}
- void* operator new [](size_t size) {
+ void* operator new [](size_t size) throw() {
address res = (address)resource_allocate_bytes(size);
DEBUG_ONLY(set_allocation_type(res, RESOURCE_AREA);)
return res;
}
- void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) {
+ void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw() {
address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL);
DEBUG_ONLY(if (res != NULL) set_allocation_type(res, RESOURCE_AREA);)
return res;
@@ -666,7 +666,7 @@
NEW_RESOURCE_ARRAY_RETURN_NULL(type, 1)
#define NEW_C_HEAP_ARRAY3(type, size, memflags, pc, allocfail)\
- (type*) AllocateHeap(size * sizeof(type), memflags, pc, allocfail)
+ (type*) AllocateHeap((size) * sizeof(type), memflags, pc, allocfail)
#define NEW_C_HEAP_ARRAY2(type, size, memflags, pc)\
(type*) (AllocateHeap((size) * sizeof(type), memflags, pc))
@@ -675,16 +675,16 @@
(type*) (AllocateHeap((size) * sizeof(type), memflags))
#define NEW_C_HEAP_ARRAY2_RETURN_NULL(type, size, memflags, pc)\
- NEW_C_HEAP_ARRAY3(type, size, memflags, pc, AllocFailStrategy::RETURN_NULL)
+ NEW_C_HEAP_ARRAY3(type, (size), memflags, pc, AllocFailStrategy::RETURN_NULL)
#define NEW_C_HEAP_ARRAY_RETURN_NULL(type, size, memflags)\
- NEW_C_HEAP_ARRAY3(type, size, memflags, (address)0, AllocFailStrategy::RETURN_NULL)
+ NEW_C_HEAP_ARRAY3(type, (size), memflags, (address)0, AllocFailStrategy::RETURN_NULL)
#define REALLOC_C_HEAP_ARRAY(type, old, size, memflags)\
- (type*) (ReallocateHeap((char*)old, (size) * sizeof(type), memflags))
+ (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), memflags))
#define REALLOC_C_HEAP_ARRAY_RETURN_NULL(type, old, size, memflags)\
- (type*) (ReallocateHeap((char*)old, (size) * sizeof(type), memflags, AllocFailStrategy::RETURN_NULL))
+ (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), memflags, AllocFailStrategy::RETURN_NULL))
#define FREE_C_HEAP_ARRAY(type, old, memflags) \
FreeHeap((char*)(old), memflags)
--- a/hotspot/src/share/vm/memory/allocation.inline.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/allocation.inline.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -85,7 +85,7 @@
template <MEMFLAGS F> void* CHeapObj<F>::operator new(size_t size,
- address caller_pc){
+ address caller_pc) throw() {
void* p = (void*)AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC));
#ifdef ASSERT
if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
@@ -94,7 +94,7 @@
}
template <MEMFLAGS F> void* CHeapObj<F>::operator new (size_t size,
- const std::nothrow_t& nothrow_constant, address caller_pc) {
+ const std::nothrow_t& nothrow_constant, address caller_pc) throw() {
void* p = (void*)AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC),
AllocFailStrategy::RETURN_NULL);
#ifdef ASSERT
@@ -104,12 +104,12 @@
}
template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
- address caller_pc){
+ address caller_pc) throw() {
return CHeapObj<F>::operator new(size, caller_pc);
}
template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
- const std::nothrow_t& nothrow_constant, address caller_pc) {
+ const std::nothrow_t& nothrow_constant, address caller_pc) throw() {
return CHeapObj<F>::operator new(size, nothrow_constant, caller_pc);
}
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -193,6 +193,8 @@
alignment = lcm(os::large_page_size(), alignment);
}
+ assert(alignment >= min_alignment(), "Must be");
+
return alignment;
}
--- a/hotspot/src/share/vm/memory/filemap.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/filemap.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -55,6 +55,7 @@
" shared archive file.\n");
jio_vfprintf(defaultStream::error_stream(), msg, ap);
jio_fprintf(defaultStream::error_stream(), "\n");
+ // Do not change the text of the below message because some tests check for it.
vm_exit_during_initialization("Unable to use shared archive.", NULL);
}
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -95,13 +95,13 @@
guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize");
// The heap must be at least as aligned as generations.
- size_t alignment = Generation::GenGrain;
+ size_t gen_alignment = Generation::GenGrain;
_gen_specs = gen_policy()->generations();
// Make sure the sizes are all aligned.
for (i = 0; i < _n_gens; i++) {
- _gen_specs[i]->align(alignment);
+ _gen_specs[i]->align(gen_alignment);
}
// Allocate space for the heap.
@@ -109,9 +109,11 @@
char* heap_address;
size_t total_reserved = 0;
int n_covered_regions = 0;
- ReservedSpace heap_rs(0);
+ ReservedSpace heap_rs;
- heap_address = allocate(alignment, &total_reserved,
+ size_t heap_alignment = collector_policy()->max_alignment();
+
+ heap_address = allocate(heap_alignment, &total_reserved,
&n_covered_regions, &heap_rs);
if (!heap_rs.is_reserved()) {
@@ -168,6 +170,8 @@
const size_t pageSize = UseLargePages ?
os::large_page_size() : os::vm_page_size();
+ assert(alignment % pageSize == 0, "Must be");
+
for (int i = 0; i < _n_gens; i++) {
total_reserved += _gen_specs[i]->max_size();
if (total_reserved < _gen_specs[i]->max_size()) {
@@ -175,24 +179,17 @@
}
n_covered_regions += _gen_specs[i]->n_covered_regions();
}
- assert(total_reserved % pageSize == 0,
- err_msg("Gen size; total_reserved=" SIZE_FORMAT ", pageSize="
- SIZE_FORMAT, total_reserved, pageSize));
+ assert(total_reserved % alignment == 0,
+ err_msg("Gen size; total_reserved=" SIZE_FORMAT ", alignment="
+ SIZE_FORMAT, total_reserved, alignment));
// Needed until the cardtable is fixed to have the right number
// of covered regions.
n_covered_regions += 2;
- if (UseLargePages) {
- assert(total_reserved != 0, "total_reserved cannot be 0");
- total_reserved = round_to(total_reserved, os::large_page_size());
- if (total_reserved < os::large_page_size()) {
- vm_exit_during_initialization(overflow_msg);
- }
- }
+ *_total_reserved = total_reserved;
+ *_n_covered_regions = n_covered_regions;
- *_total_reserved = total_reserved;
- *_n_covered_regions = n_covered_regions;
*heap_rs = Universe::reserve_heap(total_reserved, alignment);
return heap_rs->base();
}
--- a/hotspot/src/share/vm/memory/memRegion.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/memRegion.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
@@ -102,11 +102,11 @@
return MemRegion();
}
-void* MemRegion::operator new(size_t size) {
+void* MemRegion::operator new(size_t size) throw() {
return (address)AllocateHeap(size, mtGC, 0, AllocFailStrategy::RETURN_NULL);
}
-void* MemRegion::operator new [](size_t size) {
+void* MemRegion::operator new [](size_t size) throw() {
return (address)AllocateHeap(size, mtGC, 0, AllocFailStrategy::RETURN_NULL);
}
void MemRegion::operator delete(void* p) {
--- a/hotspot/src/share/vm/memory/memRegion.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/memRegion.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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,8 +94,8 @@
size_t word_size() const { return _word_size; }
bool is_empty() const { return word_size() == 0; }
- void* operator new(size_t size);
- void* operator new [](size_t size);
+ void* operator new(size_t size) throw();
+ void* operator new [](size_t size) throw();
void operator delete(void* p);
void operator delete [](void* p);
};
@@ -111,13 +111,13 @@
class MemRegionClosureRO: public MemRegionClosure {
public:
- void* operator new(size_t size, ResourceObj::allocation_type type, MEMFLAGS flags) {
+ void* operator new(size_t size, ResourceObj::allocation_type type, MEMFLAGS flags) throw() {
return ResourceObj::operator new(size, type, flags);
}
- void* operator new(size_t size, Arena *arena) {
+ void* operator new(size_t size, Arena *arena) throw() {
return ResourceObj::operator new(size, arena);
}
- void* operator new(size_t size) {
+ void* operator new(size_t size) throw() {
return ResourceObj::operator new(size);
}
--- a/hotspot/src/share/vm/memory/metaspace.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -345,7 +345,7 @@
};
// byte_size is the size of the associated virtualspace.
-VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL), _rs(0), _container_count(0) {
+VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL), _rs(), _container_count(0) {
// align up to vm allocation granularity
byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
--- a/hotspot/src/share/vm/memory/universe.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/universe.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -681,17 +681,23 @@
// 32Gb
// OopEncodingHeapMax == NarrowOopHeapMax << LogMinObjAlignmentInBytes;
-char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) {
+char* Universe::preferred_heap_base(size_t heap_size, size_t alignment, NARROW_OOP_MODE mode) {
+ assert(is_size_aligned((size_t)OopEncodingHeapMax, alignment), "Must be");
+ assert(is_size_aligned((size_t)NarrowOopHeapMax, alignment), "Must be");
+ assert(is_size_aligned(heap_size, alignment), "Must be");
+
+ uintx heap_base_min_address_aligned = align_size_up(HeapBaseMinAddress, alignment);
+
size_t base = 0;
#ifdef _LP64
if (UseCompressedOops) {
assert(mode == UnscaledNarrowOop ||
mode == ZeroBasedNarrowOop ||
mode == HeapBasedNarrowOop, "mode is invalid");
- const size_t total_size = heap_size + HeapBaseMinAddress;
+ const size_t total_size = heap_size + heap_base_min_address_aligned;
// Return specified base for the first request.
if (!FLAG_IS_DEFAULT(HeapBaseMinAddress) && (mode == UnscaledNarrowOop)) {
- base = HeapBaseMinAddress;
+ base = heap_base_min_address_aligned;
// If the total size is small enough to allow UnscaledNarrowOop then
// just use UnscaledNarrowOop.
@@ -742,6 +748,8 @@
}
}
#endif
+
+ assert(is_ptr_aligned((char*)base, alignment), "Must be");
return (char*)base; // also return NULL (don't care) for 32-bit VM
}
@@ -867,27 +875,33 @@
size_t total_reserved = align_size_up(heap_size, alignment);
assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
"heap size is too big for compressed oops");
- char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop);
- ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr);
+ bool use_large_pages = UseLargePages && is_size_aligned(alignment, os::large_page_size());
+ assert(!UseLargePages
+ || UseParallelOldGC
+ || use_large_pages, "Wrong alignment to use large pages");
+
+ char* addr = Universe::preferred_heap_base(total_reserved, alignment, Universe::UnscaledNarrowOop);
+
+ ReservedHeapSpace total_rs(total_reserved, alignment, use_large_pages, addr);
if (UseCompressedOops) {
if (addr != NULL && !total_rs.is_reserved()) {
// Failed to reserve at specified address - the requested memory
// region is taken already, for example, by 'java' launcher.
// Try again to reserver heap higher.
- addr = Universe::preferred_heap_base(total_reserved, Universe::ZeroBasedNarrowOop);
+ addr = Universe::preferred_heap_base(total_reserved, alignment, Universe::ZeroBasedNarrowOop);
ReservedHeapSpace total_rs0(total_reserved, alignment,
- UseLargePages, addr);
+ use_large_pages, addr);
if (addr != NULL && !total_rs0.is_reserved()) {
// Failed to reserve at specified address again - give up.
- addr = Universe::preferred_heap_base(total_reserved, Universe::HeapBasedNarrowOop);
+ addr = Universe::preferred_heap_base(total_reserved, alignment, Universe::HeapBasedNarrowOop);
assert(addr == NULL, "");
ReservedHeapSpace total_rs1(total_reserved, alignment,
- UseLargePages, addr);
+ use_large_pages, addr);
total_rs = total_rs1;
} else {
total_rs = total_rs0;
--- a/hotspot/src/share/vm/memory/universe.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/memory/universe.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -346,7 +346,7 @@
};
static NARROW_OOP_MODE narrow_oop_mode();
static const char* narrow_oop_mode_to_string(NARROW_OOP_MODE mode);
- static char* preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode);
+ static char* preferred_heap_base(size_t heap_size, size_t alignment, NARROW_OOP_MODE mode);
static char* preferred_metaspace_base(size_t heap_size, NARROW_OOP_MODE mode);
static address narrow_oop_base() { return _narrow_oop._base; }
static bool is_narrow_oop_base(void* addr) { return (narrow_oop_base() == (address)addr); }
--- a/hotspot/src/share/vm/oops/klass.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/oops/klass.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -139,7 +139,7 @@
return NULL;
}
-void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) {
+void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
return Metaspace::allocate(loader_data, word_size, /*read_only*/false,
MetaspaceObj::ClassType, CHECK_NULL);
}
--- a/hotspot/src/share/vm/oops/klass.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/oops/klass.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -179,7 +179,7 @@
// Constructor
Klass();
- void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS);
+ void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw();
public:
bool is_klass() const volatile { return true; }
--- a/hotspot/src/share/vm/oops/method.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/oops/method.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -720,11 +720,22 @@
}
}
+bool Method::is_always_compilable() const {
+ // Generated adapters must be compiled
+ if (is_method_handle_intrinsic() && is_synthetic()) {
+ assert(!is_not_c1_compilable(), "sanity check");
+ assert(!is_not_c2_compilable(), "sanity check");
+ return true;
+ }
+
+ return false;
+}
+
bool Method::is_not_compilable(int comp_level) const {
if (number_of_breakpoints() > 0)
return true;
- if (is_method_handle_intrinsic())
- return !is_synthetic(); // the generated adapters must be compiled
+ if (is_always_compilable())
+ return false;
if (comp_level == CompLevel_any)
return is_not_c1_compilable() || is_not_c2_compilable();
if (is_c1_compile(comp_level))
@@ -736,6 +747,10 @@
// call this when compiler finds that this method is not compilable
void Method::set_not_compilable(int comp_level, bool report, const char* reason) {
+ if (is_always_compilable()) {
+ // Don't mark a method which should be always compilable
+ return;
+ }
print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason);
if (comp_level == CompLevel_all) {
set_not_c1_compilable();
--- a/hotspot/src/share/vm/oops/method.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/oops/method.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -796,6 +796,7 @@
void set_not_osr_compilable_quietly(int comp_level = CompLevel_all) {
set_not_osr_compilable(comp_level, false);
}
+ bool is_always_compilable() const;
private:
void print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason);
--- a/hotspot/src/share/vm/oops/symbol.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/oops/symbol.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -41,19 +41,19 @@
}
}
-void* Symbol::operator new(size_t sz, int len, TRAPS) {
+void* Symbol::operator new(size_t sz, int len, TRAPS) throw() {
int alloc_size = size(len)*HeapWordSize;
address res = (address) AllocateHeap(alloc_size, mtSymbol);
return res;
}
-void* Symbol::operator new(size_t sz, int len, Arena* arena, TRAPS) {
+void* Symbol::operator new(size_t sz, int len, Arena* arena, TRAPS) throw() {
int alloc_size = size(len)*HeapWordSize;
address res = (address)arena->Amalloc(alloc_size);
return res;
}
-void* Symbol::operator new(size_t sz, int len, ClassLoaderData* loader_data, TRAPS) {
+void* Symbol::operator new(size_t sz, int len, ClassLoaderData* loader_data, TRAPS) throw() {
address res;
int alloc_size = size(len)*HeapWordSize;
res = (address) Metaspace::allocate(loader_data, size(len), true,
--- a/hotspot/src/share/vm/oops/symbol.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/oops/symbol.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -136,9 +136,9 @@
}
Symbol(const u1* name, int length, int refcount);
- void* operator new(size_t size, int len, TRAPS);
- void* operator new(size_t size, int len, Arena* arena, TRAPS);
- void* operator new(size_t size, int len, ClassLoaderData* loader_data, TRAPS);
+ void* operator new(size_t size, int len, TRAPS) throw();
+ void* operator new(size_t size, int len, Arena* arena, TRAPS) throw();
+ void* operator new(size_t size, int len, ClassLoaderData* loader_data, TRAPS) throw();
void operator delete(void* p);
--- a/hotspot/src/share/vm/opto/block.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/block.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -112,9 +112,9 @@
// exceeds OptoLoopAlignment.
uint Block::compute_first_inst_size(uint& sum_size, uint inst_cnt,
PhaseRegAlloc* ra) {
- uint last_inst = _nodes.size();
+ uint last_inst = number_of_nodes();
for( uint j = 0; j < last_inst && inst_cnt > 0; j++ ) {
- uint inst_size = _nodes[j]->size(ra);
+ uint inst_size = get_node(j)->size(ra);
if( inst_size > 0 ) {
inst_cnt--;
uint sz = sum_size + inst_size;
@@ -131,8 +131,8 @@
}
uint Block::find_node( const Node *n ) const {
- for( uint i = 0; i < _nodes.size(); i++ ) {
- if( _nodes[i] == n )
+ for( uint i = 0; i < number_of_nodes(); i++ ) {
+ if( get_node(i) == n )
return i;
}
ShouldNotReachHere();
@@ -141,7 +141,7 @@
// Find and remove n from block list
void Block::find_remove( const Node *n ) {
- _nodes.remove(find_node(n));
+ remove_node(find_node(n));
}
// Return empty status of a block. Empty blocks contain only the head, other
@@ -154,10 +154,10 @@
}
int success_result = completely_empty;
- int end_idx = _nodes.size()-1;
+ int end_idx = number_of_nodes() - 1;
// Check for ending goto
- if ((end_idx > 0) && (_nodes[end_idx]->is_MachGoto())) {
+ if ((end_idx > 0) && (get_node(end_idx)->is_MachGoto())) {
success_result = empty_with_goto;
end_idx--;
}
@@ -170,7 +170,7 @@
// Ideal nodes are allowable in empty blocks: skip them Only MachNodes
// turn directly into code, because only MachNodes have non-trivial
// emit() functions.
- while ((end_idx > 0) && !_nodes[end_idx]->is_Mach()) {
+ while ((end_idx > 0) && !get_node(end_idx)->is_Mach()) {
end_idx--;
}
@@ -209,15 +209,15 @@
// True if block is low enough frequency or guarded by a test which
// mostly does not go here.
-bool Block::is_uncommon(PhaseCFG* cfg) const {
+bool PhaseCFG::is_uncommon(const Block* block) {
// Initial blocks must never be moved, so are never uncommon.
- if (head()->is_Root() || head()->is_Start()) return false;
+ if (block->head()->is_Root() || block->head()->is_Start()) return false;
// Check for way-low freq
- if( _freq < BLOCK_FREQUENCY(0.00001f) ) return true;
+ if(block->_freq < BLOCK_FREQUENCY(0.00001f) ) return true;
// Look for code shape indicating uncommon_trap or slow path
- if (has_uncommon_code()) return true;
+ if (block->has_uncommon_code()) return true;
const float epsilon = 0.05f;
const float guard_factor = PROB_UNLIKELY_MAG(4) / (1.f - epsilon);
@@ -225,8 +225,8 @@
uint freq_preds = 0;
uint uncommon_for_freq_preds = 0;
- for( uint i=1; i<num_preds(); i++ ) {
- Block* guard = cfg->get_block_for_node(pred(i));
+ for( uint i=1; i< block->num_preds(); i++ ) {
+ Block* guard = get_block_for_node(block->pred(i));
// Check to see if this block follows its guard 1 time out of 10000
// or less.
//
@@ -244,14 +244,14 @@
uncommon_preds++;
} else {
freq_preds++;
- if( _freq < guard->_freq * guard_factor ) {
+ if(block->_freq < guard->_freq * guard_factor ) {
uncommon_for_freq_preds++;
}
}
}
- if( num_preds() > 1 &&
+ if( block->num_preds() > 1 &&
// The block is uncommon if all preds are uncommon or
- (uncommon_preds == (num_preds()-1) ||
+ (uncommon_preds == (block->num_preds()-1) ||
// it is uncommon for all frequent preds.
uncommon_for_freq_preds == freq_preds) ) {
return true;
@@ -344,8 +344,8 @@
void Block::dump(const PhaseCFG* cfg) const {
dump_head(cfg);
- for (uint i=0; i< _nodes.size(); i++) {
- _nodes[i]->dump();
+ for (uint i=0; i< number_of_nodes(); i++) {
+ get_node(i)->dump();
}
tty->print("\n");
}
@@ -434,7 +434,7 @@
map_node_to_block(p, bb);
map_node_to_block(x, bb);
if( x != p ) { // Only for root is x == p
- bb->_nodes.push((Node*)x);
+ bb->push_node((Node*)x);
}
// Now handle predecessors
++sum; // Count 1 for self block
@@ -469,11 +469,11 @@
assert( x != proj, "" );
// Map basic block of projection
map_node_to_block(proj, pb);
- pb->_nodes.push(proj);
+ pb->push_node(proj);
}
// Insert self as a child of my predecessor block
pb->_succs.map(pb->_num_succs++, get_block_for_node(np));
- assert( pb->_nodes[ pb->_nodes.size() - pb->_num_succs ]->is_block_proj(),
+ assert( pb->get_node(pb->number_of_nodes() - pb->_num_succs)->is_block_proj(),
"too many control users, not a CFG?" );
}
}
@@ -495,7 +495,7 @@
// surrounding blocks.
float freq = in->_freq * in->succ_prob(succ_no);
// get ProjNode corresponding to the succ_no'th successor of the in block
- ProjNode* proj = in->_nodes[in->_nodes.size() - in->_num_succs + succ_no]->as_Proj();
+ ProjNode* proj = in->get_node(in->number_of_nodes() - in->_num_succs + succ_no)->as_Proj();
// create region for basic block
RegionNode* region = new (C) RegionNode(2);
region->init_req(1, proj);
@@ -507,7 +507,7 @@
Node* gto = _goto->clone(); // get a new goto node
gto->set_req(0, region);
// add it to the basic block
- block->_nodes.push(gto);
+ block->push_node(gto);
map_node_to_block(gto, block);
C->regalloc()->set_bad(gto->_idx);
// hook up successor block
@@ -527,9 +527,9 @@
// Does this block end in a multiway branch that cannot have the default case
// flipped for another case?
static bool no_flip_branch( Block *b ) {
- int branch_idx = b->_nodes.size() - b->_num_succs-1;
+ int branch_idx = b->number_of_nodes() - b->_num_succs-1;
if( branch_idx < 1 ) return false;
- Node *bra = b->_nodes[branch_idx];
+ Node *bra = b->get_node(branch_idx);
if( bra->is_Catch() )
return true;
if( bra->is_Mach() ) {
@@ -550,16 +550,16 @@
void PhaseCFG::convert_NeverBranch_to_Goto(Block *b) {
// Find true target
int end_idx = b->end_idx();
- int idx = b->_nodes[end_idx+1]->as_Proj()->_con;
+ int idx = b->get_node(end_idx+1)->as_Proj()->_con;
Block *succ = b->_succs[idx];
Node* gto = _goto->clone(); // get a new goto node
gto->set_req(0, b->head());
- Node *bp = b->_nodes[end_idx];
- b->_nodes.map(end_idx,gto); // Slam over NeverBranch
+ Node *bp = b->get_node(end_idx);
+ b->map_node(gto, end_idx); // Slam over NeverBranch
map_node_to_block(gto, b);
C->regalloc()->set_bad(gto->_idx);
- b->_nodes.pop(); // Yank projections
- b->_nodes.pop(); // Yank projections
+ b->pop_node(); // Yank projections
+ b->pop_node(); // Yank projections
b->_succs.map(0,succ); // Map only successor
b->_num_succs = 1;
// remap successor's predecessors if necessary
@@ -575,8 +575,8 @@
// Scan through block, yanking dead path from
// all regions and phis.
dead->head()->del_req(j);
- for( int k = 1; dead->_nodes[k]->is_Phi(); k++ )
- dead->_nodes[k]->del_req(j);
+ for( int k = 1; dead->get_node(k)->is_Phi(); k++ )
+ dead->get_node(k)->del_req(j);
}
// Helper function to move block bx to the slot following b_index. Return
@@ -620,7 +620,7 @@
if (e != Block::not_empty) {
if (e == Block::empty_with_goto) {
// Remove the goto, but leave the block.
- b->_nodes.pop();
+ b->pop_node();
}
// Mark this block as a connector block, which will cause it to be
// ignored in certain functions such as non_connector_successor().
@@ -663,13 +663,13 @@
// to give a fake exit path to infinite loops. At this late stage they
// need to turn into Goto's so that when you enter the infinite loop you
// indeed hang.
- if (block->_nodes[block->end_idx()]->Opcode() == Op_NeverBranch) {
+ if (block->get_node(block->end_idx())->Opcode() == Op_NeverBranch) {
convert_NeverBranch_to_Goto(block);
}
// Look for uncommon blocks and move to end.
if (!C->do_freq_based_layout()) {
- if (block->is_uncommon(this)) {
+ if (is_uncommon(block)) {
move_to_end(block, i);
last--; // No longer check for being uncommon!
if (no_flip_branch(block)) { // Fall-thru case must follow?
@@ -720,9 +720,9 @@
// exchange the true and false targets.
if (no_flip_branch(block)) {
// Find fall through case - if must fall into its target
- int branch_idx = block->_nodes.size() - block->_num_succs;
+ int branch_idx = block->number_of_nodes() - block->_num_succs;
for (uint j2 = 0; j2 < block->_num_succs; j2++) {
- const ProjNode* p = block->_nodes[branch_idx + j2]->as_Proj();
+ const ProjNode* p = block->get_node(branch_idx + j2)->as_Proj();
if (p->_con == 0) {
// successor j2 is fall through case
if (block->non_connector_successor(j2) != bnext) {
@@ -743,14 +743,14 @@
// Remove all CatchProjs
for (uint j = 0; j < block->_num_succs; j++) {
- block->_nodes.pop();
+ block->pop_node();
}
} else if (block->_num_succs == 1) {
// Block ends in a Goto?
if (bnext == bs0) {
// We fall into next block; remove the Goto
- block->_nodes.pop();
+ block->pop_node();
}
} else if(block->_num_succs == 2) { // Block ends in a If?
@@ -759,9 +759,9 @@
// be projections (in any order), the 3rd last node must be
// the IfNode (we have excluded other 2-way exits such as
// CatchNodes already).
- MachNode* iff = block->_nodes[block->_nodes.size() - 3]->as_Mach();
- ProjNode* proj0 = block->_nodes[block->_nodes.size() - 2]->as_Proj();
- ProjNode* proj1 = block->_nodes[block->_nodes.size() - 1]->as_Proj();
+ MachNode* iff = block->get_node(block->number_of_nodes() - 3)->as_Mach();
+ ProjNode* proj0 = block->get_node(block->number_of_nodes() - 2)->as_Proj();
+ ProjNode* proj1 = block->get_node(block->number_of_nodes() - 1)->as_Proj();
// Assert that proj0 and succs[0] match up. Similarly for proj1 and succs[1].
assert(proj0->raw_out(0) == block->_succs[0]->head(), "Mismatch successor 0");
@@ -833,8 +833,8 @@
iff->as_MachIf()->negate();
}
- block->_nodes.pop(); // Remove IfFalse & IfTrue projections
- block->_nodes.pop();
+ block->pop_node(); // Remove IfFalse & IfTrue projections
+ block->pop_node();
} else {
// Multi-exit block, e.g. a switch statement
@@ -895,13 +895,13 @@
// Verify sane CFG
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
- uint cnt = block->_nodes.size();
+ uint cnt = block->number_of_nodes();
uint j;
for (j = 0; j < cnt; j++) {
- Node *n = block->_nodes[j];
+ Node *n = block->get_node(j);
assert(get_block_for_node(n) == block, "");
if (j >= 1 && n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_CreateEx) {
- assert(j == 1 || block->_nodes[j-1]->is_Phi(), "CreateEx must be first instruction in block");
+ assert(j == 1 || block->get_node(j-1)->is_Phi(), "CreateEx must be first instruction in block");
}
for (uint k = 0; k < n->req(); k++) {
Node *def = n->in(k);
@@ -930,14 +930,14 @@
}
j = block->end_idx();
- Node* bp = (Node*)block->_nodes[block->_nodes.size() - 1]->is_block_proj();
+ Node* bp = (Node*)block->get_node(block->number_of_nodes() - 1)->is_block_proj();
assert(bp, "last instruction must be a block proj");
- assert(bp == block->_nodes[j], "wrong number of successors for this block");
+ assert(bp == block->get_node(j), "wrong number of successors for this block");
if (bp->is_Catch()) {
- while (block->_nodes[--j]->is_MachProj()) {
+ while (block->get_node(--j)->is_MachProj()) {
;
}
- assert(block->_nodes[j]->is_MachCall(), "CatchProj must follow call");
+ assert(block->get_node(j)->is_MachCall(), "CatchProj must follow call");
} else if (bp->is_Mach() && bp->as_Mach()->ideal_Opcode() == Op_If) {
assert(block->_num_succs == 2, "Conditional branch must have two targets");
}
@@ -1440,9 +1440,9 @@
Block *bnext = next(b);
Block *bs0 = b->non_connector_successor(0);
- MachNode *iff = b->_nodes[b->_nodes.size()-3]->as_Mach();
- ProjNode *proj0 = b->_nodes[b->_nodes.size()-2]->as_Proj();
- ProjNode *proj1 = b->_nodes[b->_nodes.size()-1]->as_Proj();
+ MachNode *iff = b->get_node(b->number_of_nodes() - 3)->as_Mach();
+ ProjNode *proj0 = b->get_node(b->number_of_nodes() - 2)->as_Proj();
+ ProjNode *proj1 = b->get_node(b->number_of_nodes() - 1)->as_Proj();
if (bnext == bs0) {
// Fall-thru case in succs[0], should be in succs[1]
@@ -1454,8 +1454,8 @@
b->_succs.map( 1, tbs0 );
// Flip projections to match targets
- b->_nodes.map(b->_nodes.size()-2, proj1);
- b->_nodes.map(b->_nodes.size()-1, proj0);
+ b->map_node(proj1, b->number_of_nodes() - 2);
+ b->map_node(proj0, b->number_of_nodes() - 1);
}
}
}
--- a/hotspot/src/share/vm/opto/block.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/block.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -105,15 +105,53 @@
// any optimization pass. They are created late in the game.
class Block : public CFGElement {
friend class VMStructs;
- public:
+
+private:
// Nodes in this block, in order
Node_List _nodes;
+public:
+
+ // Get the node at index 'at_index', if 'at_index' is out of bounds return NULL
+ Node* get_node(uint at_index) const {
+ return _nodes[at_index];
+ }
+
+ // Get the number of nodes in this block
+ uint number_of_nodes() const {
+ return _nodes.size();
+ }
+
+ // Map a node 'node' to index 'to_index' in the block, if the index is out of bounds the size of the node list is increased
+ void map_node(Node* node, uint to_index) {
+ _nodes.map(to_index, node);
+ }
+
+ // Insert a node 'node' at index 'at_index', moving all nodes that are on a higher index one step, if 'at_index' is out of bounds we crash
+ void insert_node(Node* node, uint at_index) {
+ _nodes.insert(at_index, node);
+ }
+
+ // Remove a node at index 'at_index'
+ void remove_node(uint at_index) {
+ _nodes.remove(at_index);
+ }
+
+ // Push a node 'node' onto the node list
+ void push_node(Node* node) {
+ _nodes.push(node);
+ }
+
+ // Pop the last node off the node list
+ Node* pop_node() {
+ return _nodes.pop();
+ }
+
// Basic blocks have a Node which defines Control for all Nodes pinned in
// this block. This Node is a RegionNode. Exception-causing Nodes
// (division, subroutines) and Phi functions are always pinned. Later,
// every Node will get pinned to some block.
- Node *head() const { return _nodes[0]; }
+ Node *head() const { return get_node(0); }
// CAUTION: num_preds() is ONE based, so that predecessor numbers match
// input edges to Regions and Phis.
@@ -274,29 +312,12 @@
// Add an instruction to an existing block. It must go after the head
// instruction and before the end instruction.
- void add_inst( Node *n ) { _nodes.insert(end_idx(),n); }
+ void add_inst( Node *n ) { insert_node(n, end_idx()); }
// Find node in block
uint find_node( const Node *n ) const;
// Find and remove n from block list
void find_remove( const Node *n );
- // helper function that adds caller save registers to MachProjNode
- void add_call_kills(MachProjNode *proj, RegMask& regs, const char* save_policy, bool exclude_soe);
- // Schedule a call next in the block
- uint sched_call(Matcher &matcher, PhaseCFG* cfg, uint node_cnt, Node_List &worklist, GrowableArray<int> &ready_cnt, MachCallNode *mcall, VectorSet &next_call);
-
- // Perform basic-block local scheduling
- Node *select(PhaseCFG *cfg, Node_List &worklist, GrowableArray<int> &ready_cnt, VectorSet &next_call, uint sched_slot);
- void set_next_call( Node *n, VectorSet &next_call, PhaseCFG* cfg);
- void needed_for_next_call(Node *this_call, VectorSet &next_call, PhaseCFG* cfg);
- bool schedule_local(PhaseCFG *cfg, Matcher &m, GrowableArray<int> &ready_cnt, VectorSet &next_call);
- // Cleanup if any code lands between a Call and his Catch
- void call_catch_cleanup(PhaseCFG* cfg, Compile *C);
- // Detect implicit-null-check opportunities. Basically, find NULL checks
- // with suitable memory ops nearby. Use the memory op to do the NULL check.
- // I can generate a memory op if there is not one nearby.
- void implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowed_reasons);
-
// Return the empty status of a block
enum { not_empty, empty_with_goto, completely_empty };
int is_Empty() const;
@@ -328,10 +349,6 @@
// Examine block's code shape to predict if it is not commonly executed.
bool has_uncommon_code() const;
- // Use frequency calculations and code shape to predict if the block
- // is uncommon.
- bool is_uncommon(PhaseCFG* cfg) const;
-
#ifndef PRODUCT
// Debugging print of basic block
void dump_bidx(const Block* orig, outputStream* st = tty) const;
@@ -414,6 +431,27 @@
// to late. Helper for schedule_late.
Block* hoist_to_cheaper_block(Block* LCA, Block* early, Node* self);
+ bool schedule_local(Block* block, GrowableArray<int>& ready_cnt, VectorSet& next_call);
+ void set_next_call(Block* block, Node* n, VectorSet& next_call);
+ void needed_for_next_call(Block* block, Node* this_call, VectorSet& next_call);
+
+ // Perform basic-block local scheduling
+ Node* select(Block* block, Node_List& worklist, GrowableArray<int>& ready_cnt, VectorSet& next_call, uint sched_slot);
+
+ // Schedule a call next in the block
+ uint sched_call(Block* block, uint node_cnt, Node_List& worklist, GrowableArray<int>& ready_cnt, MachCallNode* mcall, VectorSet& next_call);
+
+ // Cleanup if any code lands between a Call and his Catch
+ void call_catch_cleanup(Block* block);
+
+ Node* catch_cleanup_find_cloned_def(Block* use_blk, Node* def, Block* def_blk, int n_clone_idx);
+ void catch_cleanup_inter_block(Node *use, Block *use_blk, Node *def, Block *def_blk, int n_clone_idx);
+
+ // Detect implicit-null-check opportunities. Basically, find NULL checks
+ // with suitable memory ops nearby. Use the memory op to do the NULL check.
+ // I can generate a memory op if there is not one nearby.
+ void implicit_null_check(Block* block, Node *proj, Node *val, int allowed_reasons);
+
// Perform a Depth First Search (DFS).
// Setup 'vertex' as DFS to vertex mapping.
// Setup 'semi' as vertex to DFS mapping.
@@ -530,6 +568,10 @@
return (_node_to_block_mapping.lookup(node->_idx) != NULL);
}
+ // Use frequency calculations and code shape to predict if the block
+ // is uncommon.
+ bool is_uncommon(const Block* block);
+
#ifdef ASSERT
Unique_Node_List _raw_oops;
#endif
@@ -550,7 +592,7 @@
// Insert a node into a block at index and map the node to the block
void insert(Block *b, uint idx, Node *n) {
- b->_nodes.insert( idx, n );
+ b->insert_node(n , idx);
map_node_to_block(n, b);
}
--- a/hotspot/src/share/vm/opto/buildOopMap.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/buildOopMap.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -121,8 +121,8 @@
// Given reaching-defs for this block start, compute it for this block end
void OopFlow::compute_reach( PhaseRegAlloc *regalloc, int max_reg, Dict *safehash ) {
- for( uint i=0; i<_b->_nodes.size(); i++ ) {
- Node *n = _b->_nodes[i];
+ for( uint i=0; i<_b->number_of_nodes(); i++ ) {
+ Node *n = _b->get_node(i);
if( n->jvms() ) { // Build an OopMap here?
JVMState *jvms = n->jvms();
@@ -447,8 +447,8 @@
}
// Now walk tmp_live up the block backwards, computing live
- for( int k=b->_nodes.size()-1; k>=0; k-- ) {
- Node *n = b->_nodes[k];
+ for( int k=b->number_of_nodes()-1; k>=0; k-- ) {
+ Node *n = b->get_node(k);
// KILL def'd bits
int first = regalloc->get_reg_first(n);
int second = regalloc->get_reg_second(n);
@@ -544,12 +544,12 @@
for (i = 1; i < cfg->number_of_blocks(); i++) {
Block* block = cfg->get_block(i);
uint j;
- for (j = 1; j < block->_nodes.size(); j++) {
- if (block->_nodes[j]->jvms() && (*safehash)[block->_nodes[j]] == NULL) {
+ for (j = 1; j < block->number_of_nodes(); j++) {
+ if (block->get_node(j)->jvms() && (*safehash)[block->get_node(j)] == NULL) {
break;
}
}
- if (j < block->_nodes.size()) {
+ if (j < block->number_of_nodes()) {
break;
}
}
--- a/hotspot/src/share/vm/opto/callGenerator.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/callGenerator.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
@@ -260,7 +260,7 @@
// Because WarmInfo objects live over the entire lifetime of the
// Compile object, they are allocated into the comp_arena, which
// does not get resource marked or reset during the compile process
- void *operator new( size_t x, Compile* C ) { return C->comp_arena()->Amalloc(x); }
+ void *operator new( size_t x, Compile* C ) throw() { return C->comp_arena()->Amalloc(x); }
void operator delete( void * ) { } // fast deallocation
static WarmCallInfo* always_hot();
--- a/hotspot/src/share/vm/opto/callnode.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/callnode.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -458,7 +458,7 @@
st->print("={");
uint nf = spobj->n_fields();
if (nf > 0) {
- uint first_ind = spobj->first_index();
+ uint first_ind = spobj->first_index(mcall->jvms());
Node* fld_node = mcall->in(first_ind);
ciField* cifield;
if (iklass != NULL) {
@@ -1063,7 +1063,6 @@
int scloff = jvms->scloff();
int endoff = jvms->endoff();
assert(endoff == (int)req(), "no other states or debug info after me");
- assert(jvms->scl_size() == 0, "parsed code should not have scalar objects");
Node* top = Compile::current()->top();
for (uint i = 0; i < grow_by; i++) {
ins_req(monoff, top);
@@ -1079,32 +1078,31 @@
const int MonitorEdges = 2;
assert(JVMState::logMonitorEdges == exact_log2(MonitorEdges), "correct MonitorEdges");
assert(req() == jvms()->endoff(), "correct sizing");
- assert((jvms()->scl_size() == 0), "parsed code should not have scalar objects");
int nextmon = jvms()->scloff();
if (GenerateSynchronizationCode) {
- add_req(lock->box_node());
- add_req(lock->obj_node());
+ ins_req(nextmon, lock->box_node());
+ ins_req(nextmon+1, lock->obj_node());
} else {
Node* top = Compile::current()->top();
- add_req(top);
- add_req(top);
+ ins_req(nextmon, top);
+ ins_req(nextmon, top);
}
- jvms()->set_scloff(nextmon+MonitorEdges);
+ jvms()->set_scloff(nextmon + MonitorEdges);
jvms()->set_endoff(req());
}
void SafePointNode::pop_monitor() {
// Delete last monitor from debug info
- assert((jvms()->scl_size() == 0), "parsed code should not have scalar objects");
debug_only(int num_before_pop = jvms()->nof_monitors());
- const int MonitorEdges = (1<<JVMState::logMonitorEdges);
+ const int MonitorEdges = 2;
+ assert(JVMState::logMonitorEdges == exact_log2(MonitorEdges), "correct MonitorEdges");
int scloff = jvms()->scloff();
int endoff = jvms()->endoff();
int new_scloff = scloff - MonitorEdges;
int new_endoff = endoff - MonitorEdges;
jvms()->set_scloff(new_scloff);
jvms()->set_endoff(new_endoff);
- while (scloff > new_scloff) del_req(--scloff);
+ while (scloff > new_scloff) del_req_ordered(--scloff);
assert(jvms()->nof_monitors() == num_before_pop-1, "");
}
@@ -1169,13 +1167,12 @@
}
SafePointScalarObjectNode*
-SafePointScalarObjectNode::clone(int jvms_adj, Dict* sosn_map) const {
+SafePointScalarObjectNode::clone(Dict* sosn_map) const {
void* cached = (*sosn_map)[(void*)this];
if (cached != NULL) {
return (SafePointScalarObjectNode*)cached;
}
SafePointScalarObjectNode* res = (SafePointScalarObjectNode*)Node::clone();
- res->_first_index += jvms_adj;
sosn_map->Insert((void*)this, (void*)res);
return res;
}
--- a/hotspot/src/share/vm/opto/callnode.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/callnode.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -216,7 +216,7 @@
// Because JVMState objects live over the entire lifetime of the
// Compile object, they are allocated into the comp_arena, which
// does not get resource marked or reset during the compile process
- void *operator new( size_t x, Compile* C ) { return C->comp_arena()->Amalloc(x); }
+ void *operator new( size_t x, Compile* C ) throw() { return C->comp_arena()->Amalloc(x); }
void operator delete( void * ) { } // fast deallocation
// Create a new JVMState, ready for abstract interpretation.
@@ -449,14 +449,17 @@
// at a safepoint.
class SafePointScalarObjectNode: public TypeNode {
- uint _first_index; // First input edge index of a SafePoint node where
+ uint _first_index; // First input edge relative index of a SafePoint node where
// states of the scalarized object fields are collected.
+ // It is relative to the last (youngest) jvms->_scloff.
uint _n_fields; // Number of non-static fields of the scalarized object.
DEBUG_ONLY(AllocateNode* _alloc;)
virtual uint hash() const ; // { return NO_HASH; }
virtual uint cmp( const Node &n ) const;
+ uint first_index() const { return _first_index; }
+
public:
SafePointScalarObjectNode(const TypeOopPtr* tp,
#ifdef ASSERT
@@ -469,7 +472,10 @@
virtual const RegMask &out_RegMask() const;
virtual uint match_edge(uint idx) const;
- uint first_index() const { return _first_index; }
+ uint first_index(JVMState* jvms) const {
+ assert(jvms != NULL, "missed JVMS");
+ return jvms->scloff() + _first_index;
+ }
uint n_fields() const { return _n_fields; }
#ifdef ASSERT
@@ -485,7 +491,7 @@
// corresponds appropriately to "this" in "new_call". Assumes that
// "sosn_map" is a map, specific to the translation of "s" to "new_call",
// mapping old SafePointScalarObjectNodes to new, to avoid multiple copies.
- SafePointScalarObjectNode* clone(int jvms_adj, Dict* sosn_map) const;
+ SafePointScalarObjectNode* clone(Dict* sosn_map) const;
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
--- a/hotspot/src/share/vm/opto/chaitin.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/chaitin.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -301,7 +301,7 @@
// Copy kill projections after the cloned node
Node* kills = proj->clone();
kills->set_req(0, copy);
- b->_nodes.insert(idx++, kills);
+ b->insert_node(kills, idx++);
_cfg.map_node_to_block(kills, b);
new_lrg(kills, max_lrg_id++);
}
@@ -682,11 +682,11 @@
uint lr_counter = 1;
for( uint i = 0; i < _cfg.number_of_blocks(); i++ ) {
Block* block = _cfg.get_block(i);
- uint cnt = block->_nodes.size();
+ uint cnt = block->number_of_nodes();
// Handle all the normal Nodes in the block
for( uint j = 0; j < cnt; j++ ) {
- Node *n = block->_nodes[j];
+ Node *n = block->get_node(j);
// Pre-color to the zero live range, or pick virtual register
const RegMask &rm = n->out_RegMask();
_lrg_map.map(n->_idx, rm.is_NotEmpty() ? lr_counter++ : 0);
@@ -710,8 +710,8 @@
Block* block = _cfg.get_block(i);
// For all instructions
- for (uint j = 1; j < block->_nodes.size(); j++) {
- Node* n = block->_nodes[j];
+ for (uint j = 1; j < block->number_of_nodes(); j++) {
+ Node* n = block->get_node(j);
uint input_edge_start =1; // Skip control most nodes
if (n->is_Mach()) {
input_edge_start = n->as_Mach()->oper_input_base();
@@ -1604,7 +1604,7 @@
// For all instructions in block
uint last_inst = block->end_idx();
for (uint j = 1; j <= last_inst; j++) {
- Node* n = block->_nodes[j];
+ Node* n = block->get_node(j);
// Dead instruction???
assert( n->outcnt() != 0 ||// Nothing dead after post alloc
@@ -1641,7 +1641,7 @@
assert( cisc->oper_input_base() == 2, "Only adding one edge");
cisc->ins_req(1,src); // Requires a memory edge
}
- block->_nodes.map(j,cisc); // Insert into basic block
+ block->map_node(cisc, j); // Insert into basic block
n->subsume_by(cisc, C); // Correct graph
//
++_used_cisc_instructions;
@@ -1698,7 +1698,7 @@
// (where top() node is placed).
base->init_req(0, _cfg.get_root_node());
Block *startb = _cfg.get_block_for_node(C->top());
- startb->_nodes.insert(startb->find_node(C->top()), base );
+ startb->insert_node(base, startb->find_node(C->top()));
_cfg.map_node_to_block(base, startb);
assert(_lrg_map.live_range_id(base) == 0, "should not have LRG yet");
}
@@ -1743,9 +1743,9 @@
// Search the current block for an existing base-Phi
Block *b = _cfg.get_block_for_node(derived);
for( i = 1; i <= b->end_idx(); i++ ) {// Search for matching Phi
- Node *phi = b->_nodes[i];
+ Node *phi = b->get_node(i);
if( !phi->is_Phi() ) { // Found end of Phis with no match?
- b->_nodes.insert( i, base ); // Must insert created Phi here as base
+ b->insert_node(base, i); // Must insert created Phi here as base
_cfg.map_node_to_block(base, b);
new_lrg(base,maxlrg++);
break;
@@ -1786,7 +1786,7 @@
IndexSet liveout(_live->live(block));
for (uint j = block->end_idx() + 1; j > 1; j--) {
- Node* n = block->_nodes[j - 1];
+ Node* n = block->get_node(j - 1);
// Pre-split compares of loop-phis. Loop-phis form a cycle we would
// like to see in the same register. Compare uses the loop-phi and so
@@ -1979,8 +1979,8 @@
b->dump_head(&_cfg);
// For all instructions
- for( uint j = 0; j < b->_nodes.size(); j++ )
- dump(b->_nodes[j]);
+ for( uint j = 0; j < b->number_of_nodes(); j++ )
+ dump(b->get_node(j));
// Print live-out info at end of block
if( _live ) {
tty->print("Liveout: ");
@@ -2271,8 +2271,8 @@
int dump_once = 0;
// For all instructions
- for( uint j = 0; j < block->_nodes.size(); j++ ) {
- Node *n = block->_nodes[j];
+ for( uint j = 0; j < block->number_of_nodes(); j++ ) {
+ Node *n = block->get_node(j);
if (_lrg_map.find_const(n) == lidx) {
if (!dump_once++) {
tty->cr();
--- a/hotspot/src/share/vm/opto/coalesce.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/coalesce.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -54,9 +54,9 @@
for( j=0; j<b->_num_succs; j++ )
tty->print("B%d ",b->_succs[j]->_pre_order);
tty->print(" IDom: B%d/#%d\n", b->_idom ? b->_idom->_pre_order : 0, b->_dom_depth);
- uint cnt = b->_nodes.size();
+ uint cnt = b->number_of_nodes();
for( j=0; j<cnt; j++ ) {
- Node *n = b->_nodes[j];
+ Node *n = b->get_node(j);
dump( n );
tty->print("\t%s\t",n->Name());
@@ -152,7 +152,7 @@
// after the last use. Last use is really first-use on a backwards scan.
uint i = b->end_idx()-1;
while(1) {
- Node *n = b->_nodes[i];
+ Node *n = b->get_node(i);
// Check for end of virtual copies; this is also the end of the
// parallel renaming effort.
if (n->_idx < _unique) {
@@ -174,7 +174,7 @@
// the last kill. Thus it is the first kill on a backwards scan.
i = b->end_idx()-1;
while (1) {
- Node *n = b->_nodes[i];
+ Node *n = b->get_node(i);
// Check for end of virtual copies; this is also the end of the
// parallel renaming effort.
if (n->_idx < _unique) {
@@ -200,13 +200,13 @@
tmp ->set_req(idx,copy->in(idx));
copy->set_req(idx,tmp);
// Save source in temp early, before source is killed
- b->_nodes.insert(kill_src_idx,tmp);
+ b->insert_node(tmp, kill_src_idx);
_phc._cfg.map_node_to_block(tmp, b);
last_use_idx++;
}
// Insert just after last use
- b->_nodes.insert(last_use_idx+1,copy);
+ b->insert_node(copy, last_use_idx + 1);
}
void PhaseAggressiveCoalesce::insert_copies( Matcher &matcher ) {
@@ -237,8 +237,8 @@
Block *b = _phc._cfg.get_block(i);
uint cnt = b->num_preds(); // Number of inputs to the Phi
- for( uint l = 1; l<b->_nodes.size(); l++ ) {
- Node *n = b->_nodes[l];
+ for( uint l = 1; l<b->number_of_nodes(); l++ ) {
+ Node *n = b->get_node(l);
// Do not use removed-copies, use copied value instead
uint ncnt = n->req();
@@ -260,7 +260,7 @@
if (_phc._lrg_map.find(n) == _phc._lrg_map.find(def)) {
n->replace_by(def);
n->set_req(cidx,NULL);
- b->_nodes.remove(l);
+ b->remove_node(l);
l--;
continue;
}
@@ -321,13 +321,13 @@
m->as_Mach()->rematerialize()) {
copy = m->clone();
// Insert the copy in the basic block, just before us
- b->_nodes.insert(l++, copy);
+ b->insert_node(copy, l++);
l += _phc.clone_projs(b, l, m, copy, _phc._lrg_map);
} else {
const RegMask *rm = C->matcher()->idealreg2spillmask[m->ideal_reg()];
copy = new (C) MachSpillCopyNode(m, *rm, *rm);
// Insert the copy in the basic block, just before us
- b->_nodes.insert(l++, copy);
+ b->insert_node(copy, l++);
}
// Insert the copy in the use-def chain
n->set_req(idx, copy);
@@ -339,7 +339,7 @@
} // End of is two-adr
// Insert a copy at a debug use for a lrg which has high frequency
- if (b->_freq < OPTO_DEBUG_SPLIT_FREQ || b->is_uncommon(&_phc._cfg)) {
+ if (b->_freq < OPTO_DEBUG_SPLIT_FREQ || _phc._cfg.is_uncommon(b)) {
// Walk the debug inputs to the node and check for lrg freq
JVMState* jvms = n->jvms();
uint debug_start = jvms ? jvms->debug_start() : 999999;
@@ -376,7 +376,7 @@
// Insert the copy in the use-def chain
n->set_req(inpidx, copy );
// Insert the copy in the basic block, just before us
- b->_nodes.insert( l++, copy );
+ b->insert_node(copy, l++);
// Extend ("register allocate") the names array for the copy.
uint max_lrg_id = _phc._lrg_map.max_lrg_id();
_phc.new_lrg(copy, max_lrg_id);
@@ -431,8 +431,8 @@
}
// Visit all the Phis in successor block
- for( uint k = 1; k<bs->_nodes.size(); k++ ) {
- Node *n = bs->_nodes[k];
+ for( uint k = 1; k<bs->number_of_nodes(); k++ ) {
+ Node *n = bs->get_node(k);
if( !n->is_Phi() ) break;
combine_these_two( n, n->in(j) );
}
@@ -442,7 +442,7 @@
// Check _this_ block for 2-address instructions and copies.
uint cnt = b->end_idx();
for( i = 1; i<cnt; i++ ) {
- Node *n = b->_nodes[i];
+ Node *n = b->get_node(i);
uint idx;
// 2-address instructions have a virtual Copy matching their input
// to their output
@@ -490,10 +490,10 @@
dst_copy->set_req( didx, src_def );
// Add copy to free list
// _phc.free_spillcopy(b->_nodes[bindex]);
- assert( b->_nodes[bindex] == dst_copy, "" );
+ assert( b->get_node(bindex) == dst_copy, "" );
dst_copy->replace_by( dst_copy->in(didx) );
dst_copy->set_req( didx, NULL);
- b->_nodes.remove(bindex);
+ b->remove_node(bindex);
if( bindex < b->_ihrp_index ) b->_ihrp_index--;
if( bindex < b->_fhrp_index ) b->_fhrp_index--;
@@ -523,8 +523,8 @@
bindex2 = b2->end_idx()-1;
}
// Get prior instruction
- assert(bindex2 < b2->_nodes.size(), "index out of bounds");
- Node *x = b2->_nodes[bindex2];
+ assert(bindex2 < b2->number_of_nodes(), "index out of bounds");
+ Node *x = b2->get_node(bindex2);
if( x == prev_copy ) { // Previous copy in copy chain?
if( prev_copy == src_copy)// Found end of chain and all interferences
break; // So break out of loop
@@ -769,14 +769,14 @@
// Conservative (but pessimistic) copy coalescing of a single block
void PhaseConservativeCoalesce::coalesce( Block *b ) {
// Bail out on infrequent blocks
- if (b->is_uncommon(&_phc._cfg)) {
+ if (_phc._cfg.is_uncommon(b)) {
return;
}
// Check this block for copies.
for( uint i = 1; i<b->end_idx(); i++ ) {
// Check for actual copies on inputs. Coalesce a copy into its
// input if use and copy's input are compatible.
- Node *copy1 = b->_nodes[i];
+ Node *copy1 = b->get_node(i);
uint idx1 = copy1->is_Copy();
if( !idx1 ) continue; // Not a copy
--- a/hotspot/src/share/vm/opto/compile.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/compile.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -2258,7 +2258,7 @@
if (block->is_connector() && !Verbose) {
continue;
}
- n = block->_nodes[0];
+ n = block->head();
if (pcs && n->_idx < pc_limit) {
tty->print("%3.3x ", pcs[n->_idx]);
} else {
@@ -2273,12 +2273,12 @@
// For all instructions
Node *delay = NULL;
- for (uint j = 0; j < block->_nodes.size(); j++) {
+ for (uint j = 0; j < block->number_of_nodes(); j++) {
if (VMThread::should_terminate()) {
cut_short = true;
break;
}
- n = block->_nodes[j];
+ n = block->get_node(j);
if (valid_bundle_info(n)) {
Bundle* bundle = node_bundling(n);
if (bundle->used_in_unconditional_delay()) {
--- a/hotspot/src/share/vm/opto/domgraph.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/domgraph.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -211,21 +211,21 @@
uint Block_Stack::most_frequent_successor( Block *b ) {
uint freq_idx = 0;
int eidx = b->end_idx();
- Node *n = b->_nodes[eidx];
+ Node *n = b->get_node(eidx);
int op = n->is_Mach() ? n->as_Mach()->ideal_Opcode() : n->Opcode();
switch( op ) {
case Op_CountedLoopEnd:
case Op_If: { // Split frequency amongst children
float prob = n->as_MachIf()->_prob;
// Is succ[0] the TRUE branch or the FALSE branch?
- if( b->_nodes[eidx+1]->Opcode() == Op_IfFalse )
+ if( b->get_node(eidx+1)->Opcode() == Op_IfFalse )
prob = 1.0f - prob;
freq_idx = prob < PROB_FAIR; // freq=1 for succ[0] < 0.5 prob
break;
}
case Op_Catch: // Split frequency amongst children
for( freq_idx = 0; freq_idx < b->_num_succs; freq_idx++ )
- if( b->_nodes[eidx+1+freq_idx]->as_CatchProj()->_con == CatchProjNode::fall_through_index )
+ if( b->get_node(eidx+1+freq_idx)->as_CatchProj()->_con == CatchProjNode::fall_through_index )
break;
// Handle case of no fall-thru (e.g., check-cast MUST throw an exception)
if( freq_idx == b->_num_succs ) freq_idx = 0;
--- a/hotspot/src/share/vm/opto/gcm.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/gcm.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -102,12 +102,12 @@
uint j = 0;
if (pb->_num_succs != 1) { // More then 1 successor?
// Search for successor
- uint max = pb->_nodes.size();
+ uint max = pb->number_of_nodes();
assert( max > 1, "" );
uint start = max - pb->_num_succs;
// Find which output path belongs to projection
for (j = start; j < max; j++) {
- if( pb->_nodes[j] == in0 )
+ if( pb->get_node(j) == in0 )
break;
}
assert( j < max, "must find" );
@@ -1027,8 +1027,8 @@
Block* least = LCA;
double least_freq = least->_freq;
uint target = get_latency_for_node(self);
- uint start_latency = get_latency_for_node(LCA->_nodes[0]);
- uint end_latency = get_latency_for_node(LCA->_nodes[LCA->end_idx()]);
+ uint start_latency = get_latency_for_node(LCA->head());
+ uint end_latency = get_latency_for_node(LCA->get_node(LCA->end_idx()));
bool in_latency = (target <= start_latency);
const Block* root_block = get_block_for_node(_root);
@@ -1049,9 +1049,9 @@
self->dump();
tty->print_cr("# B%d: start latency for [%4d]=%d, end latency for [%4d]=%d, freq=%g",
LCA->_pre_order,
- LCA->_nodes[0]->_idx,
+ LCA->head()->_idx,
start_latency,
- LCA->_nodes[LCA->end_idx()]->_idx,
+ LCA->get_node(LCA->end_idx())->_idx,
end_latency,
least_freq);
}
@@ -1074,14 +1074,14 @@
if (mach && LCA == root_block)
break;
- uint start_lat = get_latency_for_node(LCA->_nodes[0]);
+ uint start_lat = get_latency_for_node(LCA->head());
uint end_idx = LCA->end_idx();
- uint end_lat = get_latency_for_node(LCA->_nodes[end_idx]);
+ uint end_lat = get_latency_for_node(LCA->get_node(end_idx));
double LCA_freq = LCA->_freq;
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print_cr("# B%d: start latency for [%4d]=%d, end latency for [%4d]=%d, freq=%g",
- LCA->_pre_order, LCA->_nodes[0]->_idx, start_lat, end_idx, end_lat, LCA_freq);
+ LCA->_pre_order, LCA->head()->_idx, start_lat, end_idx, end_lat, LCA_freq);
}
#endif
cand_cnt++;
@@ -1342,7 +1342,7 @@
Node* proj = _matcher._null_check_tests[i];
Node* val = _matcher._null_check_tests[i + 1];
Block* block = get_block_for_node(proj);
- block->implicit_null_check(this, proj, val, allowed_reasons);
+ implicit_null_check(block, proj, val, allowed_reasons);
// The implicit_null_check will only perform the transformation
// if the null branch is truly uncommon, *and* it leads to an
// uncommon trap. Combined with the too_many_traps guards
@@ -1363,7 +1363,7 @@
visited.Clear();
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
- if (!block->schedule_local(this, _matcher, ready_cnt, visited)) {
+ if (!schedule_local(block, ready_cnt, visited)) {
if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
C->record_method_not_compilable("local schedule failed");
}
@@ -1375,7 +1375,7 @@
// clone the instructions on all paths below the Catch.
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
- block->call_catch_cleanup(this, C);
+ call_catch_cleanup(block);
}
#ifndef PRODUCT
@@ -1726,7 +1726,7 @@
// Determine the probability of reaching successor 'i' from the receiver block.
float Block::succ_prob(uint i) {
int eidx = end_idx();
- Node *n = _nodes[eidx]; // Get ending Node
+ Node *n = get_node(eidx); // Get ending Node
int op = n->Opcode();
if (n->is_Mach()) {
@@ -1761,7 +1761,7 @@
float prob = n->as_MachIf()->_prob;
assert(prob >= 0.0 && prob <= 1.0, "out of range probability");
// If succ[i] is the FALSE branch, invert path info
- if( _nodes[i + eidx + 1]->Opcode() == Op_IfFalse ) {
+ if( get_node(i + eidx + 1)->Opcode() == Op_IfFalse ) {
return 1.0f - prob; // not taken
} else {
return prob; // taken
@@ -1773,7 +1773,7 @@
return 1.0f/_num_succs;
case Op_Catch: {
- const CatchProjNode *ci = _nodes[i + eidx + 1]->as_CatchProj();
+ const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
if (ci->_con == CatchProjNode::fall_through_index) {
// Fall-thru path gets the lion's share.
return 1.0f - PROB_UNLIKELY_MAG(5)*_num_succs;
@@ -1810,7 +1810,7 @@
// Return the number of fall-through candidates for a block
int Block::num_fall_throughs() {
int eidx = end_idx();
- Node *n = _nodes[eidx]; // Get ending Node
+ Node *n = get_node(eidx); // Get ending Node
int op = n->Opcode();
if (n->is_Mach()) {
@@ -1834,7 +1834,7 @@
case Op_Catch: {
for (uint i = 0; i < _num_succs; i++) {
- const CatchProjNode *ci = _nodes[i + eidx + 1]->as_CatchProj();
+ const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
if (ci->_con == CatchProjNode::fall_through_index) {
return 1;
}
@@ -1862,14 +1862,14 @@
// Return true if a specific successor could be fall-through target.
bool Block::succ_fall_through(uint i) {
int eidx = end_idx();
- Node *n = _nodes[eidx]; // Get ending Node
+ Node *n = get_node(eidx); // Get ending Node
int op = n->Opcode();
if (n->is_Mach()) {
if (n->is_MachNullCheck()) {
// In theory, either side can fall-thru, for simplicity sake,
// let's say only the false branch can now.
- return _nodes[i + eidx + 1]->Opcode() == Op_IfFalse;
+ return get_node(i + eidx + 1)->Opcode() == Op_IfFalse;
}
op = n->as_Mach()->ideal_Opcode();
}
@@ -1883,7 +1883,7 @@
return true;
case Op_Catch: {
- const CatchProjNode *ci = _nodes[i + eidx + 1]->as_CatchProj();
+ const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
return ci->_con == CatchProjNode::fall_through_index;
}
@@ -1907,7 +1907,7 @@
// Update the probability of a two-branch to be uncommon
void Block::update_uncommon_branch(Block* ub) {
int eidx = end_idx();
- Node *n = _nodes[eidx]; // Get ending Node
+ Node *n = get_node(eidx); // Get ending Node
int op = n->as_Mach()->ideal_Opcode();
@@ -1923,7 +1923,7 @@
// If ub is the true path, make the proability small, else
// ub is the false path, and make the probability large
- bool invert = (_nodes[s + eidx + 1]->Opcode() == Op_IfFalse);
+ bool invert = (get_node(s + eidx + 1)->Opcode() == Op_IfFalse);
// Get existing probability
float p = n->as_MachIf()->_prob;
--- a/hotspot/src/share/vm/opto/generateOptoStub.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/generateOptoStub.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -61,6 +61,7 @@
JVMState* jvms = new (C) JVMState(0);
jvms->set_bci(InvocationEntryBci);
jvms->set_monoff(max_map);
+ jvms->set_scloff(max_map);
jvms->set_endoff(max_map);
{
SafePointNode *map = new (C) SafePointNode( max_map, jvms );
--- a/hotspot/src/share/vm/opto/graphKit.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/graphKit.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1501,6 +1501,25 @@
}
}
+bool GraphKit::can_move_pre_barrier() const {
+ BarrierSet* bs = Universe::heap()->barrier_set();
+ switch (bs->kind()) {
+ case BarrierSet::G1SATBCT:
+ case BarrierSet::G1SATBCTLogging:
+ return true; // Can move it if no safepoint
+
+ case BarrierSet::CardTableModRef:
+ case BarrierSet::CardTableExtension:
+ case BarrierSet::ModRef:
+ return true; // There is no pre-barrier
+
+ case BarrierSet::Other:
+ default :
+ ShouldNotReachHere();
+ }
+ return false;
+}
+
void GraphKit::post_barrier(Node* ctl,
Node* store,
Node* obj,
@@ -3551,6 +3570,8 @@
} else {
// In this case both val_type and alias_idx are unused.
assert(pre_val != NULL, "must be loaded already");
+ // Nothing to be done if pre_val is null.
+ if (pre_val->bottom_type() == TypePtr::NULL_PTR) return;
assert(pre_val->bottom_type()->basic_type() == T_OBJECT, "or we shouldn't be here");
}
assert(bt == T_OBJECT, "or we shouldn't be here");
@@ -3595,7 +3616,7 @@
if (do_load) {
// load original value
// alias_idx correct??
- pre_val = __ load(no_ctrl, adr, val_type, bt, alias_idx);
+ pre_val = __ load(__ ctrl(), adr, val_type, bt, alias_idx);
}
// if (pre_val != NULL)
--- a/hotspot/src/share/vm/opto/graphKit.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/graphKit.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -695,6 +695,10 @@
void write_barrier_post(Node *store, Node* obj,
Node* adr, uint adr_idx, Node* val, bool use_precise);
+ // Allow reordering of pre-barrier with oop store and/or post-barrier.
+ // Used for load_store operations which loads old value.
+ bool can_move_pre_barrier() const;
+
// G1 pre/post barriers
void g1_write_barrier_pre(bool do_load,
Node* obj,
--- a/hotspot/src/share/vm/opto/idealGraphPrinter.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/idealGraphPrinter.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -639,8 +639,8 @@
// reachable but are in the CFG so add them here.
for (uint i = 0; i < C->cfg()->number_of_blocks(); i++) {
Block* block = C->cfg()->get_block(i);
- for (uint s = 0; s < block->_nodes.size(); s++) {
- nodeStack.push(block->_nodes[s]);
+ for (uint s = 0; s < block->number_of_nodes(); s++) {
+ nodeStack.push(block->get_node(s));
}
}
}
@@ -713,9 +713,9 @@
tail(SUCCESSORS_ELEMENT);
head(NODES_ELEMENT);
- for (uint s = 0; s < block->_nodes.size(); s++) {
+ for (uint s = 0; s < block->number_of_nodes(); s++) {
begin_elem(NODE_ELEMENT);
- print_attr(NODE_ID_PROPERTY, get_node_id(block->_nodes[s]));
+ print_attr(NODE_ID_PROPERTY, get_node_id(block->get_node(s)));
end_elem();
}
tail(NODES_ELEMENT);
--- a/hotspot/src/share/vm/opto/ifg.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/ifg.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -319,7 +319,7 @@
// value is then removed from the live-ness set and it's inputs are
// added to the live-ness set.
for (uint j = block->end_idx() + 1; j > 1; j--) {
- Node* n = block->_nodes[j - 1];
+ Node* n = block->get_node(j - 1);
// Get value being defined
uint r = _lrg_map.live_range_id(n);
@@ -456,7 +456,7 @@
// Compute first nonphi node index
uint first_inst;
for (first_inst = 1; first_inst < last_inst; first_inst++) {
- if (!block->_nodes[first_inst]->is_Phi()) {
+ if (!block->get_node(first_inst)->is_Phi()) {
break;
}
}
@@ -464,15 +464,15 @@
// Spills could be inserted before CreateEx node which should be
// first instruction in block after Phis. Move CreateEx up.
for (uint insidx = first_inst; insidx < last_inst; insidx++) {
- Node *ex = block->_nodes[insidx];
+ Node *ex = block->get_node(insidx);
if (ex->is_SpillCopy()) {
continue;
}
if (insidx > first_inst && ex->is_Mach() && ex->as_Mach()->ideal_Opcode() == Op_CreateEx) {
// If the CreateEx isn't above all the MachSpillCopies
// then move it to the top.
- block->_nodes.remove(insidx);
- block->_nodes.insert(first_inst, ex);
+ block->remove_node(insidx);
+ block->insert_node(ex, first_inst);
}
// Stop once a CreateEx or any other node is found
break;
@@ -523,7 +523,7 @@
// to the live-ness set.
uint j;
for (j = last_inst + 1; j > 1; j--) {
- Node* n = block->_nodes[j - 1];
+ Node* n = block->get_node(j - 1);
// Get value being defined
uint r = _lrg_map.live_range_id(n);
@@ -541,7 +541,7 @@
if( !n->is_Proj() ||
// Could also be a flags-projection of a dead ADD or such.
(_lrg_map.live_range_id(def) && !liveout.member(_lrg_map.live_range_id(def)))) {
- block->_nodes.remove(j - 1);
+ block->remove_node(j - 1);
if (lrgs(r)._def == n) {
lrgs(r)._def = 0;
}
@@ -605,7 +605,7 @@
// (j - 1) is index for current instruction 'n'
Node *m = n;
for (uint i = j; i <= last_inst && m->is_SpillCopy(); ++i) {
- m = block->_nodes[i];
+ m = block->get_node(i);
}
if (m == single_use) {
lrgs(r)._area = 0.0;
@@ -772,20 +772,20 @@
// Compute high pressure indice; avoid landing in the middle of projnodes
j = hrp_index[0];
- if (j < block->_nodes.size() && j < block->end_idx() + 1) {
- Node* cur = block->_nodes[j];
+ if (j < block->number_of_nodes() && j < block->end_idx() + 1) {
+ Node* cur = block->get_node(j);
while (cur->is_Proj() || (cur->is_MachNullCheck()) || cur->is_Catch()) {
j--;
- cur = block->_nodes[j];
+ cur = block->get_node(j);
}
}
block->_ihrp_index = j;
j = hrp_index[1];
- if (j < block->_nodes.size() && j < block->end_idx() + 1) {
- Node* cur = block->_nodes[j];
+ if (j < block->number_of_nodes() && j < block->end_idx() + 1) {
+ Node* cur = block->get_node(j);
while (cur->is_Proj() || (cur->is_MachNullCheck()) || cur->is_Catch()) {
j--;
- cur = block->_nodes[j];
+ cur = block->get_node(j);
}
}
block->_fhrp_index = j;
--- a/hotspot/src/share/vm/opto/lcm.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/lcm.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -58,14 +58,14 @@
// The proj is the control projection for the not-null case.
// The val is the pointer being checked for nullness or
// decodeHeapOop_not_null node if it did not fold into address.
-void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowed_reasons) {
+void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allowed_reasons) {
// Assume if null check need for 0 offset then always needed
// Intel solaris doesn't support any null checks yet and no
// mechanism exists (yet) to set the switches at an os_cpu level
if( !ImplicitNullChecks || MacroAssembler::needs_explicit_null_check(0)) return;
// Make sure the ptr-is-null path appears to be uncommon!
- float f = end()->as_MachIf()->_prob;
+ float f = block->end()->as_MachIf()->_prob;
if( proj->Opcode() == Op_IfTrue ) f = 1.0f - f;
if( f > PROB_UNLIKELY_MAG(4) ) return;
@@ -75,13 +75,13 @@
// Get the successor block for if the test ptr is non-null
Block* not_null_block; // this one goes with the proj
Block* null_block;
- if (_nodes[_nodes.size()-1] == proj) {
- null_block = _succs[0];
- not_null_block = _succs[1];
+ if (block->get_node(block->number_of_nodes()-1) == proj) {
+ null_block = block->_succs[0];
+ not_null_block = block->_succs[1];
} else {
- assert(_nodes[_nodes.size()-2] == proj, "proj is one or the other");
- not_null_block = _succs[0];
- null_block = _succs[1];
+ assert(block->get_node(block->number_of_nodes()-2) == proj, "proj is one or the other");
+ not_null_block = block->_succs[0];
+ null_block = block->_succs[1];
}
while (null_block->is_Empty() == Block::empty_with_goto) {
null_block = null_block->_succs[0];
@@ -93,8 +93,8 @@
// detect failure of this optimization, as in 6366351.)
{
bool found_trap = false;
- for (uint i1 = 0; i1 < null_block->_nodes.size(); i1++) {
- Node* nn = null_block->_nodes[i1];
+ for (uint i1 = 0; i1 < null_block->number_of_nodes(); i1++) {
+ Node* nn = null_block->get_node(i1);
if (nn->is_MachCall() &&
nn->as_MachCall()->entry_point() == SharedRuntime::uncommon_trap_blob()->entry_point()) {
const Type* trtype = nn->in(TypeFunc::Parms)->bottom_type();
@@ -237,20 +237,20 @@
}
// Check ctrl input to see if the null-check dominates the memory op
- Block *cb = cfg->get_block_for_node(mach);
+ Block *cb = get_block_for_node(mach);
cb = cb->_idom; // Always hoist at least 1 block
if( !was_store ) { // Stores can be hoisted only one block
- while( cb->_dom_depth > (_dom_depth + 1))
+ while( cb->_dom_depth > (block->_dom_depth + 1))
cb = cb->_idom; // Hoist loads as far as we want
// The non-null-block should dominate the memory op, too. Live
// range spilling will insert a spill in the non-null-block if it is
// needs to spill the memory op for an implicit null check.
- if (cb->_dom_depth == (_dom_depth + 1)) {
+ if (cb->_dom_depth == (block->_dom_depth + 1)) {
if (cb != not_null_block) continue;
cb = cb->_idom;
}
}
- if( cb != this ) continue;
+ if( cb != block ) continue;
// Found a memory user; see if it can be hoisted to check-block
uint vidx = 0; // Capture index of value into memop
@@ -262,8 +262,8 @@
if( is_decoden ) continue;
}
// Block of memory-op input
- Block *inb = cfg->get_block_for_node(mach->in(j));
- Block *b = this; // Start from nul check
+ Block *inb = get_block_for_node(mach->in(j));
+ Block *b = block; // Start from nul check
while( b != inb && b->_dom_depth > inb->_dom_depth )
b = b->_idom; // search upwards for input
// See if input dominates null check
@@ -272,28 +272,28 @@
}
if( j > 0 )
continue;
- Block *mb = cfg->get_block_for_node(mach);
+ Block *mb = get_block_for_node(mach);
// Hoisting stores requires more checks for the anti-dependence case.
// Give up hoisting if we have to move the store past any load.
if( was_store ) {
Block *b = mb; // Start searching here for a local load
// mach use (faulting) trying to hoist
// n might be blocker to hoisting
- while( b != this ) {
+ while( b != block ) {
uint k;
- for( k = 1; k < b->_nodes.size(); k++ ) {
- Node *n = b->_nodes[k];
+ for( k = 1; k < b->number_of_nodes(); k++ ) {
+ Node *n = b->get_node(k);
if( n->needs_anti_dependence_check() &&
n->in(LoadNode::Memory) == mach->in(StoreNode::Memory) )
break; // Found anti-dependent load
}
- if( k < b->_nodes.size() )
+ if( k < b->number_of_nodes() )
break; // Found anti-dependent load
// Make sure control does not do a merge (would have to check allpaths)
if( b->num_preds() != 2 ) break;
- b = cfg->get_block_for_node(b->pred(1)); // Move up to predecessor block
+ b = get_block_for_node(b->pred(1)); // Move up to predecessor block
}
- if( b != this ) continue;
+ if( b != block ) continue;
}
// Make sure this memory op is not already being used for a NullCheck
@@ -303,7 +303,7 @@
// Found a candidate! Pick one with least dom depth - the highest
// in the dom tree should be closest to the null check.
- if (best == NULL || cfg->get_block_for_node(mach)->_dom_depth < cfg->get_block_for_node(best)->_dom_depth) {
+ if (best == NULL || get_block_for_node(mach)->_dom_depth < get_block_for_node(best)->_dom_depth) {
best = mach;
bidx = vidx;
}
@@ -319,46 +319,45 @@
if( is_decoden ) {
// Check if we need to hoist decodeHeapOop_not_null first.
- Block *valb = cfg->get_block_for_node(val);
- if( this != valb && this->_dom_depth < valb->_dom_depth ) {
+ Block *valb = get_block_for_node(val);
+ if( block != valb && block->_dom_depth < valb->_dom_depth ) {
// Hoist it up to the end of the test block.
valb->find_remove(val);
- this->add_inst(val);
- cfg->map_node_to_block(val, this);
+ block->add_inst(val);
+ map_node_to_block(val, block);
// DecodeN on x86 may kill flags. Check for flag-killing projections
// that also need to be hoisted.
for (DUIterator_Fast jmax, j = val->fast_outs(jmax); j < jmax; j++) {
Node* n = val->fast_out(j);
if( n->is_MachProj() ) {
- cfg->get_block_for_node(n)->find_remove(n);
- this->add_inst(n);
- cfg->map_node_to_block(n, this);
+ get_block_for_node(n)->find_remove(n);
+ block->add_inst(n);
+ map_node_to_block(n, block);
}
}
}
}
// Hoist the memory candidate up to the end of the test block.
- Block *old_block = cfg->get_block_for_node(best);
+ Block *old_block = get_block_for_node(best);
old_block->find_remove(best);
- add_inst(best);
- cfg->map_node_to_block(best, this);
+ block->add_inst(best);
+ map_node_to_block(best, block);
// Move the control dependence
- if (best->in(0) && best->in(0) == old_block->_nodes[0])
- best->set_req(0, _nodes[0]);
+ if (best->in(0) && best->in(0) == old_block->head())
+ best->set_req(0, block->head());
// Check for flag-killing projections that also need to be hoisted
// Should be DU safe because no edge updates.
for (DUIterator_Fast jmax, j = best->fast_outs(jmax); j < jmax; j++) {
Node* n = best->fast_out(j);
if( n->is_MachProj() ) {
- cfg->get_block_for_node(n)->find_remove(n);
- add_inst(n);
- cfg->map_node_to_block(n, this);
+ get_block_for_node(n)->find_remove(n);
+ block->add_inst(n);
+ map_node_to_block(n, block);
}
}
- Compile *C = cfg->C;
// proj==Op_True --> ne test; proj==Op_False --> eq test.
// One of two graph shapes got matched:
// (IfTrue (If (Bool NE (CmpP ptr NULL))))
@@ -368,10 +367,10 @@
// We need to flip the projections to keep the same semantics.
if( proj->Opcode() == Op_IfTrue ) {
// Swap order of projections in basic block to swap branch targets
- Node *tmp1 = _nodes[end_idx()+1];
- Node *tmp2 = _nodes[end_idx()+2];
- _nodes.map(end_idx()+1, tmp2);
- _nodes.map(end_idx()+2, tmp1);
+ Node *tmp1 = block->get_node(block->end_idx()+1);
+ Node *tmp2 = block->get_node(block->end_idx()+2);
+ block->map_node(tmp2, block->end_idx()+1);
+ block->map_node(tmp1, block->end_idx()+2);
Node *tmp = new (C) Node(C->top()); // Use not NULL input
tmp1->replace_by(tmp);
tmp2->replace_by(tmp1);
@@ -384,8 +383,8 @@
// it as well.
Node *old_tst = proj->in(0);
MachNode *nul_chk = new (C) MachNullCheckNode(old_tst->in(0),best,bidx);
- _nodes.map(end_idx(),nul_chk);
- cfg->map_node_to_block(nul_chk, this);
+ block->map_node(nul_chk, block->end_idx());
+ map_node_to_block(nul_chk, block);
// Redirect users of old_test to nul_chk
for (DUIterator_Last i2min, i2 = old_tst->last_outs(i2min); i2 >= i2min; --i2)
old_tst->last_out(i2)->set_req(0, nul_chk);
@@ -393,8 +392,8 @@
for (uint i3 = 0; i3 < old_tst->req(); i3++)
old_tst->set_req(i3, NULL);
- cfg->latency_from_uses(nul_chk);
- cfg->latency_from_uses(best);
+ latency_from_uses(nul_chk);
+ latency_from_uses(best);
}
@@ -408,7 +407,7 @@
// remaining cases (most), choose the instruction with the greatest latency
// (that is, the most number of pseudo-cycles required to the end of the
// routine). If there is a tie, choose the instruction with the most inputs.
-Node *Block::select(PhaseCFG *cfg, Node_List &worklist, GrowableArray<int> &ready_cnt, VectorSet &next_call, uint sched_slot) {
+Node* PhaseCFG::select(Block* block, Node_List &worklist, GrowableArray<int> &ready_cnt, VectorSet &next_call, uint sched_slot) {
// If only a single entry on the stack, use it
uint cnt = worklist.size();
@@ -442,7 +441,7 @@
}
// Final call in a block must be adjacent to 'catch'
- Node *e = end();
+ Node *e = block->end();
if( e->is_Catch() && e->in(0)->in(0) == n )
continue;
@@ -468,7 +467,7 @@
Node* use = n->fast_out(j);
// The use is a conditional branch, make them adjacent
- if (use->is_MachIf() && cfg->get_block_for_node(use) == this) {
+ if (use->is_MachIf() && get_block_for_node(use) == block) {
found_machif = true;
break;
}
@@ -501,7 +500,7 @@
n_choice = 1;
}
- uint n_latency = cfg->get_latency_for_node(n);
+ uint n_latency = get_latency_for_node(n);
uint n_score = n->req(); // Many inputs get high score to break ties
// Keep best latency found
@@ -529,13 +528,13 @@
//------------------------------set_next_call----------------------------------
-void Block::set_next_call( Node *n, VectorSet &next_call, PhaseCFG* cfg) {
+void PhaseCFG::set_next_call(Block* block, Node* n, VectorSet& next_call) {
if( next_call.test_set(n->_idx) ) return;
for( uint i=0; i<n->len(); i++ ) {
Node *m = n->in(i);
if( !m ) continue; // must see all nodes in block that precede call
- if (cfg->get_block_for_node(m) == this) {
- set_next_call(m, next_call, cfg);
+ if (get_block_for_node(m) == block) {
+ set_next_call(block, m, next_call);
}
}
}
@@ -546,24 +545,26 @@
// next subroutine call get priority - basically it moves things NOT needed
// for the next call till after the call. This prevents me from trying to
// carry lots of stuff live across a call.
-void Block::needed_for_next_call(Node *this_call, VectorSet &next_call, PhaseCFG* cfg) {
+void PhaseCFG::needed_for_next_call(Block* block, Node* this_call, VectorSet& next_call) {
// Find the next control-defining Node in this block
Node* call = NULL;
for (DUIterator_Fast imax, i = this_call->fast_outs(imax); i < imax; i++) {
Node* m = this_call->fast_out(i);
- if(cfg->get_block_for_node(m) == this && // Local-block user
+ if (get_block_for_node(m) == block && // Local-block user
m != this_call && // Not self-start node
- m->is_MachCall() )
+ m->is_MachCall()) {
call = m;
break;
+ }
}
if (call == NULL) return; // No next call (e.g., block end is near)
// Set next-call for all inputs to this call
- set_next_call(call, next_call, cfg);
+ set_next_call(block, call, next_call);
}
//------------------------------add_call_kills-------------------------------------
-void Block::add_call_kills(MachProjNode *proj, RegMask& regs, const char* save_policy, bool exclude_soe) {
+// helper function that adds caller save registers to MachProjNode
+static void add_call_kills(MachProjNode *proj, RegMask& regs, const char* save_policy, bool exclude_soe) {
// Fill in the kill mask for the call
for( OptoReg::Name r = OptoReg::Name(0); r < _last_Mach_Reg; r=OptoReg::add(r,1) ) {
if( !regs.Member(r) ) { // Not already defined by the call
@@ -579,7 +580,7 @@
//------------------------------sched_call-------------------------------------
-uint Block::sched_call( Matcher &matcher, PhaseCFG* cfg, uint node_cnt, Node_List &worklist, GrowableArray<int> &ready_cnt, MachCallNode *mcall, VectorSet &next_call ) {
+uint PhaseCFG::sched_call(Block* block, uint node_cnt, Node_List& worklist, GrowableArray<int>& ready_cnt, MachCallNode* mcall, VectorSet& next_call) {
RegMask regs;
// Schedule all the users of the call right now. All the users are
@@ -592,18 +593,18 @@
ready_cnt.at_put(n->_idx, n_cnt);
assert( n_cnt == 0, "" );
// Schedule next to call
- _nodes.map(node_cnt++, n);
+ block->map_node(n, node_cnt++);
// Collect defined registers
regs.OR(n->out_RegMask());
// Check for scheduling the next control-definer
if( n->bottom_type() == Type::CONTROL )
// Warm up next pile of heuristic bits
- needed_for_next_call(n, next_call, cfg);
+ needed_for_next_call(block, n, next_call);
// Children of projections are now all ready
for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
Node* m = n->fast_out(j); // Get user
- if(cfg->get_block_for_node(m) != this) {
+ if(get_block_for_node(m) != block) {
continue;
}
if( m->is_Phi() ) continue;
@@ -617,14 +618,14 @@
// Act as if the call defines the Frame Pointer.
// Certainly the FP is alive and well after the call.
- regs.Insert(matcher.c_frame_pointer());
+ regs.Insert(_matcher.c_frame_pointer());
// Set all registers killed and not already defined by the call.
uint r_cnt = mcall->tf()->range()->cnt();
int op = mcall->ideal_Opcode();
- MachProjNode *proj = new (matcher.C) MachProjNode( mcall, r_cnt+1, RegMask::Empty, MachProjNode::fat_proj );
- cfg->map_node_to_block(proj, this);
- _nodes.insert(node_cnt++, proj);
+ MachProjNode *proj = new (C) MachProjNode( mcall, r_cnt+1, RegMask::Empty, MachProjNode::fat_proj );
+ map_node_to_block(proj, block);
+ block->insert_node(proj, node_cnt++);
// Select the right register save policy.
const char * save_policy;
@@ -633,13 +634,13 @@
case Op_CallLeaf:
case Op_CallLeafNoFP:
// Calling C code so use C calling convention
- save_policy = matcher._c_reg_save_policy;
+ save_policy = _matcher._c_reg_save_policy;
break;
case Op_CallStaticJava:
case Op_CallDynamicJava:
// Calling Java code so use Java calling convention
- save_policy = matcher._register_save_policy;
+ save_policy = _matcher._register_save_policy;
break;
default:
@@ -674,44 +675,46 @@
//------------------------------schedule_local---------------------------------
// Topological sort within a block. Someday become a real scheduler.
-bool Block::schedule_local(PhaseCFG *cfg, Matcher &matcher, GrowableArray<int> &ready_cnt, VectorSet &next_call) {
+bool PhaseCFG::schedule_local(Block* block, GrowableArray<int>& ready_cnt, VectorSet& next_call) {
// Already "sorted" are the block start Node (as the first entry), and
// the block-ending Node and any trailing control projections. We leave
// these alone. PhiNodes and ParmNodes are made to follow the block start
// Node. Everything else gets topo-sorted.
#ifndef PRODUCT
- if (cfg->trace_opto_pipelining()) {
- tty->print_cr("# --- schedule_local B%d, before: ---", _pre_order);
- for (uint i = 0;i < _nodes.size();i++) {
+ if (trace_opto_pipelining()) {
+ tty->print_cr("# --- schedule_local B%d, before: ---", block->_pre_order);
+ for (uint i = 0;i < block->number_of_nodes(); i++) {
tty->print("# ");
- _nodes[i]->fast_dump();
+ block->get_node(i)->fast_dump();
}
tty->print_cr("#");
}
#endif
// RootNode is already sorted
- if( _nodes.size() == 1 ) return true;
+ if (block->number_of_nodes() == 1) {
+ return true;
+ }
// Move PhiNodes and ParmNodes from 1 to cnt up to the start
- uint node_cnt = end_idx();
+ uint node_cnt = block->end_idx();
uint phi_cnt = 1;
uint i;
for( i = 1; i<node_cnt; i++ ) { // Scan for Phi
- Node *n = _nodes[i];
+ Node *n = block->get_node(i);
if( n->is_Phi() || // Found a PhiNode or ParmNode
- (n->is_Proj() && n->in(0) == head()) ) {
+ (n->is_Proj() && n->in(0) == block->head()) ) {
// Move guy at 'phi_cnt' to the end; makes a hole at phi_cnt
- _nodes.map(i,_nodes[phi_cnt]);
- _nodes.map(phi_cnt++,n); // swap Phi/Parm up front
+ block->map_node(block->get_node(phi_cnt), i);
+ block->map_node(n, phi_cnt++); // swap Phi/Parm up front
} else { // All others
// Count block-local inputs to 'n'
uint cnt = n->len(); // Input count
uint local = 0;
for( uint j=0; j<cnt; j++ ) {
Node *m = n->in(j);
- if( m && cfg->get_block_for_node(m) == this && !m->is_top() )
+ if( m && get_block_for_node(m) == block && !m->is_top() )
local++; // One more block-local input
}
ready_cnt.at_put(n->_idx, local); // Count em up
@@ -723,7 +726,7 @@
for (uint prec = n->req(); prec < n->len(); prec++) {
Node* oop_store = n->in(prec);
if (oop_store != NULL) {
- assert(cfg->get_block_for_node(oop_store)->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark");
+ assert(get_block_for_node(oop_store)->_dom_depth <= block->_dom_depth, "oop_store must dominate card-mark");
}
}
}
@@ -747,16 +750,16 @@
}
}
}
- for(uint i2=i; i2<_nodes.size(); i2++ ) // Trailing guys get zapped count
- ready_cnt.at_put(_nodes[i2]->_idx, 0);
+ for(uint i2=i; i2< block->number_of_nodes(); i2++ ) // Trailing guys get zapped count
+ ready_cnt.at_put(block->get_node(i2)->_idx, 0);
// All the prescheduled guys do not hold back internal nodes
uint i3;
for(i3 = 0; i3<phi_cnt; i3++ ) { // For all pre-scheduled
- Node *n = _nodes[i3]; // Get pre-scheduled
+ Node *n = block->get_node(i3); // Get pre-scheduled
for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) {
Node* m = n->fast_out(j);
- if (cfg->get_block_for_node(m) == this) { // Local-block user
+ if (get_block_for_node(m) == block) { // Local-block user
int m_cnt = ready_cnt.at(m->_idx)-1;
ready_cnt.at_put(m->_idx, m_cnt); // Fix ready count
}
@@ -767,7 +770,7 @@
// Make a worklist
Node_List worklist;
for(uint i4=i3; i4<node_cnt; i4++ ) { // Put ready guys on worklist
- Node *m = _nodes[i4];
+ Node *m = block->get_node(i4);
if( !ready_cnt.at(m->_idx) ) { // Zero ready count?
if (m->is_iteratively_computed()) {
// Push induction variable increments last to allow other uses
@@ -789,15 +792,15 @@
}
// Warm up the 'next_call' heuristic bits
- needed_for_next_call(_nodes[0], next_call, cfg);
+ needed_for_next_call(block, block->head(), next_call);
#ifndef PRODUCT
- if (cfg->trace_opto_pipelining()) {
- for (uint j=0; j<_nodes.size(); j++) {
- Node *n = _nodes[j];
+ if (trace_opto_pipelining()) {
+ for (uint j=0; j< block->number_of_nodes(); j++) {
+ Node *n = block->get_node(j);
int idx = n->_idx;
tty->print("# ready cnt:%3d ", ready_cnt.at(idx));
- tty->print("latency:%3d ", cfg->get_latency_for_node(n));
+ tty->print("latency:%3d ", get_latency_for_node(n));
tty->print("%4d: %s\n", idx, n->Name());
}
}
@@ -808,7 +811,7 @@
while( worklist.size() ) { // Worklist is not ready
#ifndef PRODUCT
- if (cfg->trace_opto_pipelining()) {
+ if (trace_opto_pipelining()) {
tty->print("# ready list:");
for( uint i=0; i<worklist.size(); i++ ) { // Inspect entire worklist
Node *n = worklist[i]; // Get Node on worklist
@@ -819,13 +822,13 @@
#endif
// Select and pop a ready guy from worklist
- Node* n = select(cfg, worklist, ready_cnt, next_call, phi_cnt);
- _nodes.map(phi_cnt++,n); // Schedule him next
+ Node* n = select(block, worklist, ready_cnt, next_call, phi_cnt);
+ block->map_node(n, phi_cnt++); // Schedule him next
#ifndef PRODUCT
- if (cfg->trace_opto_pipelining()) {
+ if (trace_opto_pipelining()) {
tty->print("# select %d: %s", n->_idx, n->Name());
- tty->print(", latency:%d", cfg->get_latency_for_node(n));
+ tty->print(", latency:%d", get_latency_for_node(n));
n->dump();
if (Verbose) {
tty->print("# ready list:");
@@ -840,26 +843,26 @@
#endif
if( n->is_MachCall() ) {
MachCallNode *mcall = n->as_MachCall();
- phi_cnt = sched_call(matcher, cfg, phi_cnt, worklist, ready_cnt, mcall, next_call);
+ phi_cnt = sched_call(block, phi_cnt, worklist, ready_cnt, mcall, next_call);
continue;
}
if (n->is_Mach() && n->as_Mach()->has_call()) {
RegMask regs;
- regs.Insert(matcher.c_frame_pointer());
+ regs.Insert(_matcher.c_frame_pointer());
regs.OR(n->out_RegMask());
- MachProjNode *proj = new (matcher.C) MachProjNode( n, 1, RegMask::Empty, MachProjNode::fat_proj );
- cfg->map_node_to_block(proj, this);
- _nodes.insert(phi_cnt++, proj);
+ MachProjNode *proj = new (C) MachProjNode( n, 1, RegMask::Empty, MachProjNode::fat_proj );
+ map_node_to_block(proj, block);
+ block->insert_node(proj, phi_cnt++);
- add_call_kills(proj, regs, matcher._c_reg_save_policy, false);
+ add_call_kills(proj, regs, _matcher._c_reg_save_policy, false);
}
// Children are now all ready
for (DUIterator_Fast i5max, i5 = n->fast_outs(i5max); i5 < i5max; i5++) {
Node* m = n->fast_out(i5); // Get user
- if (cfg->get_block_for_node(m) != this) {
+ if (get_block_for_node(m) != block) {
continue;
}
if( m->is_Phi() ) continue;
@@ -874,9 +877,8 @@
}
}
- if( phi_cnt != end_idx() ) {
+ if( phi_cnt != block->end_idx() ) {
// did not schedule all. Retry, Bailout, or Die
- Compile* C = matcher.C;
if (C->subsume_loads() == true && !C->failing()) {
// Retry with subsume_loads == false
// If this is the first failure, the sentinel string will "stick"
@@ -888,12 +890,12 @@
}
#ifndef PRODUCT
- if (cfg->trace_opto_pipelining()) {
+ if (trace_opto_pipelining()) {
tty->print_cr("#");
tty->print_cr("# after schedule_local");
- for (uint i = 0;i < _nodes.size();i++) {
+ for (uint i = 0;i < block->number_of_nodes();i++) {
tty->print("# ");
- _nodes[i]->fast_dump();
+ block->get_node(i)->fast_dump();
}
tty->cr();
}
@@ -919,7 +921,7 @@
}
//------------------------------catch_cleanup_find_cloned_def------------------
-static Node *catch_cleanup_find_cloned_def(Block *use_blk, Node *def, Block *def_blk, PhaseCFG* cfg, int n_clone_idx) {
+Node* PhaseCFG::catch_cleanup_find_cloned_def(Block *use_blk, Node *def, Block *def_blk, int n_clone_idx) {
assert( use_blk != def_blk, "Inter-block cleanup only");
// The use is some block below the Catch. Find and return the clone of the def
@@ -945,14 +947,14 @@
// PhiNode, the PhiNode uses from the def and IT's uses need fixup.
Node_Array inputs = new Node_List(Thread::current()->resource_area());
for(uint k = 1; k < use_blk->num_preds(); k++) {
- Block* block = cfg->get_block_for_node(use_blk->pred(k));
- inputs.map(k, catch_cleanup_find_cloned_def(block, def, def_blk, cfg, n_clone_idx));
+ Block* block = get_block_for_node(use_blk->pred(k));
+ inputs.map(k, catch_cleanup_find_cloned_def(block, def, def_blk, n_clone_idx));
}
// Check to see if the use_blk already has an identical phi inserted.
// If it exists, it will be at the first position since all uses of a
// def are processed together.
- Node *phi = use_blk->_nodes[1];
+ Node *phi = use_blk->get_node(1);
if( phi->is_Phi() ) {
fixup = phi;
for (uint k = 1; k < use_blk->num_preds(); k++) {
@@ -967,8 +969,8 @@
// If an existing PhiNode was not found, make a new one.
if (fixup == NULL) {
Node *new_phi = PhiNode::make(use_blk->head(), def);
- use_blk->_nodes.insert(1, new_phi);
- cfg->map_node_to_block(new_phi, use_blk);
+ use_blk->insert_node(new_phi, 1);
+ map_node_to_block(new_phi, use_blk);
for (uint k = 1; k < use_blk->num_preds(); k++) {
new_phi->set_req(k, inputs[k]);
}
@@ -977,7 +979,7 @@
} else {
// Found the use just below the Catch. Make it use the clone.
- fixup = use_blk->_nodes[n_clone_idx];
+ fixup = use_blk->get_node(n_clone_idx);
}
return fixup;
@@ -997,36 +999,36 @@
for( uint k = 0; k < blk->_num_succs; k++ ) {
// Get clone in each successor block
Block *sb = blk->_succs[k];
- Node *clone = sb->_nodes[offset_idx+1];
+ Node *clone = sb->get_node(offset_idx+1);
assert( clone->Opcode() == use->Opcode(), "" );
// Make use-clone reference the def-clone
- catch_cleanup_fix_all_inputs(clone, def, sb->_nodes[n_clone_idx]);
+ catch_cleanup_fix_all_inputs(clone, def, sb->get_node(n_clone_idx));
}
}
//------------------------------catch_cleanup_inter_block---------------------
// Fix all input edges in use that reference "def". The use is in a different
// block than the def.
-static void catch_cleanup_inter_block(Node *use, Block *use_blk, Node *def, Block *def_blk, PhaseCFG* cfg, int n_clone_idx) {
+void PhaseCFG::catch_cleanup_inter_block(Node *use, Block *use_blk, Node *def, Block *def_blk, int n_clone_idx) {
if( !use_blk ) return; // Can happen if the use is a precedence edge
- Node *new_def = catch_cleanup_find_cloned_def(use_blk, def, def_blk, cfg, n_clone_idx);
+ Node *new_def = catch_cleanup_find_cloned_def(use_blk, def, def_blk, n_clone_idx);
catch_cleanup_fix_all_inputs(use, def, new_def);
}
//------------------------------call_catch_cleanup-----------------------------
// If we inserted any instructions between a Call and his CatchNode,
// clone the instructions on all paths below the Catch.
-void Block::call_catch_cleanup(PhaseCFG* cfg, Compile* C) {
+void PhaseCFG::call_catch_cleanup(Block* block) {
// End of region to clone
- uint end = end_idx();
- if( !_nodes[end]->is_Catch() ) return;
+ uint end = block->end_idx();
+ if( !block->get_node(end)->is_Catch() ) return;
// Start of region to clone
uint beg = end;
- while(!_nodes[beg-1]->is_MachProj() ||
- !_nodes[beg-1]->in(0)->is_MachCall() ) {
+ while(!block->get_node(beg-1)->is_MachProj() ||
+ !block->get_node(beg-1)->in(0)->is_MachCall() ) {
beg--;
assert(beg > 0,"Catch cleanup walking beyond block boundary");
}
@@ -1035,15 +1037,15 @@
// Clone along all Catch output paths. Clone area between the 'beg' and
// 'end' indices.
- for( uint i = 0; i < _num_succs; i++ ) {
- Block *sb = _succs[i];
+ for( uint i = 0; i < block->_num_succs; i++ ) {
+ Block *sb = block->_succs[i];
// Clone the entire area; ignoring the edge fixup for now.
for( uint j = end; j > beg; j-- ) {
// It is safe here to clone a node with anti_dependence
// since clones dominate on each path.
- Node *clone = _nodes[j-1]->clone();
- sb->_nodes.insert( 1, clone );
- cfg->map_node_to_block(clone, sb);
+ Node *clone = block->get_node(j-1)->clone();
+ sb->insert_node(clone, 1);
+ map_node_to_block(clone, sb);
}
}
@@ -1051,7 +1053,7 @@
// Fixup edges. Check the def-use info per cloned Node
for(uint i2 = beg; i2 < end; i2++ ) {
uint n_clone_idx = i2-beg+1; // Index of clone of n in each successor block
- Node *n = _nodes[i2]; // Node that got cloned
+ Node *n = block->get_node(i2); // Node that got cloned
// Need DU safe iterator because of edge manipulation in calls.
Unique_Node_List *out = new Unique_Node_List(Thread::current()->resource_area());
for (DUIterator_Fast j1max, j1 = n->fast_outs(j1max); j1 < j1max; j1++) {
@@ -1060,19 +1062,19 @@
uint max = out->size();
for (uint j = 0; j < max; j++) {// For all users
Node *use = out->pop();
- Block *buse = cfg->get_block_for_node(use);
+ Block *buse = get_block_for_node(use);
if( use->is_Phi() ) {
for( uint k = 1; k < use->req(); k++ )
if( use->in(k) == n ) {
- Block* block = cfg->get_block_for_node(buse->pred(k));
- Node *fixup = catch_cleanup_find_cloned_def(block, n, this, cfg, n_clone_idx);
+ Block* b = get_block_for_node(buse->pred(k));
+ Node *fixup = catch_cleanup_find_cloned_def(b, n, block, n_clone_idx);
use->set_req(k, fixup);
}
} else {
- if (this == buse) {
- catch_cleanup_intra_block(use, n, this, beg, n_clone_idx);
+ if (block == buse) {
+ catch_cleanup_intra_block(use, n, block, beg, n_clone_idx);
} else {
- catch_cleanup_inter_block(use, buse, n, this, cfg, n_clone_idx);
+ catch_cleanup_inter_block(use, buse, n, block, n_clone_idx);
}
}
} // End for all users
@@ -1081,30 +1083,30 @@
// Remove the now-dead cloned ops
for(uint i3 = beg; i3 < end; i3++ ) {
- _nodes[beg]->disconnect_inputs(NULL, C);
- _nodes.remove(beg);
+ block->get_node(beg)->disconnect_inputs(NULL, C);
+ block->remove_node(beg);
}
// If the successor blocks have a CreateEx node, move it back to the top
- for(uint i4 = 0; i4 < _num_succs; i4++ ) {
- Block *sb = _succs[i4];
+ for(uint i4 = 0; i4 < block->_num_succs; i4++ ) {
+ Block *sb = block->_succs[i4];
uint new_cnt = end - beg;
// Remove any newly created, but dead, nodes.
for( uint j = new_cnt; j > 0; j-- ) {
- Node *n = sb->_nodes[j];
+ Node *n = sb->get_node(j);
if (n->outcnt() == 0 &&
(!n->is_Proj() || n->as_Proj()->in(0)->outcnt() == 1) ){
n->disconnect_inputs(NULL, C);
- sb->_nodes.remove(j);
+ sb->remove_node(j);
new_cnt--;
}
}
// If any newly created nodes remain, move the CreateEx node to the top
if (new_cnt > 0) {
- Node *cex = sb->_nodes[1+new_cnt];
+ Node *cex = sb->get_node(1+new_cnt);
if( cex->is_Mach() && cex->as_Mach()->ideal_Opcode() == Op_CreateEx ) {
- sb->_nodes.remove(1+new_cnt);
- sb->_nodes.insert(1,cex);
+ sb->remove_node(1+new_cnt);
+ sb->insert_node(cex, 1);
}
}
}
--- a/hotspot/src/share/vm/opto/library_call.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/library_call.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -2756,10 +2756,28 @@
newval = _gvn.makecon(TypePtr::NULL_PTR);
// Reference stores need a store barrier.
- pre_barrier(true /* do_load*/,
- control(), base, adr, alias_idx, newval, value_type->make_oopptr(),
- NULL /* pre_val*/,
- T_OBJECT);
+ if (kind == LS_xchg) {
+ // If pre-barrier must execute before the oop store, old value will require do_load here.
+ if (!can_move_pre_barrier()) {
+ pre_barrier(true /* do_load*/,
+ control(), base, adr, alias_idx, newval, value_type->make_oopptr(),
+ NULL /* pre_val*/,
+ T_OBJECT);
+ } // Else move pre_barrier to use load_store value, see below.
+ } else if (kind == LS_cmpxchg) {
+ // Same as for newval above:
+ if (_gvn.type(oldval) == TypePtr::NULL_PTR) {
+ oldval = _gvn.makecon(TypePtr::NULL_PTR);
+ }
+ // The only known value which might get overwritten is oldval.
+ pre_barrier(false /* do_load */,
+ control(), NULL, NULL, max_juint, NULL, NULL,
+ oldval /* pre_val */,
+ T_OBJECT);
+ } else {
+ ShouldNotReachHere();
+ }
+
#ifdef _LP64
if (adr->bottom_type()->is_ptr_to_narrowoop()) {
Node *newval_enc = _gvn.transform(new (C) EncodePNode(newval, newval->bottom_type()->make_narrowoop()));
@@ -2795,16 +2813,27 @@
Node* proj = _gvn.transform(new (C) SCMemProjNode(load_store));
set_memory(proj, alias_idx);
+ if (type == T_OBJECT && kind == LS_xchg) {
+#ifdef _LP64
+ if (adr->bottom_type()->is_ptr_to_narrowoop()) {
+ load_store = _gvn.transform(new (C) DecodeNNode(load_store, load_store->get_ptr_type()));
+ }
+#endif
+ if (can_move_pre_barrier()) {
+ // Don't need to load pre_val. The old value is returned by load_store.
+ // The pre_barrier can execute after the xchg as long as no safepoint
+ // gets inserted between them.
+ pre_barrier(false /* do_load */,
+ control(), NULL, NULL, max_juint, NULL, NULL,
+ load_store /* pre_val */,
+ T_OBJECT);
+ }
+ }
+
// Add the trailing membar surrounding the access
insert_mem_bar(Op_MemBarCPUOrder);
insert_mem_bar(Op_MemBarAcquire);
-#ifdef _LP64
- if (type == T_OBJECT && adr->bottom_type()->is_ptr_to_narrowoop() && kind == LS_xchg) {
- load_store = _gvn.transform(new (C) DecodeNNode(load_store, load_store->get_ptr_type()));
- }
-#endif
-
assert(type2size[load_store->bottom_type()->basic_type()] == type2size[rtype], "result type should match");
set_result(load_store);
return true;
--- a/hotspot/src/share/vm/opto/live.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/live.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -85,8 +85,8 @@
IndexSet* def = &_defs[block->_pre_order-1];
DEBUG_ONLY(IndexSet *def_outside = getfreeset();)
uint i;
- for (i = block->_nodes.size(); i > 1; i--) {
- Node* n = block->_nodes[i-1];
+ for (i = block->number_of_nodes(); i > 1; i--) {
+ Node* n = block->get_node(i-1);
if (n->is_Phi()) {
break;
}
@@ -112,7 +112,7 @@
#endif
// Remove anything defined by Phis and the block start instruction
for (uint k = i; k > 0; k--) {
- uint r = _names[block->_nodes[k - 1]->_idx];
+ uint r = _names[block->get_node(k - 1)->_idx];
def->insert(r);
use->remove(r);
}
@@ -124,7 +124,7 @@
// PhiNode uses go in the live-out set of prior blocks.
for (uint k = i; k > 0; k--) {
- add_liveout(p, _names[block->_nodes[k-1]->in(l)->_idx], first_pass);
+ add_liveout(p, _names[block->get_node(k-1)->in(l)->_idx], first_pass);
}
}
freeset(block);
@@ -254,10 +254,10 @@
void PhaseLive::dump( const Block *b ) const {
tty->print("Block %d: ",b->_pre_order);
tty->print("LiveOut: "); _live[b->_pre_order-1].dump();
- uint cnt = b->_nodes.size();
+ uint cnt = b->number_of_nodes();
for( uint i=0; i<cnt; i++ ) {
- tty->print("L%d/", _names[b->_nodes[i]->_idx] );
- b->_nodes[i]->dump();
+ tty->print("L%d/", _names[b->get_node(i)->_idx] );
+ b->get_node(i)->dump();
}
tty->print("\n");
}
@@ -269,7 +269,7 @@
for (uint i = 0; i < _cfg.number_of_blocks(); i++) {
Block* block = _cfg.get_block(i);
for (uint j = block->end_idx() + 1; j > 1; j--) {
- Node* n = block->_nodes[j-1];
+ Node* n = block->get_node(j-1);
if (n->is_Phi()) {
break;
}
--- a/hotspot/src/share/vm/opto/machnode.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/machnode.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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,7 +58,7 @@
class MachOper : public ResourceObj {
public:
// Allocate right next to the MachNodes in the same arena
- void *operator new( size_t x, Compile* C ) { return C->node_arena()->Amalloc_D(x); }
+ void *operator new( size_t x, Compile* C ) throw() { return C->node_arena()->Amalloc_D(x); }
// Opcode
virtual uint opcode() const = 0;
--- a/hotspot/src/share/vm/opto/macro.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/macro.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -72,6 +72,8 @@
int jvms_adj = new_dbg_start - old_dbg_start;
assert (new_dbg_start == newcall->req(), "argument count mismatch");
+ // SafePointScalarObject node could be referenced several times in debug info.
+ // Use Dict to record cloned nodes.
Dict* sosn_map = new Dict(cmpkey,hashkey);
for (uint i = old_dbg_start; i < oldcall->req(); i++) {
Node* old_in = oldcall->in(i);
@@ -79,8 +81,8 @@
if (old_in != NULL && old_in->is_SafePointScalarObject()) {
SafePointScalarObjectNode* old_sosn = old_in->as_SafePointScalarObject();
uint old_unique = C->unique();
- Node* new_in = old_sosn->clone(jvms_adj, sosn_map);
- if (old_unique != C->unique()) {
+ Node* new_in = old_sosn->clone(sosn_map);
+ if (old_unique != C->unique()) { // New node?
new_in->set_req(0, C->root()); // reset control edge
new_in = transform_later(new_in); // Register new node.
}
@@ -725,7 +727,11 @@
while (safepoints.length() > 0) {
SafePointNode* sfpt = safepoints.pop();
Node* mem = sfpt->memory();
- uint first_ind = sfpt->req();
+ assert(sfpt->jvms() != NULL, "missed JVMS");
+ // Fields of scalar objs are referenced only at the end
+ // of regular debuginfo at the last (youngest) JVMS.
+ // Record relative start index.
+ uint first_ind = (sfpt->req() - sfpt->jvms()->scloff());
SafePointScalarObjectNode* sobj = new (C) SafePointScalarObjectNode(res_type,
#ifdef ASSERT
alloc,
@@ -799,7 +805,7 @@
for (int i = start; i < end; i++) {
if (sfpt_done->in(i)->is_SafePointScalarObject()) {
SafePointScalarObjectNode* scobj = sfpt_done->in(i)->as_SafePointScalarObject();
- if (scobj->first_index() == sfpt_done->req() &&
+ if (scobj->first_index(jvms) == sfpt_done->req() &&
scobj->n_fields() == (uint)nfields) {
assert(scobj->alloc() == alloc, "sanity");
sfpt_done->set_req(i, res);
--- a/hotspot/src/share/vm/opto/node.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/node.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -773,6 +773,21 @@
_in[_cnt] = NULL; // NULL out emptied slot
}
+//------------------------------del_req_ordered--------------------------------
+// Delete the required edge and compact the edge array with preserved order
+void Node::del_req_ordered( uint idx ) {
+ assert( idx < _cnt, "oob");
+ assert( !VerifyHashTableKeys || _hash_lock == 0,
+ "remove node from hash table before modifying it");
+ // First remove corresponding def-use edge
+ Node *n = in(idx);
+ if (n != NULL) n->del_out((Node *)this);
+ if (idx < _cnt - 1) { // Not last edge ?
+ Copy::conjoint_words_to_lower((HeapWord*)&_in[idx+1], (HeapWord*)&_in[idx], ((_cnt-idx-1)*sizeof(Node*)));
+ }
+ _in[--_cnt] = NULL; // NULL out emptied slot
+}
+
//------------------------------ins_req----------------------------------------
// Insert a new required input at the end
void Node::ins_req( uint idx, Node *n ) {
--- a/hotspot/src/share/vm/opto/node.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/node.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -211,7 +211,7 @@
// New Operator that takes a Compile pointer, this will eventually
// be the "new" New operator.
- inline void* operator new( size_t x, Compile* C) {
+ inline void* operator new( size_t x, Compile* C) throw() {
Node* n = (Node*)C->node_arena()->Amalloc_D(x);
#ifdef ASSERT
n->_in = (Node**)n; // magic cookie for assertion check
@@ -384,6 +384,7 @@
void add_req( Node *n ); // Append a NEW required input
void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n).
void del_req( uint idx ); // Delete required edge & compact
+ void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order
void ins_req( uint i, Node *n ); // Insert a NEW required input
void set_req( uint i, Node *n ) {
assert( is_not_dead(n), "can not use dead node");
--- a/hotspot/src/share/vm/opto/output.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/output.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -57,7 +57,7 @@
// Convert Nodes to instruction bits and pass off to the VM
void Compile::Output() {
// RootNode goes
- assert( _cfg->get_root_block()->_nodes.size() == 0, "" );
+ assert( _cfg->get_root_block()->number_of_nodes() == 0, "" );
// The number of new nodes (mostly MachNop) is proportional to
// the number of java calls and inner loops which are aligned.
@@ -70,11 +70,11 @@
Block *entry = _cfg->get_block(1);
Block *broot = _cfg->get_root_block();
- const StartNode *start = entry->_nodes[0]->as_Start();
+ const StartNode *start = entry->head()->as_Start();
// Replace StartNode with prolog
MachPrologNode *prolog = new (this) MachPrologNode();
- entry->_nodes.map( 0, prolog );
+ entry->map_node(prolog, 0);
_cfg->map_node_to_block(prolog, entry);
_cfg->unmap_node_from_block(start); // start is no longer in any block
@@ -144,8 +144,8 @@
for (uint i = 0; i < _cfg->number_of_blocks(); i++) {
tty->print("\nBB#%03d:\n", i);
Block* block = _cfg->get_block(i);
- for (uint j = 0; j < block->_nodes.size(); j++) {
- Node* n = block->_nodes[j];
+ for (uint j = 0; j < block->number_of_nodes(); j++) {
+ Node* n = block->get_node(j);
OptoReg::Name reg = _regalloc->get_reg_first(n);
tty->print(" %-6s ", reg >= 0 && reg < REG_COUNT ? Matcher::regName[reg] : "");
n->dump();
@@ -226,8 +226,8 @@
// Insert call to zap runtime stub before every node with an oop map
for( uint i=0; i<_cfg->number_of_blocks(); i++ ) {
Block *b = _cfg->get_block(i);
- for ( uint j = 0; j < b->_nodes.size(); ++j ) {
- Node *n = b->_nodes[j];
+ for ( uint j = 0; j < b->number_of_nodes(); ++j ) {
+ Node *n = b->get_node(j);
// Determining if we should insert a zap-a-lot node in output.
// We do that for all nodes that has oopmap info, except for calls
@@ -256,7 +256,7 @@
}
if (insert) {
Node *zap = call_zap_node(n->as_MachSafePoint(), i);
- b->_nodes.insert( j, zap );
+ b->insert_node(zap, j);
_cfg->map_node_to_block(zap, b);
++j;
}
@@ -379,10 +379,10 @@
DEBUG_ONLY( jmp_rule[i] = 0; )
// Sum all instruction sizes to compute block size
- uint last_inst = block->_nodes.size();
+ uint last_inst = block->number_of_nodes();
uint blk_size = 0;
for (uint j = 0; j < last_inst; j++) {
- Node* nj = block->_nodes[j];
+ Node* nj = block->get_node(j);
// Handle machine instruction nodes
if (nj->is_Mach()) {
MachNode *mach = nj->as_Mach();
@@ -477,18 +477,18 @@
for (uint i = 0; i < nblocks; i++) {
Block* block = _cfg->get_block(i);
int idx = jmp_nidx[i];
- MachNode* mach = (idx == -1) ? NULL: block->_nodes[idx]->as_Mach();
+ MachNode* mach = (idx == -1) ? NULL: block->get_node(idx)->as_Mach();
if (mach != NULL && mach->may_be_short_branch()) {
#ifdef ASSERT
assert(jmp_size[i] > 0 && mach->is_MachBranch(), "sanity");
int j;
// Find the branch; ignore trailing NOPs.
- for (j = block->_nodes.size()-1; j>=0; j--) {
- Node* n = block->_nodes[j];
+ for (j = block->number_of_nodes()-1; j>=0; j--) {
+ Node* n = block->get_node(j);
if (!n->is_Mach() || n->as_Mach()->ideal_Opcode() != Op_Con)
break;
}
- assert(j >= 0 && j == idx && block->_nodes[j] == (Node*)mach, "sanity");
+ assert(j >= 0 && j == idx && block->get_node(j) == (Node*)mach, "sanity");
#endif
int br_size = jmp_size[i];
int br_offs = blk_starts[i] + jmp_offset[i];
@@ -522,7 +522,7 @@
diff -= nop_size;
}
adjust_block_start += diff;
- block->_nodes.map(idx, replacement);
+ block->map_node(replacement, idx);
mach->subsume_by(replacement, C);
mach = replacement;
progress = true;
@@ -639,7 +639,7 @@
new ConstantOopWriteValue(cik->java_mirror()->constant_encoding()));
Compile::set_sv_for_object_node(objs, sv);
- uint first_ind = spobj->first_index();
+ uint first_ind = spobj->first_index(sfpt->jvms());
for (uint i = 0; i < spobj->n_fields(); i++) {
Node* fld_node = sfpt->in(first_ind+i);
(void)FillLocArray(sv->field_values()->length(), sfpt, fld_node, sv->field_values(), objs);
@@ -894,7 +894,7 @@
GrowableArray<MonitorValue*> *monarray = new GrowableArray<MonitorValue*>(num_mon);
// Loop over monitors and insert into array
- for(idx = 0; idx < num_mon; idx++) {
+ for (idx = 0; idx < num_mon; idx++) {
// Grab the node that defines this monitor
Node* box_node = sfn->monitor_box(jvms, idx);
Node* obj_node = sfn->monitor_obj(jvms, idx);
@@ -902,11 +902,11 @@
// Create ScopeValue for object
ScopeValue *scval = NULL;
- if( obj_node->is_SafePointScalarObject() ) {
+ if (obj_node->is_SafePointScalarObject()) {
SafePointScalarObjectNode* spobj = obj_node->as_SafePointScalarObject();
scval = Compile::sv_for_node_id(objs, spobj->_idx);
if (scval == NULL) {
- const Type *t = obj_node->bottom_type();
+ const Type *t = spobj->bottom_type();
ciKlass* cik = t->is_oopptr()->klass();
assert(cik->is_instance_klass() ||
cik->is_array_klass(), "Not supported allocation.");
@@ -914,14 +914,14 @@
new ConstantOopWriteValue(cik->java_mirror()->constant_encoding()));
Compile::set_sv_for_object_node(objs, sv);
- uint first_ind = spobj->first_index();
+ uint first_ind = spobj->first_index(youngest_jvms);
for (uint i = 0; i < spobj->n_fields(); i++) {
Node* fld_node = sfn->in(first_ind+i);
(void)FillLocArray(sv->field_values()->length(), sfn, fld_node, sv->field_values(), objs);
}
scval = sv;
}
- } else if( !obj_node->is_Con() ) {
+ } else if (!obj_node->is_Con()) {
OptoReg::Name obj_reg = _regalloc->get_reg_first(obj_node);
if( obj_node->bottom_type()->base() == Type::NarrowOop ) {
scval = new_loc_value( _regalloc, obj_reg, Location::narrowoop );
@@ -1088,8 +1088,8 @@
for (uint i = 0; i < _cfg->number_of_blocks(); i++) {
Block* b = _cfg->get_block(i);
- for (uint j = 0; j < b->_nodes.size(); j++) {
- Node* n = b->_nodes[j];
+ for (uint j = 0; j < b->number_of_nodes(); j++) {
+ Node* n = b->get_node(j);
// If the node is a MachConstantNode evaluate the constant
// value section.
@@ -1247,14 +1247,14 @@
// Define the label at the beginning of the basic block
MacroAssembler(cb).bind(blk_labels[block->_pre_order]);
- uint last_inst = block->_nodes.size();
+ uint last_inst = block->number_of_nodes();
// Emit block normally, except for last instruction.
// Emit means "dump code bits into code buffer".
for (uint j = 0; j<last_inst; j++) {
// Get the node
- Node* n = block->_nodes[j];
+ Node* n = block->get_node(j);
// See if delay slots are supported
if (valid_bundle_info(n) &&
@@ -1308,7 +1308,7 @@
assert((padding % nop_size) == 0, "padding is not a multiple of NOP size");
int nops_cnt = padding / nop_size;
MachNode *nop = new (this) MachNopNode(nops_cnt);
- block->_nodes.insert(j++, nop);
+ block->insert_node(nop, j++);
last_inst++;
_cfg->map_node_to_block(nop, block);
nop->emit(*cb, _regalloc);
@@ -1394,7 +1394,7 @@
// Insert padding between avoid_back_to_back branches.
if (needs_padding && replacement->avoid_back_to_back()) {
MachNode *nop = new (this) MachNopNode();
- block->_nodes.insert(j++, nop);
+ block->insert_node(nop, j++);
_cfg->map_node_to_block(nop, block);
last_inst++;
nop->emit(*cb, _regalloc);
@@ -1407,7 +1407,7 @@
jmp_size[i] = new_size;
jmp_rule[i] = mach->rule();
#endif
- block->_nodes.map(j, replacement);
+ block->map_node(replacement, j);
mach->subsume_by(replacement, C);
n = replacement;
mach = replacement;
@@ -1438,7 +1438,7 @@
count++;
uint i4;
for (i4 = 0; i4 < last_inst; ++i4) {
- if (block->_nodes[i4] == oop_store) {
+ if (block->get_node(i4) == oop_store) {
break;
}
}
@@ -1548,7 +1548,7 @@
int padding = nb->alignment_padding(current_offset);
if( padding > 0 ) {
MachNode *nop = new (this) MachNopNode(padding / nop_size);
- block->_nodes.insert(block->_nodes.size(), nop);
+ block->insert_node(nop, block->number_of_nodes());
_cfg->map_node_to_block(nop, block);
nop->emit(*cb, _regalloc);
current_offset = cb->insts_size();
@@ -1655,8 +1655,8 @@
int j;
// Find the branch; ignore trailing NOPs.
- for (j = block->_nodes.size() - 1; j >= 0; j--) {
- n = block->_nodes[j];
+ for (j = block->number_of_nodes() - 1; j >= 0; j--) {
+ n = block->get_node(j);
if (!n->is_Mach() || n->as_Mach()->ideal_Opcode() != Op_Con) {
break;
}
@@ -1675,8 +1675,8 @@
uint call_return = call_returns[block->_pre_order];
#ifdef ASSERT
assert( call_return > 0, "no call seen for this basic block" );
- while (block->_nodes[--j]->is_MachProj()) ;
- assert(block->_nodes[j]->is_MachCall(), "CatchProj must follow call");
+ while (block->get_node(--j)->is_MachProj()) ;
+ assert(block->get_node(j)->is_MachCall(), "CatchProj must follow call");
#endif
// last instruction is a CatchNode, find it's CatchProjNodes
int nof_succs = block->_num_succs;
@@ -1782,7 +1782,7 @@
// Get the last node
Block* block = _cfg->get_block(_cfg->number_of_blocks() - 1);
- _next_node = block->_nodes[block->_nodes.size() - 1];
+ _next_node = block->get_node(block->number_of_nodes() - 1);
}
#ifndef PRODUCT
@@ -1875,7 +1875,7 @@
// Used to allow latency 0 to force an instruction to the beginning
// of the bb
uint latency = 1;
- Node *use = bb->_nodes[j];
+ Node *use = bb->get_node(j);
uint nlen = use->len();
// Walk over all the inputs
@@ -2286,7 +2286,7 @@
(OptoReg::is_valid(_regalloc->get_reg_first(n)) || op != Op_BoxLock)) ) {
// Push any trailing projections
- if( bb->_nodes[bb->_nodes.size()-1] != n ) {
+ if( bb->get_node(bb->number_of_nodes()-1) != n ) {
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
Node *foi = n->fast_out(i);
if( foi->is_Proj() )
@@ -2329,21 +2329,21 @@
_unconditional_delay_slot = NULL;
#ifdef ASSERT
- for( uint i=0; i < bb->_nodes.size(); i++ )
- assert( _uses[bb->_nodes[i]->_idx] == 0, "_use array not clean" );
+ for( uint i=0; i < bb->number_of_nodes(); i++ )
+ assert( _uses[bb->get_node(i)->_idx] == 0, "_use array not clean" );
#endif
// Force the _uses count to never go to zero for unscheduable pieces
// of the block
for( uint k = 0; k < _bb_start; k++ )
- _uses[bb->_nodes[k]->_idx] = 1;
- for( uint l = _bb_end; l < bb->_nodes.size(); l++ )
- _uses[bb->_nodes[l]->_idx] = 1;
+ _uses[bb->get_node(k)->_idx] = 1;
+ for( uint l = _bb_end; l < bb->number_of_nodes(); l++ )
+ _uses[bb->get_node(l)->_idx] = 1;
// Iterate backwards over the instructions in the block. Don't count the
// branch projections at end or the block header instructions.
for( uint j = _bb_end-1; j >= _bb_start; j-- ) {
- Node *n = bb->_nodes[j];
+ Node *n = bb->get_node(j);
if( n->is_Proj() ) continue; // Projections handled another way
// Account for all uses
@@ -2398,8 +2398,8 @@
#ifndef PRODUCT
if (_cfg->C->trace_opto_output()) {
tty->print("# Schedule BB#%03d (initial)\n", i);
- for (uint j = 0; j < bb->_nodes.size(); j++) {
- bb->_nodes[j]->dump();
+ for (uint j = 0; j < bb->number_of_nodes(); j++) {
+ bb->get_node(j)->dump();
}
}
#endif
@@ -2426,10 +2426,10 @@
}
// Leave untouched the starting instruction, any Phis, a CreateEx node
- // or Top. bb->_nodes[_bb_start] is the first schedulable instruction.
- _bb_end = bb->_nodes.size()-1;
+ // or Top. bb->get_node(_bb_start) is the first schedulable instruction.
+ _bb_end = bb->number_of_nodes()-1;
for( _bb_start=1; _bb_start <= _bb_end; _bb_start++ ) {
- Node *n = bb->_nodes[_bb_start];
+ Node *n = bb->get_node(_bb_start);
// Things not matched, like Phinodes and ProjNodes don't get scheduled.
// Also, MachIdealNodes do not get scheduled
if( !n->is_Mach() ) continue; // Skip non-machine nodes
@@ -2449,19 +2449,19 @@
// in the block), because they have delay slots we can fill. Calls all
// have their delay slots filled in the template expansions, so we don't
// bother scheduling them.
- Node *last = bb->_nodes[_bb_end];
+ Node *last = bb->get_node(_bb_end);
// Ignore trailing NOPs.
while (_bb_end > 0 && last->is_Mach() &&
last->as_Mach()->ideal_Opcode() == Op_Con) {
- last = bb->_nodes[--_bb_end];
+ last = bb->get_node(--_bb_end);
}
assert(!last->is_Mach() || last->as_Mach()->ideal_Opcode() != Op_Con, "");
if( last->is_Catch() ||
// Exclude unreachable path case when Halt node is in a separate block.
(_bb_end > 1 && last->is_Mach() && last->as_Mach()->ideal_Opcode() == Op_Halt) ) {
// There must be a prior call. Skip it.
- while( !bb->_nodes[--_bb_end]->is_MachCall() ) {
- assert( bb->_nodes[_bb_end]->is_MachProj(), "skipping projections after expected call" );
+ while( !bb->get_node(--_bb_end)->is_MachCall() ) {
+ assert( bb->get_node(_bb_end)->is_MachProj(), "skipping projections after expected call" );
}
} else if( last->is_MachNullCheck() ) {
// Backup so the last null-checked memory instruction is
@@ -2470,7 +2470,7 @@
Node *mem = last->in(1);
do {
_bb_end--;
- } while (mem != bb->_nodes[_bb_end]);
+ } while (mem != bb->get_node(_bb_end));
} else {
// Set _bb_end to point after last schedulable inst.
_bb_end++;
@@ -2499,7 +2499,7 @@
assert( _scheduled.size() == _bb_end - _bb_start, "wrong number of instructions" );
#ifdef ASSERT
for( uint l = _bb_start; l < _bb_end; l++ ) {
- Node *n = bb->_nodes[l];
+ Node *n = bb->get_node(l);
uint m;
for( m = 0; m < _bb_end-_bb_start; m++ )
if( _scheduled[m] == n )
@@ -2510,14 +2510,14 @@
// Now copy the instructions (in reverse order) back to the block
for ( uint k = _bb_start; k < _bb_end; k++ )
- bb->_nodes.map(k, _scheduled[_bb_end-k-1]);
+ bb->map_node(_scheduled[_bb_end-k-1], k);
#ifndef PRODUCT
if (_cfg->C->trace_opto_output()) {
tty->print("# Schedule BB#%03d (final)\n", i);
uint current = 0;
- for (uint j = 0; j < bb->_nodes.size(); j++) {
- Node *n = bb->_nodes[j];
+ for (uint j = 0; j < bb->number_of_nodes(); j++) {
+ Node *n = bb->get_node(j);
if( valid_bundle_info(n) ) {
Bundle *bundle = node_bundling(n);
if (bundle->instr_count() > 0 || bundle->flags() > 0) {
@@ -2579,8 +2579,8 @@
// Walk over the block backwards. Check to make sure each DEF doesn't
// kill a live value (other than the one it's supposed to). Add each
// USE to the live set.
- for( uint i = b->_nodes.size()-1; i >= _bb_start; i-- ) {
- Node *n = b->_nodes[i];
+ for( uint i = b->number_of_nodes()-1; i >= _bb_start; i-- ) {
+ Node *n = b->get_node(i);
int n_op = n->Opcode();
if( n_op == Op_MachProj && n->ideal_reg() == MachProjNode::fat_proj ) {
// Fat-proj kills a slew of registers
@@ -2711,7 +2711,7 @@
pinch->req() == 1 ) { // pinch not yet in block?
pinch->del_req(0); // yank pointer to later-def, also set flag
// Insert the pinch-point in the block just after the last use
- b->_nodes.insert(b->find_node(use)+1,pinch);
+ b->insert_node(pinch, b->find_node(use) + 1);
_bb_end++; // Increase size scheduled region in block
}
@@ -2763,10 +2763,10 @@
// it being in the current block.
bool fat_proj_seen = false;
uint last_safept = _bb_end-1;
- Node* end_node = (_bb_end-1 >= _bb_start) ? b->_nodes[last_safept] : NULL;
+ Node* end_node = (_bb_end-1 >= _bb_start) ? b->get_node(last_safept) : NULL;
Node* last_safept_node = end_node;
for( uint i = _bb_end-1; i >= _bb_start; i-- ) {
- Node *n = b->_nodes[i];
+ Node *n = b->get_node(i);
int is_def = n->outcnt(); // def if some uses prior to adding precedence edges
if( n->is_MachProj() && n->ideal_reg() == MachProjNode::fat_proj ) {
// Fat-proj kills a slew of registers
@@ -2815,7 +2815,7 @@
// Do not allow defs of new derived values to float above GC
// points unless the base is definitely available at the GC point.
- Node *m = b->_nodes[i];
+ Node *m = b->get_node(i);
// Add precedence edge from following safepoint to use of derived pointer
if( last_safept_node != end_node &&
@@ -2832,11 +2832,11 @@
if( n->jvms() ) { // Precedence edge from derived to safept
// Check if last_safept_node was moved by pinch-point insertion in anti_do_use()
- if( b->_nodes[last_safept] != last_safept_node ) {
+ if( b->get_node(last_safept) != last_safept_node ) {
last_safept = b->find_node(last_safept_node);
}
for( uint j=last_safept; j > i; j-- ) {
- Node *mach = b->_nodes[j];
+ Node *mach = b->get_node(j);
if( mach->is_Mach() && mach->as_Mach()->ideal_Opcode() == Op_AddP )
mach->add_prec( n );
}
--- a/hotspot/src/share/vm/opto/phaseX.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/phaseX.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1648,10 +1648,10 @@
bool block_not_printed = true;
// and each instruction within a block
- uint end_index = block->_nodes.size();
+ uint end_index = block->number_of_nodes();
// block->end_idx() not valid after PhaseRegAlloc
for( uint instruction_index = 1; instruction_index < end_index; ++instruction_index ) {
- Node *n = block->_nodes.at(instruction_index);
+ Node *n = block->get_node(instruction_index);
if( n->is_Mach() ) {
MachNode *m = n->as_Mach();
int deleted_count = 0;
@@ -1673,7 +1673,7 @@
}
// Print instructions being deleted
for( int i = (deleted_count - 1); i >= 0; --i ) {
- block->_nodes.at(instruction_index-i)->as_Mach()->format(_regalloc); tty->cr();
+ block->get_node(instruction_index-i)->as_Mach()->format(_regalloc); tty->cr();
}
tty->print_cr("replaced with");
// Print new instruction
@@ -1687,11 +1687,11 @@
// the node index to live range mappings.)
uint safe_instruction_index = (instruction_index - deleted_count);
for( ; (instruction_index > safe_instruction_index); --instruction_index ) {
- block->_nodes.remove( instruction_index );
+ block->remove_node( instruction_index );
}
// install new node after safe_instruction_index
- block->_nodes.insert( safe_instruction_index + 1, m2 );
- end_index = block->_nodes.size() - 1; // Recompute new block size
+ block->insert_node(m2, safe_instruction_index + 1);
+ end_index = block->number_of_nodes() - 1; // Recompute new block size
NOT_PRODUCT( inc_peepholes(); )
}
}
--- a/hotspot/src/share/vm/opto/postaloc.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/postaloc.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -423,8 +423,8 @@
// Count of Phis in block
uint phi_dex;
- for (phi_dex = 1; phi_dex < block->_nodes.size(); phi_dex++) {
- Node* phi = block->_nodes[phi_dex];
+ for (phi_dex = 1; phi_dex < block->number_of_nodes(); phi_dex++) {
+ Node* phi = block->get_node(phi_dex);
if (!phi->is_Phi()) {
break;
}
@@ -439,7 +439,7 @@
Block* pb = _cfg.get_block_for_node(block->pred(j));
// Remove copies along phi edges
for (uint k = 1; k < phi_dex; k++) {
- elide_copy(block->_nodes[k], j, block, *blk2value[pb->_pre_order], *blk2regnd[pb->_pre_order], false);
+ elide_copy(block->get_node(k), j, block, *blk2value[pb->_pre_order], *blk2regnd[pb->_pre_order], false);
}
if (blk2value[pb->_pre_order]) { // Have a mapping on this edge?
// See if this predecessor's mappings have been used by everybody
@@ -510,7 +510,7 @@
// For all Phi's
for (j = 1; j < phi_dex; j++) {
uint k;
- Node *phi = block->_nodes[j];
+ Node *phi = block->get_node(j);
uint pidx = _lrg_map.live_range_id(phi);
OptoReg::Name preg = lrgs(_lrg_map.live_range_id(phi)).reg();
@@ -522,7 +522,7 @@
u = u ? NodeSentinel : x; // Capture unique input, or NodeSentinel for 2nd input
}
if (u != NodeSentinel) { // Junk Phi. Remove
- block->_nodes.remove(j--);
+ block->remove_node(j--);
phi_dex--;
_cfg.unmap_node_from_block(phi);
phi->replace_by(u);
@@ -552,8 +552,8 @@
}
// For all remaining instructions
- for (j = phi_dex; j < block->_nodes.size(); j++) {
- Node* n = block->_nodes[j];
+ for (j = phi_dex; j < block->number_of_nodes(); j++) {
+ Node* n = block->get_node(j);
if(n->outcnt() == 0 && // Dead?
n != C->top() && // (ignore TOP, it has no du info)
--- a/hotspot/src/share/vm/opto/reg_split.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/reg_split.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -112,17 +112,17 @@
void PhaseChaitin::insert_proj( Block *b, uint i, Node *spill, uint maxlrg ) {
// Skip intervening ProjNodes. Do not insert between a ProjNode and
// its definer.
- while( i < b->_nodes.size() &&
- (b->_nodes[i]->is_Proj() ||
- b->_nodes[i]->is_Phi() ) )
+ while( i < b->number_of_nodes() &&
+ (b->get_node(i)->is_Proj() ||
+ b->get_node(i)->is_Phi() ) )
i++;
// Do not insert between a call and his Catch
- if( b->_nodes[i]->is_Catch() ) {
+ if( b->get_node(i)->is_Catch() ) {
// Put the instruction at the top of the fall-thru block.
// Find the fall-thru projection
while( 1 ) {
- const CatchProjNode *cp = b->_nodes[++i]->as_CatchProj();
+ const CatchProjNode *cp = b->get_node(++i)->as_CatchProj();
if( cp->_con == CatchProjNode::fall_through_index )
break;
}
@@ -131,7 +131,7 @@
i = 1; // Right at start of block
}
- b->_nodes.insert(i,spill); // Insert node in block
+ b->insert_node(spill, i); // Insert node in block
_cfg.map_node_to_block(spill, b); // Update node->block mapping to reflect
// Adjust the point where we go hi-pressure
if( i <= b->_ihrp_index ) b->_ihrp_index++;
@@ -160,9 +160,9 @@
// (The implicit_null_check function ensures the use is also dominated
// by the branch-not-taken block.)
Node *be = b->end();
- if( be->is_MachNullCheck() && be->in(1) == def && def == b->_nodes[loc] ) {
+ if( be->is_MachNullCheck() && be->in(1) == def && def == b->get_node(loc)) {
// Spill goes in the branch-not-taken block
- b = b->_succs[b->_nodes[b->end_idx()+1]->Opcode() == Op_IfTrue];
+ b = b->_succs[b->get_node(b->end_idx()+1)->Opcode() == Op_IfTrue];
loc = 0; // Just past the Region
}
assert( loc >= 0, "must insert past block head" );
@@ -450,7 +450,7 @@
// Scan block for 1st use.
for( uint i = 1; i <= b->end_idx(); i++ ) {
- Node *n = b->_nodes[i];
+ Node *n = b->get_node(i);
// Ignore PHI use, these can be up or down
if (n->is_Phi()) {
continue;
@@ -647,7 +647,7 @@
// check block for appropriate phinode & update edges
for( insidx = 1; insidx <= b->end_idx(); insidx++ ) {
- n1 = b->_nodes[insidx];
+ n1 = b->get_node(insidx);
// bail if this is not a phi
phi = n1->is_Phi() ? n1->as_Phi() : NULL;
if( phi == NULL ) {
@@ -747,7 +747,7 @@
//----------Walk Instructions in the Block and Split----------
// For all non-phi instructions in the block
for( insidx = 1; insidx <= b->end_idx(); insidx++ ) {
- Node *n = b->_nodes[insidx];
+ Node *n = b->get_node(insidx);
// Find the defining Node's live range index
uint defidx = _lrg_map.find_id(n);
uint cnt = n->req();
@@ -776,7 +776,7 @@
assert(_lrg_map.find_id(n) == _lrg_map.find_id(u), "should be the same lrg");
n->replace_by(u); // Then replace with unique input
n->disconnect_inputs(NULL, C);
- b->_nodes.remove(insidx);
+ b->remove_node(insidx);
insidx--;
b->_ihrp_index--;
b->_fhrp_index--;
@@ -789,12 +789,12 @@
(b->_reg_pressure < (uint)INTPRESSURE) ||
b->_ihrp_index > 4000000 ||
b->_ihrp_index >= b->end_idx() ||
- !b->_nodes[b->_ihrp_index]->is_Proj(), "" );
+ !b->get_node(b->_ihrp_index)->is_Proj(), "" );
assert( insidx > b->_fhrp_index ||
(b->_freg_pressure < (uint)FLOATPRESSURE) ||
b->_fhrp_index > 4000000 ||
b->_fhrp_index >= b->end_idx() ||
- !b->_nodes[b->_fhrp_index]->is_Proj(), "" );
+ !b->get_node(b->_fhrp_index)->is_Proj(), "" );
// ********** Handle Crossing HRP Boundry **********
if( (insidx == b->_ihrp_index) || (insidx == b->_fhrp_index) ) {
@@ -819,7 +819,7 @@
// Insert point is just past last use or def in the block
int insert_point = insidx-1;
while( insert_point > 0 ) {
- Node *n = b->_nodes[insert_point];
+ Node *n = b->get_node(insert_point);
// Hit top of block? Quit going backwards
if (n->is_Phi()) {
break;
@@ -865,7 +865,7 @@
}
} // end if LRG is UP
} // end for all spilling live ranges
- assert( b->_nodes[insidx] == n, "got insidx set incorrectly" );
+ assert( b->get_node(insidx) == n, "got insidx set incorrectly" );
} // end if crossing HRP Boundry
// If the LRG index is oob, then this is a new spillcopy, skip it.
@@ -878,7 +878,7 @@
if (copyidx && defidx == _lrg_map.live_range_id(n->in(copyidx))) {
n->replace_by( n->in(copyidx) );
n->set_req( copyidx, NULL );
- b->_nodes.remove(insidx--);
+ b->remove_node(insidx--);
b->_ihrp_index--; // Adjust the point where we go hi-pressure
b->_fhrp_index--;
continue;
@@ -932,10 +932,10 @@
// Rematerializable? Then clone def at use site instead
// of store/load
if( def->rematerialize() ) {
- int old_size = b->_nodes.size();
+ int old_size = b->number_of_nodes();
def = split_Rematerialize( def, b, insidx, maxlrg, splits, slidx, lrg2reach, Reachblock, true );
if( !def ) return 0; // Bail out
- insidx += b->_nodes.size()-old_size;
+ insidx += b->number_of_nodes()-old_size;
}
MachNode *mach = n->is_Mach() ? n->as_Mach() : NULL;
@@ -1332,8 +1332,8 @@
// so look at the node before it.
int insert = pred->end_idx();
while (insert >= 1 &&
- pred->_nodes[insert - 1]->is_SpillCopy() &&
- _lrg_map.find(pred->_nodes[insert - 1]) >= lrgs_before_phi_split) {
+ pred->get_node(insert - 1)->is_SpillCopy() &&
+ _lrg_map.find(pred->get_node(insert - 1)) >= lrgs_before_phi_split) {
insert--;
}
def = split_Rematerialize(def, pred, insert, maxlrg, splits, slidx, lrg2reach, Reachblock, false);
@@ -1402,7 +1402,7 @@
for (bidx = 0; bidx < _cfg.number_of_blocks(); bidx++) {
b = _cfg.get_block(bidx);
for (insidx = 0; insidx <= b->end_idx(); insidx++) {
- Node *n = b->_nodes[insidx];
+ Node *n = b->get_node(insidx);
uint defidx = _lrg_map.find(n);
assert(defidx < _lrg_map.max_lrg_id(), "Bad live range index in Split");
assert(defidx < maxlrg,"Bad live range index in Split");
--- a/hotspot/src/share/vm/opto/type.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/opto/type.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -169,7 +169,7 @@
public:
- inline void* operator new( size_t x ) {
+ inline void* operator new( size_t x ) throw() {
Compile* compile = Compile::current();
compile->set_type_last_size(x);
void *temp = compile->type_arena()->Amalloc_D(x);
--- a/hotspot/src/share/vm/prims/jni.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/prims/jni.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -3234,19 +3234,22 @@
HOTSPOT_JNI_GETSTRINGCHARS_ENTRY(
env, string, (uintptr_t *) isCopy);
#endif /* USDT2 */
- //%note jni_5
- if (isCopy != NULL) {
- *isCopy = JNI_TRUE;
- }
oop s = JNIHandles::resolve_non_null(string);
int s_len = java_lang_String::length(s);
typeArrayOop s_value = java_lang_String::value(s);
int s_offset = java_lang_String::offset(s);
- jchar* buf = NEW_C_HEAP_ARRAY(jchar, s_len + 1, mtInternal); // add one for zero termination
- if (s_len > 0) {
- memcpy(buf, s_value->char_at_addr(s_offset), sizeof(jchar)*s_len);
+ jchar* buf = NEW_C_HEAP_ARRAY_RETURN_NULL(jchar, s_len + 1, mtInternal); // add one for zero termination
+ /* JNI Specification states return NULL on OOM */
+ if (buf != NULL) {
+ if (s_len > 0) {
+ memcpy(buf, s_value->char_at_addr(s_offset), sizeof(jchar)*s_len);
+ }
+ buf[s_len] = 0;
+ //%note jni_5
+ if (isCopy != NULL) {
+ *isCopy = JNI_TRUE;
+ }
}
- buf[s_len] = 0;
#ifndef USDT2
DTRACE_PROBE1(hotspot_jni, GetStringChars__return, buf);
#else /* USDT2 */
@@ -3335,9 +3338,14 @@
#endif /* USDT2 */
oop java_string = JNIHandles::resolve_non_null(string);
size_t length = java_lang_String::utf8_length(java_string);
- char* result = AllocateHeap(length + 1, mtInternal);
- java_lang_String::as_utf8_string(java_string, result, (int) length + 1);
- if (isCopy != NULL) *isCopy = JNI_TRUE;
+ /* JNI Specification states return NULL on OOM */
+ char* result = AllocateHeap(length + 1, mtInternal, 0, AllocFailStrategy::RETURN_NULL);
+ if (result != NULL) {
+ java_lang_String::as_utf8_string(java_string, result, (int) length + 1);
+ if (isCopy != NULL) {
+ *isCopy = JNI_TRUE;
+ }
+ }
#ifndef USDT2
DTRACE_PROBE1(hotspot_jni, GetStringUTFChars__return, result);
#else /* USDT2 */
@@ -3591,11 +3599,16 @@
* Avoid asserts in typeArrayOop. */ \
result = (ElementType*)get_bad_address(); \
} else { \
- result = NEW_C_HEAP_ARRAY(ElementType, len, mtInternal); \
- /* copy the array to the c chunk */ \
- memcpy(result, a->Tag##_at_addr(0), sizeof(ElementType)*len); \
+ /* JNI Specification states return NULL on OOM */ \
+ result = NEW_C_HEAP_ARRAY_RETURN_NULL(ElementType, len, mtInternal); \
+ if (result != NULL) { \
+ /* copy the array to the c chunk */ \
+ memcpy(result, a->Tag##_at_addr(0), sizeof(ElementType)*len); \
+ if (isCopy) { \
+ *isCopy = JNI_TRUE; \
+ } \
+ } \
} \
- if (isCopy) *isCopy = JNI_TRUE; \
DTRACE_PROBE1(hotspot_jni, Get##Result##ArrayElements__return, result);\
return result; \
JNI_END
@@ -3628,11 +3641,16 @@
* Avoid asserts in typeArrayOop. */ \
result = (ElementType*)get_bad_address(); \
} else { \
- result = NEW_C_HEAP_ARRAY(ElementType, len, mtInternal); \
- /* copy the array to the c chunk */ \
- memcpy(result, a->Tag##_at_addr(0), sizeof(ElementType)*len); \
+ /* JNI Specification states return NULL on OOM */ \
+ result = NEW_C_HEAP_ARRAY_RETURN_NULL(ElementType, len, mtInternal); \
+ if (result != NULL) { \
+ /* copy the array to the c chunk */ \
+ memcpy(result, a->Tag##_at_addr(0), sizeof(ElementType)*len); \
+ if (isCopy) { \
+ *isCopy = JNI_TRUE; \
+ } \
+ } \
} \
- if (isCopy) *isCopy = JNI_TRUE; \
ReturnProbe; \
return result; \
JNI_END
@@ -5027,9 +5045,15 @@
tty->print_cr("Running test: " #unit_test_function_call); \
unit_test_function_call
+// Forward declaration
+void TestReservedSpace_test();
+void TestReserveMemorySpecial_test();
+
void execute_internal_vm_tests() {
if (ExecuteInternalVMTests) {
tty->print_cr("Running internal VM tests");
+ run_unit_test(TestReservedSpace_test());
+ run_unit_test(TestReserveMemorySpecial_test());
run_unit_test(GlobalDefinitions::test_globals());
run_unit_test(GCTimerAllTest::all());
run_unit_test(arrayOopDesc::test_max_array_length());
--- a/hotspot/src/share/vm/prims/jvmti.xml Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/prims/jvmti.xml Fri Sep 06 14:20:58 2013 -0700
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
<!--
- Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2002, 2013, 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
@@ -358,7 +358,7 @@
<specification label="JVM(TM) Tool Interface"
majorversion="1"
minorversion="2"
- microversion="2">
+ microversion="3">
<title subtitle="Version">
<tm>JVM</tm> Tool Interface
</title>
@@ -431,12 +431,46 @@
On the <tm>Solaris</tm> Operating Environment, an agent library is a shared
object (<code>.so</code> file).
<p/>
+
An agent may be started at VM startup by specifying the agent library
name using a <internallink id="starting">command line option</internallink>.
Some implementations may support a mechanism to <internallink id="onattach">
start agents</internallink> in the live <functionlink id="GetPhase">phase</functionlink>.
The details of how this is initiated are implementation specific.
</intro>
+
+ <intro id="entry point" label="Statically Linked Agents (since version 1.2.3)">
+
+ A native JVMTI Agent may be <i>statically linked</i> with the VM.
+ The manner in which the library and VM image are combined is
+ implementation-dependent.
+ An agent L whose image has been combined with the VM is defined as
+ <i>statically linked</i> if and only if the agent exports a function
+ called Agent_OnLoad_L.
+<p/>
+ If a <i>statically linked</i> agent L exports a function called
+ Agent_OnLoad_L and a function called Agent_OnLoad, the Agent_OnLoad
+ function will be ignored.
+ If an agent L is <i>statically linked</i>, an Agent_OnLoad_L
+ function will be invoked with the same arguments and expected return
+ value as specified for the Agent_OnLoad function.
+ An agent L that is <i>statically linked</i> will prohibit an agent of
+ the same name from being loaded dynamically.
+<p/>
+ The VM will invoke the Agent_OnUnload_L function of the agent, if such
+ a function is exported, at the same point during startup as it would
+ have called the dynamic entry point Agent_OnUnLoad.
+ If a <i>statically linked</i> agent L exports a function called
+ Agent_OnUnLoad_L and a function called Agent_OnUnLoad, the Agent_OnUnLoad
+ function will be ignored.
+<p/>
+ If an agent L is <i>statically linked</i>, an Agent_OnAttach_L function
+ will be invoked with the same arguments and expected return value as
+ specified for the Agent_OnAttach function.
+ If a <i>statically linked</i> agent L exports a function called
+ Agent_OnAttach_L and a function called Agent_OnAttach, the Agent_OnAttach
+ function will be ignored.
+</intro>
<intro id="starting" label="Agent Command Line Options">
The term "command-line option" is used below to
@@ -455,7 +489,7 @@
<dd>
The name following <code>-agentlib:</code> is the name of the
library to load. Lookup of the library, both its full name and location,
- proceeds in a platform-specific manner.
+ proceeds in a platform-specific manner.
Typically, the <i><agent-lib-name></i> is expanded to an
operating system specific file name.
The <i><options></i> will be passed to the agent on start-up.
@@ -463,7 +497,11 @@
<code>-agentlib:foo=opt1,opt2</code> is specified, the VM will attempt to
load the shared library <code>foo.dll</code> from the system <code>PATH</code>
under <tm>Windows</tm> or <code>libfoo.so</code> from the
- <code>LD_LIBRARY_PATH</code> under the <tm>Solaris</tm> operating environment.
+ <code>LD_LIBRARY_PATH</code> under the <tm>Solaris</tm> operating
+ environment.
+ If the agent library is statically linked into the executable
+ then no actual loading takes place.
+ <p/>
</dd>
<dt><code>-agentpath:</code><i><path-to-agent></i><code>=</code><i><options></i></dt>
<dd>
@@ -473,11 +511,20 @@
The <i><options></i> will be passed to the agent on start-up.
For example, if the option
<code>-agentpath:c:\myLibs\foo.dll=opt1,opt2</code> is specified, the VM will attempt to
- load the shared library <code>c:\myLibs\foo.dll</code>.
+ load the shared library <code>c:\myLibs\foo.dll</code>. If the agent
+ library is statically linked into the executable
+ then no actual loading takes place.
+ <p/>
</dd>
</dl>
- The start-up routine <internallink id="onload"><code>Agent_OnLoad</code></internallink>
- in the library will be invoked.
+ For a dynamic shared library agent, the start-up routine
+ <internallink id="onload"><code>Agent_OnLoad</code></internallink>
+ in the library will be invoked. If the agent library is statically linked
+ into the executable then the system will attempt to invoke the
+ <code>Agent_OnLoad_<agent-lib-name></code> entry point where
+ <agent-lib-name> is the basename of the
+ agent. In the above example <code>-agentpath:c:\myLibs\foo.dll=opt1,opt2</code>,
+ the system will attempt to find and call the <code>Agent_OnLoad_foo</code> start-up routine.
<p/>
Libraries loaded with <code>-agentlib:</code> or <code>-agentpath:</code>
will be searched for JNI native method implementations to facilitate the
@@ -502,11 +549,13 @@
If the agent is started in the <code>OnLoad</code>
<functionlink id="GetPhase">phase</functionlink> the function
<internallink id="onload"><code>Agent_OnLoad</code></internallink>
- will be invoked.
+ or <internallink id="onload"><code>Agent_OnLoad_L</code></internallink>
+ for statically linked agents will be invoked.
If the agent is started in the live
<functionlink id="GetPhase">phase</functionlink> the function
<internallink id="onattach"><code>Agent_OnAttach</code></internallink>
- will be invoked.
+ or <internallink id="onattach"><code>Agent_OnAttach_L</code></internallink>
+ for statically linked agents will be invoked.
Exactly one call to a start-up function is made per agent.
</intro>
@@ -516,6 +565,11 @@
<example>
JNIEXPORT jint JNICALL
Agent_OnLoad(JavaVM *vm, char *options, void *reserved)</example>
+ Or for a statically linked agent named 'L':
+ <example>
+JNIEXPORT jint JNICALL
+Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved)</example>
+
The VM will start the agent by calling this function.
It will be called early enough in VM initialization that:
<ul>
@@ -531,7 +585,8 @@
<li>no objects have been created</li>
</ul>
<p/>
- The VM will call the <code>Agent_OnLoad</code> function with
+ The VM will call the <code>Agent_OnLoad</code> or
+ <code>Agent_OnLoad_<agent-lib-name></code> function with
<i><options></i> as the second argument -
that is, using the command-line option examples,
<code>"opt1,opt2"</code> will be passed to the <code>char *options</code>
@@ -540,7 +595,8 @@
<internallink id="mUTF">modified UTF-8</internallink> string.
If <i>=<options></i> is not specified,
a zero length string is passed to <code>options</code>.
- The lifespan of the <code>options</code> string is the <code>Agent_OnLoad</code>
+ The lifespan of the <code>options</code> string is the
+ <code>Agent_OnLoad</code> or <code>Agent_OnLoad_<agent-lib-name></code>
call. If needed beyond this time the string or parts of the string must
be copied.
The period between when <code>Agent_OnLoad</code> is called and when it
@@ -570,7 +626,8 @@
their functionality.
</rationale>
<p/>
- The return value from <code>Agent_OnLoad</code> is used to indicate an error.
+ The return value from <code>Agent_OnLoad</code> or
+ <code>Agent_OnLoad_<agent-lib-name></code> is used to indicate an error.
Any value other than zero indicates an error and causes termination of the VM.
</intro>
@@ -587,6 +644,11 @@
<example>
JNIEXPORT jint JNICALL
Agent_OnAttach(JavaVM* vm, char *options, void *reserved)</example>
+Or for a statically linked agent named 'L':
+ <example>
+JNIEXPORT jint JNICALL
+Agent_OnAttach_L(JavaVM* vm, char *options, void *reserved)</example>
+
<p/>
The VM will start the agent by calling this function.
It will be called in the context of a thread
@@ -596,13 +658,14 @@
</internallink> string.
If startup options were not provided, a zero length string is passed to
<code>options</code>. The lifespan of the <code>options</code> string is the
- <code>Agent_OnAttach</code> call. If needed beyond this time the string or parts of
- the string must be copied.
+ <code>Agent_OnAttach</code> or <code>Agent_OnAttach_<agent-lib-name></code> call.
+ If needed beyond this time the string or parts of the string must be copied.
<p/>
Note that some <internallink id="capability">capabilities</internallink>
may not be available in the live phase.
<p/>
- The <code>Agent_OnAttach</code> function initializes the agent and returns a value
+ The <code>Agent_OnAttach</code> or <code>Agent_OnAttach_<agent-lib-name
+ ></code> function initializes the agent and returns a value
to the VM to indicate if an error occurred. Any value other than zero indicates an error.
An error does not cause the VM to terminate. Instead the VM ignores the error, or takes
some implementation specific action -- for example it might print an error to standard error,
@@ -615,8 +678,14 @@
<example>
JNIEXPORT void JNICALL
Agent_OnUnload(JavaVM *vm)</example>
+ Or for a statically linked agent named 'L':
+ <example>
+JNIEXPORT void JNICALL
+Agent_OnUnload_L(JavaVM *vm)</example>
+
This function will be called by the VM when the library is about to be unloaded.
- The library will be unloaded and this function will be called if some platform specific
+ The library will be unloaded (unless it is statically linked into the
+ executable) and this function will be called if some platform specific
mechanism causes the unload (an unload mechanism is not specified in this document)
or the library is (in effect) unloaded by the termination of the VM whether through
normal termination or VM failure, including start-up failure.
@@ -625,8 +694,9 @@
<eventlink id="VMDeath">VM Death event</eventlink>: for the VM Death event
to be sent, the VM must have run at least to the point of initialization and a valid
<jvmti/> environment must exist which has set a callback for VMDeath
- and enabled the event
- None of these are required for <code>Agent_OnUnload</code> and this function
+ and enabled the event.
+ None of these are required for <code>Agent_OnUnload</code> or
+ <code>Agent_OnUnload_<agent-lib-name></code> and this function
is also called if the library is unloaded for other reasons.
In the case that a VM Death event is sent, it will be sent before this
function is called (assuming this function is called due to VM termination).
@@ -10701,10 +10771,14 @@
<constants id="jvmtiPhase" label="Phases of execution" kind="enum">
<constant id="JVMTI_PHASE_ONLOAD" num="1">
<code>OnLoad</code> phase: while in the
- <internallink id="onload"><code>Agent_OnLoad</code></internallink> function.
+ <internallink id="onload"><code>Agent_OnLoad</code></internallink>
+ or, for statically linked agents, the <internallink id="onload">
+ <code>Agent_OnLoad_<agent-lib-name>
+ </code></internallink> function.
</constant>
<constant id="JVMTI_PHASE_PRIMORDIAL" num="2">
- Primordial phase: between return from <code>Agent_OnLoad</code> and the
+ Primordial phase: between return from <code>Agent_OnLoad</code>
+ or <code>Agent_OnLoad_<agent-lib-name></code> and the
<code>VMStart</code> event.
</constant>
<constant id="JVMTI_PHASE_START" num="6">
@@ -14261,6 +14335,9 @@
<change date="11 October 2012" version="1.2.2">
Fixed the "HTTP" and "Missing Anchor" errors reported by the LinkCheck tool.
</change>
+ <change date="19 June 2013" version="1.2.3">
+ Added support for statically linked agents.
+ </change>
</changehistory>
</specification>
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -2191,6 +2191,8 @@
char buffer[JVM_MAXPATHLEN];
void* library = NULL;
jint result = JNI_ERR;
+ const char *on_attach_symbols[] = AGENT_ONATTACH_SYMBOLS;
+ size_t num_symbol_entries = ARRAY_SIZE(on_attach_symbols);
// get agent name and options
const char* agent = op->arg(0);
@@ -2200,43 +2202,48 @@
// The abs paramter should be "true" or "false"
bool is_absolute_path = (absParam != NULL) && (strcmp(absParam,"true")==0);
+ // Initially marked as invalid. It will be set to valid if we can find the agent
+ AgentLibrary *agent_lib = new AgentLibrary(agent, options, is_absolute_path, NULL);
- // If the path is absolute we attempt to load the library. Otherwise we try to
- // load it from the standard dll directory.
+ // Check for statically linked in agent. If not found then if the path is
+ // absolute we attempt to load the library. Otherwise we try to load it
+ // from the standard dll directory.
- if (is_absolute_path) {
- library = os::dll_load(agent, ebuf, sizeof ebuf);
- } else {
- // Try to load the agent from the standard dll directory
- if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(),
- agent)) {
- library = os::dll_load(buffer, ebuf, sizeof ebuf);
- }
- if (library == NULL) {
- // not found - try local path
- char ns[1] = {0};
- if (os::dll_build_name(buffer, sizeof(buffer), ns, agent)) {
+ if (!os::find_builtin_agent(agent_lib, on_attach_symbols, num_symbol_entries)) {
+ if (is_absolute_path) {
+ library = os::dll_load(agent, ebuf, sizeof ebuf);
+ } else {
+ // Try to load the agent from the standard dll directory
+ if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(),
+ agent)) {
library = os::dll_load(buffer, ebuf, sizeof ebuf);
}
+ if (library == NULL) {
+ // not found - try local path
+ char ns[1] = {0};
+ if (os::dll_build_name(buffer, sizeof(buffer), ns, agent)) {
+ library = os::dll_load(buffer, ebuf, sizeof ebuf);
+ }
+ }
}
+ if (library != NULL) {
+ agent_lib->set_os_lib(library);
+ agent_lib->set_valid();
+ }
}
-
// If the library was loaded then we attempt to invoke the Agent_OnAttach
// function
- if (library != NULL) {
-
+ if (agent_lib->valid()) {
// Lookup the Agent_OnAttach function
OnAttachEntry_t on_attach_entry = NULL;
- const char *on_attach_symbols[] = AGENT_ONATTACH_SYMBOLS;
- for (uint symbol_index = 0; symbol_index < ARRAY_SIZE(on_attach_symbols); symbol_index++) {
- on_attach_entry =
- CAST_TO_FN_PTR(OnAttachEntry_t, os::dll_lookup(library, on_attach_symbols[symbol_index]));
- if (on_attach_entry != NULL) break;
- }
-
+ on_attach_entry = CAST_TO_FN_PTR(OnAttachEntry_t,
+ os::find_agent_function(agent_lib, false, on_attach_symbols, num_symbol_entries));
if (on_attach_entry == NULL) {
// Agent_OnAttach missing - unload library
- os::dll_unload(library);
+ if (!agent_lib->is_static_lib()) {
+ os::dll_unload(library);
+ }
+ delete agent_lib;
} else {
// Invoke the Agent_OnAttach function
JavaThread* THREAD = JavaThread::current();
@@ -2256,7 +2263,9 @@
// If OnAttach returns JNI_OK then we add it to the list of
// agent libraries so that we can call Agent_OnUnload later.
if (result == JNI_OK) {
- Arguments::add_loaded_agent(agent, (char*)options, is_absolute_path, library);
+ Arguments::add_loaded_agent(agent_lib);
+ } else {
+ delete agent_lib;
}
// Agent_OnAttach executed so completion status is JNI_OK
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1554,18 +1554,22 @@
return false;
}
- // rewrite sourc file name index:
+ // rewrite source file name index:
u2 source_file_name_idx = scratch_class->source_file_name_index();
if (source_file_name_idx != 0) {
u2 new_source_file_name_idx = find_new_index(source_file_name_idx);
- scratch_class->set_source_file_name_index(new_source_file_name_idx);
+ if (new_source_file_name_idx != 0) {
+ scratch_class->set_source_file_name_index(new_source_file_name_idx);
+ }
}
// rewrite class generic signature index:
u2 generic_signature_index = scratch_class->generic_signature_index();
if (generic_signature_index != 0) {
u2 new_generic_signature_index = find_new_index(generic_signature_index);
- scratch_class->set_generic_signature_index(new_generic_signature_index);
+ if (new_generic_signature_index != 0) {
+ scratch_class->set_generic_signature_index(new_generic_signature_index);
+ }
}
return true;
@@ -1737,7 +1741,10 @@
for (int i = 0; i < len; i++) {
const u2 cp_index = elem[i].name_cp_index;
- elem[i].name_cp_index = find_new_index(cp_index);
+ const u2 new_cp_index = find_new_index(cp_index);
+ if (new_cp_index != 0) {
+ elem[i].name_cp_index = new_cp_index;
+ }
}
}
} // end rewrite_cp_refs_in_method()
--- a/hotspot/src/share/vm/prims/whitebox.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/prims/whitebox.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -128,7 +128,7 @@
WB_END
#endif // INCLUDE_ALL_GCS
-#ifdef INCLUDE_NMT
+#if INCLUDE_NMT
// Alloc memory using the test memory type so that we can use that to see if
// NMT picks it up correctly
WB_ENTRY(jlong, WB_NMTMalloc(JNIEnv* env, jobject o, jlong size))
@@ -181,6 +181,10 @@
return MemTracker::wbtest_wait_for_data_merge();
WB_END
+WB_ENTRY(jboolean, WB_NMTIsDetailSupported(JNIEnv* env))
+ return MemTracker::tracking_level() == MemTracker::NMT_detail;
+WB_END
+
#endif // INCLUDE_NMT
static jmethodID reflected_method_to_jmid(JavaThread* thread, JNIEnv* env, jobject method) {
@@ -439,7 +443,7 @@
{CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions },
{CC"g1RegionSize", CC"()I", (void*)&WB_G1RegionSize },
#endif // INCLUDE_ALL_GCS
-#ifdef INCLUDE_NMT
+#if INCLUDE_NMT
{CC"NMTMalloc", CC"(J)J", (void*)&WB_NMTMalloc },
{CC"NMTFree", CC"(J)V", (void*)&WB_NMTFree },
{CC"NMTReserveMemory", CC"(J)J", (void*)&WB_NMTReserveMemory },
@@ -447,6 +451,7 @@
{CC"NMTUncommitMemory", CC"(JJ)V", (void*)&WB_NMTUncommitMemory },
{CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory },
{CC"NMTWaitForDataMerge", CC"()Z", (void*)&WB_NMTWaitForDataMerge},
+ {CC"NMTIsDetailSupported",CC"()Z", (void*)&WB_NMTIsDetailSupported},
#endif // INCLUDE_NMT
{CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll },
{CC"deoptimizeMethod", CC"(Ljava/lang/reflect/Executable;Z)I",
--- a/hotspot/src/share/vm/runtime/arguments.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1605,17 +1605,6 @@
return result;
}
-void Arguments::set_heap_base_min_address() {
- if (FLAG_IS_DEFAULT(HeapBaseMinAddress) && UseG1GC && HeapBaseMinAddress < 1*G) {
- // By default HeapBaseMinAddress is 2G on all platforms except Solaris x86.
- // G1 currently needs a lot of C-heap, so on Solaris we have to give G1
- // some extra space for the C-heap compared to other collectors.
- // Use FLAG_SET_DEFAULT here rather than FLAG_SET_ERGO to make sure that
- // code that checks for default values work correctly.
- FLAG_SET_DEFAULT(HeapBaseMinAddress, 1*G);
- }
-}
-
void Arguments::set_heap_size() {
if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
// Deprecated flag
@@ -2230,7 +2219,7 @@
// among the distinct pages.
if (ContendedPaddingWidth < 0 || ContendedPaddingWidth > 8192) {
jio_fprintf(defaultStream::error_stream(),
- "ContendedPaddingWidth=" INTX_FORMAT " must be the between %d and %d\n",
+ "ContendedPaddingWidth=" INTX_FORMAT " must be in between %d and %d\n",
ContendedPaddingWidth, 0, 8192);
status = false;
}
@@ -2239,7 +2228,7 @@
// It is sufficient to check against the largest type size.
if ((ContendedPaddingWidth % BytesPerLong) != 0) {
jio_fprintf(defaultStream::error_stream(),
- "ContendedPaddingWidth=" INTX_FORMAT " must be the multiple of %d\n",
+ "ContendedPaddingWidth=" INTX_FORMAT " must be a multiple of %d\n",
ContendedPaddingWidth, BytesPerLong);
status = false;
}
@@ -3537,8 +3526,6 @@
}
}
- set_heap_base_min_address();
-
// Set heap size based on available physical memory
set_heap_size();
--- a/hotspot/src/share/vm/runtime/arguments.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/arguments.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -118,11 +118,21 @@
// For use by -agentlib, -agentpath and -Xrun
class AgentLibrary : public CHeapObj<mtInternal> {
friend class AgentLibraryList;
+public:
+ // Is this library valid or not. Don't rely on os_lib == NULL as statically
+ // linked lib could have handle of RTLD_DEFAULT which == 0 on some platforms
+ enum AgentState {
+ agent_invalid = 0,
+ agent_valid = 1
+ };
+
private:
char* _name;
char* _options;
void* _os_lib;
bool _is_absolute_path;
+ bool _is_static_lib;
+ AgentState _state;
AgentLibrary* _next;
public:
@@ -133,6 +143,11 @@
void* os_lib() const { return _os_lib; }
void set_os_lib(void* os_lib) { _os_lib = os_lib; }
AgentLibrary* next() const { return _next; }
+ bool is_static_lib() const { return _is_static_lib; }
+ void set_static_lib(bool static_lib) { _is_static_lib = static_lib; }
+ bool valid() { return (_state == agent_valid); }
+ void set_valid() { _state = agent_valid; }
+ void set_invalid() { _state = agent_invalid; }
// Constructor
AgentLibrary(const char* name, const char* options, bool is_absolute_path, void* os_lib) {
@@ -147,6 +162,8 @@
_is_absolute_path = is_absolute_path;
_os_lib = os_lib;
_next = NULL;
+ _state = agent_invalid;
+ _is_static_lib = false;
}
};
@@ -276,6 +293,8 @@
{ _agentList.add(new AgentLibrary(name, options, absolute_path, NULL)); }
// Late-binding agents not started via arguments
+ static void add_loaded_agent(AgentLibrary *agentLib)
+ { _agentList.add(agentLib); }
static void add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib)
{ _agentList.add(new AgentLibrary(name, options, absolute_path, os_lib)); }
@@ -315,8 +334,6 @@
// limits the given memory size by the maximum amount of memory this process is
// currently allowed to allocate or reserve.
static julong limit_by_allocatable_memory(julong size);
- // Setup HeapBaseMinAddress
- static void set_heap_base_min_address();
// Setup heap size
static void set_heap_size();
// Based on automatic selection criteria, should the
--- a/hotspot/src/share/vm/runtime/fprofiler.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/fprofiler.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -264,7 +264,7 @@
public:
- void* operator new(size_t size, ThreadProfiler* tp);
+ void* operator new(size_t size, ThreadProfiler* tp) throw();
void operator delete(void* p);
ProfilerNode() {
@@ -373,7 +373,7 @@
}
};
-void* ProfilerNode::operator new(size_t size, ThreadProfiler* tp){
+void* ProfilerNode::operator new(size_t size, ThreadProfiler* tp) throw() {
void* result = (void*) tp->area_top;
tp->area_top += size;
@@ -925,6 +925,8 @@
FlatProfiler::interval_print();
FlatProfiler::interval_reset();
}
+
+ FREE_C_HEAP_ARRAY(JavaThread *, threadsList, mtInternal);
} else {
// Couldn't get the threads lock, just record that rather than blocking
FlatProfiler::threads_lock_ticks += 1;
--- a/hotspot/src/share/vm/runtime/globals.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/globals.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -205,6 +205,7 @@
#define C1_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) "{C1 product}", DEFAULT },
#define C1_PD_PRODUCT_FLAG_STRUCT(type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) "{C1 pd product}", DEFAULT },
+#define C1_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) "{C1 diagnostic}", DEFAULT },
#ifdef PRODUCT
#define C1_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */
#define C1_PD_DEVELOP_FLAG_STRUCT(type, name, doc) /* flag is constant */
@@ -260,7 +261,7 @@
G1_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT)
#endif // INCLUDE_ALL_GCS
#ifdef COMPILER1
- C1_FLAGS(C1_DEVELOP_FLAG_STRUCT, C1_PD_DEVELOP_FLAG_STRUCT, C1_PRODUCT_FLAG_STRUCT, C1_PD_PRODUCT_FLAG_STRUCT, C1_NOTPRODUCT_FLAG_STRUCT)
+ C1_FLAGS(C1_DEVELOP_FLAG_STRUCT, C1_PD_DEVELOP_FLAG_STRUCT, C1_PRODUCT_FLAG_STRUCT, C1_PD_PRODUCT_FLAG_STRUCT, C1_DIAGNOSTIC_FLAG_STRUCT, C1_NOTPRODUCT_FLAG_STRUCT)
#endif
#ifdef COMPILER2
C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_EXPERIMENTAL_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
--- a/hotspot/src/share/vm/runtime/globals.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/globals.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1933,6 +1933,9 @@
notproduct(bool, ExecuteInternalVMTests, false, \
"Enable execution of internal VM tests.") \
\
+ notproduct(bool, VerboseInternalVMTests, false, \
+ "Turn on logging for internal VM tests.") \
+ \
product_pd(bool, UseTLAB, "Use thread-local object allocation") \
\
product_pd(bool, ResizeTLAB, \
@@ -3511,6 +3514,8 @@
"Temporary flag for transition to AbstractMethodError wrapped " \
"in InvocationTargetException. See 6531596") \
\
+ develop(bool, VerifyLambdaBytecodes, false, \
+ "Force verification of jdk 8 lambda metafactory bytecodes.") \
\
develop(intx, FastSuperclassLimit, 8, \
"Depth of hardwired instanceof accelerator array") \
@@ -3682,15 +3687,9 @@
develop(bool, TraceDefaultMethods, false, \
"Trace the default method processing steps") \
\
- develop(bool, ParseAllGenericSignatures, false, \
- "Parse all generic signatures while classloading") \
- \
develop(bool, VerifyGenericSignatures, false, \
"Abort VM on erroneous or inconsistent generic signatures") \
\
- product(bool, ParseGenericDefaults, false, \
- "Parse generic signatures for default method handling") \
- \
product(bool, UseVMInterruptibleIO, false, \
"(Unstable, Solaris-specific) Thread interrupt before or with " \
"EINTR for I/O operations results in OS_INTRPT. The default value"\
--- a/hotspot/src/share/vm/runtime/globals_extension.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/globals_extension.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -57,6 +57,7 @@
#define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
#define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
+#define C1_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
#ifdef PRODUCT
#define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc) /* flag is constant */
#define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc) /* flag is constant */
@@ -99,7 +100,7 @@
G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER)
#endif // INCLUDE_ALL_GCS
#ifdef COMPILER1
- C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER)
+ C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_DIAGNOSTIC_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER)
#endif
#ifdef COMPILER2
C2_FLAGS(C2_DEVELOP_FLAG_MEMBER, C2_PD_DEVELOP_FLAG_MEMBER, C2_PRODUCT_FLAG_MEMBER, C2_PD_PRODUCT_FLAG_MEMBER, C2_DIAGNOSTIC_FLAG_MEMBER, C2_EXPERIMENTAL_FLAG_MEMBER, C2_NOTPRODUCT_FLAG_MEMBER)
@@ -131,6 +132,7 @@
#define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
#define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
+#define C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
#ifdef PRODUCT
#define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */
#define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) /* flag is constant */
@@ -204,6 +206,7 @@
C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
C1_PRODUCT_FLAG_MEMBER_WITH_TYPE,
C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
+ C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
#endif
#ifdef COMPILER2
--- a/hotspot/src/share/vm/runtime/handles.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/handles.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -179,11 +179,11 @@
_thread->set_last_handle_mark(previous_handle_mark());
}
-void* HandleMark::operator new(size_t size) {
+void* HandleMark::operator new(size_t size) throw() {
return AllocateHeap(size, mtThread);
}
-void* HandleMark::operator new [] (size_t size) {
+void* HandleMark::operator new [] (size_t size) throw() {
return AllocateHeap(size, mtThread);
}
--- a/hotspot/src/share/vm/runtime/handles.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/handles.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -309,8 +309,8 @@
// called in the destructor of HandleMarkCleaner
void pop_and_restore();
// overloaded operators
- void* operator new(size_t size);
- void* operator new [](size_t size);
+ void* operator new(size_t size) throw();
+ void* operator new [](size_t size) throw();
void operator delete(void* p);
void operator delete[](void* p);
};
--- a/hotspot/src/share/vm/runtime/interfaceSupport.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -56,7 +56,7 @@
}
private:
- inline void* operator new(size_t size, void* ptr) {
+ inline void* operator new(size_t size, void* ptr) throw() {
return ptr;
}
};
--- a/hotspot/src/share/vm/runtime/mutexLocker.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -124,13 +124,15 @@
Mutex* Management_lock = NULL;
Monitor* Service_lock = NULL;
-Mutex* Stacktrace_lock = NULL;
+Monitor* PeriodicTask_lock = NULL;
-Monitor* JfrQuery_lock = NULL;
+#ifdef INCLUDE_TRACE
+Mutex* JfrStacktrace_lock = NULL;
Monitor* JfrMsg_lock = NULL;
Mutex* JfrBuffer_lock = NULL;
Mutex* JfrStream_lock = NULL;
-Monitor* PeriodicTask_lock = NULL;
+Mutex* JfrThreadGroups_lock = NULL;
+#endif
#define MAX_NUM_MUTEX 128
static Monitor * _mutex_array[MAX_NUM_MUTEX];
@@ -206,7 +208,6 @@
def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching.
def(ObjAllocPost_lock , Monitor, special, false);
def(Service_lock , Monitor, special, true ); // used for service thread operations
- def(Stacktrace_lock , Mutex, special, true ); // used for JFR stacktrace database
def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs.
def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread
@@ -272,11 +273,16 @@
def(Debug3_lock , Mutex , nonleaf+4, true );
def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread
def(CompileThread_lock , Monitor, nonleaf+5, false );
+ def(PeriodicTask_lock , Monitor, nonleaf+5, true);
+#ifdef INCLUDE_TRACE
def(JfrMsg_lock , Monitor, leaf, true);
def(JfrBuffer_lock , Mutex, nonleaf+1, true);
+ def(JfrThreadGroups_lock , Mutex, nonleaf+1, true);
def(JfrStream_lock , Mutex, nonleaf+2, true);
- def(PeriodicTask_lock , Monitor, nonleaf+5, true);
+ def(JfrStacktrace_lock , Mutex, special, true );
+#endif
+
}
GCMutexLocker::GCMutexLocker(Monitor * mutex) {
--- a/hotspot/src/share/vm/runtime/mutexLocker.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/mutexLocker.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -137,13 +137,15 @@
extern Mutex* Management_lock; // a lock used to serialize JVM management
extern Monitor* Service_lock; // a lock used for service thread operation
-extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table
+extern Monitor* PeriodicTask_lock; // protects the periodic task structure
-extern Monitor* JfrQuery_lock; // protects JFR use
+#ifdef INCLUDE_TRACE
+extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table
extern Monitor* JfrMsg_lock; // protects JFR messaging
extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
extern Mutex* JfrStream_lock; // protects JFR stream access
-extern Monitor* PeriodicTask_lock; // protects the periodic task structure
+extern Mutex* JfrThreadGroups_lock; // protects JFR access to Thread Groups
+#endif
// A MutexLocker provides mutual exclusion with respect to a given mutex
// for the scope which contains the locker. The lock is an OS lock, not
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -312,10 +312,10 @@
public:
static int Knob_Verbose;
static int Knob_SpinLimit;
- void* operator new (size_t size) {
+ void* operator new (size_t size) throw() {
return AllocateHeap(size, mtInternal);
}
- void* operator new[] (size_t size) {
+ void* operator new[] (size_t size) throw() {
return operator new (size);
}
void operator delete(void* p) {
--- a/hotspot/src/share/vm/runtime/os.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/os.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -443,6 +443,67 @@
return _native_java_library;
}
+/*
+ * Support for finding Agent_On(Un)Load/Attach<_lib_name> if it exists.
+ * If check_lib == true then we are looking for an
+ * Agent_OnLoad_lib_name or Agent_OnAttach_lib_name function to determine if
+ * this library is statically linked into the image.
+ * If check_lib == false then we will look for the appropriate symbol in the
+ * executable if agent_lib->is_static_lib() == true or in the shared library
+ * referenced by 'handle'.
+ */
+void* os::find_agent_function(AgentLibrary *agent_lib, bool check_lib,
+ const char *syms[], size_t syms_len) {
+ const char *lib_name;
+ void *handle = agent_lib->os_lib();
+ void *entryName = NULL;
+ char *agent_function_name;
+ size_t i;
+
+ // If checking then use the agent name otherwise test is_static_lib() to
+ // see how to process this lookup
+ lib_name = ((check_lib || agent_lib->is_static_lib()) ? agent_lib->name() : NULL);
+ for (i = 0; i < syms_len; i++) {
+ agent_function_name = build_agent_function_name(syms[i], lib_name, agent_lib->is_absolute_path());
+ if (agent_function_name == NULL) {
+ break;
+ }
+ entryName = dll_lookup(handle, agent_function_name);
+ FREE_C_HEAP_ARRAY(char, agent_function_name, mtThread);
+ if (entryName != NULL) {
+ break;
+ }
+ }
+ return entryName;
+}
+
+// See if the passed in agent is statically linked into the VM image.
+bool os::find_builtin_agent(AgentLibrary *agent_lib, const char *syms[],
+ size_t syms_len) {
+ void *ret;
+ void *proc_handle;
+ void *save_handle;
+
+ if (agent_lib->name() == NULL) {
+ return false;
+ }
+ proc_handle = get_default_process_handle();
+ // Check for Agent_OnLoad/Attach_lib_name function
+ save_handle = agent_lib->os_lib();
+ // We want to look in this process' symbol table.
+ agent_lib->set_os_lib(proc_handle);
+ ret = find_agent_function(agent_lib, true, syms, syms_len);
+ agent_lib->set_os_lib(save_handle);
+ if (ret != NULL) {
+ // Found an entry point like Agent_OnLoad_lib_name so we have a static agent
+ agent_lib->set_os_lib(proc_handle);
+ agent_lib->set_valid();
+ agent_lib->set_static_lib(true);
+ return true;
+ }
+ return false;
+}
+
// --------------------- heap allocation utilities ---------------------
char *os::strdup(const char *str, MEMFLAGS flags) {
@@ -1424,44 +1485,6 @@
return result;
}
-// Read file line by line, if line is longer than bsize,
-// skip rest of line.
-int os::get_line_chars(int fd, char* buf, const size_t bsize){
- size_t sz, i = 0;
-
- // read until EOF, EOL or buf is full
- while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-2) && buf[i] != '\n') {
- ++i;
- }
-
- if (buf[i] == '\n') {
- // EOL reached so ignore EOL character and return
-
- buf[i] = 0;
- return (int) i;
- }
-
- buf[i+1] = 0;
-
- if (sz != 1) {
- // EOF reached. if we read chars before EOF return them and
- // return EOF on next call otherwise return EOF
-
- return (i == 0) ? -1 : (int) i;
- }
-
- // line is longer than size of buf, skip to EOL
- char ch;
- while (read(fd, &ch, 1) == 1 && ch != '\n') {
- // Do nothing
- }
-
- // return initial part of line that fits in buf.
- // If we reached EOF, it will be returned on next call.
-
- return (int) i;
-}
-
void os::SuspendedThreadTask::run() {
assert(Threads_lock->owned_by_self() || (_thread == VMThread::vm_thread()), "must have threads lock to call this");
internal_do_task();
--- a/hotspot/src/share/vm/runtime/os.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/os.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -46,6 +46,8 @@
# include <setjmp.h>
#endif
+class AgentLibrary;
+
// os defines the interface to operating system; this includes traditional
// OS services (time, I/O) as well as other functionality with system-
// dependent code.
@@ -328,8 +330,8 @@
static char* non_memory_address_word();
// reserve, commit and pin the entire memory region
- static char* reserve_memory_special(size_t size, char* addr = NULL,
- bool executable = false);
+ static char* reserve_memory_special(size_t size, size_t alignment,
+ char* addr, bool executable);
static bool release_memory_special(char* addr, size_t bytes);
static void large_page_init();
static size_t large_page_size();
@@ -537,6 +539,17 @@
// Unload library
static void dll_unload(void *lib);
+ // Return the handle of this process
+ static void* get_default_process_handle();
+
+ // Check for static linked agent library
+ static bool find_builtin_agent(AgentLibrary *agent_lib, const char *syms[],
+ size_t syms_len);
+
+ // Find agent entry point
+ static void *find_agent_function(AgentLibrary *agent_lib, bool check_lib,
+ const char *syms[], size_t syms_len);
+
// Print out system information; they are called by fatal error handler.
// Output format may be different on different platforms.
static void print_os_info(outputStream* st);
@@ -725,10 +738,6 @@
// Hook for os specific jvm options that we don't want to abort on seeing
static bool obsolete_option(const JavaVMOption *option);
- // Read file line by line. If line is longer than bsize,
- // rest of line is skipped. Returns number of bytes read or -1 on EOF
- static int get_line_chars(int fd, char *buf, const size_t bsize);
-
// Extensions
#include "runtime/os_ext.hpp"
@@ -806,6 +815,11 @@
// ResumeThread call)
static void pause();
+ // Builds a platform dependent Agent_OnLoad_<libname> function name
+ // which is used to find statically linked in agents.
+ static char* build_agent_function_name(const char *sym, const char *cname,
+ bool is_absolute_path);
+
class SuspendedThreadTaskContext {
public:
SuspendedThreadTaskContext(Thread* thread, void *ucontext) : _thread(thread), _ucontext(ucontext) {}
--- a/hotspot/src/share/vm/runtime/park.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/park.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -140,7 +140,7 @@
// well as bank access imbalance on Niagara-like platforms,
// although Niagara's hash function should help.
-void * ParkEvent::operator new (size_t sz) {
+void * ParkEvent::operator new (size_t sz) throw() {
return (void *) ((intptr_t (AllocateHeap(sz + 256, mtInternal, CALLER_PC)) + 256) & -256) ;
}
--- a/hotspot/src/share/vm/runtime/park.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/park.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -166,7 +166,7 @@
// aligned on 256-byte address boundaries. This ensures that the least
// significant byte of a ParkEvent address is always 0.
- void * operator new (size_t sz) ;
+ void * operator new (size_t sz) throw();
void operator delete (void * a) ;
public:
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1051,7 +1051,8 @@
// Find receiver for non-static call
if (bc != Bytecodes::_invokestatic &&
- bc != Bytecodes::_invokedynamic) {
+ bc != Bytecodes::_invokedynamic &&
+ bc != Bytecodes::_invokehandle) {
// This register map must be update since we need to find the receiver for
// compiled frames. The receiver might be in a register.
RegisterMap reg_map2(thread);
@@ -1078,7 +1079,7 @@
#ifdef ASSERT
// Check that the receiver klass is of the right subtype and that it is initialized for virtual calls
- if (bc != Bytecodes::_invokestatic && bc != Bytecodes::_invokedynamic) {
+ if (bc != Bytecodes::_invokestatic && bc != Bytecodes::_invokedynamic && bc != Bytecodes::_invokehandle) {
assert(receiver.not_null(), "should have thrown exception");
KlassHandle receiver_klass(THREAD, receiver->klass());
Klass* rk = constants->klass_ref_at(bytecode_index, CHECK_(nullHandle));
@@ -1240,9 +1241,9 @@
#endif
if (is_virtual) {
- assert(receiver.not_null(), "sanity check");
+ assert(receiver.not_null() || invoke_code == Bytecodes::_invokehandle, "sanity check");
bool static_bound = call_info.resolved_method()->can_be_statically_bound();
- KlassHandle h_klass(THREAD, receiver->klass());
+ KlassHandle h_klass(THREAD, invoke_code == Bytecodes::_invokehandle ? NULL : receiver->klass());
CompiledIC::compute_monomorphic_entry(callee_method, h_klass,
is_optimized, static_bound, virtual_call_info,
CHECK_(methodHandle()));
--- a/hotspot/src/share/vm/runtime/thread.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/thread.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -3636,6 +3636,16 @@
CompileBroker::compilation_init();
#endif
+ if (EnableInvokeDynamic) {
+ // Pre-initialize some JSR292 core classes to avoid deadlock during class loading.
+ // It is done after compilers are initialized, because otherwise compilations of
+ // signature polymorphic MH intrinsics can be missed
+ // (see SystemDictionary::find_method_handle_intrinsic).
+ initialize_class(vmSymbols::java_lang_invoke_MethodHandle(), CHECK_0);
+ initialize_class(vmSymbols::java_lang_invoke_MemberName(), CHECK_0);
+ initialize_class(vmSymbols::java_lang_invoke_MethodHandleNatives(), CHECK_0);
+ }
+
#if INCLUDE_MANAGEMENT
Management::initialize(THREAD);
#endif // INCLUDE_MANAGEMENT
@@ -3696,15 +3706,18 @@
// num_symbol_entries must be passed-in since only the caller knows the number of symbols in the array.
static OnLoadEntry_t lookup_on_load(AgentLibrary* agent, const char *on_load_symbols[], size_t num_symbol_entries) {
OnLoadEntry_t on_load_entry = NULL;
- void *library = agent->os_lib(); // check if we have looked it up before
-
- if (library == NULL) {
+ void *library = NULL;
+
+ if (!agent->valid()) {
char buffer[JVM_MAXPATHLEN];
char ebuf[1024];
const char *name = agent->name();
const char *msg = "Could not find agent library ";
- if (agent->is_absolute_path()) {
+ // First check to see if agent is statcally linked into executable
+ if (os::find_builtin_agent(agent, on_load_symbols, num_symbol_entries)) {
+ library = agent->os_lib();
+ } else if (agent->is_absolute_path()) {
library = os::dll_load(name, ebuf, sizeof ebuf);
if (library == NULL) {
const char *sub_msg = " in absolute path, with error: ";
@@ -3738,13 +3751,15 @@
}
}
agent->set_os_lib(library);
+ agent->set_valid();
}
// Find the OnLoad function.
- for (size_t symbol_index = 0; symbol_index < num_symbol_entries; symbol_index++) {
- on_load_entry = CAST_TO_FN_PTR(OnLoadEntry_t, os::dll_lookup(library, on_load_symbols[symbol_index]));
- if (on_load_entry != NULL) break;
- }
+ on_load_entry =
+ CAST_TO_FN_PTR(OnLoadEntry_t, os::find_agent_function(agent,
+ false,
+ on_load_symbols,
+ num_symbol_entries));
return on_load_entry;
}
@@ -3819,22 +3834,23 @@
void Threads::shutdown_vm_agents() {
// Send any Agent_OnUnload notifications
const char *on_unload_symbols[] = AGENT_ONUNLOAD_SYMBOLS;
+ size_t num_symbol_entries = ARRAY_SIZE(on_unload_symbols);
extern struct JavaVM_ main_vm;
for (AgentLibrary* agent = Arguments::agents(); agent != NULL; agent = agent->next()) {
// Find the Agent_OnUnload function.
- for (uint symbol_index = 0; symbol_index < ARRAY_SIZE(on_unload_symbols); symbol_index++) {
- Agent_OnUnload_t unload_entry = CAST_TO_FN_PTR(Agent_OnUnload_t,
- os::dll_lookup(agent->os_lib(), on_unload_symbols[symbol_index]));
-
- // Invoke the Agent_OnUnload function
- if (unload_entry != NULL) {
- JavaThread* thread = JavaThread::current();
- ThreadToNativeFromVM ttn(thread);
- HandleMark hm(thread);
- (*unload_entry)(&main_vm);
- break;
- }
+ Agent_OnUnload_t unload_entry = CAST_TO_FN_PTR(Agent_OnUnload_t,
+ os::find_agent_function(agent,
+ false,
+ on_unload_symbols,
+ num_symbol_entries));
+
+ // Invoke the Agent_OnUnload function
+ if (unload_entry != NULL) {
+ JavaThread* thread = JavaThread::current();
+ ThreadToNativeFromVM ttn(thread);
+ HandleMark hm(thread);
+ (*unload_entry)(&main_vm);
}
}
}
--- a/hotspot/src/share/vm/runtime/thread.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/thread.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -113,8 +113,9 @@
// Support for forcing alignment of thread objects for biased locking
void* _real_malloc_address;
public:
- void* operator new(size_t size) { return allocate(size, true); }
- void* operator new(size_t size, const std::nothrow_t& nothrow_constant) { return allocate(size, false); }
+ void* operator new(size_t size) throw() { return allocate(size, true); }
+ void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() {
+ return allocate(size, false); }
void operator delete(void* p);
protected:
--- a/hotspot/src/share/vm/runtime/virtualspace.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/virtualspace.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -42,8 +42,19 @@
// ReservedSpace
+
+// Dummy constructor
+ReservedSpace::ReservedSpace() : _base(NULL), _size(0), _noaccess_prefix(0),
+ _alignment(0), _special(false), _executable(false) {
+}
+
ReservedSpace::ReservedSpace(size_t size) {
- initialize(size, 0, false, NULL, 0, false);
+ size_t page_size = os::page_size_for_region(size, size, 1);
+ bool large_pages = page_size != (size_t)os::vm_page_size();
+ // Don't force the alignment to be large page aligned,
+ // since that will waste memory.
+ size_t alignment = os::vm_allocation_granularity();
+ initialize(size, alignment, large_pages, NULL, 0, false);
}
ReservedSpace::ReservedSpace(size_t size, size_t alignment,
@@ -129,16 +140,18 @@
if (special) {
- base = os::reserve_memory_special(size, requested_address, executable);
+ base = os::reserve_memory_special(size, alignment, requested_address, executable);
if (base != NULL) {
if (failed_to_reserve_as_requested(base, requested_address, size, true)) {
// OS ignored requested address. Try different address.
return;
}
- // Check alignment constraints
+ // Check alignment constraints.
assert((uintptr_t) base % alignment == 0,
- "Large pages returned a non-aligned address");
+ err_msg("Large pages returned a non-aligned address, base: "
+ PTR_FORMAT " alignment: " PTR_FORMAT,
+ base, (void*)(uintptr_t)alignment));
_special = true;
} else {
// failed; try to reserve regular memory below
@@ -715,4 +728,188 @@
tty->print_cr(" - [low_b, high_b]: [" INTPTR_FORMAT ", " INTPTR_FORMAT "]", low_boundary(), high_boundary());
}
+
+/////////////// Unit tests ///////////////
+
+#ifndef PRODUCT
+
+#define test_log(...) \
+ do {\
+ if (VerboseInternalVMTests) { \
+ tty->print_cr(__VA_ARGS__); \
+ tty->flush(); \
+ }\
+ } while (false)
+
+class TestReservedSpace : AllStatic {
+ public:
+ static void small_page_write(void* addr, size_t size) {
+ size_t page_size = os::vm_page_size();
+
+ char* end = (char*)addr + size;
+ for (char* p = (char*)addr; p < end; p += page_size) {
+ *p = 1;
+ }
+ }
+
+ static void release_memory_for_test(ReservedSpace rs) {
+ if (rs.special()) {
+ guarantee(os::release_memory_special(rs.base(), rs.size()), "Shouldn't fail");
+ } else {
+ guarantee(os::release_memory(rs.base(), rs.size()), "Shouldn't fail");
+ }
+ }
+
+ static void test_reserved_space1(size_t size, size_t alignment) {
+ test_log("test_reserved_space1(%p)", (void*) (uintptr_t) size);
+
+ assert(is_size_aligned(size, alignment), "Incorrect input parameters");
+
+ ReservedSpace rs(size, // size
+ alignment, // alignment
+ UseLargePages, // large
+ NULL, // requested_address
+ 0); // noacces_prefix
+
+ test_log(" rs.special() == %d", rs.special());
+
+ assert(rs.base() != NULL, "Must be");
+ assert(rs.size() == size, "Must be");
+
+ assert(is_ptr_aligned(rs.base(), alignment), "aligned sizes should always give aligned addresses");
+ assert(is_size_aligned(rs.size(), alignment), "aligned sizes should always give aligned addresses");
+
+ if (rs.special()) {
+ small_page_write(rs.base(), size);
+ }
+
+ release_memory_for_test(rs);
+ }
+
+ static void test_reserved_space2(size_t size) {
+ test_log("test_reserved_space2(%p)", (void*)(uintptr_t)size);
+
+ assert(is_size_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned");
+
+ ReservedSpace rs(size);
+
+ test_log(" rs.special() == %d", rs.special());
+
+ assert(rs.base() != NULL, "Must be");
+ assert(rs.size() == size, "Must be");
+
+ if (rs.special()) {
+ small_page_write(rs.base(), size);
+ }
+
+ release_memory_for_test(rs);
+ }
+
+ static void test_reserved_space3(size_t size, size_t alignment, bool maybe_large) {
+ test_log("test_reserved_space3(%p, %p, %d)",
+ (void*)(uintptr_t)size, (void*)(uintptr_t)alignment, maybe_large);
+
+ assert(is_size_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned");
+ assert(is_size_aligned(size, alignment), "Must be at least aligned against alignment");
+
+ bool large = maybe_large && UseLargePages && size >= os::large_page_size();
+
+ ReservedSpace rs(size, alignment, large, false);
+
+ test_log(" rs.special() == %d", rs.special());
+
+ assert(rs.base() != NULL, "Must be");
+ assert(rs.size() == size, "Must be");
+
+ if (rs.special()) {
+ small_page_write(rs.base(), size);
+ }
+
+ release_memory_for_test(rs);
+ }
+
+
+ static void test_reserved_space1() {
+ size_t size = 2 * 1024 * 1024;
+ size_t ag = os::vm_allocation_granularity();
+
+ test_reserved_space1(size, ag);
+ test_reserved_space1(size * 2, ag);
+ test_reserved_space1(size * 10, ag);
+ }
+
+ static void test_reserved_space2() {
+ size_t size = 2 * 1024 * 1024;
+ size_t ag = os::vm_allocation_granularity();
+
+ test_reserved_space2(size * 1);
+ test_reserved_space2(size * 2);
+ test_reserved_space2(size * 10);
+ test_reserved_space2(ag);
+ test_reserved_space2(size - ag);
+ test_reserved_space2(size);
+ test_reserved_space2(size + ag);
+ test_reserved_space2(size * 2);
+ test_reserved_space2(size * 2 - ag);
+ test_reserved_space2(size * 2 + ag);
+ test_reserved_space2(size * 3);
+ test_reserved_space2(size * 3 - ag);
+ test_reserved_space2(size * 3 + ag);
+ test_reserved_space2(size * 10);
+ test_reserved_space2(size * 10 + size / 2);
+ }
+
+ static void test_reserved_space3() {
+ size_t ag = os::vm_allocation_granularity();
+
+ test_reserved_space3(ag, ag , false);
+ test_reserved_space3(ag * 2, ag , false);
+ test_reserved_space3(ag * 3, ag , false);
+ test_reserved_space3(ag * 2, ag * 2, false);
+ test_reserved_space3(ag * 4, ag * 2, false);
+ test_reserved_space3(ag * 8, ag * 2, false);
+ test_reserved_space3(ag * 4, ag * 4, false);
+ test_reserved_space3(ag * 8, ag * 4, false);
+ test_reserved_space3(ag * 16, ag * 4, false);
+
+ if (UseLargePages) {
+ size_t lp = os::large_page_size();
+
+ // Without large pages
+ test_reserved_space3(lp, ag * 4, false);
+ test_reserved_space3(lp * 2, ag * 4, false);
+ test_reserved_space3(lp * 4, ag * 4, false);
+ test_reserved_space3(lp, lp , false);
+ test_reserved_space3(lp * 2, lp , false);
+ test_reserved_space3(lp * 3, lp , false);
+ test_reserved_space3(lp * 2, lp * 2, false);
+ test_reserved_space3(lp * 4, lp * 2, false);
+ test_reserved_space3(lp * 8, lp * 2, false);
+
+ // With large pages
+ test_reserved_space3(lp, ag * 4 , true);
+ test_reserved_space3(lp * 2, ag * 4, true);
+ test_reserved_space3(lp * 4, ag * 4, true);
+ test_reserved_space3(lp, lp , true);
+ test_reserved_space3(lp * 2, lp , true);
+ test_reserved_space3(lp * 3, lp , true);
+ test_reserved_space3(lp * 2, lp * 2, true);
+ test_reserved_space3(lp * 4, lp * 2, true);
+ test_reserved_space3(lp * 8, lp * 2, true);
+ }
+ }
+
+ static void test_reserved_space() {
+ test_reserved_space1();
+ test_reserved_space2();
+ test_reserved_space3();
+ }
+};
+
+void TestReservedSpace_test() {
+ TestReservedSpace::test_reserved_space();
+}
+
+#endif // PRODUCT
+
#endif
--- a/hotspot/src/share/vm/runtime/virtualspace.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/runtime/virtualspace.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -53,6 +53,7 @@
public:
// Constructor
+ ReservedSpace();
ReservedSpace(size_t size);
ReservedSpace(size_t size, size_t alignment, bool large,
char* requested_address = NULL,
--- a/hotspot/src/share/vm/services/management.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/services/management.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -876,8 +876,6 @@
total_used += u.used();
total_committed += u.committed();
- // if any one of the memory pool has undefined init_size or max_size,
- // set it to -1
if (u.init_size() == (size_t)-1) {
has_undefined_init_size = true;
}
@@ -894,6 +892,15 @@
}
}
+ // if any one of the memory pool has undefined init_size or max_size,
+ // set it to -1
+ if (has_undefined_init_size) {
+ total_init = (size_t)-1;
+ }
+ if (has_undefined_max_size) {
+ total_max = (size_t)-1;
+ }
+
MemoryUsage usage((heap ? InitialHeapSize : total_init),
total_used,
total_committed,
--- a/hotspot/src/share/vm/services/memRecorder.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/services/memRecorder.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -53,13 +53,13 @@
}
}
- void* operator new(size_t size, const std::nothrow_t& nothrow_constant) {
+ void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() {
// the instance is part of memRecorder, needs to be tagged with 'otNMTRecorder'
// to avoid recursion
return os::malloc(size, (mtNMT | otNMTRecorder));
}
- void* operator new(size_t size) {
+ void* operator new(size_t size) throw() {
assert(false, "use nothrow version");
return NULL;
}
--- a/hotspot/src/share/vm/services/memTrackWorker.cpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/services/memTrackWorker.cpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -63,12 +63,12 @@
}
}
-void* MemTrackWorker::operator new(size_t size) {
+void* MemTrackWorker::operator new(size_t size) throw() {
assert(false, "use nothrow version");
return NULL;
}
-void* MemTrackWorker::operator new(size_t size, const std::nothrow_t& nothrow_constant) {
+void* MemTrackWorker::operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() {
return allocate(size, false, mtNMT);
}
--- a/hotspot/src/share/vm/services/memTrackWorker.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/services/memTrackWorker.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -90,8 +90,8 @@
public:
MemTrackWorker(MemSnapshot* snapshot);
~MemTrackWorker();
- _NOINLINE_ void* operator new(size_t size);
- _NOINLINE_ void* operator new(size_t size, const std::nothrow_t& nothrow_constant);
+ _NOINLINE_ void* operator new(size_t size) throw();
+ _NOINLINE_ void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw();
void start();
void run();
--- a/hotspot/src/share/vm/services/memTracker.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/services/memTracker.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -87,6 +87,8 @@
MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { }
static inline void record_virtual_memory_commit(address addr, size_t size,
address pc = 0, Thread* thread = NULL) { }
+ static inline void record_virtual_memory_release(address addr, size_t size,
+ Thread* thread = NULL) { }
static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
Thread* thread = NULL) { }
static inline Tracker get_realloc_tracker() { return _tkr; }
@@ -372,6 +374,13 @@
tkr.record(addr, size, flags, pc);
}
+ static inline void record_virtual_memory_release(address addr, size_t size,
+ Thread* thread = NULL) {
+ if (is_on()) {
+ Tracker tkr(Tracker::Release, thread);
+ tkr.record(addr, size);
+ }
+ }
// record memory type on virtual memory base address
static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
--- a/hotspot/src/share/vm/utilities/array.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/utilities/array.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -317,7 +317,7 @@
Array(const Array<T>&);
void operator=(const Array<T>&);
- void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) {
+ void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
size_t word_size = Array::size(length);
return (void*) Metaspace::allocate(loader_data, word_size, read_only,
MetaspaceObj::array_type(sizeof(T)), CHECK_NULL);
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp Fri Sep 06 14:20:58 2013 -0700
@@ -402,6 +402,14 @@
#define align_size_up_(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1))
+inline bool is_size_aligned(size_t size, size_t alignment) {
+ return align_size_up_(size, alignment) == size;
+}
+
+inline bool is_ptr_aligned(void* ptr, size_t alignment) {
+ return align_size_up_((intptr_t)ptr, (intptr_t)alignment) == (intptr_t)ptr;
+}
+
inline intptr_t align_size_up(intptr_t size, intptr_t alignment) {
return align_size_up_(size, alignment);
}
@@ -414,6 +422,14 @@
#define is_size_aligned_(size, alignment) ((size) == (align_size_up_(size, alignment)))
+inline void* align_ptr_up(void* ptr, size_t alignment) {
+ return (void*)align_size_up((intptr_t)ptr, (intptr_t)alignment);
+}
+
+inline void* align_ptr_down(void* ptr, size_t alignment) {
+ return (void*)align_size_down((intptr_t)ptr, (intptr_t)alignment);
+}
+
// Align objects by rounding up their size, in HeapWord units.
#define align_object_size_(size) align_size_up_(size, MinObjAlignment)
--- a/hotspot/test/TEST.ROOT Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/TEST.ROOT Fri Sep 06 14:20:58 2013 -0700
@@ -25,7 +25,8 @@
# This file identifies the root of the test-suite hierarchy.
# It also contains test-suite configuration information.
-# DO NOT EDIT without first contacting hotspot-regtest@sun.com
# The list of keywords supported in this test suite
keys=cte_test jcmd nmt regression gc
+
+groups=TEST.groups [closed/TEST.groups]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/TEST.groups Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,192 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Profile-based Test Group Definitions
+#
+# These groups define the tests that cover the different possible runtimes:
+# - compact1, compact2, compact3, full JRE, JDK
+#
+# In addition they support testing of the minimal VM on compact1 and compact2.
+# Essentially this defines groups based around the specified API's and VM
+# services available in the runtime.
+#
+# The groups are defined hierarchically in two forms:
+# - The need_xxx groups list all the tests that have a dependency on
+# a specific profile. This is either because it tests a feature in
+# that profile, or the test infrastructure uses a feature in that
+# profile.
+# - The primary groups are defined in terms of the other primary groups
+# combined with the needs_xxx groups (including and excluding them as
+# appropriate). For example the jre can run all tests from compact3, plus
+# those from needs_jre, but excluding those from need_jdk.
+#
+# The bottom group defines all the actual tests to be considered, simply
+# by listing the top-level test directories.
+#
+# To use a group simply list it on the jtreg command line eg:
+# jtreg :jdk
+# runs all tests. While
+# jtreg :compact2
+# runs those tests that only require compact1 and compact2 API's.
+#
+
+# Full JDK can run all tests
+#
+jdk = \
+ :jre \
+ :needs_jdk
+
+# Tests that require a full JDK to execute. Either they test a feature
+# only in the JDK or they use tools that are only in the JDK. The latter
+# can be resolved in some cases by using tools from the compile-jdk.
+#
+needs_jdk = \
+ gc/TestG1ZeroPGCTJcmdThreadPrint.java \
+ gc/metaspace/ClassMetaspaceSizeInJmapHeap.java \
+ gc/metaspace/TestMetaspacePerfCounters.java \
+ runtime/6819213/TestBootNativeLibraryPath.java \
+ runtime/6878713/Test6878713.sh \
+ runtime/6925573/SortMethodsTest.java \
+ runtime/7107135/Test7107135.sh \
+ runtime/7158988/FieldMonitor.java \
+ runtime/7194254/Test7194254.java \
+ runtime/jsig/Test8017498.sh \
+ runtime/Metaspace/FragmentMetaspace.java \
+ runtime/NMT/BaselineWithParameter.java \
+ runtime/NMT/JcmdScale.java \
+ runtime/NMT/JcmdWithNMTDisabled.java \
+ runtime/NMT/MallocTestType.java \
+ runtime/NMT/ReleaseCommittedMemory.java \
+ runtime/NMT/ShutdownTwice.java \
+ runtime/NMT/SummaryAfterShutdown.java \
+ runtime/NMT/SummarySanityCheck.java \
+ runtime/NMT/ThreadedMallocTestType.java \
+ runtime/NMT/ThreadedVirtualAllocTestType.java \
+ runtime/NMT/VirtualAllocTestType.java \
+ runtime/RedefineObject/TestRedefineObject.java \
+ serviceability/attach/AttachWithStalePidFile.java
+
+# JRE adds further tests to compact3
+#
+jre = \
+ :compact3 \
+ :needs_jre \
+ -:needs_jdk
+
+# Tests that require the full JRE
+#
+needs_jre = \
+ compiler/6852078/Test6852078.java \
+ compiler/7047069/Test7047069.java \
+ runtime/6294277/SourceDebugExtension.java
+
+# Compact 3 adds further tests to compact2
+#
+compact3 = \
+ :compact2 \
+ :needs_compact3 \
+ -:needs_jre \
+ -:needs_jdk
+
+
+# Tests that require compact3 API's
+#
+needs_compact3 = \
+ compiler/whitebox/DeoptimizeMethodTest.java \
+ compiler/whitebox/SetForceInlineMethodTest.java \
+ compiler/whitebox/SetDontInlineMethodTest.java \
+ compiler/whitebox/DeoptimizeAllTest.java \
+ compiler/whitebox/MakeMethodNotCompilableTest.java \
+ compiler/whitebox/ClearMethodStateTest.java \
+ compiler/whitebox/EnqueueMethodForCompilationTest.java \
+ compiler/whitebox/IsMethodCompilableTest.java \
+ gc/6581734/Test6581734.java \
+ gc/7072527/TestFullGCCount.java \
+ gc/7168848/HumongousAlloc.java \
+ gc/arguments/TestG1HeapRegionSize.java \
+ gc/metaspace/TestMetaspaceMemoryPool.java \
+ runtime/InternalApi/ThreadCpuTimesDeadlock.java \
+ serviceability/threads/TestFalseDeadLock.java
+
+# Compact 2 adds full VM tests
+compact2 = \
+ :compact2_minimal \
+ :compact1 \
+ :needs_full_vm_compact2 \
+ -:needs_compact3 \
+ -:needs_jre \
+ -:needs_jdk
+
+# Tests that require compact2 API's and a full VM
+#
+needs_full_vm_compact2 =
+
+# Compact 1 adds full VM tests
+#
+compact1 = \
+ :compact1_minimal \
+ :needs_full_vm_compact1 \
+ -:needs_compact2 \
+ -:needs_full_vm_compact2 \
+ -:needs_compact3 \
+ -:needs_jre \
+ -:needs_jdk
+
+# Tests that require compact1 API's and a full VM
+#
+needs_full_vm_compact1 = \
+ runtime/NMT \
+ gc/g1/TestRegionAlignment.java \
+ gc/g1/TestShrinkToOneRegion.java \
+ gc/metaspace/G1AddMetaspaceDependency.java \
+ runtime/6929067/Test6929067.sh
+
+# Minimal VM on Compact 2 adds in some compact2 tests
+#
+compact2_minimal = \
+ :compact1_minimal \
+ :needs_compact2 \
+ -:needs_full_vm_compact2 \
+ -:needs_compact3 \
+ -:needs_jre \
+ -:needs_jdk
+
+# Tests that require compact2 API's
+#
+needs_compact2 = \
+ compiler/6589834/Test_ia32.java
+
+# All tests that run on the most minimal configuration: Minimal VM on Compact 1
+compact1_minimal = \
+ serviceability/ \
+ compiler/ \
+ testlibrary/ \
+ sanity/ \
+ runtime/ \
+ gc/ \
+ -:needs_full_vm_compact1 \
+ -:needs_full_vm_compact2 \
+ -:needs_compact2 \
+ -:needs_compact3 \
+ -:needs_jre \
+ -:needs_jdk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/8004051/Test8004051.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8004051
+ * @bug 8005722
+ * @summary assert(_oprs_len[mode] < maxNumberOfOperands) failed: array overflow
+ *
+ * @run main/othervm -Xcomp -client Test8004051
+ */
+
+public class Test8004051 {
+ public static void main(String[] argv) {
+ Object o = new Object();
+ fillPrimRect(1.1f, 1.2f, 1.3f, 1.4f,
+ o, o,
+ 1.5f, 1.6f, 1.7f, 1.8f,
+ 2.0f, 2.1f, 2.2f, 2.3f,
+ 2.4f, 2.5f, 2.6f, 2.7f,
+ 100, 101);
+ System.out.println("Test passed, test did not assert");
+ }
+
+ static boolean fillPrimRect(float x, float y, float w, float h,
+ Object rectTex, Object wrapTex,
+ float bx, float by, float bw, float bh,
+ float f1, float f2, float f3, float f4,
+ float f5, float f6, float f7, float f8,
+ int i1, int i2 ) {
+ System.out.println(x + " " + y + " " + w + " " + h + " " +
+ bx + " " + by + " " + bw + " " + bh);
+ return true;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/gcbarriers/G1CrashTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8023472
+ * @summary C2 optimization breaks with G1
+ *
+ * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -Dcount=100000 G1CrashTest
+ *
+ * @author pbiswal@palantir.com
+ */
+
+public class G1CrashTest {
+ static Object[] set = new Object[11];
+
+ public static void main(String[] args) throws InterruptedException {
+ for (int j = 0; j < Integer.getInteger("count"); j++) {
+ Object key = new Object();
+ insertKey(key);
+ if (j > set.length / 2) {
+ Object[] oldKeys = set;
+ set = new Object[2 * set.length - 1];
+ for (Object o : oldKeys) {
+ if (o != null)
+ insertKey(o);
+ }
+ }
+ }
+ }
+
+ static void insertKey(Object key) {
+ int hash = key.hashCode() & 0x7fffffff;
+ int index = hash % set.length;
+ Object cur = set[index];
+ if (cur == null)
+ set[index] = key;
+ else
+ insertKeyRehash(key, index, hash, cur);
+ }
+
+ static void insertKeyRehash(Object key, int index, int hash, Object cur) {
+ int loopIndex = index;
+ int firstRemoved = -1;
+ do {
+ if (cur == "dead")
+ firstRemoved = 1;
+ index--;
+ if (index < 0)
+ index += set.length;
+ cur = set[index];
+ if (cur == null) {
+ if (firstRemoved != -1)
+ set[firstRemoved] = "dead";
+ else
+ set[index] = key;
+ return;
+ }
+ } while (index != loopIndex);
+ if (firstRemoved != -1)
+ set[firstRemoved] = null;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8022595
+ * @summary JSR292: deadlock during class loading of MethodHandles, MethodHandleImpl & MethodHandleNatives
+ *
+ * @run main/othervm ConcurrentClassLoadingTest
+ */
+import java.util.*;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
+
+public class ConcurrentClassLoadingTest {
+ int numThreads = 0;
+ long seed = 0;
+ CyclicBarrier l;
+ Random rand;
+
+ public static void main(String[] args) throws Throwable {
+ ConcurrentClassLoadingTest test = new ConcurrentClassLoadingTest();
+ test.parseArgs(args);
+ test.run();
+ }
+
+ void parseArgs(String[] args) {
+ int i = 0;
+ while (i < args.length) {
+ String flag = args[i];
+ switch(flag) {
+ case "-seed":
+ seed = Long.parseLong(args[++i]);
+ break;
+ case "-numThreads":
+ numThreads = Integer.parseInt(args[++i]);
+ break;
+ default:
+ throw new Error("Unknown flag: " + flag);
+ }
+ ++i;
+ }
+ }
+
+ void init() {
+ if (numThreads == 0) {
+ numThreads = Runtime.getRuntime().availableProcessors();
+ }
+
+ if (seed == 0) {
+ seed = (new Random()).nextLong();
+ }
+ rand = new Random(seed);
+
+ l = new CyclicBarrier(numThreads + 1);
+
+ System.out.printf("Threads: %d\n", numThreads);
+ System.out.printf("Seed: %d\n", seed);
+ }
+
+ final List<Loader> loaders = new ArrayList<>();
+
+ void prepare() {
+ List<String> c = new ArrayList<>(Arrays.asList(classNames));
+
+ // Split classes between loading threads
+ int count = (classNames.length / numThreads) + 1;
+ for (int t = 0; t < numThreads; t++) {
+ List<String> sel = new ArrayList<>();
+
+ System.out.printf("Thread #%d:\n", t);
+ for (int i = 0; i < count; i++) {
+ if (c.size() == 0) break;
+
+ int k = rand.nextInt(c.size());
+ String elem = c.remove(k);
+ sel.add(elem);
+ System.out.printf("\t%s\n", elem);
+ }
+ loaders.add(new Loader(sel));
+ }
+
+ // Print diagnostic info when the test hangs
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+ public void run() {
+ boolean alive = false;
+ for (Loader l : loaders) {
+ if (!l.isAlive()) continue;
+
+ if (!alive) {
+ System.out.println("Some threads are still alive:");
+ alive = true;
+ }
+
+ System.out.println(l.getName());
+ for (StackTraceElement elem : l.getStackTrace()) {
+ System.out.println("\t"+elem.toString());
+ }
+ }
+ }
+ });
+ }
+
+ public void run() throws Throwable {
+ init();
+ prepare();
+
+ for (Loader loader : loaders) {
+ loader.start();
+ }
+
+ l.await();
+
+ for (Loader loader : loaders) {
+ loader.join();
+ }
+ }
+
+ class Loader extends Thread {
+ List<String> classes;
+
+ public Loader(List<String> classes) {
+ this.classes = classes;
+ setDaemon(true);
+ }
+
+ @Override
+ public void run() {
+ try {
+ l.await();
+
+ for (String name : classes) {
+ Class.forName(name).getName();
+ }
+ } catch (ClassNotFoundException | BrokenBarrierException | InterruptedException e) {
+ throw new Error(e);
+ }
+ }
+ }
+
+ final static String[] classNames = {
+ "java.lang.invoke.AbstractValidatingLambdaMetafactory",
+ "java.lang.invoke.BoundMethodHandle",
+ "java.lang.invoke.CallSite",
+ "java.lang.invoke.ConstantCallSite",
+ "java.lang.invoke.DirectMethodHandle",
+ "java.lang.invoke.InnerClassLambdaMetafactory",
+ "java.lang.invoke.InvokeDynamic",
+ "java.lang.invoke.InvokeGeneric",
+ "java.lang.invoke.InvokerBytecodeGenerator",
+ "java.lang.invoke.Invokers",
+ "java.lang.invoke.LambdaConversionException",
+ "java.lang.invoke.LambdaForm",
+ "java.lang.invoke.LambdaMetafactory",
+ "java.lang.invoke.MagicLambdaImpl",
+ "java.lang.invoke.MemberName",
+ "java.lang.invoke.MethodHandle",
+ "java.lang.invoke.MethodHandleImpl",
+ "java.lang.invoke.MethodHandleInfo",
+ "java.lang.invoke.MethodHandleNatives",
+ "java.lang.invoke.MethodHandleProxies",
+ "java.lang.invoke.MethodHandles",
+ "java.lang.invoke.MethodHandleStatics",
+ "java.lang.invoke.MethodType",
+ "java.lang.invoke.MethodTypeForm",
+ "java.lang.invoke.MutableCallSite",
+ "java.lang.invoke.SerializedLambda",
+ "java.lang.invoke.SimpleMethodHandle",
+ "java.lang.invoke.SwitchPoint",
+ "java.lang.invoke.TypeConvertingMethodAdapter",
+ "java.lang.invoke.VolatileCallSite",
+ "java.lang.invoke.WrongMethodTypeException"
+ };
+}
--- a/hotspot/test/runtime/7051189/Xchecksig.sh Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-# @test Xchecksig.sh
-# @bug 7051189
-# @summary Need to suppress info message if -xcheck:jni used with libjsig.so
-# @run shell Xchecksig.sh
-#
-
-if [ "${TESTSRC}" = "" ]
-then
- TESTSRC=${PWD}
- echo "TESTSRC not set. Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../test_env.sh
-
-OS=`uname -s`
-case "$OS" in
- Windows_* | CYGWIN_* )
- printf "Not testing libjsig.so on Windows. PASSED.\n "
- exit 0
- ;;
-esac
-
-JAVA=${TESTJAVA}${FS}bin${FS}java
-
-# LD_PRELOAD arch needs to match the binary we run, so run the java
-# 64-bit binary directly if we are testing 64-bit (bin/ARCH/java).
-# Check if TESTVMOPS contains -d64, but cannot use
-# java ${TESTVMOPS} to run "java -d64" with LD_PRELOAD.
-
-if [ ${OS} -eq "SunOS" ]
-then
- printf "SunOS test TESTVMOPTS = ${TESTVMOPTS}"
- printf ${TESTVMOPTS} | grep d64 > /dev/null
- if [ $? -eq 0 ]
- then
- printf "SunOS 64-bit test\n"
- BIT_FLAG=-d64
- fi
-fi
-
-ARCH=`uname -p`
-case $ARCH in
- i386)
- if [ X${BIT_FLAG} != "X" ]
- then
- ARCH=amd64
- JAVA=${TESTJAVA}${FS}bin${FS}${ARCH}${FS}java
- fi
- ;;
- sparc)
- if [ X${BIT_FLAG} != "X" ]
- then
- ARCH=sparcv9
- JAVA=${TESTJAVA}${FS}bin${FS}${ARCH}${FS}java
- fi
- ;;
- * )
- printf "Not testing architecture $ARCH, skipping test.\n"
- exit 0
- ;;
-esac
-
-LIBJSIG=${COMPILEJAVA}${FS}jre${FS}lib${FS}${ARCH}${FS}libjsig.so
-
-# If libjsig and binary do not match, skip test.
-
-A=`file ${LIBJSIG} | awk '{ print $3 }'`
-B=`file ${JAVA} | awk '{ print $3 }'`
-
-if [ $A -ne $B ]
-then
- printf "Mismatching binary and library to preload, skipping test.\n"
- exit 0
-fi
-
-if [ ! -f ${LIBJSIG} ]
-then
- printf "Skipping test: libjsig missing for given architecture: ${LIBJSIG}\n"
- exit 0
-fi
-# Use java -version to test, java version info appears on stderr,
-# the libjsig message we are removing appears on stdout.
-
-# grep returns zero meaning found, non-zero means not found:
-
-LD_PRELOAD=${LIBJSIG} ${JAVA} ${TESTVMOPTS} -Xcheck:jni -version 2>&1 | grep "libjsig is activated"
-if [ $? -eq 0 ]; then
- printf "Failed: -Xcheck:jni prints message when libjsig.so is loaded.\n"
- exit 1
-fi
-
-
-LD_PRELOAD=${LIBJSIG} ${JAVA} ${TESTVMOPTS} -Xcheck:jni -verbose:jni -version 2>&1 | grep "libjsig is activated"
-if [ $? != 0 ]; then
- printf "Failed: -Xcheck:jni does not print message when libjsig.so is loaded and -verbose:jni is set.\n"
- exit 1
-fi
-
-printf "PASSED\n"
-exit 0
-
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java Fri Sep 06 14:20:58 2013 -0700
@@ -51,9 +51,8 @@
output.shouldHaveExitValue(0);
} catch (RuntimeException e) {
- // Report 'passed' if CDS was turned off because we could not allocate
- // the klass metaspace at an address that would work with CDS.
- output.shouldContain("Could not allocate metaspace at a compatible address");
+ // Report 'passed' if CDS was turned off.
+ output.shouldContain("Unable to use shared archive");
output.shouldHaveExitValue(1);
}
}
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java Fri Sep 06 14:20:58 2013 -0700
@@ -69,7 +69,7 @@
"-server", "-Xshare:on", "-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./sample.jsa", "-version");
output = new OutputAnalyzer(pb.start());
- output.shouldContain("Could not allocate metaspace at a compatible address");
+ output.shouldContain("Unable to use shared archive");
output.shouldHaveExitValue(1);
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/InitialThreadOverflow/DoOverflow.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+public class DoOverflow {
+
+ static int count;
+
+ public void overflow() {
+ count+=1;
+ overflow();
+ }
+
+ public static void printIt() {
+ System.out.println("Going to overflow stack");
+ try {
+ new DoOverflow().overflow();
+ } catch(java.lang.StackOverflowError e) {
+ System.out.println("Overflow OK " + count);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/InitialThreadOverflow/invoke.cxx Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <assert.h>
+#include <jni.h>
+
+#include <pthread.h>
+
+JavaVM* jvm;
+
+void *
+floobydust (void *p) {
+ JNIEnv *env;
+
+ jvm->AttachCurrentThread((void**)&env, NULL);
+
+ jclass class_id = env->FindClass ("DoOverflow");
+ assert (class_id);
+
+ jmethodID method_id = env->GetStaticMethodID(class_id, "printIt", "()V");
+ assert (method_id);
+
+ env->CallStaticVoidMethod(class_id, method_id, NULL);
+
+ jvm->DetachCurrentThread();
+}
+
+int
+main (int argc, const char** argv) {
+ JavaVMOption options[1];
+ options[0].optionString = (char*) "-Xss320k";
+
+ JavaVMInitArgs vm_args;
+ vm_args.version = JNI_VERSION_1_2;
+ vm_args.ignoreUnrecognized = JNI_TRUE;
+ vm_args.options = options;
+ vm_args.nOptions = 1;
+
+ JNIEnv* env;
+ jint result = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
+ assert(result >= 0);
+
+ pthread_t thr;
+ pthread_create(&thr, NULL, floobydust, NULL);
+ pthread_join(thr, NULL);
+
+ floobydust(NULL);
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/InitialThreadOverflow/testme.sh Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+
+# @test testme.sh
+# @bug 8009062
+# @summary Poor performance of JNI AttachCurrentThread after fix for 7017193
+# @compile DoOverflow.java
+# @run shell testme.sh
+
+set -x
+if [ "${TESTSRC}" = "" ]
+then
+ TESTSRC=${PWD}
+ echo "TESTSRC not set. Using "${TESTSRC}" as default"
+fi
+echo "TESTSRC=${TESTSRC}"
+## Adding common setup Variables for running shell tests.
+. ${TESTSRC}/../../test_env.sh
+
+if [ "${VM_OS}" != "linux" ]
+then
+ echo "Test only valid for Linux"
+ exit 0
+fi
+
+gcc_cmd=`which gcc`
+if [ "x$gcc_cmd" == "x" ]; then
+ echo "WARNING: gcc not found. Cannot execute test." 2>&1
+ exit 0;
+fi
+
+CFLAGS="-m${VM_BITS}"
+
+LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH
+
+cp ${TESTSRC}${FS}invoke.cxx .
+
+# Copy the result of our @compile action:
+cp ${TESTCLASSES}${FS}DoOverflow.class .
+
+echo "Compilation flag: ${COMP_FLAG}"
+# Note pthread may not be found thus invoke creation will fail to be created.
+# Check to ensure you have a /usr/lib/libpthread.so if you don't please look
+# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.
+
+$gcc_cmd -DLINUX ${CFLAGS} -o invoke \
+ -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
+ -L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \
+ -ljvm -lpthread invoke.cxx
+
+./invoke
+exit $?
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/LoadClass/LoadClassNegative.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @key regression
+ * @bug 8020675
+ * @summary make sure there is no fatal error if a class is loaded from an invalid jar file which is in the bootclasspath
+ * @library /testlibrary
+ * @build TestForName
+ * @build LoadClassNegative
+ * @run main LoadClassNegative
+ */
+
+import java.io.File;
+import com.oracle.java.testlibrary.*;
+
+public class LoadClassNegative {
+
+ public static void main(String args[]) throws Exception {
+ String bootCP = "-Xbootclasspath/a:" + System.getProperty("test.src")
+ + File.separator + "dummy.jar";
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+ bootCP,
+ "TestForName");
+
+ OutputAnalyzer output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ClassNotFoundException");
+ output.shouldHaveExitValue(0);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/LoadClass/TestForName.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+public class TestForName {
+ public static void main(String[] args) {
+ try {
+ Class cls = Class.forName("xxx");
+ System.out.println("Class = " + cls.getName());
+ } catch (ClassNotFoundException cnfe) {
+ cnfe.printStackTrace();
+ }
+ }
+}
--- a/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java Fri Sep 06 14:20:58 2013 -0700
@@ -45,6 +45,13 @@
String pid = Integer.toString(ProcessTools.getProcessId());
ProcessBuilder pb = new ProcessBuilder();
+ boolean has_nmt_detail = wb.NMTIsDetailSupported();
+ if (has_nmt_detail) {
+ System.out.println("NMT detail support detected.");
+ } else {
+ System.out.println("NMT detail support not detected.");
+ }
+
Thread reserveThread = new Thread() {
public void run() {
addr = wb.NMTReserveMemory(reserveSize);
@@ -58,7 +65,9 @@
pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "detail"});
output = new OutputAnalyzer(pb.start());
output.shouldContain("Test (reserved=512KB, committed=0KB)");
- output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 512KB for Test");
+ if (has_nmt_detail) {
+ output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 512KB for Test");
+ }
Thread commitThread = new Thread() {
public void run() {
@@ -72,7 +81,9 @@
output = new OutputAnalyzer(pb.start());
output.shouldContain("Test (reserved=512KB, committed=128KB)");
- output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB");
+ if (has_nmt_detail) {
+ output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB");
+ }
Thread uncommitThread = new Thread() {
public void run() {
--- a/hotspot/test/runtime/NMT/VirtualAllocTestType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/runtime/NMT/VirtualAllocTestType.java Fri Sep 06 14:20:58 2013 -0700
@@ -46,13 +46,22 @@
String pid = Integer.toString(ProcessTools.getProcessId());
ProcessBuilder pb = new ProcessBuilder();
+ boolean has_nmt_detail = wb.NMTIsDetailSupported();
+ if (has_nmt_detail) {
+ System.out.println("NMT detail support detected.");
+ } else {
+ System.out.println("NMT detail support not detected.");
+ }
+
addr = wb.NMTReserveMemory(reserveSize);
mergeData();
+ pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "detail"});
- pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "detail"});
output = new OutputAnalyzer(pb.start());
output.shouldContain("Test (reserved=256KB, committed=0KB)");
- output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 256KB for Test");
+ if (has_nmt_detail) {
+ output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 256KB for Test");
+ }
wb.NMTCommitMemory(addr, commitSize);
@@ -60,7 +69,9 @@
output = new OutputAnalyzer(pb.start());
output.shouldContain("Test (reserved=256KB, committed=128KB)");
- output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB");
+ if (has_nmt_detail) {
+ output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB");
+ }
wb.NMTUncommitMemory(addr, commitSize);
@@ -71,7 +82,6 @@
output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed");
wb.NMTReleaseMemory(addr, reserveSize);
-
mergeData();
output = new OutputAnalyzer(pb.start());
--- a/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java Fri Sep 06 14:20:58 2013 -0700
@@ -84,7 +84,7 @@
// there is a chance such reservation will fail
// If it does, it is NOT considered a failure of the feature,
// rather a possible expected outcome, though not likely
- output.shouldContain("Could not allocate metaspace at a compatible address");
+ output.shouldContain("Unable to use shared archive");
output.shouldHaveExitValue(1);
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/XCheckJniJsig/XCheckJSig.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7051189 8023393
+ * @summary Need to suppress info message if -Xcheck:jni is used with libjsig.so
+ * @library /testlibrary
+ * @run main XCheckJSig
+ */
+
+import java.util.*;
+import com.oracle.java.testlibrary.*;
+
+public class XCheckJSig {
+ public static void main(String args[]) throws Throwable {
+
+ System.out.println("Regression test for bugs 7051189 and 8023393");
+ if (!Platform.isSolaris() && !Platform.isLinux() && !Platform.isOSX()) {
+ System.out.println("Test only applicable on Solaris, Linux, and Mac OSX, skipping");
+ return;
+ }
+
+ String jdk_path = System.getProperty("test.jdk");
+ String os_arch = Platform.getOsArch();
+ String libjsig;
+ String env_var;
+ if (Platform.isOSX()) {
+ libjsig = jdk_path + "/jre/lib/server/libjsig.dylib";
+ env_var = "DYLD_INSERT_LIBRARIES";
+ } else {
+ libjsig = jdk_path + "/jre/lib/" + os_arch + "/libjsig.so";
+ env_var = "LD_PRELOAD";
+ }
+ String java_program;
+ if (Platform.isSolaris()) {
+ // On Solaris, need to call the 64-bit Java directly in order for
+ // LD_PRELOAD to work because libjsig.so is 64-bit.
+ java_program = jdk_path + "/jre/bin/" + os_arch + "/java";
+ } else {
+ java_program = JDKToolFinder.getJDKTool("java");
+ }
+ // If this test fails, these might be useful to know.
+ System.out.println("libjsig: " + libjsig);
+ System.out.println("osArch: " + os_arch);
+ System.out.println("java_program: " + java_program);
+
+ ProcessBuilder pb = new ProcessBuilder(java_program, "-Xcheck:jni", "-version");
+ Map<String, String> env = pb.environment();
+ env.put(env_var, libjsig);
+ OutputAnalyzer output = new OutputAnalyzer(pb.start());
+ output.shouldNotContain("libjsig is activated");
+ output.shouldHaveExitValue(0);
+
+ pb = new ProcessBuilder(java_program, "-Xcheck:jni", "-verbose:jni", "-version");
+ env = pb.environment();
+ env.put(env_var, libjsig);
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("libjsig is activated");
+ output.shouldHaveExitValue(0);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/contended/Options.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.oracle.java.testlibrary.*;
+
+/*
+ * @test
+ * @bug 8006997
+ * @summary ContendedPaddingWidth should be range-checked
+ *
+ * @library /testlibrary
+ * @run main Options
+ */
+public class Options {
+
+ public static void main(String[] args) throws Exception {
+ ProcessBuilder pb;
+ OutputAnalyzer output;
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-128", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be in between");
+ output.shouldHaveExitValue(1);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-8", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be in between");
+ output.shouldHaveExitValue(1);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-1", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be in between");
+ output.shouldContain("must be a multiple of 8");
+ output.shouldHaveExitValue(1);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=0", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldHaveExitValue(0);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=1", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be a multiple of 8");
+ output.shouldHaveExitValue(1);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=8", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldHaveExitValue(0);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=8184", "-version"); // 8192-8 = 8184
+ output = new OutputAnalyzer(pb.start());
+ output.shouldHaveExitValue(0);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=8191", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be a multiple of 8");
+ output.shouldHaveExitValue(1);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=8192", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldHaveExitValue(0);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=8193", "-version");
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be in between");
+ output.shouldContain("must be a multiple of 8");
+ output.shouldHaveExitValue(1);
+
+ pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=8200", "-version"); // 8192+8 = 8200
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("ContendedPaddingWidth");
+ output.shouldContain("must be in between");
+ output.shouldHaveExitValue(1);
+
+ }
+
+}
+
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Wed Sep 04 19:58:16 2013 +0530
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Fri Sep 06 14:20:58 2013 -0700
@@ -90,6 +90,7 @@
public native void NMTUncommitMemory(long addr, long size);
public native void NMTReleaseMemory(long addr, long size);
public native boolean NMTWaitForDataMerge();
+ public native boolean NMTIsDetailSupported();
// Compiler
public native void deoptimizeAll();
--- a/jaxp/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxp/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
7cffafa606e9fb865e7b5e6a56e0a681ce5cf617 jdk8-b102
b1ceab582fc6d795b20aaa8a3fde2eba34af9399 jdk8-b103
a22fe9bd01e6c7e7ddc7995dfc9471711692b8d1 jdk8-b104
+09a46ec11f880154886c70be03aff5ab2ddf0ab7 jdk8-b105
+d3be8e3b429df917e72c1c23e7920c651219b587 jdk8-b106
--- a/jaxws/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
988a5f2ac559dcab05698b8a8633aa453e012260 jdk8-b102
6cdc6ed987801c175a1217d0d3e53c3bd69ba52e jdk8-b103
42211ab0ab1cca51a050d184634cf1db7ef81fbf jdk8-b104
+88390df7ed2cf128298a02c5e6d978f0a603cd58 jdk8-b105
+6908370afe834ff01739e8ec992d4246c74b7e6e jdk8-b106
--- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -211,6 +211,7 @@
throw new ClassNotFoundException("Loaded outside a jar "+url);
url = url.substring(4); // cut off jar:
url = url.substring(0,url.lastIndexOf('!')); // cut off everything after '!'
+ url = url.replaceAll(" ", "%20"); // support white spaces in path
return new URL(url);
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, 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
@@ -47,5 +47,8 @@
public boolean self() default false;
public String providerName() default "";
public String moduleName() default "";
-
+ public boolean stateful() default false;
+ public String profileNames() default "";
+ public boolean statefulReturn() default false;
+ public boolean statefulException() default false;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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,7 +27,6 @@
package com.sun.org.glassfish.external.statistics.impl;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.Map;
import java.lang.reflect.*;
import com.sun.org.glassfish.external.statistics.AverageRangeStatistic;
@@ -139,6 +138,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ checkMethod(method);
+
Object result;
try {
result = method.invoke(this, args);
@@ -147,7 +148,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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,7 +27,6 @@
package com.sun.org.glassfish.external.statistics.impl;
import com.sun.org.glassfish.external.statistics.BoundaryStatistic;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.Map;
import java.lang.reflect.*;
@@ -81,6 +80,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ checkMethod(m);
+
Object result;
try {
result = m.invoke(this, args);
@@ -89,7 +90,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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
@@ -26,8 +26,8 @@
package com.sun.org.glassfish.external.statistics.impl;
+
import com.sun.org.glassfish.external.statistics.BoundedRangeStatistic;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.Map;
import java.lang.reflect.*;
@@ -145,6 +145,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ checkMethod(m);
+
Object result;
try {
result = m.invoke(this, args);
@@ -153,7 +155,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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
@@ -26,7 +26,6 @@
package com.sun.org.glassfish.external.statistics.impl;
import com.sun.org.glassfish.external.statistics.CountStatistic;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.Map;
import java.lang.reflect.*;
@@ -103,6 +102,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ checkMethod(m);
+
Object result;
try {
result = m.invoke(this, args);
@@ -111,7 +112,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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,7 +27,6 @@
package com.sun.org.glassfish.external.statistics.impl;
import com.sun.org.glassfish.external.statistics.RangeStatistic;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.Map;
import java.lang.reflect.*;
@@ -125,6 +124,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ checkMethod(m);
+
Object result;
try {
result = m.invoke(this, args);
@@ -133,7 +134,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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
@@ -26,8 +26,8 @@
package com.sun.org.glassfish.external.statistics.impl;
import com.sun.org.glassfish.external.statistics.Statistic;
-import java.io.Serializable;
-import java.util.concurrent.atomic.AtomicLong;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -133,4 +133,13 @@
protected static boolean isValidString(String str) {
return (str!=null && str.length()>0);
}
+
+ protected void checkMethod(Method method) {
+ if (method == null || method.getDeclaringClass() == null
+ || !Statistic.class.isAssignableFrom(method.getDeclaringClass())
+ || Modifier.isStatic(method.getModifiers())) {
+ throw new RuntimeException("Invalid method on invoke");
+ }
+ }
+
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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
@@ -90,6 +90,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ checkMethod(m);
+
Object result;
try {
result = m.invoke(this, args);
@@ -98,7 +100,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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
@@ -28,7 +28,6 @@
package com.sun.org.glassfish.external.statistics.impl;
import com.sun.org.glassfish.external.statistics.TimeStatistic;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.Map;
import java.lang.reflect.*;
@@ -145,6 +144,8 @@
// todo: equals implementation
public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
+ checkMethod(m);
+
Object result;
try {
result = m.invoke(this, args);
@@ -153,7 +154,6 @@
} catch (Exception e) {
throw new RuntimeException("unexpected invocation exception: " +
e.getMessage());
- } finally {
}
return result;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,10 @@
Non-existent directory: {0}
VERSION = \
- schemagen 2.2.8-b01
+ schemagen 2.2.8-b20130806.1801
FULLVERSION = \
- schemagen full version "2.2.8-b01"
+ schemagen full version "2.2.8-b20130806.1801"
USAGE = \
Usage: schemagen [-options ...] <java files> \n\
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b01"
+FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b20130806.1801"
USAGE = Verwendung: schemagen [-options ...] <java files> \nOptionen: \n\\ \\ \\ \\ -d <path> : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp <path> : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath <path> : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding <encoding> : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode <file> : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = Directorio no existente: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b01"
+FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b20130806.1801"
USAGE = Sintaxis: schemagen [-options ...] <archivos java> \nOpciones: \n\\ \\ \\ \\ -d <ruta de acceso> : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp <ruta de acceso> : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding <codificaci\u00F3n> : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode <archivo> : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b01"
+FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b20130806.1801"
USAGE = Syntaxe : schemagen [-options ...] <java files> \nOptions : \n\ \ \ \ -d <path> : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding <encoding> : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode <file> : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = Directory non esistente: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = versione completa schemagen "2.2.8-b01"
+FULLVERSION = versione completa schemagen "2.2.8-b20130806.1801"
USAGE = Uso: schemagen [-options ...] <java files> \nOpzioni: \n\ \ \ \ -d <path> : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp <path> : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath <path> : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding <encoding> : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode <file> : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b01"
+FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801"
USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] <java files> \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d <path> : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp <path> : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath <path> : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding <encoding> : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode <file> : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b01"
+FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801"
USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] <java files> \n\uC635\uC158: \n\ \ \ \ -d <path> : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp <path> : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath <path> : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding <encoding> : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode <file> : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0}
-VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b01
+VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b20130806.1801
-FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b01"
+FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b20130806.1801"
USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] <java files> \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d <path> : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp <path> : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath <path> : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding <encoding> : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode <file> : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b01"
+FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9009\u9879: \n\ \ \ \ -d <path> : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp <path> : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath <path> : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding <encoding> : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode <file> : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,8 @@
BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0}
-VERSION = schemagen 2.2.8-b01
+VERSION = schemagen 2.2.8-b20130806.1801
-FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b01"
+FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9078\u9805: \n\\ \\ \\ \\ -d <path> : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp <path> : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath <path> : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding <encoding> : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode <file> : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -64,6 +64,9 @@
* AttributeList} interface, it also includes a much more efficient
* implementation using a single array rather than a set of Vectors.</p>
*
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* @since SAX 2.0
* @author David Megginson,
* <a href="mailto:sax@megginson.com">sax@megginson.com</a>
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java Fri Sep 06 14:20:58 2013 -0700
@@ -33,7 +33,11 @@
import java.util.List;
import java.util.ArrayList;
-
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public class Classes extends NGCCHandler {
private String __text;
private String exclude_content;
@@ -78,17 +82,11 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 4:
+ case 12:
{
- $_ngcc_current_state = 3;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("includes"))) {
+ if(($__uri.equals("") && $__local.equals("classes"))) {
$runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 10;
+ $_ngcc_current_state = 11;
}
else {
unexpectedEnterElement($__qname);
@@ -107,22 +105,28 @@
}
}
break;
- case 0:
+ case 4:
{
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ $_ngcc_current_state = 3;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
- case 12:
+ case 11:
{
- if(($__uri.equals("") && $__local.equals("classes"))) {
+ if(($__uri.equals("") && $__local.equals("includes"))) {
$runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 11;
+ $_ngcc_current_state = 10;
}
else {
unexpectedEnterElement($__qname);
}
}
break;
+ case 0:
+ {
+ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -137,12 +141,29 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 4:
{
$_ngcc_current_state = 3;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 1:
+ {
+ if(($__uri.equals("") && $__local.equals("classes"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 3:
{
if(($__uri.equals("") && $__local.equals("excludes"))) {
@@ -154,15 +175,9 @@
}
}
break;
- case 1:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("classes"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
+ revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
}
break;
case 8:
@@ -176,17 +191,6 @@
}
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveElement($__qname);
@@ -201,18 +205,18 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 4:
{
$_ngcc_current_state = 3;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 0:
{
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
@@ -232,18 +236,18 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 4:
{
$_ngcc_current_state = 3;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 0:
{
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
@@ -260,6 +264,12 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
case 4:
{
exclude_content = $value;
@@ -267,6 +277,13 @@
action0();
}
break;
+ case 10:
+ {
+ __text = $value;
+ $_ngcc_current_state = 9;
+ action3();
+ }
+ break;
case 3:
{
exclude_content = $value;
@@ -274,6 +291,18 @@
action0();
}
break;
+ case 6:
+ {
+ __text = $value;
+ $_ngcc_current_state = 4;
+ action1();
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromText(this, super._cookie, $value);
+ }
+ break;
case 9:
{
include_content = $value;
@@ -281,20 +310,6 @@
action2();
}
break;
- case 10:
- {
- __text = $value;
- $_ngcc_current_state = 9;
- action3();
- }
- break;
- case 6:
- {
- __text = $value;
- $_ngcc_current_state = 4;
- action1();
- }
- break;
case 8:
{
include_content = $value;
@@ -302,17 +317,6 @@
action2();
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java Fri Sep 06 14:20:58 2013 -0700
@@ -36,7 +36,11 @@
import java.util.ArrayList;
import java.io.File;
-
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public class Config extends NGCCHandler {
private String bd;
private Schema _schema;
@@ -74,15 +78,19 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
+ case 0:
+ {
+ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 1:
{
if(($__uri.equals("") && $__local.equals("schema"))) {
- NGCCHandler h = new Schema(this, super._source, $runtime, 16, baseDir);
+ NGCCHandler h = new Schema(this, super._source, $runtime, 19, baseDir);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ unexpectedEnterElement($__qname);
}
}
break;
@@ -100,7 +108,7 @@
case 4:
{
if(($__uri.equals("") && $__local.equals("classes"))) {
- NGCCHandler h = new Classes(this, super._source, $runtime, 18);
+ NGCCHandler h = new Classes(this, super._source, $runtime, 22);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -108,19 +116,15 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 1:
+ case 2:
{
if(($__uri.equals("") && $__local.equals("schema"))) {
- NGCCHandler h = new Schema(this, super._source, $runtime, 15, baseDir);
+ NGCCHandler h = new Schema(this, super._source, $runtime, 20, baseDir);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- unexpectedEnterElement($__qname);
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
@@ -149,12 +153,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 0:
{
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
@@ -171,6 +169,12 @@
}
}
break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 7:
{
if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) {
@@ -196,17 +200,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 2:
{
$_ngcc_current_state = 1;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 7:
{
if(($__uri.equals("") && $__local.equals("baseDir"))) {
@@ -231,10 +235,9 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
+ case 0:
{
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
case 5:
@@ -247,9 +250,10 @@
}
}
break;
- case 0:
+ case 2:
{
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -263,10 +267,9 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 2:
+ case 0:
{
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
+ revertToParentFromText(this, super._cookie, $value);
}
break;
case 6:
@@ -276,9 +279,10 @@
action1();
}
break;
- case 0:
+ case 2:
{
- revertToParentFromText(this, super._cookie, $value);
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 7:
@@ -294,20 +298,20 @@
public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
switch(cookie) {
- case 16:
+ case 19:
{
this._schema = ((Schema)result);
action0();
$_ngcc_current_state = 1;
}
break;
- case 18:
+ case 22:
{
this.classes = ((Classes)result);
$_ngcc_current_state = 2;
}
break;
- case 15:
+ case 20:
{
this._schema = ((Schema)result);
action0();
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,7 +29,9 @@
import org.xml.sax.SAXException;
/**
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
*
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,7 +29,9 @@
import org.xml.sax.SAXException;
/**
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
*
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,7 +29,9 @@
import org.xml.sax.SAXException;
/**
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
*
* @version $Id: NGCCHandler.java,v 1.9 2002/09/29 02:55:48 okajima Exp $
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java Fri Sep 06 14:20:58 2013 -0700
@@ -32,6 +32,9 @@
* Dispatches incoming events into sub handlers appropriately
* so that the interleaving semantics will be correctly realized.
*
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
public abstract class NGCCInterleaveFilter implements NGCCEventSource, NGCCEventReceiver {
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java Fri Sep 06 14:20:58 2013 -0700
@@ -50,7 +50,9 @@
* <li>manage mapping between namespace URIs and prefixes.
*
* <li>TODO: provide support for interleaving.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* @version $Id: NGCCRuntime.java,v 1.15 2002/09/29 02:55:48 okajima Exp $
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java Fri Sep 06 14:20:58 2013 -0700
@@ -32,7 +32,11 @@
import java.io.File;
-
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public class Schema extends NGCCHandler {
private File baseDir;
private String loc;
@@ -72,6 +76,18 @@
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
+ case 2:
+ {
+ if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 6:
{
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
@@ -84,18 +100,6 @@
}
}
break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 10:
{
if(($__uri.equals("") && $__local.equals("schema"))) {
@@ -121,23 +125,22 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ if(($__uri.equals("") && $__local.equals("schema"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 0:
{
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
}
break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 2:
{
if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
@@ -150,14 +153,15 @@
}
}
break;
- case 1:
+ case 6:
{
- if(($__uri.equals("") && $__local.equals("schema"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
- unexpectedLeaveElement($__qname);
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
}
break;
@@ -180,6 +184,17 @@
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 2:
+ {
+ if(($__uri.equals("") && $__local.equals("location"))) {
+ $_ngcc_current_state = 4;
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
case 6:
{
if(($__uri.equals("") && $__local.equals("namespace"))) {
@@ -191,17 +206,6 @@
}
}
break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("location"))) {
- $_ngcc_current_state = 4;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -221,6 +225,16 @@
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 3:
+ {
+ if(($__uri.equals("") && $__local.equals("location"))) {
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
case 7:
{
if(($__uri.equals("") && $__local.equals("namespace"))) {
@@ -231,25 +245,15 @@
}
}
break;
- case 6:
+ case 2:
{
- $_ngcc_current_state = 2;
+ $_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 3:
+ case 6:
{
- if(($__uri.equals("") && $__local.equals("location"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
+ $_ngcc_current_state = 2;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -270,11 +274,30 @@
$_ngcc_current_state = 7;
}
break;
+ case 4:
+ {
+ loc = $value;
+ $_ngcc_current_state = 3;
+ action0();
+ }
+ break;
case 0:
{
revertToParentFromText(this, super._cookie, $value);
}
break;
+ case 2:
+ {
+ if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 6:
{
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
@@ -287,25 +310,6 @@
}
}
break;
- case 4:
- {
- loc = $value;
- $_ngcc_current_state = 3;
- action0();
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, 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,7 +23,7 @@
# questions.
#
-build-id=2.2.9-b14027
-build-version=JAX-WS RI 2.2.9-b14027
+build-id=2.2.9-b14140
+build-version=JAX-WS RI 2.2.9-b14140
major-version=2.2.9
-svn-revision=14027
+svn-revision=14140
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties Fri Sep 06 14:20:58 2013 -0700
@@ -171,23 +171,23 @@
Driver.FailedToGenerateCode = \
Failed to produce code.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
Driver.FilePrologComment = \
- This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b01 \n\
+ This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \n\
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\
Any modifications to this file will be lost upon recompilation of the source schema. \n\
Generated on: {0} \n
Driver.Version = \
- xjc 2.2.8-b01
+ xjc 2.2.8-b20130806.1801
Driver.FullVersion = \
- xjc full version "2.2.8-b01-b28"
+ xjc full version "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b01 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = xjc vollst\u00e4ndige Version "2.2.8-b01-b28"
+Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.8-b01 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.8-b20130806.1801 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = versi\u00f3n completa de xjc "2.2.8-b01-b28"
+Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = Echec de la production du code.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b01 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b20130806.1801 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = version compl\u00e8te xjc "2.2.8-b01-b28"
+Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = Produzione del codice non riuscita.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b01 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b20130806.1801 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = versione completa xjc "2.2.8-b01-b28"
+Driver.FullVersion = versione completa xjc "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.8-b01\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.8-b20130806.1801\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = xjc\u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3"2.2.8-b01-b28"
+Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.8-b01 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.8-b20130806.1801 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
-Driver.Version = XJC 2.2.8-b01
+Driver.Version = XJC 2.2.8-b20130806.1801
-Driver.FullVersion = XJC \uc815\uc2dd \ubc84\uc804 "2.2.8-b01-b28"
+Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.8-b01 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.8-b20130806.1801 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = vers\u00e3o completa de xjc "2.2.8-b01-b28"
+Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.8-b01 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.8-b20130806.1801 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = xjc \u5b8c\u6574\u7248\u672c "2.2.8-b01-b28"
+Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties Fri Sep 06 14:20:58 2013 -0700
@@ -96,17 +96,17 @@
Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc.
-# DO NOT localize the 2.2.8-b01 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b01 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
+# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
-Driver.Version = xjc 2.2.8-b01
+Driver.Version = xjc 2.2.8-b20130806.1801
-Driver.FullVersion = xjc \u5b8c\u6574\u7248\u672c "2.2.8-b01-b28"
+Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
-Driver.BuildID = 2.2.8-b01
+Driver.BuildID = 2.2.8-b20130806.1801
# for JDK integration - include version in source zip
-jaxb.jdk.version=2.2.8-b01
+jaxb.jdk.version=@@JAXB_JDK_VERSION@@
# see java.text.SimpleDateFormat for format syntax
# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -35,6 +35,8 @@
import javax.xml.XMLConstants;
import org.xml.sax.SAXException;
+import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess;
+
/**
* Wraps a JAXP {@link Schema} object and lazily instantiate it.
*
@@ -59,7 +61,7 @@
try {
// do not disable secure processing - these are well-known schemas
SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false);
- schema = sf.newSchema(source);
+ schema = allowFileAccess(sf, false).newSchema(source);
} catch (SAXException e) {
// we make sure that the schema is correct before we ship.
throw new AssertionError(e);
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorOrderWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorOrderWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import javax.xml.bind.annotation.XmlAccessorOrder;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlAccessorOrderWriter
extends JAnnotationWriter<XmlAccessorOrder>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorTypeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorTypeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import javax.xml.bind.annotation.XmlAccessorType;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlAccessorTypeWriter
extends JAnnotationWriter<XmlAccessorType>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyAttributeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyAttributeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlAnyAttribute;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlAnyAttributeWriter
extends JAnnotationWriter<XmlAnyAttribute>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyElementWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyElementWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlAnyElementWriter
extends JAnnotationWriter<XmlAnyElement>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttachmentRefWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttachmentRefWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlAttachmentRef;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlAttachmentRefWriter
extends JAnnotationWriter<XmlAttachmentRef>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttributeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttributeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlAttribute;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlAttributeWriter
extends JAnnotationWriter<XmlAttribute>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementDeclWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementDeclWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlElementDeclWriter
extends JAnnotationWriter<XmlElementDecl>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlElementRefWriter
extends JAnnotationWriter<XmlElementRef>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefsWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefsWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlElementRefs;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlElementRefsWriter
extends JAnnotationWriter<XmlElementRefs>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWrapperWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWrapperWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlElementWrapper;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlElementWrapperWriter
extends JAnnotationWriter<XmlElementWrapper>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlElementWriter
extends JAnnotationWriter<XmlElement>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementsWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementsWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlElements;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlElementsWriter
extends JAnnotationWriter<XmlElements>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumValueWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumValueWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlEnumValueWriter
extends JAnnotationWriter<XmlEnumValue>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlEnumWriter
extends JAnnotationWriter<XmlEnum>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDREFWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDREFWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlIDREF;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlIDREFWriter
extends JAnnotationWriter<XmlIDREF>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlID;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlIDWriter
extends JAnnotationWriter<XmlID>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlInlineBinaryDataWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlInlineBinaryDataWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlInlineBinaryData;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlInlineBinaryDataWriter
extends JAnnotationWriter<XmlInlineBinaryData>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlJavaTypeAdapterWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlJavaTypeAdapterWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlJavaTypeAdapterWriter
extends JAnnotationWriter<XmlJavaTypeAdapter>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlListWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlListWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlList;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlListWriter
extends JAnnotationWriter<XmlList>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMimeTypeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMimeTypeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlMimeType;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlMimeTypeWriter
extends JAnnotationWriter<XmlMimeType>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMixedWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMixedWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlMixed;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlMixedWriter
extends JAnnotationWriter<XmlMixed>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlNsWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlNsWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlNs;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlNsWriter
extends JAnnotationWriter<XmlNs>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRegistryWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRegistryWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlRegistry;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlRegistryWriter
extends JAnnotationWriter<XmlRegistry>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRootElementWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRootElementWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlRootElement;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlRootElementWriter
extends JAnnotationWriter<XmlRootElement>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlSchemaTypeWriter
extends JAnnotationWriter<XmlSchemaType>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypesWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypesWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlSchemaTypes;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlSchemaTypesWriter
extends JAnnotationWriter<XmlSchemaTypes>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import javax.xml.bind.annotation.XmlSchema;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlSchemaWriter
extends JAnnotationWriter<XmlSchema>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlSeeAlsoWriter
extends JAnnotationWriter<XmlSeeAlso>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTransientWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTransientWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlTransient;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlTransientWriter
extends JAnnotationWriter<XmlTransient>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTypeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTypeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.codemodel.internal.JAnnotationWriter;
import com.sun.codemodel.internal.JType;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlTypeWriter
extends JAnnotationWriter<XmlType>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlValueWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlValueWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import javax.xml.bind.annotation.XmlValue;
import com.sun.codemodel.internal.JAnnotationWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface XmlValueWriter
extends JAnnotationWriter<XmlValue>
{
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle.properties Fri Sep 06 14:20:58 2013 -0700
@@ -26,7 +26,7 @@
METHOD_COLLISION = \
The "{0}" method is defined on both "{1}" and "{2}" and is causing a collision.
-# {0} - enumeration constant value (but something that couldn?t be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
+# {0} - enumeration constant value (but something that couldn�t be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
ERR_UNUSABLE_NAME = \
Cannot derive a valid Java identifier from "{0}". Specify a customization to change the name.
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,7 @@
import java.util.Collection;
import java.util.Map;
+import javax.xml.XMLConstants;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
@@ -298,7 +299,7 @@
// this is anonymous type. can't have @XmlSchemaType
return false;
- if(!typeName.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA))
+ if(!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(typeName.getNamespaceURI()))
// if we put application-defined type name, it will be undefined
// by the time we generate a schema.
return false;
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java Fri Sep 06 14:20:58 2013 -0700
@@ -25,6 +25,7 @@
package com.sun.tools.internal.xjc.model;
+import javax.xml.XMLConstants;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
@@ -34,6 +35,7 @@
import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
import com.sun.xml.internal.bind.v2.model.core.TypeRef;
import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil;
+import com.sun.xml.internal.xsom.XSType;
import com.sun.xml.internal.xsom.XmlString;
import com.sun.xml.internal.xsom.XSElementDecl;
import com.sun.istack.internal.Nullable;
@@ -74,11 +76,34 @@
}
public static QName getSimpleTypeName(XSElementDecl decl) {
- if(decl==null) return null;
- QName typeName = null;
- if(decl.getType().isSimpleType())
- typeName = BGMBuilder.getName(decl.getType());
- return typeName;
+ if(decl==null || !decl.getType().isSimpleType())
+ return null; // null if not simple type
+ return resolveSimpleTypeName(decl.getType());
+ }
+
+ /**
+ * Recursively search for type name.
+ *
+ * This is needed to find correct type for refs like:
+ *
+ *<xs:simpleType name="parent">
+ * <xs:restriction base="xs:date"/>
+ *</xs:simpleType>
+ *<xs:simpleType name="child">
+ * <xs:restriction base="parent"/>
+ *</xs:simpleType>
+ *
+ *<xs:element name="testField" type="child"/>
+ *
+ * @param declType given type
+ * @return simpleTypeName or null
+ */
+ private static QName resolveSimpleTypeName(XSType declType) {
+ QName name = BGMBuilder.getName(declType);
+ if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI()))
+ return resolveSimpleTypeName(declType.getBaseType());
+ else
+ return name;
}
public CTypeRef(CNonElement type, QName elementName, QName typeName, boolean nillable, XmlString defaultValue) {
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/package-info.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/package-info.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -55,7 +55,3 @@
* </dl>
*/
package com.sun.tools.internal.xjc.model;
-
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -25,29 +25,27 @@
package com.sun.tools.internal.xjc.reader.internalizer;
-import java.io.IOException;
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-
import com.sun.istack.internal.SAXParseException2;
-
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.XMLFilterImpl;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
/**
* XMLFilter that finds references to other schema files from
* SAX events.
- *
+ * <p/>
* This implementation is a base implementation for typical case
* where we just need to look for a particular attribute which
* contains an URL to another schema file.
*
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
*/
public abstract class AbstractReferenceFinderImpl extends XMLFilterImpl {
@@ -61,12 +59,9 @@
* IF the given element contains a reference to an external resource,
* return its URL.
*
- * @param nsURI
- * Namespace URI of the current element
- * @param localName
- * Local name of the current element
- * @return
- * It's OK to return a relative URL.
+ * @param nsURI Namespace URI of the current element
+ * @param localName Local name of the current element
+ * @return It's OK to return a relative URL.
*/
protected abstract String findExternalResource(String nsURI, String localName, Attributes atts);
@@ -83,16 +78,21 @@
// absolutize URL.
String lsi = locator.getSystemId();
String ref;
- if (lsi.startsWith("jar:")) {
- int bangIdx = lsi.indexOf('!');
- if (bangIdx > 0) {
- ref = lsi.substring(0, bangIdx + 1)
- + new URI(lsi.substring(bangIdx + 1)).resolve(new URI(relativeRef)).toString();
+ URI relRefURI = new URI(relativeRef);
+ if (relRefURI.isAbsolute())
+ ref = relativeRef;
+ else {
+ if (lsi.startsWith("jar:")) {
+ int bangIdx = lsi.indexOf('!');
+ if (bangIdx > 0) {
+ ref = lsi.substring(0, bangIdx + 1)
+ + new URI(lsi.substring(bangIdx + 1)).resolve(new URI(relativeRef)).toString();
+ } else {
+ ref = relativeRef;
+ }
} else {
- ref = relativeRef;
+ ref = new URI(lsi).resolve(new URI(relativeRef)).toString();
}
- } else {
- ref = new URI(lsi).resolve(new URI(relativeRef)).toString();
}
// then parse this schema as well,
@@ -121,6 +121,7 @@
throw spe;
}
}
+
private Locator locator;
@Override
@@ -128,4 +129,4 @@
super.setDocumentLocator(locator);
this.locator = locator;
}
-};
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java Fri Sep 06 14:20:58 2013 -0700
@@ -25,18 +25,21 @@
package com.sun.tools.internal.xjc.reader.internalizer;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.XMLStreamReaderToContentHandler;
+import com.sun.tools.internal.xjc.ErrorReceiver;
+import com.sun.tools.internal.xjc.Options;
+import com.sun.tools.internal.xjc.reader.Const;
+import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
+import com.sun.xml.internal.bind.marshaller.DataWriter;
+import com.sun.xml.internal.bind.v2.util.XmlFactory;
+import com.sun.xml.internal.xsom.parser.JAXPParser;
+import com.sun.xml.internal.xsom.parser.XMLParser;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.*;
+import org.xml.sax.helpers.XMLFilterImpl;
-import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -51,27 +54,13 @@
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXSource;
import javax.xml.validation.SchemaFactory;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.util.*;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.XMLStreamReaderToContentHandler;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.xml.internal.bind.marshaller.DataWriter;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.xsom.parser.JAXPParser;
-import com.sun.xml.internal.xsom.parser.XMLParser;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLFilterImpl;
+import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess;
+import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
/**
@@ -471,7 +460,7 @@
}
try {
- sf.newSchema(sources.toArray(new SAXSource[0]));
+ allowFileAccess(sf, options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0]));
} catch (SAXException e) {
// error should have been reported.
} catch (RuntimeException re) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Util.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Util.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,7 +30,7 @@
/**
* @author Kohsuke Kawaguchi
*/
-public abstract class Util {
+public final class Util {
private Util() {} // no instanciation
/**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -40,6 +40,8 @@
NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS, // 1 arg
INVALID_TYPE_IN_MAP, // 0args
INVALID_JAXP_IMPLEMENTATION, // 1 arg
+ JAXP_SUPPORTED_PROPERTY, // 1 arg
+ JAXP_UNSUPPORTED_PROPERTY, // 1 arg
;
private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, 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
@@ -50,3 +50,9 @@
INVALID_JAXP_IMPLEMENTATION = \
You are running with invalid JAXP api or implementation. JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required. In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions.
+
+JAXP_SUPPORTED_PROPERTY =\
+ Property "{0}" is supported and has been successfully set by used JAXP implementation.
+
+JAXP_UNSUPPORTED_PROPERTY =\
+ Property "{0}" is not supported by used JAXP implementation.
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Init.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Init.java Fri Sep 06 14:20:58 2013 -0700
@@ -25,7 +25,10 @@
package com.sun.xml.internal.bind.v2.model.annotation;
-
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
class Init {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlAttributeQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlAttributeQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlAttributeQuick
extends Quick
implements XmlAttribute
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementDeclQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementDeclQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlElementDecl;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlElementDeclQuick
extends Quick
implements XmlElementDecl
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlElementQuick
extends Quick
implements XmlElement
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlElementRef;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlElementRefQuick
extends Quick
implements XmlElementRef
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefsQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefsQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlElementRefsQuick
extends Quick
implements XmlElementRefs
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlEnumQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlEnumQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlEnumQuick
extends Quick
implements XmlEnum
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlRootElementQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlRootElementQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlRootElementQuick
extends Quick
implements XmlRootElement
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlSchemaQuick
extends Quick
implements XmlSchema
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlSchemaType;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlSchemaTypeQuick
extends Quick
implements XmlSchemaType
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTransientQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTransientQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlTransient;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlTransientQuick
extends Quick
implements XmlTransient
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTypeQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTypeQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlTypeQuick
extends Quick
implements XmlType
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlValueQuick.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlValueQuick.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import java.lang.annotation.Annotation;
import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * <p><b>Auto-generated, do not edit.</b></p>
+ *
+ */
final class XmlValueQuick
extends Quick
implements XmlValue
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/package-info.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/package-info.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -59,10 +59,6 @@
@XmlSchema(namespace="http://jaxb.dev.java.net/xjc/model",elementFormDefault=QUALIFIED)
package com.sun.xml.internal.bind.v2.model.core;
-import java.lang.reflect.Type;
-import java.lang.reflect.Method;
-import java.lang.reflect.Field;
-
import javax.xml.bind.annotation.XmlSchema;
import static javax.xml.bind.annotation.XmlNsForm.QUALIFIED;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -91,6 +91,9 @@
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
import com.sun.xml.internal.bind.v2.util.ByteArrayOutputStreamEx;
import com.sun.xml.internal.bind.v2.util.DataSourceSource;
+import java.util.logging.Logger;
+import com.sun.xml.internal.bind.Util;
+import java.util.logging.Level;
import org.xml.sax.SAXException;
@@ -105,6 +108,8 @@
public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<Type,Class>
implements RuntimeBuiltinLeafInfo, Transducer<T> {
+ private static final Logger logger = Util.getClassLogger();
+
private RuntimeBuiltinLeafInfoImpl(Class type, QName... typeNames) {
super(type, typeNames);
LEAVES.put(type,this);
@@ -196,6 +201,7 @@
public static final List<RuntimeBuiltinLeafInfoImpl<?>> builtinBeanInfos;
public static final String MAP_ANYURI_TO_URI = "mapAnyUriToUri";
+ public static final String USE_OLD_GMONTH_MAPPING = "jaxb.ri.useOldGmonthMapping";
static {
@@ -960,7 +966,14 @@
m.put(DatatypeConstants.DATETIME, "%Y-%M-%DT%h:%m:%s"+ "%z");
m.put(DatatypeConstants.DATE, "%Y-%M-%D" +"%z");
m.put(DatatypeConstants.TIME, "%h:%m:%s"+ "%z");
- m.put(DatatypeConstants.GMONTH, "--%M--%z");
+ if (System.getProperty(USE_OLD_GMONTH_MAPPING) == null) {
+ m.put(DatatypeConstants.GMONTH, "--%M%z"); // E2-12 Error. http://www.w3.org/2001/05/xmlschema-errata#e2-12
+ } else { // backw. compatibility
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Old GMonth mapping used.");
+ }
+ m.put(DatatypeConstants.GMONTH, "--%M--%z");
+ }
m.put(DatatypeConstants.GDAY, "---%D" + "%z");
m.put(DatatypeConstants.GYEAR, "%Y" + "%z");
m.put(DatatypeConstants.GYEARMONTH, "%Y-%M" + "%z");
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/package-info.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/package-info.java Fri Sep 06 14:20:58 2013 -0700
@@ -180,7 +180,3 @@
* @ArchitectureDocument
*/
package com.sun.xml.internal.bind.v2;
-
-import javax.xml.bind.JAXBContext;
-
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeAdapter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeAdapter.java Fri Sep 06 14:20:58 2013 -0700
@@ -88,13 +88,11 @@
private OnWire adaptM(Marshaller m,InMemory v) throws JAXBException {
XMLSerializer serializer = ((MarshallerImpl)m).serializer;
- serializer.setThreadAffinity();
serializer.pushCoordinator();
try {
return _adaptM(serializer, v);
} finally {
serializer.popCoordinator();
- serializer.resetThreadAffinity();
}
}
@@ -132,7 +130,6 @@
private @NotNull InMemory adaptU(Unmarshaller _u, OnWire v) throws JAXBException {
UnmarshallerImpl u = (UnmarshallerImpl) _u;
XmlAdapter<OnWire,InMemory> a = u.coordinator.getAdapter(adapter);
- u.coordinator.setThreadAffinity();
u.coordinator.pushCoordinator();
try {
return a.unmarshal(v);
@@ -140,7 +137,6 @@
throw new UnmarshalException(e);
} finally {
u.coordinator.popCoordinator();
- u.coordinator.resetThreadAffinity();
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Coordinator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Coordinator.java Fri Sep 06 14:20:58 2013 -0700
@@ -94,75 +94,37 @@
return adapters.containsKey(type);
}
+ // this much is necessary to avoid calling get and set twice when we push.
+ private static final ThreadLocal<Coordinator> activeTable = new ThreadLocal<Coordinator>();
+
/**
* The {@link Coordinator} in charge before this {@link Coordinator}.
*/
- private Object old;
-
- /**
- * A 'pointer' to a {@link Coordinator} that keeps track of the currently active {@link Coordinator}.
- * Having this improves the runtime performance.
- */
- private Object[] table;
-
- /**
- * When we set {@link #table} to null, record who did it.
- * This is for trouble-shooting a possible concurrency issue reported at:
- * http://forums.java.net/jive/thread.jspa?threadID=15132
- */
- public Exception guyWhoSetTheTableToNull;
-
- /**
- * Associates this {@link Coordinator} with the current thread.
- * Should be called at the very beginning of the episode.
- */
- protected final void setThreadAffinity() {
- table = activeTable.get();
- assert table!=null;
- }
-
- /**
- * Dis-associate this {@link Coordinator} with the current thread.
- * Sohuld be called at the end of the episode to avoid memory leak.
- */
- protected final void resetThreadAffinity() {
- if (activeTable != null) {
- activeTable.remove();
- }
- if(debugTableNPE)
- guyWhoSetTheTableToNull = new Exception(); // remember that we set it to null
- table = null;
- }
+ private Coordinator old;
/**
* Called whenever an execution flow enters the realm of this {@link Coordinator}.
*/
protected final void pushCoordinator() {
- old = table[0];
- table[0] = this;
+ old = activeTable.get();
+ activeTable.set(this);
}
/**
* Called whenever an execution flow exits the realm of this {@link Coordinator}.
*/
protected final void popCoordinator() {
- assert table[0]==this;
- table[0] = old;
+ if (old != null)
+ activeTable.set(old);
+ else
+ activeTable.remove();
old = null; // avoid memory leak
}
public static Coordinator _getInstance() {
- return (Coordinator) activeTable.get()[0];
+ return activeTable.get();
}
- // this much is necessary to avoid calling get and set twice when we push.
- private static final ThreadLocal<Object[]> activeTable = new ThreadLocal<Object[]>() {
- @Override
- public Object[] initialValue() {
- return new Object[1];
- }
- };
-
//
//
// ErrorHandler implementation
@@ -207,13 +169,4 @@
throw saxException;
}
}
-
- public static boolean debugTableNPE;
-
- static {
- try {
- debugTableNPE = Boolean.getBoolean(Coordinator.class.getName()+".debugTableNPE");
- } catch (SecurityException t) {
- }
- }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/XMLSerializer.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/XMLSerializer.java Fri Sep 06 14:20:58 2013 -0700
@@ -812,7 +812,6 @@
* Similar to 'schemaLocation' but this one works for xsi:noNamespaceSchemaLocation
*/
public void startDocument(XmlOutput out,boolean fragment,String schemaLocation,String noNsSchemaLocation) throws IOException, SAXException, XMLStreamException {
- setThreadAffinity();
pushCoordinator();
nsContext.reset();
nse = nsContext.getCurrent();
@@ -841,7 +840,6 @@
out = null;
clearCurrentProperty();
popCoordinator();
- resetThreadAffinity();
}
/**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerBoolean.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerBoolean.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerBoolean<BeanT> extends Lister<BeanT,boolean[],Boolean,PrimitiveArrayListerBoolean.BooleanArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerCharacter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerCharacter.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerCharacter<BeanT> extends Lister<BeanT,char[],Character,PrimitiveArrayListerCharacter.CharacterArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerDouble.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerDouble.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerDouble<BeanT> extends Lister<BeanT,double[],Double,PrimitiveArrayListerDouble.DoubleArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerFloat.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerFloat.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerFloat<BeanT> extends Lister<BeanT,float[],Float,PrimitiveArrayListerFloat.FloatArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerInteger.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerInteger.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerInteger<BeanT> extends Lister<BeanT,int[],Integer,PrimitiveArrayListerInteger.IntegerArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerLong.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerLong.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerLong<BeanT> extends Lister<BeanT,long[],Long,PrimitiveArrayListerLong.LongArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerShort.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerShort.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,10 +30,13 @@
/**
* {@link Lister} for primitive type arrays.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
+ * B y t e ArrayLister is used as the master to generate the rest of the
+ * lister classes. Do not modify the generated copies.
+ * </p>
*/
final class PrimitiveArrayListerShort<BeanT> extends Lister<BeanT,short[],Short,PrimitiveArrayListerShort.ShortArrayPack> {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Boolean.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Boolean.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Boolean extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Character.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Character.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for char fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Character extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Double.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Double.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for double fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Double extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Float.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Float.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for float fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Float extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Integer.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Integer.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for int fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Integer extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Long.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Long.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for long fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Long extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Short.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Short.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for short fields.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
+ * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class FieldAccessor_Short extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Boolean.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Boolean.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Boolean extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Character.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Character.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Character extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Double.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Double.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Double extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Float.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Float.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Float extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Integer.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Integer.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Integer extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Long.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Long.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Long extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Short.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Short.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,10 +29,12 @@
/**
* Template {@link Accessor} for boolean getter/setter.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
+ * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*/
public class MethodAccessor_Short extends Accessor {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a double field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a float field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a long field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a short field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a boolean field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a double field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a float field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a long field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,10 +31,12 @@
/**
* Template {@link TransducedAccessor} for a short field.
- *
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
* <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
+ * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
+ * </p>
* @author Kohsuke Kawaguchi
*
* @see TransducedAccessor#get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java Fri Sep 06 14:20:58 2013 -0700
@@ -94,11 +94,15 @@
@SuppressWarnings({"StringEquality"})
protected final void reportUnexpectedChildElement(TagName ea, boolean canRecover) throws SAXException {
- if(canRecover && !UnmarshallingContext.getInstance().parent.hasEventHandler())
+ if (canRecover) {
// this error happens particurly often (when input documents contain a lot of unexpected elements to be ignored),
// so don't bother computing all the messages and etc if we know that
// there's no event handler to receive the error in the end. See #286
- return;
+ UnmarshallingContext context = UnmarshallingContext.getInstance();
+ if (!context.parent.hasEventHandler() // is somebody listening?
+ || !context.shouldErrorBeReported()) // should we report error?
+ return;
+ }
if(ea.uri!=ea.uri.intern() || ea.local!=ea.local.intern())
reportError(Messages.UNINTERNED_STRINGS.format(), canRecover );
else
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -40,6 +40,7 @@
UNRECOGNIZED_TYPE_NAME_MAYBE, // 2 args
UNABLE_TO_CREATE_MAP, // 1 arg
UNINTERNED_STRINGS, // no args
+ ERRORS_LIMIT_EXCEEDED, // no arg
;
private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -50,3 +50,7 @@
UNINTERNED_STRINGS = \
Namespace URIs and local names to the unmarshaller needs to be interned.
+
+# user have to set Logger.getLogger("com.sun.xml.internal.bind").setLevel(Level.FINEST)
+ERRORS_LIMIT_EXCEEDED = \
+ Errors limit exceeded. To receive all errors set 'com.sun.xml.internal.bind' logger to FINEST level.
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -25,11 +25,14 @@
package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
+import com.sun.xml.internal.bind.Util;
import javax.xml.bind.JAXBException;
import javax.xml.bind.UnmarshallerHandler;
import com.sun.xml.internal.bind.WhiteSpaceProcessor;
import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
@@ -44,6 +47,8 @@
private LocatorEx loc;
+ private static final Logger logger = Util.getClassLogger();
+
/**
* SAX may fire consecutive characters event, but we don't allow it.
* so use this buffer to perform buffering.
@@ -56,6 +61,7 @@
private static final class TagNameImpl extends TagName {
String qname;
+ @Override
public String getQname() {
return qname;
}
@@ -76,6 +82,7 @@
this.loc = externalLocator;
}
+ @Override
public Object getResult() throws JAXBException, IllegalStateException {
return context.getResult();
}
@@ -84,6 +91,7 @@
return context;
}
+ @Override
public void setDocumentLocator(final Locator locator) {
if(loc!=null)
return; // we already have an external locator. ignore.
@@ -91,23 +99,43 @@
this.loc = new LocatorExWrapper(locator);
}
+ @Override
public void startDocument() throws SAXException {
+ if (logger.isLoggable(Level.FINER)) {
+ logger.log(Level.FINER, "SAXConnector.startDocument");
+ }
next.startDocument(loc,null);
}
+ @Override
public void endDocument() throws SAXException {
+ if (logger.isLoggable(Level.FINER)) {
+ logger.log(Level.FINER, "SAXConnector.endDocument");
+ }
next.endDocument();
}
+ @Override
public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ if (logger.isLoggable(Level.FINER)) {
+ logger.log(Level.FINER, "SAXConnector.startPrefixMapping: {0}:{1}", new Object[]{prefix, uri});
+ }
next.startPrefixMapping(prefix,uri);
}
+ @Override
public void endPrefixMapping(String prefix) throws SAXException {
+ if (logger.isLoggable(Level.FINER)) {
+ logger.log(Level.FINER, "SAXConnector.endPrefixMapping: {0}", new Object[]{prefix});
+ }
next.endPrefixMapping(prefix);
}
+ @Override
public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException {
+ if (logger.isLoggable(Level.FINER)) {
+ logger.log(Level.FINER, "SAXConnector.startElement: {0}:{1}:{2}, attrs: {3}", new Object[]{uri, local, qname, atts});
+ }
// work gracefully with misconfigured parsers that don't support namespaces
if( uri==null || uri.length()==0 )
uri="";
@@ -135,7 +163,11 @@
next.startElement(tagName);
}
+ @Override
public void endElement(String uri, String localName, String qName) throws SAXException {
+ if (logger.isLoggable(Level.FINER)) {
+ logger.log(Level.FINER, "SAXConnector.startElement: {0}:{1}:{2}", new Object[]{uri, localName, qName});
+ }
processText(false);
tagName.uri = uri;
tagName.local = localName;
@@ -144,19 +176,29 @@
}
+ @Override
public final void characters( char[] buf, int start, int len ) {
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.log(Level.FINEST, "SAXConnector.characters: {0}", buf);
+ }
if( predictor.expectText() )
buffer.append(buf,start,len);
}
+ @Override
public final void ignorableWhitespace( char[] buf, int start, int len ) {
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.log(Level.FINEST, "SAXConnector.characters{0}", buf);
+ }
characters(buf,start,len);
}
+ @Override
public void processingInstruction(String target, String data) {
// nop
}
+ @Override
public void skippedEntity(String name) {
// nop
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -35,6 +35,8 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBElement;
@@ -51,6 +53,7 @@
import com.sun.istack.internal.Nullable;
import com.sun.istack.internal.SAXParseException2;
import com.sun.xml.internal.bind.IDResolver;
+import com.sun.xml.internal.bind.Util;
import com.sun.xml.internal.bind.api.AccessorException;
import com.sun.xml.internal.bind.api.ClassResolver;
import com.sun.xml.internal.bind.unmarshaller.InfosetScanner;
@@ -59,6 +62,8 @@
import com.sun.xml.internal.bind.v2.runtime.Coordinator;
import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
@@ -76,6 +81,8 @@
public final class UnmarshallingContext extends Coordinator
implements NamespaceContext, ValidationEventHandler, ErrorHandler, XmlVisitor, XmlVisitor.TextPredictor {
+ private static final Logger logger = Logger.getLogger(UnmarshallingContext.class.getName());
+
/**
* Root state.
*/
@@ -177,6 +184,14 @@
public @Nullable ClassLoader classLoader;
/**
+ * The variable introduced to avoid reporting n^10 similar errors.
+ * After error is reported counter is decremented. When it became 0 - errors should not be reported any more.
+ *
+ * volatile is required to ensure that concurrent threads will see changed value
+ */
+ private static volatile int errorsCounter = 10;
+
+ /**
* State information for each element.
*/
public final class State {
@@ -260,21 +275,32 @@
return UnmarshallingContext.this;
}
+ @SuppressWarnings("LeakingThisInConstructor")
private State(State prev) {
this.prev = prev;
- if(prev!=null)
+ if (prev!=null) {
prev.next = this;
+ }
}
private void push() {
- if(next==null)
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.log(Level.FINEST, "State.push");
+ }
+ if (next==null) {
+ assert current == this;
allocateMoreStates();
+ }
+ nil = false;
State n = next;
n.numNsDecl = nsLen;
current = n;
}
private void pop() {
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.log(Level.FINEST, "State.pop");
+ }
assert prev!=null;
loader = null;
nil = false;
@@ -381,8 +407,9 @@
assert current.next==null;
State s = current;
- for( int i=0; i<8; i++ )
+ for (int i=0; i<8; i++) {
s = new State(s);
+ }
}
public void clearStates() {
@@ -436,6 +463,7 @@
}
}
+ @Override
public void startDocument(LocatorEx locator, NamespaceContext nsContext) throws SAXException {
if(locator!=null)
this.locator = locator;
@@ -449,8 +477,6 @@
isUnmarshalInProgress = true;
nsLen=0;
- setThreadAffinity();
-
if(expectedType!=null)
root.loader = EXPECTED_TYPE_ROOT_LOADER;
else
@@ -459,6 +485,7 @@
idResolver.startDocument(this);
}
+ @Override
public void startElement(TagName tagName) throws SAXException {
pushCoordinator();
try {
@@ -486,6 +513,7 @@
current.loader.startElement(current,tagName);
}
+ @Override
public void text(CharSequence pcdata) throws SAXException {
State cur = current;
pushCoordinator();
@@ -502,6 +530,7 @@
}
}
+ @Override
public final void endElement(TagName tagName) throws SAXException {
pushCoordinator();
try {
@@ -526,6 +555,7 @@
}
}
+ @Override
public void endDocument() throws SAXException {
runPatchers();
idResolver.endDocument();
@@ -537,14 +567,13 @@
// at the successful completion, scope must be all closed
assert root==current;
-
- resetThreadAffinity();
}
/**
* You should be always calling this through {@link TextPredictor}.
*/
@Deprecated
+ @Override
public boolean expectText() {
return current.loader.expectText;
}
@@ -553,10 +582,12 @@
* You should be always getting {@link TextPredictor} from {@link XmlVisitor}.
*/
@Deprecated
+ @Override
public TextPredictor getPredictor() {
return this;
}
+ @Override
public UnmarshallingContext getContext() {
return this;
}
@@ -650,6 +681,7 @@
event.getLinkedException() ) );
}
+ @Override
public boolean handleEvent(ValidationEvent event) {
try {
// if the handler says "abort", we will not return the object.
@@ -680,6 +712,7 @@
handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,msg,locator.getLocation()));
}
+ @Override
protected ValidationEventLocator getLocation() {
return locator.getLocation();
}
@@ -801,6 +834,7 @@
private String[] nsBind = new String[16];
private int nsLen=0;
+ @Override
public void startPrefixMapping( String prefix, String uri ) {
if(nsBind.length==nsLen) {
// expand the buffer
@@ -811,6 +845,7 @@
nsBind[nsLen++] = prefix;
nsBind[nsLen++] = uri;
}
+ @Override
public void endPrefixMapping( String prefix ) {
nsLen-=2;
}
@@ -868,6 +903,7 @@
// NamespaceContext2 implementation
//
+ @Override
public Iterator<String> getPrefixes(String uri) {
// TODO: could be implemented much faster
// wrap it into unmodifiable list so that the remove method
@@ -899,6 +935,7 @@
return a;
}
+ @Override
public String getPrefix(String uri) {
if( uri==null )
throw new IllegalArgumentException();
@@ -919,6 +956,7 @@
return null;
}
+ @Override
public String getNamespaceURI(String prefix) {
if (prefix == null)
throw new IllegalArgumentException();
@@ -1059,6 +1097,7 @@
return getInstance().getJAXBContext().getValidRootNames();
}
+ @Override
public void receive(State state, Object o) {
if(state.backup!=null) {
((JAXBElement<Object>)state.backup).setValue(o);
@@ -1095,6 +1134,7 @@
state.loader = new XsiNilLoader(context.expectedType.getLoader(null,true));
}
+ @Override
public void receive(State state, Object o) {
JAXBElement e = (JAXBElement)state.target;
e.setValue(o);
@@ -1233,4 +1273,27 @@
return null;
}
+ /**
+ * Based on current {@link Logger} {@link Level} and errorCounter value determines if error should be reported.
+ *
+ * If the method called and return true it is expected that error will be reported. And that's why
+ * errorCounter is automatically decremented during the check.
+ *
+ * NOT THREAD SAFE!!! In case of heave concurrency access several additional errors could be reported. It's not expected to be the
+ * problem. Otherwise add synchronization here.
+ *
+ * @return true in case if {@link Level#FINEST} is set OR we haven't exceed errors reporting limit.
+ */
+ public boolean shouldErrorBeReported() throws SAXException {
+ if (logger.isLoggable(Level.FINEST))
+ return true;
+
+ if (errorsCounter >= 0) {
+ --errorsCounter;
+ if (errorsCounter == 0) // it's possible to miss this because of concurrency. If required add synchronization here
+ handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, Messages.ERRORS_LIMIT_EXCEEDED.format(),
+ getLocator().getLocation(), null), true);
+ }
+ return errorsCounter >= 0;
+ }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java Fri Sep 06 14:20:58 2013 -0700
@@ -92,12 +92,15 @@
return defaultBeanInfo;
beanInfo = context.getJAXBContext().getGlobalType(type);
- if(beanInfo==null) {
- String nearest = context.getJAXBContext().getNearestTypeName(type);
- if(nearest!=null)
- reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true);
- else
- reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
+ if(beanInfo==null) { // let's report an error
+ if (context.parent.hasEventHandler() // is somebody listening?
+ && context.shouldErrorBeReported()) { // should we report error?
+ String nearest = context.getJAXBContext().getNearestTypeName(type);
+ if(nearest!=null)
+ reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true);
+ else
+ reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
+ }
}
// TODO: resurrect the following check
// else
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotated.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotated.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface Annotated
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotation.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotation.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("annotation")
public interface Annotation
extends TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Any.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Any.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("any")
public interface Any
extends Occurs, Wildcard, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Appinfo.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Appinfo.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("appinfo")
public interface Appinfo
extends TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttrDecls.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttrDecls.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface AttrDecls
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttributeType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttributeType.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface AttributeType
extends SimpleTypeHost, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexContent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexContent.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("complexContent")
public interface ComplexContent
extends Annotated, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexExtension.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexExtension.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("extension")
public interface ComplexExtension
extends AttrDecls, ExtensionType, TypeDefParticle, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexRestriction.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexRestriction.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("restriction")
public interface ComplexRestriction
extends Annotated, AttrDecls, TypeDefParticle, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexType.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("complexType")
public interface ComplexType
extends Annotated, ComplexTypeModel, TypedXmlWriter
@@ -36,17 +41,17 @@
@XmlAttribute("final")
+ public ComplexType _final(String[] value);
+
+ @XmlAttribute("final")
public ComplexType _final(String value);
- @XmlAttribute("final")
- public ComplexType _final(String[] value);
+ @XmlAttribute
+ public ComplexType block(String[] value);
@XmlAttribute
public ComplexType block(String value);
- @XmlAttribute
- public ComplexType block(String[] value);
-
@XmlAttribute("abstract")
public ComplexType _abstract(boolean value);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeHost.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeHost.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface ComplexTypeHost
extends TypeHost, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeModel.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeModel.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface ComplexTypeModel
extends AttrDecls, TypeDefParticle, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Documentation.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Documentation.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("documentation")
public interface Documentation
extends TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Element.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Element.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface Element
extends Annotated, ComplexTypeHost, FixedOrDefault, SimpleTypeHost, TypedXmlWriter
{
@@ -38,10 +43,10 @@
public Element type(QName value);
@XmlAttribute
- public Element block(String value);
+ public Element block(String[] value);
@XmlAttribute
- public Element block(String[] value);
+ public Element block(String value);
@XmlAttribute
public Element nillable(boolean value);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExplicitGroup.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExplicitGroup.java Fri Sep 06 14:20:58 2013 -0700
@@ -27,6 +27,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface ExplicitGroup
extends Annotated, NestedParticle, Occurs, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExtensionType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExtensionType.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface ExtensionType
extends Annotated, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/FixedOrDefault.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/FixedOrDefault.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface FixedOrDefault
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Import.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Import.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("import")
public interface Import
extends Annotated, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/List.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/List.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("list")
public interface List
extends Annotated, SimpleTypeHost, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalAttribute.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalAttribute.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("attribute")
public interface LocalAttribute
extends Annotated, AttributeType, FixedOrDefault, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalElement.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalElement.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("element")
public interface LocalElement
extends Element, Occurs, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NestedParticle.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NestedParticle.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface NestedParticle
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NoFixedFacet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NoFixedFacet.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface NoFixedFacet
extends Annotated, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Occurs.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Occurs.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface Occurs
extends TypedXmlWriter
{
@@ -37,9 +42,9 @@
public Occurs minOccurs(int value);
@XmlAttribute
- public Occurs maxOccurs(int value);
+ public Occurs maxOccurs(String value);
@XmlAttribute
- public Occurs maxOccurs(String value);
+ public Occurs maxOccurs(int value);
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Redefinable.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Redefinable.java Fri Sep 06 14:20:58 2013 -0700
@@ -27,6 +27,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface Redefinable
extends ComplexTypeHost, SimpleTypeHost, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Schema.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Schema.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("schema")
public interface Schema
extends SchemaTop, TypedXmlWriter
@@ -57,18 +62,18 @@
public Schema attributeFormDefault(String value);
@XmlAttribute
+ public Schema blockDefault(String[] value);
+
+ @XmlAttribute
public Schema blockDefault(String value);
@XmlAttribute
- public Schema blockDefault(String[] value);
+ public Schema finalDefault(String[] value);
@XmlAttribute
public Schema finalDefault(String value);
@XmlAttribute
- public Schema finalDefault(String[] value);
-
- @XmlAttribute
public Schema version(String value);
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SchemaTop.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SchemaTop.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface SchemaTop
extends Redefinable, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleContent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleContent.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("simpleContent")
public interface SimpleContent
extends Annotated, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleDerivation.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleDerivation.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface SimpleDerivation
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleExtension.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleExtension.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("extension")
public interface SimpleExtension
extends AttrDecls, ExtensionType, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestriction.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestriction.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("restriction")
public interface SimpleRestriction
extends Annotated, AttrDecls, SimpleRestrictionModel, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestrictionModel.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestrictionModel.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface SimpleRestrictionModel
extends SimpleTypeHost, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleType.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("simpleType")
public interface SimpleType
extends Annotated, SimpleDerivation, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleTypeHost.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleTypeHost.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface SimpleTypeHost
extends TypeHost, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelAttribute.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelAttribute.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("attribute")
public interface TopLevelAttribute
extends Annotated, AttributeType, FixedOrDefault, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelElement.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelElement.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("element")
public interface TopLevelElement
extends Element, TypedXmlWriter
@@ -37,10 +42,10 @@
@XmlAttribute("final")
- public TopLevelElement _final(String value);
+ public TopLevelElement _final(String[] value);
@XmlAttribute("final")
- public TopLevelElement _final(String[] value);
+ public TopLevelElement _final(String value);
@XmlAttribute("abstract")
public TopLevelElement _abstract(boolean value);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeDefParticle.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeDefParticle.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface TypeDefParticle
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeHost.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeHost.java Fri Sep 06 14:20:58 2013 -0700
@@ -27,6 +27,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface TypeHost
extends TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Union.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Union.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,11 @@
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
@XmlElement("union")
public interface Union
extends Annotated, SimpleTypeHost, TypedXmlWriter
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Wildcard.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Wildcard.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,11 @@
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
+/**
+ * <p><b>
+ * Auto-generated, do not edit.
+ * </b></p>
+ */
public interface Wildcard
extends Annotated, TypedXmlWriter
{
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/EditDistance.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/EditDistance.java Fri Sep 06 14:20:58 2013 -0700
@@ -25,8 +25,10 @@
package com.sun.xml.internal.bind.v2.util;
+import java.util.AbstractMap;
+import java.util.Arrays;
import java.util.Collection;
-import java.util.Arrays;
+import java.util.WeakHashMap;
/**
* Computes the string edit distance.
@@ -41,13 +43,29 @@
public class EditDistance {
/**
+ * Weak results cache to avoid additional computations.
+ * Because of high complexity caching is required.
+ */
+ private static final WeakHashMap<AbstractMap.SimpleEntry<String,String>, Integer> CACHE = new WeakHashMap<AbstractMap.SimpleEntry<String, String>, Integer>();
+
+ /**
* Computes the edit distance between two strings.
*
* <p>
* The complexity is O(nm) where n=a.length() and m=b.length().
*/
public static int editDistance( String a, String b ) {
- return new EditDistance(a,b).calc();
+ // let's check cache
+ AbstractMap.SimpleEntry<String,String> entry = new AbstractMap.SimpleEntry<String, String>(a, b); // using this class to avoid creation of my own which will handle PAIR of values
+ Integer result = null;
+ if (CACHE.containsKey(entry))
+ result = CACHE.get(entry); // looks like we have it
+
+ if (result == null) {
+ result = new EditDistance(a, b).calc();
+ CACHE.put(entry, result); // cache the result
+ }
+ return result;
}
/**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,6 +38,8 @@
import javax.xml.validation.SchemaFactory;
import javax.xml.xpath.XPathFactory;
import javax.xml.xpath.XPathFactoryConfigurationException;
+
+import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
@@ -49,6 +51,9 @@
*/
public class XmlFactory {
+ // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
+ public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
+
private static final Logger LOGGER = Logger.getLogger(XmlFactory.class.getName());
/**
@@ -186,4 +191,22 @@
}
}
+ public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) {
+
+ // if feature secure processing enabled, nothing to do, file is allowed,
+ // or user is able to control access by standard JAXP mechanisms
+ if (disableSecureProcessing) {
+ return sf;
+ }
+
+ try {
+ sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
+ LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA));
+ } catch (SAXException ignored) {
+ // nothing to do; support depends on version JDK or SAX implementation
+ LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored);
+ }
+ return sf;
+ }
+
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDEventListener.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDEventListener.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDHandlerBase.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDHandlerBase.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDParser.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDParser.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -57,7 +57,7 @@
* @author David Brownell
* @author Janet Koenig
* @author Kohsuke KAWAGUCHI
- * @version $Id: DTDParser.java,v 1.2 2009-04-16 15:25:49 snajper Exp $
+ * @version $Id: DTDParser.java,v 1.2 2009/04/16 15:25:49 snajper Exp $
*/
public class DTDParser {
public final static String TYPE_CDATA = "CDATA";
@@ -215,25 +215,25 @@
*/
public void parse(String uri)
throws IOException, SAXException {
- InputSource inSource;
+ InputSource in;
init();
// System.out.println ("parse (\"" + uri + "\")");
- inSource = resolver.resolveEntity(null, uri);
+ in = resolver.resolveEntity(null, uri);
// If custom resolver punts resolution to parser, handle it ...
- if (inSource == null) {
- inSource = Resolver.createInputSource(new java.net.URL(uri), false);
+ if (in == null) {
+ in = Resolver.createInputSource(new java.net.URL(uri), false);
// ... or if custom resolver doesn't correctly construct the
// input entity, patch it up enough so relative URIs work, and
// issue a warning to minimize later confusion.
- } else if (inSource.getSystemId() == null) {
+ } else if (in.getSystemId() == null) {
warning("P-065", null);
- inSource.setSystemId(uri);
+ in.setSystemId(uri);
}
- parseInternal(inSource);
+ parseInternal(in);
}
// makes sure the parser is reset to "before a document"
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EndOfInputException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EndOfInputException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EntityDecl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EntityDecl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/ExternalEntity.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/ExternalEntity.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InputEntity.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InputEntity.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InternalEntity.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InternalEntity.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/MessageCatalog.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/MessageCatalog.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/Resolver.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/Resolver.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/SimpleHashtable.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/SimpleHashtable.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlChars.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlChars.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlNames.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlNames.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -86,7 +86,7 @@
//
/**
- * Constructs the reader from an input stream, auto-detecting
+ * Constructs the reader from an input stream, autodetecting
* the encoding to use according to the heuristic specified
* in the XML 1.0 recommendation.
*
@@ -104,7 +104,7 @@
*
* @param in the input stream from which the reader is constructed
* @param encoding the IETF standard name of the encoding to use;
- * if null, auto-detection is used.
+ * if null, autodetection is used.
* @throws IOException on error, including unrecognized encoding
*/
public static Reader createReader(InputStream in, String encoding)
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
<!--
- Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2005, 2010, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/resources/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/resources/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreatorProcessor.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreatorProcessor.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
@@ -25,6 +25,7 @@
package com.sun.xml.internal.stream.buffer;
+@SuppressWarnings("PointlessBitwiseExpression")
public abstract class AbstractCreatorProcessor {
/**
* Flag on a T_DOCUMENT to indicate if a fragment
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractProcessor.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractProcessor.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AttributesHolder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AttributesHolder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
@@ -35,19 +35,19 @@
*/
@SuppressWarnings({"PointlessArithmeticExpression"})
public final class AttributesHolder implements Attributes {
- protected static final int DEFAULT_CAPACITY = 8;
- protected static final int ITEM_SIZE = 1 << 3;
+ private static final int DEFAULT_CAPACITY = 8;
+ private static final int ITEM_SIZE = 1 << 3;
- protected static final int PREFIX = 0;
- protected static final int URI = 1;
- protected static final int LOCAL_NAME = 2;
- protected static final int QNAME = 3;
- protected static final int TYPE = 4;
- protected static final int VALUE = 5;
+ private static final int PREFIX = 0;
+ private static final int URI = 1;
+ private static final int LOCAL_NAME = 2;
+ private static final int QNAME = 3;
+ private static final int TYPE = 4;
+ private static final int VALUE = 5;
- protected int _attributeCount;
+ private int _attributeCount;
- protected String[] _strings;
+ private String[] _strings;
public AttributesHolder() {
_strings = new String[DEFAULT_CAPACITY * ITEM_SIZE];
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/FragmentedArray.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/FragmentedArray.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
@@ -25,10 +25,10 @@
package com.sun.xml.internal.stream.buffer;
-class FragmentedArray<T> {
- protected T _item;
- protected FragmentedArray<T> _next;
- protected FragmentedArray<T> _previous;
+final class FragmentedArray<T> {
+ private T _item;
+ private FragmentedArray<T> _next;
+ private FragmentedArray<T> _previous;
FragmentedArray(T item) {
this(item, null);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/MutableXMLStreamBuffer.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/MutableXMLStreamBuffer.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferMark.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferMark.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferResult.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferResult.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferSource.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferSource.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/DefaultWithLexicalHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/DefaultWithLexicalHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Features.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Features.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Properties.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Properties.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferCreator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferCreator.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamBufferCreator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamBufferCreator.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
@@ -215,7 +215,8 @@
CharSequence c = reader.getPCDATA();
if (c instanceof Base64Data) {
storeStructure(T_TEXT_AS_OBJECT);
- storeContentObject(((Base64Data)c).clone());
+ //Instead of clone the Base64Data, the original Base64Data instance is used here to preserve the DataHandler
+ storeContentObject(c);
} else {
storeContentCharacters(T_TEXT_AS_CHAR_ARRAY,
reader.getTextCharacters(), reader.getTextStart(),
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferCreator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferCreator.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -932,7 +932,7 @@
write("<![CDATA[");
inCDATA = true;
} catch (IOException e) {
- new SAXException(e);
+ throw new SAXException(e);
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java Fri Sep 06 14:20:58 2013 -0700
@@ -1423,6 +1423,9 @@
if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ServerResponse)) {
return true;
}
+ if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ClientRequest)) {
+ return true;
+ }
}
}
return false;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/StreamingSOAP.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2013, 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.ws.api.message;
+
+import javax.xml.stream.XMLStreamReader;
+
+public interface StreamingSOAP {
+ public XMLStreamReader readEnvelope();
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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,7 +27,6 @@
import java.util.Collection;
import java.util.Collections;
-import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -91,6 +90,7 @@
}
public <S> S getSPI(Class<S> spiType) {
+ if (components == null) return null;
for (Component c : components) {
S s = c.getSPI(spiType);
if (s != null)
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -46,7 +46,7 @@
* @since 2.2.7
*/
public class ThreadLocalContainerResolver extends ContainerResolver {
- private ThreadLocal<Container> containers = new ThreadLocal<Container>() {
+ private ThreadLocal<Container> containerThreadLocal = new ThreadLocal<Container>() {
@Override
protected Container initialValue() {
return Container.NONE;
@@ -54,7 +54,7 @@
};
public Container getContainer() {
- return containers.get();
+ return containerThreadLocal.get();
}
/**
@@ -63,8 +63,8 @@
* @return Previous container; must be remembered and passed to exitContainer
*/
public Container enterContainer(Container container) {
- Container old = containers.get();
- containers.set(container);
+ Container old = containerThreadLocal.get();
+ containerThreadLocal.set(container);
return old;
}
@@ -73,7 +73,7 @@
* @param old Container returned from enterContainer
*/
public void exitContainer(Container old) {
- containers.set(old);
+ containerThreadLocal.set(old);
}
/**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -34,7 +34,12 @@
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
@@ -42,6 +47,8 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import com.sun.xml.internal.ws.resources.StreamingMessages;
+
/**
* Factory for {@link XMLStreamReader}.
*
@@ -61,6 +68,8 @@
*/
private static volatile @NotNull XMLStreamReaderFactory theInstance;
+ private static final String CLASS_NAME_OF_WSTXINPUTFACTORY = "com.ctc.wstx.stax.WstxInputFactory";
+
static {
XMLInputFactory xif = getXMLInputFactory();
XMLStreamReaderFactory f=null;
@@ -73,7 +82,7 @@
if(f==null) {
// is this Woodstox?
- if (xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) {
+ if (xif.getClass().getName().equals(CLASS_NAME_OF_WSTXINPUTFACTORY)) {
f = new Woodstox(xif);
}
}
@@ -83,7 +92,9 @@
}
theInstance = f;
- LOGGER.log(Level.FINE, "XMLStreamReaderFactory instance is = {0}", theInstance);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, "XMLStreamReaderFactory instance is = {0}", theInstance);
+ }
}
private static XMLInputFactory getXMLInputFactory() {
@@ -92,7 +103,9 @@
try {
xif = (XMLInputFactory)Class.forName("com.ctc.wstx.stax.WstxInputFactory").newInstance();
} catch (Exception e) {
- // Ignore and fallback to default XMLInputFactory
+ if (LOGGER.isLoggable(Level.WARNING)) {
+ LOGGER.log(Level.WARNING, StreamingMessages.WOODSTOX_CANT_LOAD(CLASS_NAME_OF_WSTXINPUTFACTORY), e);
+ }
}
}
if (xif == null) {
@@ -101,10 +114,10 @@
xif.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);
xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
xif.setProperty(XMLInputFactory.IS_COALESCING, true);
+
return xif;
}
-
/**
* Overrides the singleton {@link XMLStreamReaderFactory} instance that
* the JAX-WS RI uses.
@@ -168,7 +181,7 @@
* it takes to recycle vs the possible performance gain by doing so.
*
* <p>
- * This method may be invked by multiple threads concurrently.
+ * This method may be invoked by multiple threads concurrently.
*
* @param r
* The {@link XMLStreamReader} instance that the caller finished using.
@@ -282,11 +295,13 @@
return sr;
}
+ @Override
public void doRecycle(XMLStreamReader r) {
if(zephyrClass.isInstance(r))
pool.set(r);
}
+ @Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
try {
XMLStreamReader xsr = fetch();
@@ -307,6 +322,7 @@
}
}
+ @Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
try {
XMLStreamReader xsr = fetch();
@@ -345,7 +361,7 @@
* {@link XMLInputFactory} is not required to be thread-safe, but
* if the create method on this implementation is synchronized,
* it may run into (see <a href="https://jax-ws.dev.java.net/issues/show_bug.cgi?id=555">
- * race condition</a>). Hence, using a XMLInputFactory per theread.
+ * race condition</a>). Hence, using a XMLInputFactory per thread.
*/
public static final class Default extends XMLStreamReaderFactory {
@@ -356,6 +372,7 @@
}
};
+ @Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
try {
return xif.get().createXMLStreamReader(systemId,in);
@@ -364,6 +381,7 @@
}
}
+ @Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
try {
return xif.get().createXMLStreamReader(systemId,in);
@@ -372,6 +390,7 @@
}
}
+ @Override
public void doRecycle(XMLStreamReader r) {
// there's no way to recycle with the default StAX API.
}
@@ -391,6 +410,7 @@
this.xif = xif;
}
+ @Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
try {
return xif.createXMLStreamReader(systemId,in);
@@ -399,6 +419,7 @@
}
}
+ @Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
try {
return xif.createXMLStreamReader(systemId,in);
@@ -407,33 +428,182 @@
}
}
+ @Override
public void doRecycle(XMLStreamReader r) {
// there's no way to recycle with the default StAX API.
}
}
/**
- * Handles Woodstox's XIF but set properties to do the string interning.
+ * Handles Woodstox's XIF, but sets properties to do the string interning, sets various limits, ...
* Woodstox {@link XMLInputFactory} is thread safe.
*/
public static final class Woodstox extends NoLock {
+
+ public final static String PROPERTY_MAX_ATTRIBUTES_PER_ELEMENT = "xml.ws.maximum.AttributesPerElement";
+ public final static String PROPERTY_MAX_ATTRIBUTE_SIZE = "xml.ws.maximum.AttributeSize";
+ public final static String PROPERTY_MAX_CHILDREN_PER_ELEMENT = "xml.ws.maximum.ChildrenPerElement";
+ public final static String PROPERTY_MAX_ELEMENT_COUNT = "xml.ws.maximum.ElementCount";
+ public final static String PROPERTY_MAX_ELEMENT_DEPTH = "xml.ws.maximum.ElementDepth";
+ public final static String PROPERTY_MAX_CHARACTERS = "xml.ws.maximum.Characters";
+
+ private static final int DEFAULT_MAX_ATTRIBUTES_PER_ELEMENT = 500;
+ private static final int DEFAULT_MAX_ATTRIBUTE_SIZE = 65536 * 8;
+ private static final int DEFAULT_MAX_CHILDREN_PER_ELEMENT = Integer.MAX_VALUE;
+ private static final int DEFAULT_MAX_ELEMENT_DEPTH = 500;
+ private static final long DEFAULT_MAX_ELEMENT_COUNT = Integer.MAX_VALUE;
+ private static final long DEFAULT_MAX_CHARACTERS = Long.MAX_VALUE;
+
+ /* Woodstox default setting:
+ int mMaxAttributesPerElement = 1000;
+ int mMaxAttributeSize = 65536 * 8;
+ int mMaxChildrenPerElement = Integer.MAX_VALUE;
+ int mMaxElementDepth = 1000;
+ long mMaxElementCount = Long.MAX_VALUE;
+ long mMaxCharacters = Long.MAX_VALUE;
+ */
+
+ private int maxAttributesPerElement = DEFAULT_MAX_ATTRIBUTES_PER_ELEMENT;
+ private int maxAttributeSize = DEFAULT_MAX_ATTRIBUTE_SIZE;
+ private int maxChildrenPerElement = DEFAULT_MAX_CHILDREN_PER_ELEMENT;
+ private int maxElementDepth = DEFAULT_MAX_ELEMENT_DEPTH;
+ private long maxElementCount = DEFAULT_MAX_ELEMENT_COUNT;
+ private long maxCharacters = DEFAULT_MAX_CHARACTERS;
+
+ // Note: this is a copy from com.ctc.wstx.api.WstxInputProperties, to be removed in the future
+ private static final java.lang.String P_MAX_ATTRIBUTES_PER_ELEMENT = "com.ctc.wstx.maxAttributesPerElement";
+ private static final java.lang.String P_MAX_ATTRIBUTE_SIZE = "com.ctc.wstx.maxAttributeSize";
+ private static final java.lang.String P_MAX_CHILDREN_PER_ELEMENT = "com.ctc.wstx.maxChildrenPerElement";
+ private static final java.lang.String P_MAX_ELEMENT_COUNT = "com.ctc.wstx.maxElementCount";
+ private static final java.lang.String P_MAX_ELEMENT_DEPTH = "com.ctc.wstx.maxElementDepth";
+ private static final java.lang.String P_MAX_CHARACTERS = "com.ctc.wstx.maxCharacters";
+ private static final java.lang.String P_INTERN_NSURIS = "org.codehaus.stax2.internNsUris";
+
public Woodstox(XMLInputFactory xif) {
super(xif);
- xif.setProperty("org.codehaus.stax2.internNsUris",true);
+
+ if (xif.isPropertySupported(P_INTERN_NSURIS)) {
+ xif.setProperty(P_INTERN_NSURIS, true);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_INTERN_NSURIS + " is {0}", true);
+ }
+ }
+
+ if (xif.isPropertySupported(P_MAX_ATTRIBUTES_PER_ELEMENT)) {
+ maxAttributesPerElement = Integer.valueOf(buildIntegerValue(
+ PROPERTY_MAX_ATTRIBUTES_PER_ELEMENT, DEFAULT_MAX_ATTRIBUTES_PER_ELEMENT)
+ );
+ xif.setProperty(P_MAX_ATTRIBUTES_PER_ELEMENT, maxAttributesPerElement);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_MAX_ATTRIBUTES_PER_ELEMENT + " is {0}", maxAttributesPerElement);
+ }
+ }
+
+ if (xif.isPropertySupported(P_MAX_ATTRIBUTE_SIZE)) {
+ maxAttributeSize = Integer.valueOf(buildIntegerValue(
+ PROPERTY_MAX_ATTRIBUTE_SIZE, DEFAULT_MAX_ATTRIBUTE_SIZE)
+ );
+ xif.setProperty(P_MAX_ATTRIBUTE_SIZE, maxAttributeSize);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_MAX_ATTRIBUTE_SIZE + " is {0}", maxAttributeSize);
+ }
+ }
+
+ if (xif.isPropertySupported(P_MAX_CHILDREN_PER_ELEMENT)) {
+ maxChildrenPerElement = Integer.valueOf(buildIntegerValue(
+ PROPERTY_MAX_CHILDREN_PER_ELEMENT, DEFAULT_MAX_CHILDREN_PER_ELEMENT)
+ );
+ xif.setProperty(P_MAX_CHILDREN_PER_ELEMENT, maxChildrenPerElement);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_MAX_CHILDREN_PER_ELEMENT + " is {0}", maxChildrenPerElement);
+ }
+ }
+
+ if (xif.isPropertySupported(P_MAX_ELEMENT_DEPTH)) {
+ maxElementDepth = Integer.valueOf(buildIntegerValue(
+ PROPERTY_MAX_ELEMENT_DEPTH, DEFAULT_MAX_ELEMENT_DEPTH)
+ );
+ xif.setProperty(P_MAX_ELEMENT_DEPTH, maxElementDepth);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_MAX_ELEMENT_DEPTH + " is {0}", maxElementDepth);
+ }
+ }
+
+ if (xif.isPropertySupported(P_MAX_ELEMENT_COUNT)) {
+ maxElementCount = Long.valueOf(buildLongValue(
+ PROPERTY_MAX_ELEMENT_COUNT, DEFAULT_MAX_ELEMENT_COUNT)
+ );
+ xif.setProperty(P_MAX_ELEMENT_COUNT, maxElementCount);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_MAX_ELEMENT_COUNT + " is {0}", maxElementCount);
+ }
+ }
+
+ if (xif.isPropertySupported(P_MAX_CHARACTERS)) {
+ maxCharacters = Long.valueOf(buildLongValue(
+ PROPERTY_MAX_CHARACTERS, DEFAULT_MAX_CHARACTERS)
+ );
+ xif.setProperty(P_MAX_CHARACTERS, maxCharacters);
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE, P_MAX_CHARACTERS + " is {0}", maxCharacters);
+ }
+ }
}
+ @Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
return super.doCreate(systemId, in, rejectDTDs);
}
+ @Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
return super.doCreate(systemId, in, rejectDTDs);
}
}
+ private static int buildIntegerValue(String propertyName, int defaultValue) {
+ String propVal = System.getProperty(propertyName);
+ if (propVal != null && propVal.length() > 0) {
+ try {
+ Integer value = Integer.parseInt(propVal);
+ if (value > 0) {
+ // return with the value in System property
+ return value;
+ }
+ } catch (NumberFormatException nfe) {
+ if (LOGGER.isLoggable(Level.WARNING)) {
+ LOGGER.log(Level.WARNING, StreamingMessages.INVALID_PROPERTY_VALUE_INTEGER(propertyName, propVal, Integer.toString(defaultValue)), nfe);
+ }
+ }
+ }
+ // return with the default value
+ return defaultValue;
+ }
+
+ private static long buildLongValue(String propertyName, long defaultValue) {
+ String propVal = System.getProperty(propertyName);
+ if (propVal != null && propVal.length() > 0) {
+ try {
+ long value = Long.parseLong(propVal);
+ if (value > 0L) {
+ // return with the value in System property
+ return value;
+ }
+ } catch (NumberFormatException nfe) {
+ // defult will be returned
+ if (LOGGER.isLoggable(Level.WARNING)) {
+ LOGGER.log(Level.WARNING, StreamingMessages.INVALID_PROPERTY_VALUE_LONG(propertyName, propVal, Long.toString(defaultValue)), nfe);
+ }
+ }
+ }
+ // return with the default value
+ return defaultValue;
+ }
+
private static Boolean getProperty(final String prop) {
return AccessController.doPrivileged(
new java.security.PrivilegedAction<Boolean>() {
+ @Override
public Boolean run() {
String value = System.getProperty(prop);
return value != null ? Boolean.valueOf(value) : Boolean.FALSE;
@@ -441,4 +611,5 @@
}
);
}
+
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -42,7 +42,7 @@
* <p/>
* The JAX-WS WSDLGenerator uses TXW to serialize the WSDL out to XML.
* More information about TXW can be located at
- * <a href="http://txw.dev.java.net">http://txw.dev.java.net</a>.
+ * <a href="http://txw.java.net">http://txw.java.net</a>.
*/
public abstract class WSDLGeneratorExtension {
/**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java Fri Sep 06 14:20:58 2013 -0700
@@ -81,10 +81,27 @@
}
return toString(packet.getMessage());
+ }
+ public static String toStringNoIndent(Packet packet) {
+ if (packet == null) {
+ return "[ Null packet ]";
+ } else if (packet.getMessage() == null) {
+ return "[ Empty packet ]";
+ }
+
+ return toStringNoIndent(packet.getMessage());
}
public static String toString(Message message) {
+ return toString(message, true);
+ }
+
+ public static String toStringNoIndent(Message message) {
+ return toString(message, false);
+ }
+
+ private static String toString(Message message, boolean createIndenter) {
if (message == null) {
return "[ Null message ]";
}
@@ -94,7 +111,9 @@
XMLStreamWriter writer = null;
try {
writer = xmlOutputFactory.createXMLStreamWriter(stringOut);
- writer = createIndenter(writer);
+ if (createIndenter) {
+ writer = createIndenter(writer);
+ }
message.copy().writeTo(writer);
} catch (Exception e) { // WSIT-1596 - Message Dumping should not affect other processing
LOGGER.log(Level.WARNING, "Unexpected exception occured while dumping message", e);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java Fri Sep 06 14:20:58 2013 -0700
@@ -41,6 +41,7 @@
import com.sun.xml.internal.ws.message.MimeAttachmentSet;
import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil;
import com.sun.xml.internal.ws.util.ByteArrayDataSource;
+import com.sun.xml.internal.ws.util.xml.NamespaceContextExAdaper;
import com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter;
import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter;
import com.sun.xml.internal.ws.streaming.MtomStreamWriter;
@@ -374,8 +375,11 @@
private void writeBinary(ByteArrayBuffer bab) {
try {
mtomAttachments.add(bab);
- writer.setPrefix("xop", XOP_NAMESPACEURI);
- writer.writeNamespace("xop", XOP_NAMESPACEURI);
+ String prefix = writer.getPrefix(XOP_NAMESPACEURI);
+ if (prefix == null || !prefix.equals("xop")) {
+ writer.setPrefix("xop", XOP_NAMESPACEURI);
+ writer.writeNamespace("xop", XOP_NAMESPACEURI);
+ }
writer.writeStartElement(XOP_NAMESPACEURI, XOP_LOCALNAME);
writer.writeAttribute("href", "cid:"+bab.contentId);
writer.writeEndElement();
@@ -513,8 +517,7 @@
@Override
public NamespaceContextEx getNamespaceContext() {
- NamespaceContext nsContext = reader.getNamespaceContext();
- return new MtomNamespaceContextEx(nsContext);
+ return new NamespaceContextExAdaper(reader.getNamespaceContext());
}
@Override
@@ -522,35 +525,6 @@
throw new UnsupportedOperationException();
}
- private static class MtomNamespaceContextEx implements NamespaceContextEx {
- private final NamespaceContext nsContext;
-
- public MtomNamespaceContextEx(NamespaceContext nsContext) {
- this.nsContext = nsContext;
- }
-
- @Override
- public Iterator<Binding> iterator() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getNamespaceURI(String prefix) {
- return nsContext.getNamespaceURI(prefix);
- }
-
- @Override
- public String getPrefix(String namespaceURI) {
- return nsContext.getPrefix(namespaceURI);
- }
-
- @Override
- public Iterator getPrefixes(String namespaceURI) {
- return nsContext.getPrefixes(namespaceURI);
- }
-
- }
-
@Override
public int getTextLength() {
if (xopReferencePresent) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java Fri Sep 06 14:20:58 2013 -0700
@@ -44,12 +44,6 @@
* @author Paul.Sandoz@Sun.Com
*/
final class StreamSOAP11Codec extends StreamSOAPCodec {
- static final StreamHeaderDecoder SOAP11StreamHeaderDecoder = new StreamHeaderDecoder() {
- @Override
- public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- return new StreamHeader11(reader, mark);
- }
- };
public static final String SOAP11_MIME_TYPE = "text/xml";
public static final String DEFAULT_SOAP11_CONTENT_TYPE =
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java Fri Sep 06 14:20:58 2013 -0700
@@ -47,12 +47,6 @@
* @author Paul.Sandoz@Sun.Com
*/
final class StreamSOAP12Codec extends StreamSOAPCodec {
- static final StreamHeaderDecoder SOAP12StreamHeaderDecoder = new StreamHeaderDecoder() {
- @Override
- public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- return new StreamHeader12(reader, mark);
- }
- };
public static final String SOAP12_MIME_TYPE = "application/soap+xml";
public static final String DEFAULT_SOAP12_CONTENT_TYPE =
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java Fri Sep 06 14:20:58 2013 -0700
@@ -194,9 +194,7 @@
return decode(soapVersion, reader, attachmentSet);
}
- public static final Message decode(SOAPVersion soapVersion, XMLStreamReader reader,
- @NotNull AttachmentSet attachmentSet) {
-
+ public static final Message decode(SOAPVersion soapVersion, XMLStreamReader reader, @NotNull AttachmentSet attachmentSet) {
// Move to soap:Envelope and verify
if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT)
XMLStreamReaderUtil.nextElementContent(reader);
@@ -205,61 +203,7 @@
throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
}
XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
-
- TagInfoset envelopeTag = new TagInfoset(reader);
-
- // Collect namespaces on soap:Envelope
- Map<String,String> namespaces = new HashMap<String,String>();
- for(int i=0; i< reader.getNamespaceCount();i++){
- namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
-
- // Move to next element
- XMLStreamReaderUtil.nextElementContent(reader);
- XMLStreamReaderUtil.verifyReaderState(reader,
- javax.xml.stream.XMLStreamConstants.START_ELEMENT);
-
- HeaderList headers = null;
- TagInfoset headerTag = null;
-
- if (reader.getLocalName().equals(SOAP_HEADER)
- && reader.getNamespaceURI().equals(soapVersion.nsUri)) {
- headerTag = new TagInfoset(reader);
-
- // Collect namespaces on soap:Header
- for(int i=0; i< reader.getNamespaceCount();i++){
- namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
- // skip <soap:Header>
- XMLStreamReaderUtil.nextElementContent(reader);
-
- // If SOAP header blocks are present (i.e. not <soap:Header/>)
- if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {
- headers = new HeaderList(soapVersion);
-
- try {
- // Cache SOAP header blocks
- StreamHeaderDecoder headerDecoder = SOAPVersion.SOAP_11.equals(soapVersion) ? StreamSOAP11Codec.SOAP11StreamHeaderDecoder : StreamSOAP12Codec.SOAP12StreamHeaderDecoder;
- cacheHeaders(reader, namespaces, headers, headerDecoder);
- } catch (XMLStreamException e) {
- // TODO need to throw more meaningful exception
- throw new WebServiceException(e);
- }
- }
-
- // Move to soap:Body
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- // Verify that <soap:Body> is present
- XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_BODY);
- TagInfoset bodyTag = new TagInfoset(reader);
-
- String bodyPrologue = XMLStreamReaderUtil.nextWhiteSpaceContent(reader);
- return new StreamMessage(envelopeTag,headerTag,attachmentSet,headers,bodyPrologue,bodyTag,null,reader,soapVersion);
- // when there's no payload,
- // it's tempting to use EmptyMessageImpl, but it doesn't preserve the infoset
- // of <envelope>,<header>, and <body>, so we need to stick to StreamMessage.
+ return new StreamMessage(soapVersion, reader, attachmentSet);
}
public void decode(ReadableByteChannel in, String contentType, Packet packet ) {
@@ -270,56 +214,6 @@
return this;
}
- private static XMLStreamBuffer cacheHeaders(XMLStreamReader reader,
- Map<String, String> namespaces, HeaderList headers,
- StreamHeaderDecoder headerDecoder) throws XMLStreamException {
- MutableXMLStreamBuffer buffer = createXMLStreamBuffer();
- StreamReaderBufferCreator creator = new StreamReaderBufferCreator();
- creator.setXMLStreamBuffer(buffer);
-
- // Reader is positioned at the first header block
- while(reader.getEventType() == javax.xml.stream.XMLStreamConstants.START_ELEMENT) {
- Map<String,String> headerBlockNamespaces = namespaces;
-
- // Collect namespaces on SOAP header block
- if (reader.getNamespaceCount() > 0) {
- headerBlockNamespaces = new HashMap<String,String>(namespaces);
- for (int i = 0; i < reader.getNamespaceCount(); i++) {
- headerBlockNamespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
- }
-
- // Mark
- XMLStreamBuffer mark = new XMLStreamBufferMark(headerBlockNamespaces, creator);
- // Create Header
- headers.add(headerDecoder.decodeHeader(reader, mark));
-
-
- // Cache the header block
- // After caching Reader will be positioned at next header block or
- // the end of the </soap:header>
- creator.createElementFragment(reader, false);
- if (reader.getEventType() != XMLStreamConstants.START_ELEMENT &&
- reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.nextElementContent(reader);
- }
- }
-
- return buffer;
- }
-
- protected interface StreamHeaderDecoder {
- public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark);
- }
-
- private static MutableXMLStreamBuffer createXMLStreamBuffer() {
- // TODO: Decode should own one MutableXMLStreamBuffer for reuse
- // since it is more efficient. ISSUE: possible issue with
- // lifetime of information in the buffer if accessed beyond
- // the pipe line.
- return new MutableXMLStreamBuffer();
- }
-
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
List<String> expectedContentTypes = getExpectedContentTypes();
if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -25,6 +25,8 @@
package com.sun.xml.internal.ws.encoding;
+import java.util.List;
+
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
@@ -221,4 +223,35 @@
private static final String[] EMPTY_ARRAY = new String[0];
private static final AttributesImpl EMPTY_ATTRIBUTES = new AttributesImpl();
+
+ public String getNamespaceURI(String prefix) {
+ int size = ns.length/2;
+ for(int i=0; i<size; i++){
+ String p = ns[i*2 ];
+ String n = ns[i*2+1];
+ if (prefix.equals(p)) return n;
+ }
+ return null;
+ }
+
+ public String getPrefix(String namespaceURI) {
+ int size = ns.length/2;
+ for(int i=0; i<size; i++){
+ String p = ns[i*2 ];
+ String n = ns[i*2+1];
+ if (namespaceURI.equals(n)) return p;
+ }
+ return null;
+ }
+ //Who wants this?
+ public List<String> allPrefixes(String namespaceURI) {
+ int size = ns.length/2;
+ List<String> l = new java.util.ArrayList<String>();
+ for(int i=0; i<size; i++){
+ String p = ns[i*2 ];
+ String n = ns[i*2+1];
+ if (namespaceURI.equals(n)) l.add(p);
+ }
+ return l;
+ }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -25,6 +25,7 @@
package com.sun.xml.internal.ws.message;
+import com.sun.istack.internal.NotNull;
import com.sun.xml.internal.bind.api.Bridge;
import com.sun.xml.internal.ws.api.SOAPVersion;
import com.sun.xml.internal.ws.api.message.Header;
@@ -33,8 +34,11 @@
import com.sun.xml.internal.ws.api.message.MessageWritable;
import com.sun.xml.internal.ws.api.message.Packet;
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory;
+import com.sun.xml.internal.ws.encoding.TagInfoset;
import com.sun.xml.internal.ws.message.saaj.SAAJMessage;
import com.sun.xml.internal.ws.spi.db.XMLBridge;
+import java.util.ArrayList;
+import java.util.Collections;
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
@@ -80,10 +84,34 @@
*/
protected final SOAPVersion soapVersion;
+ protected @NotNull TagInfoset envelopeTag;
+ protected @NotNull TagInfoset headerTag;
+ protected @NotNull TagInfoset bodyTag;
+
+ protected static final AttributesImpl EMPTY_ATTS;
+ protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
+ protected static final List<TagInfoset> DEFAULT_TAGS;
+
+ static void create(SOAPVersion v, List c) {
+ int base = v.ordinal()*3;
+ c.add(base, new TagInfoset(v.nsUri, "Envelope", "S", EMPTY_ATTS,"S", v.nsUri));
+ c.add(base+1, new TagInfoset(v.nsUri, "Header", "S", EMPTY_ATTS));
+ c.add(base+2, new TagInfoset(v.nsUri, "Body", "S", EMPTY_ATTS));
+ }
+
+ static {
+ EMPTY_ATTS = new AttributesImpl();
+ List<TagInfoset> tagList = new ArrayList<TagInfoset>();
+ create(SOAPVersion.SOAP_11, tagList);
+ create(SOAPVersion.SOAP_12, tagList);
+ DEFAULT_TAGS = Collections.unmodifiableList(tagList);
+ }
+
protected AbstractMessageImpl(SOAPVersion soapVersion) {
this.soapVersion = soapVersion;
}
+ @Override
public SOAPVersion getSOAPVersion() {
return soapVersion;
}
@@ -94,10 +122,12 @@
this.soapVersion = that.soapVersion;
}
+ @Override
public Source readEnvelopeAsSource() {
return new SAXSource(new XMLReaderImpl(this), XMLReaderImpl.THE_SOURCE);
}
+ @Override
public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
if(hasAttachments())
unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(getAttachments()));
@@ -108,11 +138,13 @@
}
}
/** @deprecated */
+ @Override
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
return bridge.unmarshal(readPayloadAsSource(),
hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null );
}
+ @Override
public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
return bridge.unmarshal(readPayloadAsSource(),
hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null );
@@ -121,6 +153,7 @@
/**
* Default implementation that relies on {@link #writePayloadTo(XMLStreamWriter)}
*/
+ @Override
public void writeTo(XMLStreamWriter w) throws XMLStreamException {
String soapNsUri = soapVersion.nsUri;
w.writeStartDocument();
@@ -147,6 +180,7 @@
/**
* Writes the whole envelope as SAX events.
*/
+ @Override
public void writeTo( ContentHandler contentHandler, ErrorHandler errorHandler ) throws SAXException {
String soapNsUri = soapVersion.nsUri;
@@ -191,13 +225,12 @@
/**
* Default implementation that uses {@link #writeTo(ContentHandler, ErrorHandler)}
*/
+ @Override
public SOAPMessage readAsSOAPMessage() throws SOAPException {
return SAAJFactory.read(soapVersion, this);
}
- /**
- *
- */
+ @Override
public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
SOAPMessage msg = SAAJFactory.read(soapVersion, this, packet);
transportHeaders(packet, inbound, msg);
@@ -211,7 +244,4 @@
}
if (msg.saveRequired()) msg.saveChanges();
}
-
- protected static final AttributesImpl EMPTY_ATTS = new AttributesImpl();
- protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -28,6 +28,7 @@
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.XMLStreamException2;
import com.sun.xml.internal.bind.api.Bridge;
+import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
import com.sun.xml.internal.ws.api.message.Header;
@@ -142,16 +143,12 @@
}
public XMLStreamReader readHeader() throws XMLStreamException {
- try {
- if(infoset==null) {
- XMLStreamBufferResult sbr = new XMLStreamBufferResult();
- bridge.marshal(jaxbObject,sbr);
- infoset = sbr.getXMLStreamBuffer();
- }
- return infoset.readAsXMLStreamReader();
- } catch (JAXBException e) {
- throw new XMLStreamException2(e);
+ if(infoset==null) {
+ MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
+ writeTo(buffer.createFromXMLStreamWriter());
+ infoset = buffer;
}
+ return infoset.readAsXMLStreamReader();
}
public <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,9 +31,11 @@
import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
import com.sun.xml.internal.ws.api.SOAPVersion;
import com.sun.xml.internal.ws.api.message.AttachmentSet;
+import com.sun.xml.internal.ws.api.message.Header;
import com.sun.xml.internal.ws.api.message.HeaderList;
import com.sun.xml.internal.ws.api.message.Message;
import com.sun.xml.internal.ws.api.message.MessageHeaders;
+import com.sun.xml.internal.ws.api.message.StreamingSOAP;
import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
import com.sun.xml.internal.ws.message.AbstractMessageImpl;
import com.sun.xml.internal.ws.message.AttachmentSetImpl;
@@ -45,6 +47,9 @@
import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil;
import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
import com.sun.xml.internal.ws.streaming.MtomStreamWriter;
+import com.sun.xml.internal.ws.util.xml.XMLReaderComposite;
+import com.sun.xml.internal.ws.util.xml.XMLReaderComposite.ElemInfo;
+
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
@@ -65,13 +70,14 @@
import javax.xml.transform.Source;
import javax.xml.ws.WebServiceException;
import java.io.OutputStream;
+import java.util.List;
/**
* {@link Message} backed by a JAXB bean.
*
* @author Kohsuke Kawaguchi
*/
-public final class JAXBMessage extends AbstractMessageImpl {
+public final class JAXBMessage extends AbstractMessageImpl implements StreamingSOAP {
private MessageHeaders headers;
/**
@@ -319,14 +325,17 @@
public XMLStreamReader readPayload() throws XMLStreamException {
try {
if(infoset==null) {
- XMLStreamBufferResult sbr = new XMLStreamBufferResult();
if (rawContext != null) {
+ XMLStreamBufferResult sbr = new XMLStreamBufferResult();
Marshaller m = rawContext.createMarshaller();
m.setProperty("jaxb.fragment", Boolean.TRUE);
m.marshal(jaxbObject, sbr);
- } else
- bridge.marshal(jaxbObject, sbr);
- infoset = sbr.getXMLStreamBuffer();
+ infoset = sbr.getXMLStreamBuffer();
+ } else {
+ MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
+ writePayloadTo(buffer.createFromXMLStreamWriter());
+ infoset = buffer;
+ }
}
XMLStreamReader reader = infoset.readAsXMLStreamReader();
if(reader.getEventType()== START_DOCUMENT)
@@ -376,21 +385,22 @@
// Get output stream and use JAXB UTF-8 writer
OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null;
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.TRUE);
- m.setAttachmentMarshaller(am);
- if (os != null)
- m.marshal(jaxbObject, os);
- else
- m.marshal(jaxbObject, sw);
- } else {
- if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) {
- bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am);
- } else {
- bridge.marshal(jaxbObject, sw, am);
- }
- }
+ if (rawContext != null) {
+ Marshaller m = rawContext.createMarshaller();
+ m.setProperty("jaxb.fragment", Boolean.TRUE);
+ m.setAttachmentMarshaller(am);
+ if (os != null) {
+ m.marshal(jaxbObject, os);
+ } else {
+ m.marshal(jaxbObject, sw);
+ }
+ } else {
+ if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) {
+ bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am);
+ } else {
+ bridge.marshal(jaxbObject, sw, am);
+ }
+ }
//cleanup() is not needed since JAXB doesn't keep ref to AttachmentMarshaller
//am.cleanup();
} catch (JAXBException e) {
@@ -404,4 +414,33 @@
return new JAXBMessage(this);
}
+ public XMLStreamReader readEnvelope() {
+ int base = soapVersion.ordinal()*3;
+ this.envelopeTag = DEFAULT_TAGS.get(base);
+ this.bodyTag = DEFAULT_TAGS.get(base+2);
+ List<XMLStreamReader> hReaders = new java.util.ArrayList<XMLStreamReader>();
+ ElemInfo envElem = new ElemInfo(envelopeTag, null);
+ ElemInfo bdyElem = new ElemInfo(bodyTag, envElem);
+ for (Header h : getHeaders().asList()) {
+ try {
+ hReaders.add(h.readHeader());
+ } catch (XMLStreamException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ XMLStreamReader soapHeader = null;
+ if(hReaders.size()>0) {
+ headerTag = DEFAULT_TAGS.get(base+1);
+ ElemInfo hdrElem = new ElemInfo(headerTag, envElem);
+ soapHeader = new XMLReaderComposite(hdrElem, hReaders.toArray(new XMLStreamReader[hReaders.size()]));
+ }
+ try {
+ XMLStreamReader payload= readPayload();
+ XMLStreamReader soapBody = new XMLReaderComposite(bdyElem, new XMLStreamReader[]{payload});
+ XMLStreamReader[] soapContent = (soapHeader != null) ? new XMLStreamReader[]{soapHeader, soapBody} : new XMLStreamReader[]{soapBody};
+ return new XMLReaderComposite(envElem, soapContent);
+ } catch (XMLStreamException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java Fri Sep 06 14:20:58 2013 -0700
@@ -175,7 +175,7 @@
*/
@Override
public @NotNull AttachmentSet getAttachments() {
- parse();
+ if (attachmentSet == null) attachmentSet = new SAAJAttachmentSet(sm);
return attachmentSet;
}
@@ -185,23 +185,21 @@
*/
@Override
protected boolean hasAttachments() {
- parse();
- return attachmentSet!=null;
+ return !getAttachments().isEmpty();
}
public @Nullable String getPayloadLocalPart() {
- access();
+ soapBodyFirstChild();
return payloadLocalName;
}
public String getPayloadNamespaceURI() {
- access();
+ soapBodyFirstChild();
return payloadNamespace;
}
public boolean hasPayload() {
- access();
- return payloadNamespace != null;
+ return soapBodyFirstChild() != null;
}
private void addAttributes(Element e, NamedNodeMap attrs) {
@@ -327,15 +325,7 @@
}
public XMLStreamReader readPayload() throws XMLStreamException {
- access();
- if (payload != null) {
- DOMStreamReader dss = new DOMStreamReader();
- dss.setCurrentNode(payload);
- dss.nextTag();
- assert dss.getEventType() == XMLStreamReader.START_ELEMENT;
- return dss;
- }
- return null;
+ return soapBodyFirstChildReader();
}
public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
@@ -522,7 +512,7 @@
private static final AttributesImpl EMPTY_ATTS = new AttributesImpl();
private static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
- private static class SAAJAttachment implements AttachmentEx {
+ protected static class SAAJAttachment implements AttachmentEx {
final AttachmentPart ap;
@@ -651,7 +641,7 @@
* SAAJ wants '<' and '>' for the content ID, but {@link AttachmentSet}
* doesn't. S this class also does the conversion between them.
*/
- private static class SAAJAttachmentSet implements AttachmentSet {
+ protected static class SAAJAttachmentSet implements AttachmentSet {
private Map<String, Attachment> attMap;
private Iterator attIter;
@@ -715,4 +705,74 @@
public SOAPVersion getSOAPVersion() {
return soapVersion;
}
+
+ private XMLStreamReader soapBodyFirstChildReader;
+
+ /**
+ * This allow the subclass to retain the XMLStreamReader.
+ */
+ protected XMLStreamReader getXMLStreamReader(SOAPElement soapElement) {
+ return null;
+ }
+
+ protected XMLStreamReader createXMLStreamReader(SOAPElement soapElement) {
+ DOMStreamReader dss = new DOMStreamReader();
+ dss.setCurrentNode(soapElement);
+ return dss;
+ }
+
+ protected XMLStreamReader soapBodyFirstChildReader() {
+ if (soapBodyFirstChildReader != null) return soapBodyFirstChildReader;
+ soapBodyFirstChild();
+ if (soapBodyFirstChild != null) {
+ soapBodyFirstChildReader = getXMLStreamReader(soapBodyFirstChild);
+ if (soapBodyFirstChildReader == null) soapBodyFirstChildReader =
+ createXMLStreamReader(soapBodyFirstChild);
+ if (soapBodyFirstChildReader.getEventType() == XMLStreamReader.START_DOCUMENT) {
+ try {
+ while(soapBodyFirstChildReader.getEventType() != XMLStreamReader.START_ELEMENT)
+ soapBodyFirstChildReader.next();
+ } catch (XMLStreamException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ return soapBodyFirstChildReader;
+ } else {
+ payloadLocalName = null;
+ payloadNamespace = null;
+ return null;
+ }
+ }
+
+ private SOAPElement soapBodyFirstChild;
+
+ SOAPElement soapBodyFirstChild() {
+ if (soapBodyFirstChild != null) return soapBodyFirstChild;
+ try {
+ boolean foundElement = false;
+ for (Node n = sm.getSOAPBody().getFirstChild(); n != null && !foundElement; n = n.getNextSibling()) {
+ if (n.getNodeType() == Node.ELEMENT_NODE) {
+ foundElement = true;
+ if (n instanceof SOAPElement) {
+ soapBodyFirstChild = (SOAPElement) n;
+ payloadLocalName = soapBodyFirstChild.getLocalName();
+ payloadNamespace = soapBodyFirstChild.getNamespaceURI();
+ return soapBodyFirstChild;
+ }
+ }
+ }
+ if(foundElement) for(Iterator i = sm.getSOAPBody().getChildElements(); i.hasNext();){
+ Object o = i.next();
+ if (o instanceof SOAPElement) {
+ soapBodyFirstChild = (SOAPElement)o;
+ payloadLocalName = soapBodyFirstChild.getLocalName();
+ payloadNamespace = soapBodyFirstChild.getNamespaceURI();
+ return soapBodyFirstChild;
+ }
+ }
+ } catch (SOAPException e) {
+ throw new RuntimeException(e);
+ }
+ return soapBodyFirstChild;
+ }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,6 +30,8 @@
import com.sun.istack.internal.XMLStreamReaderToContentHandler;
import com.sun.xml.internal.bind.api.Bridge;
import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
+import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
+import com.sun.xml.internal.stream.buffer.XMLStreamBufferMark;
import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferCreator;
import com.sun.xml.internal.ws.api.SOAPVersion;
import com.sun.xml.internal.ws.api.message.AttachmentSet;
@@ -37,15 +39,20 @@
import com.sun.xml.internal.ws.api.message.HeaderList;
import com.sun.xml.internal.ws.api.message.Message;
import com.sun.xml.internal.ws.api.message.MessageHeaders;
+import com.sun.xml.internal.ws.api.message.StreamingSOAP;
import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
import com.sun.xml.internal.ws.encoding.TagInfoset;
import com.sun.xml.internal.ws.message.AbstractMessageImpl;
import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl;
+import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException;
import com.sun.xml.internal.ws.spi.db.XMLBridge;
import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
import com.sun.xml.internal.ws.util.xml.DummyLocation;
import com.sun.xml.internal.ws.util.xml.StAXSource;
+import com.sun.xml.internal.ws.util.xml.XMLReaderComposite;
import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter;
+import com.sun.xml.internal.ws.util.xml.XMLReaderComposite.ElemInfo;
+
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
@@ -55,6 +62,7 @@
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.stream.*;
+
import static javax.xml.stream.XMLStreamConstants.START_DOCUMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
@@ -62,7 +70,9 @@
import javax.xml.ws.WebServiceException;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* {@link Message} implementation backed by {@link XMLStreamReader}.
@@ -70,7 +80,7 @@
* TODO: we need another message class that keeps {@link XMLStreamReader} that points
* at the start of the envelope element.
*/
-public class StreamMessage extends AbstractMessageImpl {
+public class StreamMessage extends AbstractMessageImpl implements StreamingSOAP {
/**
* The reader will be positioned at
* the first child of the SOAP body
@@ -93,44 +103,51 @@
*/
private String bodyEpilogue = null;
- private final String payloadLocalName;
-
- private final String payloadNamespaceURI;
+ private String payloadLocalName;
- /**
- * infoset about the SOAP envelope, header, and body.
- *
- * <p>
- * If the creater of this object didn't care about those,
- * we use stock values.
- */
- private @NotNull TagInfoset envelopeTag;
- private @NotNull TagInfoset headerTag;
- private @NotNull TagInfoset bodyTag;
+ private String payloadNamespaceURI;
/**
* Used only for debugging. This records where the message was consumed.
*/
private Throwable consumedAt;
- /**
- * Default s:Envelope, s:Header, and s:Body tag infoset definitions.
- *
- * We need 3 for SOAP 1.1, 3 for SOAP 1.2.
- */
- private static final TagInfoset[] DEFAULT_TAGS;
-
- static {
- DEFAULT_TAGS = new TagInfoset[6];
- create(SOAPVersion.SOAP_11);
- create(SOAPVersion.SOAP_12);
- }
+ private XMLStreamReader envelopeReader;
public StreamMessage(SOAPVersion v) {
super(v);
payloadLocalName = null;
payloadNamespaceURI = null;
}
+
+ public StreamMessage(SOAPVersion v, @NotNull XMLStreamReader envelope, @NotNull AttachmentSet attachments) {
+ super(v);
+ envelopeReader = envelope;
+ attachmentSet = attachments;
+ }
+
+ public XMLStreamReader readEnvelope() {
+ if (envelopeReader == null) {
+ List<XMLStreamReader> hReaders = new java.util.ArrayList<XMLStreamReader>();
+ ElemInfo envElem = new ElemInfo(envelopeTag, null);
+ ElemInfo hdrElem = (headerTag != null) ? new ElemInfo(headerTag, envElem) : null;
+ ElemInfo bdyElem = new ElemInfo(bodyTag, envElem);
+ for (Header h : getHeaders().asList()) {
+ try {
+ hReaders.add(h.readHeader());
+ } catch (XMLStreamException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ XMLStreamReader soapHeader = (hdrElem != null) ? new XMLReaderComposite(hdrElem, hReaders.toArray(new XMLStreamReader[hReaders.size()])) : null;
+ XMLStreamReader[] payload = {readPayload()};
+ XMLStreamReader soapBody = new XMLReaderComposite(bdyElem, payload);
+ XMLStreamReader[] soapContent = (soapHeader != null) ? new XMLStreamReader[]{soapHeader, soapBody} : new XMLStreamReader[]{soapBody};
+ return new XMLReaderComposite(envElem, soapContent);
+ }
+ return envelopeReader;
+ }
+
/**
* Creates a {@link StreamMessage} from a {@link XMLStreamReader}
* that points at the start element of the payload, and headers.
@@ -147,6 +164,10 @@
*/
public StreamMessage(@Nullable MessageHeaders headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
super(soapVersion);
+ init(headers, attachmentSet, reader, soapVersion);
+ }
+
+ private void init(@Nullable MessageHeaders headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
this.headers = headers;
this.attachmentSet = attachmentSet;
this.reader = reader;
@@ -175,9 +196,9 @@
// use the default infoset representation for headers
int base = soapVersion.ordinal()*3;
- this.envelopeTag = DEFAULT_TAGS[base];
- this.headerTag = DEFAULT_TAGS[base+1];
- this.bodyTag = DEFAULT_TAGS[base+2];
+ this.envelopeTag = DEFAULT_TAGS.get(base);
+ this.headerTag = DEFAULT_TAGS.get(base+1);
+ this.bodyTag = DEFAULT_TAGS.get(base+2);
}
/**
@@ -197,7 +218,12 @@
}
public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @Nullable String bodyPrologue, @NotNull TagInfoset bodyTag, @Nullable String bodyEpilogue, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
- this(headers,attachmentSet,reader,soapVersion);
+ super(soapVersion);
+ init(envelopeTag, headerTag, attachmentSet, headers, bodyPrologue, bodyTag, bodyEpilogue, reader, soapVersion);
+ }
+
+ private void init(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @Nullable String bodyPrologue, @NotNull TagInfoset bodyTag, @Nullable String bodyEpilogue, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
+ init(headers,attachmentSet,reader,soapVersion);
if(envelopeTag == null ) {
throw new IllegalArgumentException("EnvelopeTag TagInfoset cannot be null");
}
@@ -212,10 +238,12 @@
}
public boolean hasHeaders() {
+ if ( envelopeReader != null ) readEnvelope(this);
return headers!=null && headers.hasHeaders();
}
public MessageHeaders getHeaders() {
+ if ( envelopeReader != null ) readEnvelope(this);
if (headers == null) {
headers = new HeaderList(getSOAPVersion());
}
@@ -223,14 +251,17 @@
}
public String getPayloadLocalPart() {
+ if ( envelopeReader != null ) readEnvelope(this);
return payloadLocalName;
}
public String getPayloadNamespaceURI() {
+ if ( envelopeReader != null ) readEnvelope(this);
return payloadNamespaceURI;
}
public boolean hasPayload() {
+ if ( envelopeReader != null ) readEnvelope(this);
return payloadLocalName!=null;
}
@@ -329,6 +360,7 @@
}
public void writePayloadTo(XMLStreamWriter writer)throws XMLStreamException {
+ if ( envelopeReader != null ) readEnvelope(this);
assert unconsumed();
if(payloadLocalName==null) {
@@ -379,6 +411,7 @@
}
public void writeTo(XMLStreamWriter sw) throws XMLStreamException{
+ if ( envelopeReader != null ) readEnvelope(this);
writeEnvelope(sw);
}
@@ -387,6 +420,7 @@
* @param writer
*/
private void writeEnvelope(XMLStreamWriter writer) throws XMLStreamException {
+ if ( envelopeReader != null ) readEnvelope(this);
writer.writeStartDocument();
envelopeTag.writeStart(writer);
@@ -411,6 +445,7 @@
}
public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
+ if ( envelopeReader != null ) readEnvelope(this);
assert unconsumed();
try {
@@ -465,8 +500,10 @@
}
}
- // TODO: this method should be probably rewritten to respect spaces between eelements; is it used at all?
+ // TODO: this method should be probably rewritten to respect spaces between elements; is it used at all?
+ @Override
public Message copy() {
+ if ( envelopeReader != null ) readEnvelope(this);
try {
assert unconsumed();
consumedAt = null; // but we don't want to mark it as consumed
@@ -528,6 +565,7 @@
}
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler ) throws SAXException {
+ if ( envelopeReader != null ) readEnvelope(this);
contentHandler.setDocumentLocator(NULL_LOCATOR);
contentHandler.startDocument();
envelopeTag.writeStart(contentHandler);
@@ -570,23 +608,159 @@
return true;
}
- private static void create(SOAPVersion v) {
- int base = v.ordinal()*3;
- DEFAULT_TAGS[base ] = new TagInfoset(v.nsUri,"Envelope","S",EMPTY_ATTS,"S",v.nsUri);
- DEFAULT_TAGS[base+1] = new TagInfoset(v.nsUri,"Header","S",EMPTY_ATTS);
- DEFAULT_TAGS[base+2] = new TagInfoset(v.nsUri,"Body","S",EMPTY_ATTS);
- }
-
public String getBodyPrologue() {
+ if ( envelopeReader != null ) readEnvelope(this);
return bodyPrologue;
}
public String getBodyEpilogue() {
+ if ( envelopeReader != null ) readEnvelope(this);
return bodyEpilogue;
}
public XMLStreamReader getReader() {
+ if ( envelopeReader != null ) readEnvelope(this);
assert unconsumed();
return reader;
}
+
+
+ private static final String SOAP_ENVELOPE = "Envelope";
+ private static final String SOAP_HEADER = "Header";
+ private static final String SOAP_BODY = "Body";
+
+ protected interface StreamHeaderDecoder {
+ public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark);
+ }
+
+ static final StreamHeaderDecoder SOAP12StreamHeaderDecoder = new StreamHeaderDecoder() {
+ @Override
+ public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
+ return new StreamHeader12(reader, mark);
+ }
+ };
+
+ static final StreamHeaderDecoder SOAP11StreamHeaderDecoder = new StreamHeaderDecoder() {
+ @Override
+ public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
+ return new StreamHeader11(reader, mark);
+ }
+ };
+
+ static private void readEnvelope(StreamMessage message) {
+ if ( message.envelopeReader == null ) return;
+ XMLStreamReader reader = message.envelopeReader;
+ message.envelopeReader = null;
+ SOAPVersion soapVersion = message.soapVersion;
+ // Move to soap:Envelope and verify
+ if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT)
+ XMLStreamReaderUtil.nextElementContent(reader);
+ XMLStreamReaderUtil.verifyReaderState(reader,XMLStreamConstants.START_ELEMENT);
+ if (SOAP_ENVELOPE.equals(reader.getLocalName()) && !soapVersion.nsUri.equals(reader.getNamespaceURI())) {
+ throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
+ }
+ XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
+
+ TagInfoset envelopeTag = new TagInfoset(reader);
+
+ // Collect namespaces on soap:Envelope
+ Map<String,String> namespaces = new HashMap<String,String>();
+ for(int i=0; i< reader.getNamespaceCount();i++){
+ namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
+ }
+
+ // Move to next element
+ XMLStreamReaderUtil.nextElementContent(reader);
+ XMLStreamReaderUtil.verifyReaderState(reader,
+ javax.xml.stream.XMLStreamConstants.START_ELEMENT);
+
+ HeaderList headers = null;
+ TagInfoset headerTag = null;
+
+ if (reader.getLocalName().equals(SOAP_HEADER)
+ && reader.getNamespaceURI().equals(soapVersion.nsUri)) {
+ headerTag = new TagInfoset(reader);
+
+ // Collect namespaces on soap:Header
+ for(int i=0; i< reader.getNamespaceCount();i++){
+ namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
+ }
+ // skip <soap:Header>
+ XMLStreamReaderUtil.nextElementContent(reader);
+
+ // If SOAP header blocks are present (i.e. not <soap:Header/>)
+ if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {
+ headers = new HeaderList(soapVersion);
+
+ try {
+ // Cache SOAP header blocks
+ StreamHeaderDecoder headerDecoder = SOAPVersion.SOAP_11.equals(soapVersion) ? SOAP11StreamHeaderDecoder : SOAP12StreamHeaderDecoder;
+ cacheHeaders(reader, namespaces, headers, headerDecoder);
+ } catch (XMLStreamException e) {
+ // TODO need to throw more meaningful exception
+ throw new WebServiceException(e);
+ }
+ }
+
+ // Move to soap:Body
+ XMLStreamReaderUtil.nextElementContent(reader);
+ }
+
+ // Verify that <soap:Body> is present
+ XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_BODY);
+ TagInfoset bodyTag = new TagInfoset(reader);
+
+ String bodyPrologue = XMLStreamReaderUtil.nextWhiteSpaceContent(reader);
+ message.init(envelopeTag,headerTag,message.attachmentSet,headers,bodyPrologue,bodyTag,null,reader,soapVersion);
+ // when there's no payload,
+ // it's tempting to use EmptyMessageImpl, but it doesn't preserve the infoset
+ // of <envelope>,<header>, and <body>, so we need to stick to StreamMessage.
+ }
+
+
+ private static XMLStreamBuffer cacheHeaders(XMLStreamReader reader,
+ Map<String, String> namespaces, HeaderList headers,
+ StreamHeaderDecoder headerDecoder) throws XMLStreamException {
+ MutableXMLStreamBuffer buffer = createXMLStreamBuffer();
+ StreamReaderBufferCreator creator = new StreamReaderBufferCreator();
+ creator.setXMLStreamBuffer(buffer);
+
+ // Reader is positioned at the first header block
+ while(reader.getEventType() == javax.xml.stream.XMLStreamConstants.START_ELEMENT) {
+ Map<String,String> headerBlockNamespaces = namespaces;
+
+ // Collect namespaces on SOAP header block
+ if (reader.getNamespaceCount() > 0) {
+ headerBlockNamespaces = new HashMap<String,String>(namespaces);
+ for (int i = 0; i < reader.getNamespaceCount(); i++) {
+ headerBlockNamespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
+ }
+ }
+
+ // Mark
+ XMLStreamBuffer mark = new XMLStreamBufferMark(headerBlockNamespaces, creator);
+ // Create Header
+ headers.add(headerDecoder.decodeHeader(reader, mark));
+
+
+ // Cache the header block
+ // After caching Reader will be positioned at next header block or
+ // the end of the </soap:header>
+ creator.createElementFragment(reader, false);
+ if (reader.getEventType() != XMLStreamConstants.START_ELEMENT &&
+ reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
+ XMLStreamReaderUtil.nextElementContent(reader);
+ }
+ }
+
+ return buffer;
+ }
+
+ private static MutableXMLStreamBuffer createXMLStreamBuffer() {
+ // TODO: Decode should own one MutableXMLStreamBuffer for reuse
+ // since it is more efficient. ISSUE: possible issue with
+ // lifetime of information in the buffer if accessed beyond
+ // the pipe line.
+ return new MutableXMLStreamBuffer();
+ }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java Fri Sep 06 14:20:58 2013 -0700
@@ -99,6 +99,18 @@
return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE(arg0, arg1));
}
+ public static Localizable localizableWOODSTOX_CANT_LOAD(Object arg0) {
+ return messageFactory.getMessage("woodstox.cant.load", arg0);
+ }
+
+ /**
+ * Unable to load Woodstox class {0}
+ *
+ */
+ public static String WOODSTOX_CANT_LOAD(Object arg0) {
+ return localizer.localize(localizableWOODSTOX_CANT_LOAD(arg0));
+ }
+
public static Localizable localizableXMLREADER_IO_EXCEPTION(Object arg0) {
return messageFactory.getMessage("xmlreader.ioException", arg0);
}
@@ -123,6 +135,18 @@
return localizer.localize(localizableFASTINFOSET_NO_IMPLEMENTATION());
}
+ public static Localizable localizableINVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) {
+ return messageFactory.getMessage("invalid.property.value.integer", arg0, arg1, arg2);
+ }
+
+ /**
+ * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid integer. Using default value "{2}".
+ *
+ */
+ public static String INVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) {
+ return localizer.localize(localizableINVALID_PROPERTY_VALUE_INTEGER(arg0, arg1, arg2));
+ }
+
public static Localizable localizableXMLWRITER_IO_EXCEPTION(Object arg0) {
return messageFactory.getMessage("xmlwriter.ioException", arg0);
}
@@ -183,6 +207,18 @@
return localizer.localize(localizableXMLREADER_NESTED_ERROR(arg0));
}
+ public static Localizable localizableINVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) {
+ return messageFactory.getMessage("invalid.property.value.long", arg0, arg1, arg2);
+ }
+
+ /**
+ * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid long. Using default value "{2}".
+ *
+ */
+ public static String INVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) {
+ return localizer.localize(localizableINVALID_PROPERTY_VALUE_LONG(arg0, arg1, arg2));
+ }
+
public static Localizable localizableSTAXREADER_XMLSTREAMEXCEPTION(Object arg0) {
return messageFactory.getMessage("staxreader.xmlstreamexception", arg0);
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, 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
@@ -48,3 +48,8 @@
fastinfoset.noImplementation=Unable to locate compatible implementation of Fast Infoset in classpath
sourcereader.invalidSource=Unable to create reader from source \"{0}\"
+
+woodstox.cant.load=Unable to load Woodstox class {0}
+
+invalid.property.value.integer=Ignoring system property \"{0}\" as value \"{1}\" is invalid, property value must be a valid integer. Using default value \"{2}\".
+invalid.property.value.long=Ignoring system property \"{0}\" as value \"{1}\" is invalid, property value must be a valid long. Using default value \"{2}\".
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -66,7 +66,7 @@
private static final QName SCHEMA_IMPORT_QNAME = new QName(NS_XSD, "import");
private static final QName SCHEMA_REDEFINE_QNAME = new QName(NS_XSD, "redefine");
private static final String VERSION_COMMENT =
- " Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is "+RuntimeVersion.VERSION+". ";
+ " Published by JAX-WS RI (http://jax-ws.java.net). RI's version is "+RuntimeVersion.VERSION+". ";
private final QName rootName;
private final SDDocumentSource source;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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,13 +36,9 @@
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttachmentRef;
import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable;
-//import com.sun.xml.internal.bind.api.BridgeContext;
-//import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-//import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
/**
* {@link JAXBContext} enhanced with JAXB RI specific functionalities.
@@ -222,32 +218,6 @@
public abstract @NotNull String getBuildId();
/**
- * Generates the episode file that represents the binding known to this {@link JAXBContext},
- * so that XJC can later do separate compilation.
- *
- * <p>
- * Episode file is really just a JAXB customization file, except that currently
- * we use the RI-specific SCD to refer to schema components.
- *
- * @param output
- * This receives the generated episode file.
- *
- * @since 2.1
- */
-// public abstract void generateEpisode(Result output);
-
- /**
- * Allows you to access the runtime model information of the JAXB XML/Java binding.
- *
- * <p>
- * This is useful for doing a deeper integration with the JAXB RI.
- * For more information about the model, see https://jaxb2-reflection.dev.java.net/
- *
- * @since 2.1.10
- */
-// public abstract RuntimeTypeInfoSet getRuntimeTypeInfoSet();
-
- /**
* The property that you can specify to {@link JAXBContext#newInstance}
* to reassign the default namespace URI to something else at the runtime.
*
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -72,6 +72,8 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import static com.sun.xml.internal.ws.util.xml.XmlUtil.allowFileAccess;
+
/**
* {@link Tube} that does the schema validation.
*
@@ -90,7 +92,7 @@
super(next);
this.binding = binding;
feature = binding.getFeature(SchemaValidationFeature.class);
- sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ sf = allowFileAccess(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI), false);
}
protected AbstractSchemaValidationTube(AbstractSchemaValidationTube that, TubeCloner cloner) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties Fri Sep 06 14:20:58 2013 -0700
@@ -274,7 +274,7 @@
V-030 = Attribute value "{0}" does not name a notation
V-031 = Attribute value "{0}" does not name an unparsed entity
V-032 = NMTOKENS attributes must have at least one value
-# Empty content model is a special type of XML element. I?d leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
+# Empty content model is a special type of XML element. I�d leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
V-033 = Empty content models must have no content
# Usage not found. TODO Remove
#V-034 = Element "{0}" does not allow "{1}" -- {2}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, 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,7 +23,7 @@
# questions.
#
-build-id=2.2.9-b14027
-build-version=JAX-WS RI 2.2.9-b14027
+build-id=2.2.9-b14140
+build-version=JAX-WS RI 2.2.9-b14140
major-version=2.2.9
-svn-revision=14027
+svn-revision=14140
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamespaceContextExAdaper.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2013, 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.ws.util.xml;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.NamespaceContext;
+
+import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
+
+public class NamespaceContextExAdaper implements NamespaceContextEx {
+
+ private final NamespaceContext nsContext;
+
+ public NamespaceContextExAdaper(NamespaceContext nsContext) {
+ this.nsContext = nsContext;
+ }
+
+ @Override //Who wants this?
+ public Iterator<Binding> iterator() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getNamespaceURI(String prefix) {
+ return nsContext.getNamespaceURI(prefix);
+ }
+
+ @Override
+ public String getPrefix(String namespaceURI) {
+ return nsContext.getPrefix(namespaceURI);
+ }
+
+ @Override
+ public Iterator getPrefixes(String namespaceURI) {
+ return nsContext.getPrefixes(namespaceURI);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLReaderComposite.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,662 @@
+/*
+ * Copyright (c) 2013, 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.ws.util.xml;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
+import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
+
+import com.sun.xml.internal.ws.encoding.TagInfoset;
+
+/**
+ * XMLReaderComposite
+ *
+ * @author shih-chang.chen@oracle.com
+ */
+public class XMLReaderComposite implements XMLStreamReaderEx {
+
+ static public enum State { StartTag, Payload, EndTag }
+
+ protected State state = State.StartTag;
+ protected ElemInfo elemInfo;
+ protected TagInfoset tagInfo;
+ protected XMLStreamReader[] children;
+ protected int payloadIndex = -1;
+ protected XMLStreamReader payloadReader;
+
+ static public class ElemInfo implements NamespaceContext {
+ ElemInfo ancestor;
+ TagInfoset tagInfo;
+ public ElemInfo(TagInfoset tag, ElemInfo parent) { tagInfo = tag; ancestor = parent; }
+ public String getNamespaceURI(String prefix) {
+ String n = tagInfo.getNamespaceURI(prefix);
+ return (n != null) ? n : (ancestor != null) ? ancestor.getNamespaceURI(prefix) : null;
+ }
+ public String getPrefix(String uri) {
+ String p = tagInfo.getPrefix(uri);
+ return (p != null) ? p : (ancestor != null) ? ancestor.getPrefix(uri) : null;
+ }
+ //Who wants this?
+ public List<String> allPrefixes(String namespaceURI) {
+ List<String> l = tagInfo.allPrefixes(namespaceURI);
+ if (ancestor != null) {
+ List<String> p = ancestor.allPrefixes(namespaceURI);
+ p.addAll(l);
+ return p;
+ }
+ return l;
+ }
+ public Iterator<String> getPrefixes(String namespaceURI) {
+ return allPrefixes(namespaceURI).iterator();
+ }
+ }
+
+ public XMLReaderComposite(final ElemInfo elem, XMLStreamReader[] wrapees) {
+ elemInfo = elem;
+ tagInfo = elem.tagInfo;
+ children = wrapees;
+ if (children != null && children.length > 0) {
+ payloadIndex = 0;
+ payloadReader = children[payloadIndex];
+ }
+ }
+
+
+ @Override
+ public int next() throws XMLStreamException {
+ switch (state) {
+ case StartTag:
+ if (payloadReader != null) {
+ state = State.Payload;
+ return payloadReader.getEventType();
+ } else {
+ state = State.EndTag;
+ return XMLStreamReader.END_ELEMENT;
+ }
+ case EndTag: return XMLStreamReader.END_DOCUMENT;
+ case Payload:
+ default:
+ int next = XMLStreamReader.END_DOCUMENT;
+ if (payloadReader != null && payloadReader.hasNext()) {
+ next = payloadReader.next();
+ }
+ if (next != XMLStreamReader.END_DOCUMENT) return next;
+ else {
+ if (payloadIndex+1 < children.length ) {
+ payloadIndex++;
+ payloadReader = children[payloadIndex];
+ return payloadReader.getEventType();
+ } else {
+ state = State.EndTag;
+ return XMLStreamReader.END_ELEMENT;
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean hasNext() throws XMLStreamException {
+ switch (state) {
+ case EndTag: return false;
+ case StartTag:
+ case Payload:
+ default: return true;
+ }
+ }
+
+ @Override
+ public String getElementText() throws XMLStreamException {
+ switch (state) {
+ case StartTag:
+ if (payloadReader.isCharacters()) return payloadReader.getText();
+ return "";
+ case Payload:
+ default:
+ return payloadReader.getElementText();
+ }
+ }
+
+ @Override
+ public int nextTag() throws XMLStreamException {
+ int e = next();
+ if (e == XMLStreamReader.END_DOCUMENT) return e;
+ while (e != XMLStreamReader.END_DOCUMENT) {
+ if (e == XMLStreamReader.START_ELEMENT) return e;
+ if (e == XMLStreamReader.END_ELEMENT) return e;
+ e = next();
+ }
+ return e;
+ }
+
+ @Override
+ public Object getProperty(String name) throws IllegalArgumentException {
+ return (payloadReader != null) ? payloadReader.getProperty(name) : null;
+ }
+
+ @Override
+ public void require(int type, String namespaceURI, String localName) throws XMLStreamException {
+ if (payloadReader!=null) payloadReader.require(type, namespaceURI, localName);
+ }
+
+ @Override
+ public void close() throws XMLStreamException {
+ if (payloadReader!=null) payloadReader.close();
+ }
+
+ @Override
+ public String getNamespaceURI(String prefix) {
+ switch (state) {
+ case StartTag:
+ case EndTag:
+ return elemInfo.getNamespaceURI(prefix);
+ case Payload:
+ default:
+ return payloadReader.getNamespaceURI(prefix);
+ }
+ }
+
+ @Override
+ public boolean isStartElement() {
+ switch (state) {
+ case StartTag: return true;
+ case EndTag: return false;
+ case Payload:
+ default:
+ return payloadReader.isStartElement();
+ }
+ }
+
+ @Override
+ public boolean isEndElement() {
+ switch (state) {
+ case StartTag: return false;
+ case EndTag: return true;
+ case Payload:
+ default:
+ return payloadReader.isEndElement();
+ }
+ }
+
+ @Override
+ public boolean isCharacters() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return false;
+ case Payload:
+ default:
+ return payloadReader.isCharacters();
+ }
+ }
+
+ @Override
+ public boolean isWhiteSpace() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return false;
+ case Payload:
+ default:
+ return payloadReader.isWhiteSpace();
+ }
+ }
+
+ @Override
+ public String getAttributeValue(String uri, String localName) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.atts.getValue(uri, localName);
+ case Payload:
+ default:
+ return payloadReader.getAttributeValue(uri, localName);
+ }
+ }
+
+ @Override
+ public int getAttributeCount() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.atts.getLength();
+ case Payload:
+ default:
+ return payloadReader.getAttributeCount();
+ }
+ }
+
+ @Override
+ public QName getAttributeName(int i) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return new QName(tagInfo.atts.getURI(i),tagInfo.atts.getLocalName(i),getPrfix(tagInfo.atts.getQName(i)));
+ case Payload:
+ default:
+ return payloadReader.getAttributeName(i);
+ }
+ }
+
+ @Override
+ public String getAttributeNamespace(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.atts.getURI(index);
+ case Payload:
+ default:
+ return payloadReader.getAttributeNamespace(index);
+ }
+ }
+
+ @Override
+ public String getAttributeLocalName(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.atts.getLocalName(index);
+ case Payload:
+ default:
+ return payloadReader.getAttributeLocalName(index);
+ }
+ }
+
+ @Override
+ public String getAttributePrefix(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return getPrfix(tagInfo.atts.getQName(index));
+ case Payload:
+ default:
+ return payloadReader.getAttributePrefix(index);
+ }
+ }
+
+ static private String getPrfix(String qName) {
+ if (qName == null) return null;
+ int i = qName.indexOf(":");
+ return (i > 0)? qName.substring(0, i) : "";
+ }
+
+
+ @Override
+ public String getAttributeType(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.atts.getType(index);
+ case Payload:
+ default:
+ return payloadReader.getAttributeType(index);
+ }
+ }
+
+ @Override
+ public String getAttributeValue(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.atts.getValue(index);
+ case Payload:
+ default:
+ return payloadReader.getAttributeValue(index);
+ }
+ }
+
+ @Override
+ public boolean isAttributeSpecified(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return (index < tagInfo.atts.getLength()) ? tagInfo.atts.getLocalName(index) != null : false;
+ case Payload:
+ default:
+ return payloadReader.isAttributeSpecified(index);
+ }
+ }
+
+ @Override
+ public int getNamespaceCount() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return (tagInfo.ns.length/2);
+ case Payload:
+ default:
+ return payloadReader.getNamespaceCount();
+ }
+ }
+
+ @Override
+ public String getNamespacePrefix(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.ns[2*index];
+ case Payload:
+ default:
+ return payloadReader.getNamespacePrefix(index);
+ }
+ }
+
+ @Override
+ public String getNamespaceURI(int index) {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.ns[2*index+1];
+ case Payload:
+ default:
+ return payloadReader.getNamespaceURI(index);
+ }
+ }
+
+ @Override
+ public NamespaceContextEx getNamespaceContext() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return new NamespaceContextExAdaper(elemInfo);
+ case Payload:
+ default:
+ return isPayloadReaderEx()?
+ payloadReaderEx().getNamespaceContext() :
+ new NamespaceContextExAdaper(payloadReader.getNamespaceContext());
+ }
+ }
+
+ private boolean isPayloadReaderEx() { return (payloadReader instanceof XMLStreamReaderEx); }
+
+ private XMLStreamReaderEx payloadReaderEx() { return (XMLStreamReaderEx)payloadReader; }
+
+ @Override
+ public int getEventType() {
+ switch (state) {
+ case StartTag: return XMLStreamReader.START_ELEMENT;
+ case EndTag: return XMLStreamReader.END_ELEMENT;
+ case Payload:
+ default:
+ return payloadReader.getEventType();
+ }
+ }
+
+ @Override
+ public String getText() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getText();
+ }
+ }
+
+ @Override
+ public char[] getTextCharacters() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getTextCharacters();
+ }
+ }
+
+ @Override
+ public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
+ switch (state) {
+ case StartTag:
+ case EndTag: return -1;
+ case Payload:
+ default:
+ return payloadReader.getTextCharacters(sourceStart, target, targetStart, length);
+ }
+ }
+
+ @Override
+ public int getTextStart() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return 0;
+ case Payload:
+ default:
+ return payloadReader.getTextStart();
+ }
+ }
+
+ @Override
+ public int getTextLength() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return 0;
+ case Payload:
+ default:
+ return payloadReader.getTextLength();
+ }
+ }
+
+ @Override
+ public String getEncoding() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getEncoding();
+ }
+ }
+
+ @Override
+ public boolean hasText() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return false;
+ case Payload:
+ default:
+ return payloadReader.hasText();
+ }
+ }
+
+ @Override
+ public Location getLocation() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return new Location() {
+
+ @Override
+ public int getLineNumber() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getColumnNumber() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getCharacterOffset() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public String getPublicId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getSystemId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ };
+ case Payload:
+ default:
+ return payloadReader.getLocation();
+ }
+ }
+
+ @Override
+ public QName getName() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return new QName(tagInfo.nsUri, tagInfo.localName, tagInfo.prefix);
+ case Payload:
+ default:
+ return payloadReader.getName();
+ }
+ }
+
+ @Override
+ public String getLocalName() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.localName;
+ case Payload:
+ default:
+ return payloadReader.getLocalName();
+ }
+ }
+
+ @Override
+ public boolean hasName() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return true;
+ case Payload:
+ default:
+ return payloadReader.hasName();
+ }
+ }
+
+ @Override
+ public String getNamespaceURI() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.nsUri;
+ case Payload:
+ default:
+ return payloadReader.getNamespaceURI();
+ }
+ }
+
+ @Override
+ public String getPrefix() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return tagInfo.prefix;
+ case Payload:
+ default:
+ return payloadReader.getPrefix();
+ }
+ }
+
+ @Override
+ public String getVersion() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getVersion();
+ }
+ }
+
+ @Override
+ public boolean isStandalone() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return true;
+ case Payload:
+ default:
+ return payloadReader.isStandalone();
+ }
+ }
+
+ @Override
+ public boolean standaloneSet() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return true;
+ case Payload:
+ default:
+ return payloadReader.standaloneSet();
+ }
+ }
+
+ @Override
+ public String getCharacterEncodingScheme() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getCharacterEncodingScheme();
+ }
+ }
+
+ @Override
+ public String getPITarget() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getPITarget();
+ }
+ }
+
+ @Override
+ public String getPIData() {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return payloadReader.getPIData();
+ }
+ }
+
+ @Override
+ public String getElementTextTrim() throws XMLStreamException {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return isPayloadReaderEx()? payloadReaderEx().getElementTextTrim() : payloadReader.getElementText().trim();
+ }
+ }
+
+ @Override
+ public CharSequence getPCDATA() throws XMLStreamException {
+ switch (state) {
+ case StartTag:
+ case EndTag: return null;
+ case Payload:
+ default:
+ return isPayloadReaderEx()? payloadReaderEx().getPCDATA() : payloadReader.getElementText();
+ }
+ }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java Fri Sep 06 14:20:58 2013 -0700
@@ -54,6 +54,7 @@
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.SchemaFactory;
import javax.xml.ws.WebServiceException;
import javax.xml.xpath.XPathFactory;
import javax.xml.xpath.XPathFactoryConfigurationException;
@@ -74,6 +75,10 @@
* @author WS Development Team
*/
public class XmlUtil {
+
+ // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
+ private static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
+
private final static String LEXICAL_HANDLER_PROPERTY =
"http://xml.org/sax/properties/lexical-handler";
@@ -414,4 +419,21 @@
return globalSecureXmlProcessingEnabled && localSecureXmlProcessingEnabled;
}
+ public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) {
+
+ // if feature secure processing enabled, nothing to do, file is allowed,
+ // or user is able to control access by standard JAXP mechanisms
+ if (checkGlobalOverride(disableSecureProcessing)) {
+ return sf;
+ }
+
+ try {
+ sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
+ LOGGER.log(Level.FINE, "Property \"{}\" is supported and has been successfully set by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
+ } catch (SAXException ignored) {
+ // depending on JDK/SAX implementation used
+ LOGGER.log(Level.CONFIG, "Property \"{}\" is not supported by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
+ }
+ return sf;
+ }
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java Fri Sep 06 14:20:58 2013 -0700
@@ -329,7 +329,7 @@
private static class CommentFilter implements XmlSerializer {
final XmlSerializer serializer;
private static final String VERSION_COMMENT =
- " Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is " + RuntimeVersion.VERSION + ". ";
+ " Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is " + RuntimeVersion.VERSION + ". ";
CommentFilter(XmlSerializer serializer) {
this.serializer = serializer;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -77,4 +77,10 @@
public static final String ERR_SIMPLE_CONTENT_EXPECTED =
"SimpleContentExpected"; // arg:2
+
+ public static final String JAXP_UNSUPPORTED_PROPERTY =
+ "JAXPUnsupportedProperty"; // arg:1
+
+ public static final String JAXP_SUPPORTED_PROPERTY =
+ "JAXPSupportedProperty"; // arg:1
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, 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
@@ -71,3 +71,9 @@
SimpleContentExpected = \
A complex type with a simple content or a simple type is expected but found ''{0}'':{1}
+
+JAXPUnsupportedProperty = \
+ Property "{0}" is not supported by used JAXP implementation.
+
+JAXPSupportedProperty = \
+ Property "{0}" is supported and has been successfuly set by used JAXP implementation.
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SAXParserFactoryAdaptor.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SAXParserFactoryAdaptor.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, 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
@@ -42,6 +42,8 @@
* {@link SAXParserFactory} implementation that ultimately
* uses {@link XMLParser} to parse documents.
*
+ * @deprecated
+ *
* @author
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
*/
@@ -58,7 +60,7 @@
}
public void setFeature(String name, boolean value) {
- ;
+ throw new UnsupportedOperationException("XSOM parser does not support JAXP features.");
}
public boolean getFeature(String name) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/Schema.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/Schema.java Fri Sep 06 14:20:58 2013 -0700
@@ -195,6 +195,70 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 49:
+ {
+ if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 45;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 36:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))))))))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 527, null);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 16:
+ {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 12;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 53:
+ {
+ if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 49;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 37:
+ {
+ if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 36;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 12:
{
if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
@@ -207,103 +271,14 @@
}
}
break;
- case 36:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))))))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 374, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
+ case 45:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 351, anno,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
- NGCCHandler h = new includeDecl(this, super._source, $runtime, 352);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
- NGCCHandler h = new importDecl(this, super._source, $runtime, 353);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- NGCCHandler h = new redefine(this, super._source, $runtime, 354);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action8();
- $_ngcc_current_state = 27;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 356);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 357);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 16;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 359);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- NGCCHandler h = new notation(this, super._source, $runtime, 360);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 361);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 53:
- {
- if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 49;
+ $_ngcc_current_state = 41;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
@@ -320,37 +295,25 @@
}
}
break;
- case 37:
- {
- if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 2:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 362, anno,AnnotationContext.SCHEMA);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 515, anno,AnnotationContext.SCHEMA);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
- NGCCHandler h = new includeDecl(this, super._source, $runtime, 363);
+ NGCCHandler h = new includeDecl(this, super._source, $runtime, 516);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
- NGCCHandler h = new importDecl(this, super._source, $runtime, 364);
+ NGCCHandler h = new importDecl(this, super._source, $runtime, 517);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- NGCCHandler h = new redefine(this, super._source, $runtime, 365);
+ NGCCHandler h = new redefine(this, super._source, $runtime, 518);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -361,12 +324,12 @@
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 367);
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 520);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 368);
+ NGCCHandler h = new complexType(this, super._source, $runtime, 521);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -377,17 +340,17 @@
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 370);
+ NGCCHandler h = new group(this, super._source, $runtime, 523);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- NGCCHandler h = new notation(this, super._source, $runtime, 371);
+ NGCCHandler h = new notation(this, super._source, $runtime, 524);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 372);
+ NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 525);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -406,15 +369,14 @@
}
}
break;
- case 45:
+ case 27:
{
- if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ if((($ai = $runtime.getAttributeIndex("","default"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 41;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ unexpectedEnterElement($__qname);
}
}
break;
@@ -430,21 +392,10 @@
}
}
break;
- case 27:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","default"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 11:
{
- if((($ai = $runtime.getAttributeIndex("","form"))>=0 || ($ai = $runtime.getAttributeIndex("","name"))>=0)) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 268, locator,false,defaultValue,fixedValue);
+ if((($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","form"))>=0)) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -452,27 +403,76 @@
}
}
break;
- case 49:
+ case 1:
{
- if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 504, anno,AnnotationContext.SCHEMA);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 45;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
+ NGCCHandler h = new includeDecl(this, super._source, $runtime, 505);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
+ NGCCHandler h = new importDecl(this, super._source, $runtime, 506);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
+ NGCCHandler h = new redefine(this, super._source, $runtime, 507);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action8();
+ $_ngcc_current_state = 27;
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 509);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ NGCCHandler h = new complexType(this, super._source, $runtime, 510);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action4();
+ $_ngcc_current_state = 16;
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
+ NGCCHandler h = new group(this, super._source, $runtime, 512);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
+ NGCCHandler h = new notation(this, super._source, $runtime, 513);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
+ NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 514);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
}
break;
@@ -490,6 +490,92 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 49:
+ {
+ if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 45;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 36:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("schema"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 527, null);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 10:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 16:
+ {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 12;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 53:
+ {
+ if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 49;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 26:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 37:
+ {
+ if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 36;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
case 12:
{
if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
@@ -502,10 +588,51 @@
}
}
break;
- case 36:
+ case 45:
+ {
+ if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 41;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 41:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("schema"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 374, null);
+ if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 37;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 27:
+ {
+ if(((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))))))) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 11:
+ {
+ if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) || (($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -524,133 +651,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 53:
- {
- if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 49;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 41:
- {
- if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 45:
- {
- if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 41;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 37:
- {
- if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 27:
- {
- if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 11:
- {
- if(((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) || (($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 268, locator,false,defaultValue,fixedValue);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 26:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 49:
- {
- if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 45;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
default:
{
unexpectedLeaveElement($__qname);
@@ -665,66 +665,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 14;
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 27:
- {
- if((($__uri.equals("") && $__local.equals("name")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("default")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 53:
- {
- if(($__uri.equals("") && $__local.equals("targetNamespace"))) {
- $_ngcc_current_state = 55;
- }
- else {
- $_ngcc_current_state = 49;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- if((($__uri.equals("") && $__local.equals("form")) || ($__uri.equals("") && $__local.equals("name")))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 268, locator,false,defaultValue,fixedValue);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 41:
- {
- if(($__uri.equals("") && $__local.equals("blockDefault"))) {
- $_ngcc_current_state = 43;
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 49:
{
if(($__uri.equals("") && $__local.equals("attributeFormDefault"))) {
@@ -747,12 +687,50 @@
}
}
break;
+ case 41:
+ {
+ if(($__uri.equals("") && $__local.equals("blockDefault"))) {
+ $_ngcc_current_state = 43;
+ }
+ else {
+ $_ngcc_current_state = 37;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
case 2:
{
$_ngcc_current_state = 1;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 27:
+ {
+ if((($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 16:
+ {
+ if(($__uri.equals("") && $__local.equals("default"))) {
+ $_ngcc_current_state = 18;
+ }
+ else {
+ $_ngcc_current_state = 12;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
case 37:
{
if(($__uri.equals("") && $__local.equals("finalDefault"))) {
@@ -764,13 +742,35 @@
}
}
break;
- case 16:
+ case 53:
{
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 18;
+ if(($__uri.equals("") && $__local.equals("targetNamespace"))) {
+ $_ngcc_current_state = 55;
}
else {
- $_ngcc_current_state = 12;
+ $_ngcc_current_state = 49;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 11:
+ {
+ if((($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("form")))) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 12:
+ {
+ if(($__uri.equals("") && $__local.equals("fixed"))) {
+ $_ngcc_current_state = 14;
+ }
+ else {
+ $_ngcc_current_state = 11;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
}
@@ -789,77 +789,33 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 12:
+ case 49:
{
- $_ngcc_current_state = 11;
+ $_ngcc_current_state = 45;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 38:
+ {
+ if(($__uri.equals("") && $__local.equals("finalDefault"))) {
+ $_ngcc_current_state = 36;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
case 0:
{
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
- case 53:
- {
- $_ngcc_current_state = 49;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 41:
- {
- $_ngcc_current_state = 37;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 45:
+ case 16:
{
- $_ngcc_current_state = 41;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 37:
- {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 12;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 50:
- {
- if(($__uri.equals("") && $__local.equals("attributeFormDefault"))) {
- $_ngcc_current_state = 45;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 46:
- {
- if(($__uri.equals("") && $__local.equals("elementFormDefault"))) {
- $_ngcc_current_state = 41;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 54:
- {
- if(($__uri.equals("") && $__local.equals("targetNamespace"))) {
- $_ngcc_current_state = 49;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
case 13:
{
if(($__uri.equals("") && $__local.equals("fixed"))) {
@@ -870,6 +826,18 @@
}
}
break;
+ case 53:
+ {
+ $_ngcc_current_state = 49;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 37:
+ {
+ $_ngcc_current_state = 36;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 17:
{
if(($__uri.equals("") && $__local.equals("default"))) {
@@ -880,6 +848,22 @@
}
}
break;
+ case 12:
+ {
+ $_ngcc_current_state = 11;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 50:
+ {
+ if(($__uri.equals("") && $__local.equals("attributeFormDefault"))) {
+ $_ngcc_current_state = 45;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
case 42:
{
if(($__uri.equals("") && $__local.equals("blockDefault"))) {
@@ -890,26 +874,42 @@
}
}
break;
- case 38:
+ case 45:
+ {
+ $_ngcc_current_state = 41;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 41:
{
- if(($__uri.equals("") && $__local.equals("finalDefault"))) {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 37;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 54:
+ {
+ if(($__uri.equals("") && $__local.equals("targetNamespace"))) {
+ $_ngcc_current_state = 49;
}
else {
unexpectedLeaveAttribute($__qname);
}
}
break;
- case 49:
+ case 46:
{
- $_ngcc_current_state = 45;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 16:
- {
- $_ngcc_current_state = 12;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("elementFormDefault"))) {
+ $_ngcc_current_state = 41;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
}
break;
default:
@@ -923,14 +923,14 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 12:
+ case 49:
{
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendText(super._cookie, $value);
}
else {
- $_ngcc_current_state = 11;
+ $_ngcc_current_state = 45;
$runtime.sendText(super._cookie, $value);
}
}
@@ -940,6 +940,38 @@
revertToParentFromText(this, super._cookie, $value);
}
break;
+ case 47:
+ {
+ if($value.equals("unqualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 539);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if($value.equals("qualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 539);
+ spawnChildFromText(h, $value);
+ }
+ }
+ }
+ break;
+ case 43:
+ {
+ NGCCHandler h = new ersSet(this, super._source, $runtime, 534);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 16:
+ {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 12;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 53:
{
if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
@@ -952,42 +984,6 @@
}
}
break;
- case 43:
- {
- NGCCHandler h = new ersSet(this, super._source, $runtime, 381);
- spawnChildFromText(h, $value);
- }
- break;
- case 41:
- {
- if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 45:
- {
- if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 41;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
case 37:
{
if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
@@ -1000,9 +996,16 @@
}
}
break;
- case 55:
+ case 12:
{
- $_ngcc_current_state = 54;
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 11;
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 14:
@@ -1011,60 +1014,75 @@
$_ngcc_current_state = 13;
}
break;
- case 47:
+ case 45:
{
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 386);
- spawnChildFromText(h, $value);
+ if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
}
else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 386);
- spawnChildFromText(h, $value);
- }
+ $_ngcc_current_state = 41;
+ $runtime.sendText(super._cookie, $value);
}
}
break;
- case 39:
+ case 41:
{
- NGCCHandler h = new erSet(this, super._source, $runtime, 376);
- spawnChildFromText(h, $value);
+ if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 37;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 55:
+ {
+ $_ngcc_current_state = 54;
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 27:
{
if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
else {
if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 286, locator,true);
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
spawnChildFromText(h, $value);
}
}
@@ -1075,15 +1093,21 @@
}
}
break;
- case 11:
+ case 39:
{
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 268, locator,false,defaultValue,fixedValue);
+ NGCCHandler h = new erSet(this, super._source, $runtime, 529);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 51:
+ {
+ if($value.equals("unqualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 544);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 268, locator,false,defaultValue,fixedValue);
+ if($value.equals("qualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 544);
spawnChildFromText(h, $value);
}
}
@@ -1095,206 +1119,182 @@
$_ngcc_current_state = 17;
}
break;
- case 51:
+ case 11:
{
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 391);
+ if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
spawnChildFromText(h, $value);
}
else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 391);
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
spawnChildFromText(h, $value);
}
}
}
break;
- case 49:
- {
- if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 45;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 381:
+ case 527:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ action10();
+ $_ngcc_current_state = 2;
+ }
+ break;
+ case 534:
{
blockDefault = ((Integer)$__result__);
action12();
$_ngcc_current_state = 42;
}
break;
- case 268:
+ case 439:
+ {
+ e = ((ElementDecl)$__result__);
+ action7();
+ $_ngcc_current_state = 26;
+ }
+ break;
+ case 544:
+ {
+ afd = ((Boolean)$__result__).booleanValue();
+ action14();
+ $_ngcc_current_state = 50;
+ }
+ break;
+ case 421:
{
ad = ((AttributeDeclImpl)$__result__);
action3();
$_ngcc_current_state = 10;
}
break;
- case 391:
- {
- afd = ((Boolean)$__result__).booleanValue();
- action14();
- $_ngcc_current_state = 50;
- }
- break;
- case 386:
- {
- efd = ((Boolean)$__result__).booleanValue();
- action13();
- $_ngcc_current_state = 46;
- }
- break;
- case 351:
+ case 504:
{
anno = ((AnnotationImpl)$__result__);
action9();
$_ngcc_current_state = 1;
}
break;
- case 352:
+ case 505:
{
$_ngcc_current_state = 1;
}
break;
- case 353:
+ case 506:
{
$_ngcc_current_state = 1;
}
break;
- case 354:
+ case 507:
{
$_ngcc_current_state = 1;
}
break;
- case 356:
+ case 509:
{
st = ((SimpleTypeImpl)$__result__);
action6();
$_ngcc_current_state = 1;
}
break;
- case 357:
+ case 510:
{
ct = ((ComplexTypeImpl)$__result__);
action5();
$_ngcc_current_state = 1;
}
break;
- case 359:
+ case 512:
{
group = ((ModelGroupDeclImpl)$__result__);
action2();
$_ngcc_current_state = 1;
}
break;
- case 360:
+ case 513:
{
notation = ((XSNotation)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 361:
+ case 514:
{
ag = ((AttGroupDeclImpl)$__result__);
action0();
$_ngcc_current_state = 1;
}
break;
- case 286:
+ case 539:
{
- e = ((ElementDecl)$__result__);
- action7();
- $_ngcc_current_state = 26;
+ efd = ((Boolean)$__result__).booleanValue();
+ action13();
+ $_ngcc_current_state = 46;
}
break;
- case 374:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- action10();
- $_ngcc_current_state = 2;
- }
- break;
- case 362:
+ case 515:
{
anno = ((AnnotationImpl)$__result__);
action9();
$_ngcc_current_state = 1;
}
break;
- case 363:
+ case 516:
{
$_ngcc_current_state = 1;
}
break;
- case 364:
+ case 517:
{
$_ngcc_current_state = 1;
}
break;
- case 365:
+ case 518:
{
$_ngcc_current_state = 1;
}
break;
- case 367:
+ case 520:
{
st = ((SimpleTypeImpl)$__result__);
action6();
$_ngcc_current_state = 1;
}
break;
- case 368:
+ case 521:
{
ct = ((ComplexTypeImpl)$__result__);
action5();
$_ngcc_current_state = 1;
}
break;
- case 370:
+ case 523:
{
group = ((ModelGroupDeclImpl)$__result__);
action2();
$_ngcc_current_state = 1;
}
break;
- case 371:
+ case 524:
{
notation = ((XSNotation)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 372:
+ case 525:
{
ag = ((AttGroupDeclImpl)$__result__);
action0();
$_ngcc_current_state = 1;
}
break;
- case 376:
+ case 529:
{
finalDefault = ((Integer)$__result__);
action11();
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java Fri Sep 06 14:20:58 2013 -0700
@@ -99,10 +99,21 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 9:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
case 7:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 693, annotation,AnnotationContext.SIMPLETYPE_DECL);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 264, annotation,AnnotationContext.SIMPLETYPE_DECL);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -111,39 +122,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 687);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 9:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || (($ai = $runtime.getAttributeIndex("","itemType"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 10:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
@@ -156,6 +134,28 @@
}
}
break;
+ case 2:
+ {
+ if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 258);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -170,12 +170,11 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 1:
+ case 9:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
+ if((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -188,11 +187,6 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
@@ -204,11 +198,17 @@
}
}
break;
- case 9:
+ case 0:
{
- if((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 1:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ action0();
}
else {
unexpectedLeaveElement($__qname);
@@ -229,17 +229,23 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 9:
+ {
+ if(($__uri.equals("") && $__local.equals("itemType"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
case 7:
{
$_ngcc_current_state = 2;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
if(($__uri.equals("") && $__local.equals("itemType"))) {
@@ -250,15 +256,9 @@
}
}
break;
- case 9:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("itemType"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -275,16 +275,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("itemType"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
case 7:
{
$_ngcc_current_state = 2;
@@ -296,6 +286,16 @@
revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 4:
+ {
+ if(($__uri.equals("") && $__local.equals("itemType"))) {
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -307,17 +307,20 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 9:
+ {
+ if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
+ spawnChildFromText(h, $value);
+ }
+ }
+ break;
case 7:
{
$_ngcc_current_state = 2;
$runtime.sendText(super._cookie, $value);
}
break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
case 2:
{
if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
@@ -326,17 +329,14 @@
}
}
break;
- case 9:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
- spawnChildFromText(h, $value);
- }
+ revertToParentFromText(result, super._cookie, $value);
}
break;
case 5:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 689);
+ NGCCHandler h = new qname(this, super._source, $runtime, 260);
spawnChildFromText(h, $value);
}
break;
@@ -345,25 +345,25 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 693:
+ case 266:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 7;
+ }
+ break;
+ case 264:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 2;
}
break;
- case 687:
+ case 258:
{
itemType = ((SimpleTypeImpl)$__result__);
$_ngcc_current_state = 1;
}
break;
- case 695:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 689:
+ case 260:
{
itemTypeName = ((UName)$__result__);
action1();
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Restriction.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Restriction.java Fri Sep 06 14:20:58 2013 -0700
@@ -105,15 +105,62 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 12:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","base"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || (((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 10:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 164, annotation,AnnotationContext.SIMPLETYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 5;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 4:
+ {
+ action1();
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
case 0:
{
revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
- case 12:
+ case 5:
{
- if(((($ai = $runtime.getAttributeIndex("","base"))>=0 && (((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 445, fa);
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 158);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ break;
+ case 1:
+ {
+ if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
+ NGCCHandler h = new facet(this, super._source, $runtime, 153);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -121,6 +168,18 @@
}
}
break;
+ case 2:
+ {
+ if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
+ NGCCHandler h = new facet(this, super._source, $runtime, 154);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 13:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
@@ -133,65 +192,6 @@
}
}
break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 437);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 2:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 433);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 1:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 432);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 443, annotation,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 5;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
default:
{
unexpectedEnterElement($__qname);
@@ -206,15 +206,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 12:
{
if((($ai = $runtime.getAttributeIndex("","base"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 445, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -222,6 +217,24 @@
}
}
break;
+ case 10:
+ {
+ $_ngcc_current_state = 5;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 4:
+ {
+ action1();
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 5:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
@@ -233,12 +246,6 @@
}
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
@@ -250,16 +257,9 @@
}
}
break;
- case 4:
+ case 2:
{
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
+ $_ngcc_current_state = 1;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -277,15 +277,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 12:
{
if(($__uri.equals("") && $__local.equals("base"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 445, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
@@ -293,6 +288,24 @@
}
}
break;
+ case 10:
+ {
+ $_ngcc_current_state = 5;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 4:
+ {
+ action1();
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 5:
{
if(($__uri.equals("") && $__local.equals("base"))) {
@@ -309,19 +322,6 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -346,14 +346,9 @@
}
}
break;
- case 0:
+ case 10:
{
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
+ $_ngcc_current_state = 5;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -364,9 +359,14 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 10:
+ case 0:
{
- $_ngcc_current_state = 5;
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -381,23 +381,36 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 0:
+ case 8:
{
- revertToParentFromText(result, super._cookie, $value);
+ NGCCHandler h = new qname(this, super._source, $runtime, 160);
+ spawnChildFromText(h, $value);
}
break;
case 12:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 445, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
spawnChildFromText(h, $value);
}
}
break;
- case 8:
+ case 10:
+ {
+ $_ngcc_current_state = 5;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 4:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 439);
- spawnChildFromText(h, $value);
+ action1();
+ $_ngcc_current_state = 2;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromText(result, super._cookie, $value);
}
break;
case 5:
@@ -414,57 +427,44 @@
$runtime.sendText(super._cookie, $value);
}
break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
- $runtime.sendText(super._cookie, $value);
- }
- break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 439:
+ case 160:
{
baseTypeName = ((UName)$__result__);
action2();
$_ngcc_current_state = 7;
}
break;
- case 445:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 10;
- }
- break;
- case 437:
- {
- baseType = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 4;
- }
- break;
- case 443:
+ case 164:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 5;
}
break;
- case 433:
+ case 154:
{
facet = ((XSFacet)$__result__);
action0();
$_ngcc_current_state = 1;
}
break;
- case 432:
+ case 166:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 10;
+ }
+ break;
+ case 158:
+ {
+ baseType = ((SimpleTypeImpl)$__result__);
+ $_ngcc_current_state = 4;
+ }
+ break;
+ case 153:
{
facet = ((XSFacet)$__result__);
action0();
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java Fri Sep 06 14:20:58 2013 -0700
@@ -111,14 +111,15 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 6:
+ case 4:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 665, fa);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 183, annotation,AnnotationContext.SIMPLETYPE_DECL);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- unexpectedEnterElement($__qname);
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
@@ -127,22 +128,10 @@
revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
- case 12:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 7;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 659);
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 179);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -162,22 +151,22 @@
}
}
break;
- case 4:
+ case 12:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 663, annotation,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action4();
+ $_ngcc_current_state = 7;
}
else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ unexpectedEnterElement($__qname);
}
}
break;
case 2:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 660);
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 180);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -186,6 +175,17 @@
}
}
break;
+ case 6:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 185, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -200,15 +200,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 6:
+ case 4:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 665, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
case 0:
@@ -240,18 +235,23 @@
}
}
break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 6:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 185, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -266,6 +266,12 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 4:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 0:
{
revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
@@ -282,12 +288,6 @@
}
}
break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -308,11 +308,23 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 4:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 0:
{
revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 7:
+ {
+ $_ngcc_current_state = 6;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 8:
{
if(($__uri.equals("") && $__local.equals("memberTypes"))) {
@@ -323,18 +335,6 @@
}
}
break;
- case 7:
- {
- $_ngcc_current_state = 6;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -352,14 +352,15 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 0:
+ case 4:
{
- revertToParentFromText(result, super._cookie, $value);
+ $_ngcc_current_state = 2;
+ $runtime.sendText(super._cookie, $value);
}
break;
- case 8:
+ case 9:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 668);
+ NGCCHandler h = new qname(this, super._source, $runtime, 187);
spawnChildFromText(h, $value);
}
break;
@@ -370,10 +371,9 @@
action3();
}
break;
- case 9:
+ case 0:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 667);
- spawnChildFromText(h, $value);
+ revertToParentFromText(result, super._cookie, $value);
}
break;
case 7:
@@ -388,10 +388,10 @@
}
}
break;
- case 4:
+ case 8:
{
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
+ NGCCHandler h = new qname(this, super._source, $runtime, 188);
+ spawnChildFromText(h, $value);
}
break;
case 2:
@@ -405,46 +405,46 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 665:
+ case 183:
{
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 4;
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 2;
}
break;
- case 660:
+ case 187:
+ {
+ memberTypeName = ((UName)$__result__);
+ action2();
+ $_ngcc_current_state = 8;
+ }
+ break;
+ case 179:
{
anonymousMemberType = ((SimpleTypeImpl)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 663:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- case 668:
+ case 188:
{
memberTypeName = ((UName)$__result__);
action2();
$_ngcc_current_state = 8;
}
break;
- case 659:
+ case 185:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 4;
+ }
+ break;
+ case 180:
{
anonymousMemberType = ((SimpleTypeImpl)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 667:
- {
- memberTypeName = ((UName)$__result__);
- action2();
- $_ngcc_current_state = 8;
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/annotation.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/annotation.java Fri Sep 06 14:20:58 2013 -0700
@@ -118,11 +118,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
@@ -134,6 +129,11 @@
}
}
break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java Fri Sep 06 14:20:58 2013 -0700
@@ -92,10 +92,26 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 12:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
case 7:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 210, null,AnnotationContext.ATTRIBUTE_DECL);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 388, null,AnnotationContext.ATTRIBUTE_DECL);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -104,9 +120,16 @@
}
}
break;
- case 0:
+ case 9:
{
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","type"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
}
break;
case 13:
@@ -121,29 +144,6 @@
}
}
break;
- case 9:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","type"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 1:
{
if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
@@ -152,7 +152,7 @@
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 201);
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 379);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -176,15 +176,38 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 12:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 7:
{
$_ngcc_current_state = 1;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
+ case 9:
{
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
}
break;
case 13:
@@ -199,29 +222,6 @@
}
}
break;
- case 9:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 1:
{
if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
@@ -248,15 +248,37 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 12:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 11;
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
case 7:
{
$_ngcc_current_state = 1;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
+ case 9:
{
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("type"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
}
break;
case 13:
@@ -270,28 +292,6 @@
}
}
break;
- case 9:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
case 1:
{
if(($__uri.equals("") && $__local.equals("type"))) {
@@ -317,10 +317,15 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 10:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 9;
+ revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 14:
+ {
+ if(($__uri.equals("") && $__local.equals("form"))) {
+ $_ngcc_current_state = 12;
}
else {
unexpectedLeaveAttribute($__qname);
@@ -333,9 +338,20 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
+ case 10:
{
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 9;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 9:
+ {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
}
break;
case 13:
@@ -344,20 +360,10 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 9:
+ case 1:
{
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("form"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
+ $_ngcc_current_state = 0;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 4:
@@ -370,12 +376,6 @@
}
}
break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -387,21 +387,35 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromText(makeResult(), super._cookie, $value);
+ }
+ break;
+ case 12:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 7:
{
$_ngcc_current_state = 1;
$runtime.sendText(super._cookie, $value);
}
break;
- case 5:
+ case 9:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 203);
- spawnChildFromText(h, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
+ spawnChildFromText(h, $value);
+ }
}
break;
case 13:
@@ -416,29 +430,17 @@
}
}
break;
- case 9:
+ case 15:
{
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
+ if($value.equals("unqualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 395);
spawnChildFromText(h, $value);
}
else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 212, fa);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 11:
- {
- name = $value;
- $_ngcc_current_state = 10;
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
+ if($value.equals("qualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 395);
+ spawnChildFromText(h, $value);
+ }
}
}
break;
@@ -454,18 +456,16 @@
}
}
break;
- case 15:
+ case 11:
{
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 217);
- spawnChildFromText(h, $value);
- }
- else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 217);
- spawnChildFromText(h, $value);
- }
- }
+ name = $value;
+ $_ngcc_current_state = 10;
+ }
+ break;
+ case 5:
+ {
+ NGCCHandler h = new qname(this, super._source, $runtime, 381);
+ spawnChildFromText(h, $value);
}
break;
}
@@ -473,43 +473,43 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 210:
+ case 388:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 1;
}
break;
- case 217:
+ case 379:
+ {
+ type = ((SimpleTypeImpl)$__result__);
+ $_ngcc_current_state = 0;
+ }
+ break;
+ case 390:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 7;
+ }
+ break;
+ case 395:
{
form = ((Boolean)$__result__).booleanValue();
action1();
$_ngcc_current_state = 14;
}
break;
- case 203:
+ case 381:
{
typeName = ((UName)$__result__);
action0();
$_ngcc_current_state = 4;
}
break;
- case 212:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 201:
- {
- type = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 0;
- }
- break;
}
}
public boolean accepted() {
- return((($_ngcc_current_state == 1) || (($_ngcc_current_state == 0) || ($_ngcc_current_state == 7))));
+ return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 1) || ($_ngcc_current_state == 7))));
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java Fri Sep 06 14:20:58 2013 -0700
@@ -83,11 +83,15 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 3:
+ case 6:
{
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 246, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
}
break;
case 13:
@@ -101,15 +105,38 @@
}
}
break;
- case 4:
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 7:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 525, null,AnnotationContext.ATTRIBUTE_GROUP);
+ if(($ai = $runtime.getAttributeIndex("","id"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 6;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 3:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 2:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 241, result);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 3;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ unexpectedEnterElement($__qname);
}
}
break;
@@ -125,45 +152,18 @@
}
}
break;
- case 7:
+ case 4:
{
- if(($ai = $runtime.getAttributeIndex("","id"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 6:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 527, fa);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 244, null,AnnotationContext.ATTRIBUTE_GROUP);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- unexpectedEnterElement($__qname);
+ $_ngcc_current_state = 3;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
- case 2:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 522, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
default:
{
unexpectedEnterElement($__qname);
@@ -178,18 +178,11 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 3:
+ case 6:
{
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 246, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -207,10 +200,20 @@
}
}
break;
- case 4:
+ case 13:
{
- $_ngcc_current_state = 3;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
}
break;
case 7:
@@ -225,10 +228,17 @@
}
}
break;
- case 6:
+ case 3:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 527, fa);
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 241, result);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -236,20 +246,10 @@
}
}
break;
- case 2:
+ case 4:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 522, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 3;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -266,13 +266,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 13:
{
if(($__uri.equals("") && $__local.equals("name"))) {
@@ -283,10 +276,9 @@
}
}
break;
- case 4:
+ case 0:
{
- $_ngcc_current_state = 3;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
case 7:
@@ -300,9 +292,17 @@
}
}
break;
- case 0:
+ case 3:
{
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 4:
+ {
+ $_ngcc_current_state = 3;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -319,6 +319,24 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 7:
+ {
+ $_ngcc_current_state = 6;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 3:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 8:
{
if(($__uri.equals("") && $__local.equals("id"))) {
@@ -329,13 +347,6 @@
}
}
break;
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 11:
{
if(($__uri.equals("") && $__local.equals("name"))) {
@@ -352,17 +363,6 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 7:
- {
- $_ngcc_current_state = 6;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -374,13 +374,6 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
case 13:
{
if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
@@ -389,21 +382,9 @@
}
}
break;
- case 12:
- {
- name = $value;
- $_ngcc_current_state = 11;
- }
- break;
- case 4:
+ case 0:
{
- $_ngcc_current_state = 3;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
+ revertToParentFromText(result, super._cookie, $value);
}
break;
case 7:
@@ -418,9 +399,28 @@
}
}
break;
- case 0:
+ case 12:
+ {
+ name = $value;
+ $_ngcc_current_state = 11;
+ }
+ break;
+ case 9:
{
- revertToParentFromText(result, super._cookie, $value);
+ $_ngcc_current_state = 8;
+ }
+ break;
+ case 3:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 4:
+ {
+ $_ngcc_current_state = 3;
+ $runtime.sendText(super._cookie, $value);
}
break;
}
@@ -428,21 +428,21 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 525:
+ case 241:
{
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 3;
+ $_ngcc_current_state = 1;
}
break;
- case 527:
+ case 246:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 4;
}
break;
- case 522:
+ case 244:
{
- $_ngcc_current_state = 1;
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 3;
}
break;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeUses.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeUses.java Fri Sep 06 14:20:58 2013 -0700
@@ -143,139 +143,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 3:
- {
- if((($ai = $runtime.getAttributeIndex("","processContents"))>=0 || (($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 448, wloc);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 9:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 455, null,AnnotationContext.ATTRIBUTE_USE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 8;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 17;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 5:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action7();
- $_ngcc_current_state = 33;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action3();
- $_ngcc_current_state = 13;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- break;
- case 33:
- {
- if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 29;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 19:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 466, null,AnnotationContext.ATTRIBUTE_USE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 18;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 17:
- {
- if((($ai = $runtime.getAttributeIndex("","form"))>=0 || ($ai = $runtime.getAttributeIndex("","name"))>=0)) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 473, locator,true,defaultValue,fixedValue);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
@@ -303,6 +170,139 @@
}
}
break;
+ case 8:
+ {
+ action2();
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 3:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0))) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 17:
+ {
+ if((($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","form"))>=0)) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ break;
+ case 33:
+ {
+ if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 29;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 25:
+ {
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 17;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 29:
+ {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 25;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 9:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 297, null,AnnotationContext.ATTRIBUTE_USE);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 8;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 16:
+ {
+ action4();
+ $_ngcc_current_state = 15;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 5:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action7();
+ $_ngcc_current_state = 33;
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action3();
+ $_ngcc_current_state = 13;
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ }
+ break;
+ case 13:
+ {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 19:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 308, null,AnnotationContext.ATTRIBUTE_USE);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 18;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 0:
{
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
@@ -322,22 +322,34 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 29:
+ case 1:
{
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
}
else {
- $_ngcc_current_state = 25;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ unexpectedLeaveElement($__qname);
}
}
break;
+ case 8:
+ {
+ action2();
+ $_ngcc_current_state = 7;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 3:
{
- if(((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 448, wloc);
+ if(((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))))) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -345,49 +357,20 @@
}
}
break;
- case 13:
+ case 17:
{
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) || (($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 17;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
}
}
break;
@@ -414,6 +397,36 @@
}
}
break;
+ case 25:
+ {
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 17;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 29:
+ {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 25;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 9:
+ {
+ $_ngcc_current_state = 8;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 16:
{
action4();
@@ -421,53 +434,40 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 5:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 13:
+ {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 7:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 19:
{
$_ngcc_current_state = 18;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 17:
- {
- if(((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) || (($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 473, locator,true,defaultValue,fixedValue);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 0:
{
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
@@ -476,7 +476,7 @@
case 18:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 464, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 306, null);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -498,21 +498,23 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 29:
+ case 1:
{
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 31;
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ $_ngcc_current_state = 0;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 8:
+ {
+ action2();
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 3:
{
- if((($__uri.equals("") && $__local.equals("processContents")) || ($__uri.equals("") && $__local.equals("namespace")))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 448, wloc);
+ if((($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
@@ -520,20 +522,31 @@
}
}
break;
- case 13:
+ case 17:
{
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 12;
+ if((($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("form")))) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
- unexpectedEnterAttribute($__qname);
+ if(($__uri.equals("") && $__local.equals("ref"))) {
+ $_ngcc_current_state = 22;
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
}
}
break;
- case 9:
+ case 33:
{
- $_ngcc_current_state = 8;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("use"))) {
+ $_ngcc_current_state = 35;
+ }
+ else {
+ $_ngcc_current_state = 29;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
case 25:
@@ -547,21 +560,21 @@
}
}
break;
- case 5:
+ case 29:
{
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("default"))) {
+ $_ngcc_current_state = 31;
+ }
+ else {
+ $_ngcc_current_state = 25;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
- case 33:
+ case 9:
{
- if(($__uri.equals("") && $__local.equals("use"))) {
- $_ngcc_current_state = 35;
- }
- else {
- $_ngcc_current_state = 29;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ $_ngcc_current_state = 8;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 16:
@@ -571,38 +584,25 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 19:
+ case 5:
{
- $_ngcc_current_state = 18;
+ $_ngcc_current_state = 1;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 17:
+ case 13:
{
- if((($__uri.equals("") && $__local.equals("form")) || ($__uri.equals("") && $__local.equals("name")))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 473, locator,true,defaultValue,fixedValue);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("ref"))) {
+ $_ngcc_current_state = 12;
}
else {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 22;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
+ unexpectedEnterAttribute($__qname);
}
}
break;
- case 8:
+ case 19:
{
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
+ $_ngcc_current_state = 18;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -625,9 +625,16 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 29:
+ case 1:
{
- $_ngcc_current_state = 25;
+ $_ngcc_current_state = 0;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 8:
+ {
+ action2();
+ $_ngcc_current_state = 7;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -641,22 +648,14 @@
}
}
break;
- case 9:
- {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 25:
+ case 26:
{
- $_ngcc_current_state = 17;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("fixed"))) {
+ $_ngcc_current_state = 17;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
}
break;
case 11:
@@ -675,29 +674,6 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 26:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 17;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 21:
{
if(($__uri.equals("") && $__local.equals("ref"))) {
@@ -708,24 +684,12 @@
}
}
break;
- case 8:
+ case 25:
{
- action2();
- $_ngcc_current_state = 7;
+ $_ngcc_current_state = 17;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 30:
{
if(($__uri.equals("") && $__local.equals("default"))) {
@@ -736,6 +700,42 @@
}
}
break;
+ case 29:
+ {
+ $_ngcc_current_state = 25;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 9:
+ {
+ $_ngcc_current_state = 8;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 16:
+ {
+ action4();
+ $_ngcc_current_state = 15;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 5:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 19:
+ {
+ $_ngcc_current_state = 18;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -747,62 +747,69 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 448, wloc);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 448, wloc);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 27:
- {
- fixedValue = $value;
- $_ngcc_current_state = 26;
- }
- break;
- case 12:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 458);
- spawnChildFromText(h, $value);
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
case 31:
{
defaultValue = $value;
$_ngcc_current_state = 30;
}
break;
- case 9:
+ case 1:
+ {
+ $_ngcc_current_state = 0;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 8:
+ {
+ action2();
+ $_ngcc_current_state = 7;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 3:
+ {
+ if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
+ spawnChildFromText(h, $value);
+ }
+ }
+ }
+ break;
+ case 17:
{
- $_ngcc_current_state = 8;
- $runtime.sendText(super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ }
+ }
+ break;
+ case 33:
+ {
+ if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 29;
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 25:
@@ -817,24 +824,48 @@
}
}
break;
- case 5:
+ case 22:
{
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
+ NGCCHandler h = new qname(this, super._source, $runtime, 311);
+ spawnChildFromText(h, $value);
}
break;
- case 33:
+ case 29:
{
- if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendText(super._cookie, $value);
}
else {
- $_ngcc_current_state = 29;
+ $_ngcc_current_state = 25;
$runtime.sendText(super._cookie, $value);
}
}
break;
+ case 12:
+ {
+ NGCCHandler h = new qname(this, super._source, $runtime, 300);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 35:
+ {
+ use = $value;
+ $_ngcc_current_state = 34;
+ }
+ break;
+ case 27:
+ {
+ fixedValue = $value;
+ $_ngcc_current_state = 26;
+ }
+ break;
+ case 9:
+ {
+ $_ngcc_current_state = 8;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
case 16:
{
action4();
@@ -842,57 +873,26 @@
$runtime.sendText(super._cookie, $value);
}
break;
+ case 5:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 13:
+ {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 19:
{
$_ngcc_current_state = 18;
$runtime.sendText(super._cookie, $value);
}
break;
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 473, locator,true,defaultValue,fixedValue);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 473, locator,true,defaultValue,fixedValue);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- }
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 22:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 469);
- spawnChildFromText(h, $value);
- }
- break;
- case 35:
- {
- use = $value;
- $_ngcc_current_state = 34;
- }
- break;
case 0:
{
revertToParentFromText(this, super._cookie, $value);
@@ -903,50 +903,50 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 448:
+ case 300:
+ {
+ groupName = ((UName)$__result__);
+ $_ngcc_current_state = 11;
+ }
+ break;
+ case 297:
+ {
+ $_ngcc_current_state = 8;
+ }
+ break;
+ case 306:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 16;
+ }
+ break;
+ case 290:
{
wildcard = ((WildcardImpl)$__result__);
action0();
$_ngcc_current_state = 2;
}
break;
- case 466:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 18;
- }
- break;
- case 473:
+ case 315:
{
anonymousDecl = ((AttributeDeclImpl)$__result__);
action6();
$_ngcc_current_state = 16;
}
break;
- case 464:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 16;
- }
- break;
- case 458:
- {
- groupName = ((UName)$__result__);
- $_ngcc_current_state = 11;
- }
- break;
- case 455:
- {
- $_ngcc_current_state = 8;
- }
- break;
- case 469:
+ case 311:
{
attDeclName = ((UName)$__result__);
action5();
$_ngcc_current_state = 21;
}
break;
+ case 308:
+ {
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 18;
+ }
+ break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java Fri Sep 06 14:20:58 2013 -0700
@@ -189,26 +189,14 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 65:
+ case 54:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 81, null,AnnotationContext.COMPLEXTYPE_DECL);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 617, annotation,AnnotationContext.COMPLEXTYPE_DECL);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 28;
+ $_ngcc_current_state = 52;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
@@ -225,64 +213,10 @@
}
}
break;
- case 88:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action16();
- $_ngcc_current_state = 84;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 63;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 29;
- }
- else {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))))))) {
- action1();
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 4, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- break;
- case 47:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 53, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
case 49:
{
if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 57);
+ NGCCHandler h = new facet(this, super._source, $runtime, 610);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -291,284 +225,6 @@
}
}
break;
- case 18:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))))))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 18, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 54:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 64, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 52;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 68:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 67;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 56:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern"))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 66, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 84:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 80;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 52:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 61);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 51;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 12:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 11, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 41:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 46, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 9, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 9;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 80:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 28:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 31, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 72:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 68;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 63:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 75, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 59:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 19:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 20, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 18;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 39:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 44, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 38;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 21:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 22, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 48:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 56);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 61:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 73, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 35;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 26:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 29, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 37:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 41, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 67:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent")))))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 83, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 7:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
@@ -588,10 +244,33 @@
}
}
break;
- case 9:
+ case 61:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 626, annotation,AnnotationContext.COMPLEXTYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 35;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 18:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))))))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 7, result);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))))))) {
+ NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 571, result);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 12:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 564, fa);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -599,6 +278,48 @@
}
}
break;
+ case 26:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 582, annotation,AnnotationContext.COMPLEXTYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 38:
+ {
+ action8();
+ $_ngcc_current_state = 37;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 44:
+ {
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 68:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 67;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 35:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
@@ -618,6 +339,122 @@
}
}
break;
+ case 80:
+ {
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 76;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 63:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 628, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 88:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action16();
+ $_ngcc_current_state = 84;
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 84:
+ {
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 80;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 37:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 594, result);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 9:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))))))) {
+ NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 560, result);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 19:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 573, annotation,AnnotationContext.COMPLEXTYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 18;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 15:
+ {
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 48:
+ {
+ if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
+ NGCCHandler h = new facet(this, super._source, $runtime, 609);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ action11();
+ $_ngcc_current_state = 47;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 47:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 606, result);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
case 24:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
@@ -629,7 +466,134 @@
}
}
break;
- case 15:
+ case 28:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 584, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 29:
+ {
+ if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 28;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 67:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 636, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 10:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 562, annotation,AnnotationContext.COMPLEXTYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 9;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 41:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 599, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ $_ngcc_current_state = 63;
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ $_ngcc_current_state = 29;
+ }
+ else {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))))))) {
+ action1();
+ NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 557, result);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ }
+ break;
+ case 21:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 575, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 72:
+ {
+ if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 68;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 56:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || ((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 619, fa);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 39:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 597, annotation,AnnotationContext.COMPLEXTYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 38;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 59:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
$runtime.consumeAttribute($ai);
@@ -640,6 +604,42 @@
}
}
break;
+ case 52:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 614);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 51;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 51:
+ {
+ action13();
+ $_ngcc_current_state = 49;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 65:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 634, null,AnnotationContext.COMPLEXTYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -654,33 +654,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 65:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 29:
+ case 54:
{
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 34:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
+ $_ngcc_current_state = 52;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
case 76:
@@ -695,18 +672,29 @@
}
}
break;
- case 2:
+ case 49:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- action1();
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 4, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 48;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 6:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
}
else {
unexpectedLeaveElement($__qname);
}
}
break;
+ case 61:
+ {
+ $_ngcc_current_state = 35;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 46:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
@@ -718,10 +706,32 @@
}
}
break;
- case 47:
+ case 36:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 34;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 18:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 53, result);
+ NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 571, result);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 12:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 564, fa);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -729,6 +739,23 @@
}
}
break;
+ case 26:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 34:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 38:
{
action8();
@@ -736,36 +763,17 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 49:
+ case 44:
{
- $_ngcc_current_state = 48;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 18:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 18, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
}
}
break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 68:
{
if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
@@ -778,10 +786,33 @@
}
}
break;
- case 56:
+ case 1:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 80:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 66, fa);
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 76;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 37:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 594, result);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -801,107 +832,11 @@
}
}
break;
- case 52:
- {
- $_ngcc_current_state = 51;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 12:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 11, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 41:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 46, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 36:
+ case 9:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 34;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 80:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 72:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 68;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 59:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 6:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
+ NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 560, result);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -914,13 +849,7 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 44:
+ case 15:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
$runtime.consumeAttribute($ai);
@@ -931,17 +860,6 @@
}
}
break;
- case 21:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 22, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 48:
{
action11();
@@ -949,45 +867,11 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 61:
- {
- $_ngcc_current_state = 35;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 37:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 41, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 67:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 83, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 17:
+ case 47:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 6;
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 606, result);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -1005,17 +889,6 @@
}
}
break;
- case 9:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 7, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 24:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
@@ -1027,7 +900,99 @@
}
}
break;
- case 15:
+ case 29:
+ {
+ if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 28;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 67:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 636, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 10:
+ {
+ $_ngcc_current_state = 9;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 41:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 599, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ action1();
+ NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 557, result);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 21:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 575, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 72:
+ {
+ if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 68;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 56:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 619, fa);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 39:
+ {
+ $_ngcc_current_state = 38;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 59:
{
if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
$runtime.consumeAttribute($ai);
@@ -1038,6 +1003,41 @@
}
}
break;
+ case 52:
+ {
+ $_ngcc_current_state = 51;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 17:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 6;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 51:
+ {
+ action13();
+ $_ngcc_current_state = 49;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 65:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -1052,9 +1052,49 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 65:
+ case 29:
+ {
+ if(($__uri.equals("") && $__local.equals("mixed"))) {
+ $_ngcc_current_state = 31;
+ }
+ else {
+ $_ngcc_current_state = 28;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 54:
+ {
+ $_ngcc_current_state = 52;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 10:
{
- $_ngcc_current_state = 2;
+ $_ngcc_current_state = 9;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 76:
+ {
+ if(($__uri.equals("") && $__local.equals("final"))) {
+ $_ngcc_current_state = 78;
+ }
+ else {
+ $_ngcc_current_state = 72;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 49:
+ {
+ $_ngcc_current_state = 48;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 61:
+ {
+ $_ngcc_current_state = 35;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -1069,26 +1109,10 @@
}
}
break;
- case 29:
+ case 39:
{
- if(($__uri.equals("") && $__local.equals("mixed"))) {
- $_ngcc_current_state = 31;
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 76:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 78;
- }
- else {
- $_ngcc_current_state = 72;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ $_ngcc_current_state = 38;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 59:
@@ -1101,15 +1125,9 @@
}
}
break;
- case 19:
+ case 26:
{
- $_ngcc_current_state = 18;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 49:
- {
- $_ngcc_current_state = 48;
+ $_ngcc_current_state = 7;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -1120,12 +1138,6 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 44:
{
if(($__uri.equals("") && $__local.equals("base"))) {
@@ -1136,17 +1148,26 @@
}
}
break;
- case 48:
+ case 68:
{
- action11();
- $_ngcc_current_state = 47;
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 70;
+ }
+ else {
+ $_ngcc_current_state = 67;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 52:
+ {
+ $_ngcc_current_state = 51;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 61:
+ case 0:
{
- $_ngcc_current_state = 35;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
case 51:
@@ -1156,25 +1177,13 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 54:
+ case 80:
{
- $_ngcc_current_state = 52;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 68:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 70;
+ if(($__uri.equals("") && $__local.equals("block"))) {
+ $_ngcc_current_state = 82;
}
else {
- $_ngcc_current_state = 67;
+ $_ngcc_current_state = 76;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
}
@@ -1190,32 +1199,33 @@
}
}
break;
- case 52:
+ case 19:
{
- $_ngcc_current_state = 51;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
+ $_ngcc_current_state = 18;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
+ case 15:
{
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("base"))) {
+ $_ngcc_current_state = 14;
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
}
break;
- case 80:
+ case 65:
{
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 82;
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 48:
+ {
+ action11();
+ $_ngcc_current_state = 47;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 24:
@@ -1228,16 +1238,6 @@
}
}
break;
- case 15:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 14;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -1252,25 +1252,9 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 22:
+ case 54:
{
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 21;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 65:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 29:
- {
- $_ngcc_current_state = 28;
+ $_ngcc_current_state = 52;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -1280,64 +1264,12 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 49:
{
$_ngcc_current_state = 48;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 85:
- {
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 80;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 68:
- {
- $_ngcc_current_state = 67;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 84:
- {
- $_ngcc_current_state = 80;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 30:
{
if(($__uri.equals("") && $__local.equals("mixed"))) {
@@ -1348,9 +1280,89 @@
}
}
break;
- case 52:
+ case 73:
+ {
+ if(($__uri.equals("") && $__local.equals("mixed"))) {
+ $_ngcc_current_state = 68;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 61:
+ {
+ $_ngcc_current_state = 35;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 26:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 38:
+ {
+ action8();
+ $_ngcc_current_state = 37;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 68:
+ {
+ $_ngcc_current_state = 67;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 13:
{
- $_ngcc_current_state = 51;
+ if(($__uri.equals("") && $__local.equals("base"))) {
+ $_ngcc_current_state = 12;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 85:
+ {
+ if(($__uri.equals("") && $__local.equals("abstract"))) {
+ $_ngcc_current_state = 80;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 80:
+ {
+ $_ngcc_current_state = 76;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 84:
+ {
+ $_ngcc_current_state = 80;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 19:
+ {
+ $_ngcc_current_state = 18;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 48:
+ {
+ action11();
+ $_ngcc_current_state = 47;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 29:
+ {
+ $_ngcc_current_state = 28;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -1360,21 +1372,42 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
+ case 77:
{
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("final"))) {
+ $_ngcc_current_state = 72;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
}
break;
- case 80:
+ case 72:
{
- $_ngcc_current_state = 76;
+ $_ngcc_current_state = 68;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 57:
+ case 69:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 67;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 39:
+ {
+ $_ngcc_current_state = 38;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 22:
{
if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 56;
+ $_ngcc_current_state = 21;
}
else {
unexpectedLeaveAttribute($__qname);
@@ -1391,24 +1424,6 @@
}
}
break;
- case 72:
- {
- $_ngcc_current_state = 68;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 42:
{
if(($__uri.equals("") && $__local.equals("base"))) {
@@ -1419,55 +1434,40 @@
}
}
break;
- case 77:
+ case 52:
+ {
+ $_ngcc_current_state = 51;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 72;
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 51:
+ {
+ action13();
+ $_ngcc_current_state = 49;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 57:
+ {
+ if(($__uri.equals("") && $__local.equals("base"))) {
+ $_ngcc_current_state = 56;
}
else {
unexpectedLeaveAttribute($__qname);
}
}
break;
- case 48:
+ case 65:
{
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 61:
- {
- $_ngcc_current_state = 35;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
+ $_ngcc_current_state = 2;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 69:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 67;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 73:
- {
- if(($__uri.equals("") && $__local.equals("mixed"))) {
- $_ngcc_current_state = 68;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -1479,22 +1479,22 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 65:
+ case 58:
{
- $_ngcc_current_state = 2;
+ NGCCHandler h = new qname(this, super._source, $runtime, 621);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 54:
+ {
+ $_ngcc_current_state = 52;
$runtime.sendText(super._cookie, $value);
}
break;
- case 29:
+ case 31:
{
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendText(super._cookie, $value);
- }
+ mixedValue = $value;
+ $_ngcc_current_state = 30;
}
break;
case 76:
@@ -1509,10 +1509,22 @@
}
}
break;
- case 23:
+ case 49:
+ {
+ $_ngcc_current_state = 48;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 61:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 24);
- spawnChildFromText(h, $value);
+ $_ngcc_current_state = 35;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 26:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 38:
@@ -1522,29 +1534,12 @@
$runtime.sendText(super._cookie, $value);
}
break;
- case 49:
- {
- $_ngcc_current_state = 48;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 43:
+ case 44:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 48);
- spawnChildFromText(h, $value);
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendText(super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 68:
@@ -1559,6 +1554,18 @@
}
}
break;
+ case 80:
+ {
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 76;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 84:
{
if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
@@ -1571,47 +1578,59 @@
}
}
break;
- case 52:
+ case 19:
+ {
+ $_ngcc_current_state = 18;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 15:
+ {
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 86:
+ {
+ abstractValue = $value;
+ $_ngcc_current_state = 85;
+ }
+ break;
+ case 48:
{
- $_ngcc_current_state = 51;
+ action11();
+ $_ngcc_current_state = 47;
$runtime.sendText(super._cookie, $value);
}
break;
+ case 24:
+ {
+ if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 29:
+ {
+ if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 28;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 10:
{
$_ngcc_current_state = 9;
$runtime.sendText(super._cookie, $value);
}
break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 80:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 58:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 68);
- spawnChildFromText(h, $value);
- }
- break;
- case 31:
- {
- mixedValue = $value;
- $_ngcc_current_state = 30;
- }
- break;
case 72:
{
if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
@@ -1624,16 +1643,16 @@
}
}
break;
- case 70:
+ case 43:
{
- name = $value;
- $_ngcc_current_state = 69;
+ NGCCHandler h = new qname(this, super._source, $runtime, 601);
+ spawnChildFromText(h, $value);
}
break;
- case 86:
+ case 39:
{
- abstractValue = $value;
- $_ngcc_current_state = 85;
+ $_ngcc_current_state = 38;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 59:
@@ -1644,69 +1663,52 @@
}
}
break;
- case 19:
+ case 23:
{
- $_ngcc_current_state = 18;
- $runtime.sendText(super._cookie, $value);
+ NGCCHandler h = new qname(this, super._source, $runtime, 577);
+ spawnChildFromText(h, $value);
}
break;
- case 39:
+ case 52:
{
- $_ngcc_current_state = 38;
+ $_ngcc_current_state = 51;
$runtime.sendText(super._cookie, $value);
}
break;
- case 44:
+ case 78:
{
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 14:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 13);
+ NGCCHandler h = new erSet(this, super._source, $runtime, 648);
spawnChildFromText(h, $value);
}
break;
- case 48:
- {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 61:
+ case 70:
{
- $_ngcc_current_state = 35;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
+ name = $value;
+ $_ngcc_current_state = 69;
}
break;
case 82:
{
- NGCCHandler h = new erSet(this, super._source, $runtime, 100);
+ NGCCHandler h = new erSet(this, super._source, $runtime, 653);
spawnChildFromText(h, $value);
}
break;
- case 78:
+ case 0:
{
- NGCCHandler h = new erSet(this, super._source, $runtime, 95);
- spawnChildFromText(h, $value);
+ revertToParentFromText(result, super._cookie, $value);
}
break;
- case 24:
+ case 51:
{
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
+ action13();
+ $_ngcc_current_state = 49;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 65:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 74:
@@ -1715,12 +1717,10 @@
$_ngcc_current_state = 73;
}
break;
- case 15:
+ case 14:
{
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
+ NGCCHandler h = new qname(this, super._source, $runtime, 566);
+ spawnChildFromText(h, $value);
}
break;
}
@@ -1728,179 +1728,179 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 53:
+ case 573:
+ {
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 18;
+ }
+ break;
+ case 636:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 65;
+ }
+ break;
+ case 562:
{
- $_ngcc_current_state = 46;
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 9;
+ }
+ break;
+ case 577:
+ {
+ baseTypeName = ((UName)$__result__);
+ action6();
+ $_ngcc_current_state = 22;
+ }
+ break;
+ case 648:
+ {
+ finalValue = ((Integer)$__result__);
+ $_ngcc_current_state = 77;
+ }
+ break;
+ case 614:
+ {
+ baseContentType = ((SimpleTypeImpl)$__result__);
+ $_ngcc_current_state = 51;
}
break;
- case 18:
+ case 653:
+ {
+ blockValue = ((Integer)$__result__);
+ $_ngcc_current_state = 81;
+ }
+ break;
+ case 566:
+ {
+ baseTypeName = ((UName)$__result__);
+ action3();
+ $_ngcc_current_state = 13;
+ }
+ break;
+ case 621:
+ {
+ baseTypeName = ((UName)$__result__);
+ action14();
+ $_ngcc_current_state = 57;
+ }
+ break;
+ case 617:
+ {
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 52;
+ }
+ break;
+ case 610:
+ {
+ facet = ((XSFacet)$__result__);
+ action12();
+ $_ngcc_current_state = 48;
+ }
+ break;
+ case 626:
+ {
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 35;
+ }
+ break;
+ case 571:
{
explicitContent = ((ContentTypeImpl)$__result__);
action5();
$_ngcc_current_state = 17;
}
break;
- case 61:
- {
- baseContentType = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 51;
- }
- break;
- case 11:
+ case 564:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 10;
}
break;
- case 9:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 9;
- }
- break;
- case 44:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 38;
- }
- break;
- case 13:
- {
- baseTypeName = ((UName)$__result__);
- action3();
- $_ngcc_current_state = 13;
- }
- break;
- case 56:
- {
- facet = ((XSFacet)$__result__);
- action12();
- $_ngcc_current_state = 48;
- }
- break;
- case 29:
+ case 582:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 7;
}
break;
- case 95:
+ case 628:
{
- finalValue = ((Integer)$__result__);
- $_ngcc_current_state = 77;
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 61;
}
break;
- case 83:
+ case 594:
{
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 65;
+ $_ngcc_current_state = 36;
}
break;
- case 7:
+ case 560:
{
explicitContent = ((ContentTypeImpl)$__result__);
action2();
$_ngcc_current_state = 8;
}
break;
- case 81:
+ case 606:
{
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
+ $_ngcc_current_state = 46;
+ }
+ break;
+ case 609:
+ {
+ facet = ((XSFacet)$__result__);
+ action12();
+ $_ngcc_current_state = 48;
}
break;
- case 24:
+ case 584:
{
- baseTypeName = ((UName)$__result__);
- action6();
- $_ngcc_current_state = 22;
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 26;
}
break;
- case 4:
+ case 599:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 39;
+ }
+ break;
+ case 557:
{
explicitContent = ((ContentTypeImpl)$__result__);
action0();
$_ngcc_current_state = 1;
}
break;
- case 57:
+ case 575:
{
- facet = ((XSFacet)$__result__);
- action12();
- $_ngcc_current_state = 48;
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 19;
}
break;
- case 48:
+ case 601:
{
baseTypeName = ((UName)$__result__);
action9();
$_ngcc_current_state = 42;
}
break;
- case 64:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 52;
- }
- break;
- case 66:
+ case 619:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 54;
}
break;
- case 46:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 39;
- }
- break;
- case 68:
+ case 597:
{
- baseTypeName = ((UName)$__result__);
- action14();
- $_ngcc_current_state = 57;
- }
- break;
- case 31:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 26;
- }
- break;
- case 75:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 61;
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 38;
}
break;
- case 20:
+ case 634:
{
annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 18;
- }
- break;
- case 22:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 19;
- }
- break;
- case 73:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 35;
- }
- break;
- case 100:
- {
- blockValue = ((Integer)$__result__);
- $_ngcc_current_state = 81;
- }
- break;
- case 41:
- {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 2;
}
break;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType_complexContent_body.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType_complexContent_body.java Fri Sep 06 14:20:58 2013 -0700
@@ -76,27 +76,27 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 0:
{
revertToParentFromEnterElement(particle, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
- case 1:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 674, owner);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 674, owner);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 2:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))) {
- NGCCHandler h = new particle(this, super._source, $runtime, 676);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
+ NGCCHandler h = new particle(this, super._source, $runtime, 3);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -119,17 +119,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ break;
case 0:
{
revertToParentFromLeaveElement(particle, super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 674, owner);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -150,17 +150,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ break;
case 0:
{
revertToParentFromEnterAttribute(particle, super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 674, owner);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -181,17 +181,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
+ spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
+ }
+ break;
case 0:
{
revertToParentFromLeaveAttribute(particle, super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 674, owner);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -209,17 +209,17 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
+ spawnChildFromText(h, $value);
+ }
+ break;
case 0:
{
revertToParentFromText(particle, super._cookie, $value);
}
break;
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 674, owner);
- spawnChildFromText(h, $value);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -231,13 +231,13 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 674:
+ case 1:
{
action0();
$_ngcc_current_state = 0;
}
break;
- case 676:
+ case 3:
{
particle = ((ParticleImpl)$__result__);
$_ngcc_current_state = 1;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java Fri Sep 06 14:20:58 2013 -0700
@@ -107,51 +107,38 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 40:
+ case 17:
{
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 13;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
- case 1:
+ case 28:
{
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- NGCCHandler h = new identityConstraint(this, super._source, $runtime, 112);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 0;
+ $_ngcc_current_state = 24;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
- case 36:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
+ NGCCHandler h = new identityConstraint(this, super._source, $runtime, 6);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 32;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
@@ -167,64 +154,6 @@
}
}
break;
- case 23:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 124);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 125);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- }
- break;
- case 0:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- NGCCHandler h = new identityConstraint(this, super._source, $runtime, 111);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 24:
{
if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
@@ -237,22 +166,57 @@
}
}
break;
- case 17:
+ case 11:
{
- if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 24, null,AnnotationContext.ELEMENT_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 3;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 23:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 13;
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 44:
+ {
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 40;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 40:
+ {
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 36;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
case 48:
{
- if(((($ai = $runtime.getAttributeIndex("","final"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","abstract"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($ai = $runtime.getAttributeIndex("","default"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if(((($ai = $runtime.getAttributeIndex("","default"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -260,26 +224,62 @@
}
}
break;
- case 28:
+ case 1:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
+ NGCCHandler h = new identityConstraint(this, super._source, $runtime, 7);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 0;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 3:
{
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 19);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ NGCCHandler h = new complexType(this, super._source, $runtime, 20);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ }
+ }
+ break;
+ case 13:
+ {
+ if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 24;
+ $_ngcc_current_state = 11;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
- case 11:
+ case 36:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 129, null,AnnotationContext.ELEMENT_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 3;
+ $_ngcc_current_state = 32;
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
@@ -298,46 +298,33 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 40:
+ case 17:
{
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 13;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
}
break;
- case 1:
+ case 28:
{
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 36:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
- $_ngcc_current_state = 32;
+ $_ngcc_current_state = 24;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
}
break;
- case 44:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
+ revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
}
break;
case 32:
@@ -352,46 +339,6 @@
}
}
break;
- case 23:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 24:
{
if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
@@ -404,22 +351,51 @@
}
}
break;
- case 17:
+ case 11:
{
- if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
+ $_ngcc_current_state = 3;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 23:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
- $_ngcc_current_state = 13;
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 44:
+ {
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 40;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 40:
+ {
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 36;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
}
break;
case 48:
{
- if((($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 || ($ai = $runtime.getAttributeIndex("","default"))>=0))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if((($ai = $runtime.getAttributeIndex("","default"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -427,22 +403,46 @@
}
}
break;
- case 28:
+ case 1:
{
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ $_ngcc_current_state = 0;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 3:
+ {
+ if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
- $_ngcc_current_state = 24;
+ $_ngcc_current_state = 1;
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
}
break;
- case 11:
+ case 13:
{
- $_ngcc_current_state = 3;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 11;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 36:
+ {
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 32;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
default:
@@ -459,43 +459,31 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 40:
+ case 17:
{
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 42;
+ if(($__uri.equals("") && $__local.equals("nillable"))) {
+ $_ngcc_current_state = 19;
}
else {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 13;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
}
break;
- case 1:
+ case 28:
{
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 36:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 38;
+ if(($__uri.equals("") && $__local.equals("fixed"))) {
+ $_ngcc_current_state = 30;
}
else {
- $_ngcc_current_state = 32;
+ $_ngcc_current_state = 24;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
}
break;
- case 44:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 46;
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
}
break;
case 32:
@@ -509,43 +497,6 @@
}
}
break;
- case 23:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 22;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 3:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- $_ngcc_current_state = 6;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("substitutionGroup"))) {
- $_ngcc_current_state = 15;
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 24:
{
if(($__uri.equals("") && $__local.equals("form"))) {
@@ -557,21 +508,48 @@
}
}
break;
- case 17:
+ case 11:
{
- if(($__uri.equals("") && $__local.equals("nillable"))) {
- $_ngcc_current_state = 19;
+ $_ngcc_current_state = 3;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 23:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 22;
}
else {
- $_ngcc_current_state = 13;
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 44:
+ {
+ if(($__uri.equals("") && $__local.equals("abstract"))) {
+ $_ngcc_current_state = 46;
+ }
+ else {
+ $_ngcc_current_state = 40;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 40:
+ {
+ if(($__uri.equals("") && $__local.equals("block"))) {
+ $_ngcc_current_state = 42;
+ }
+ else {
+ $_ngcc_current_state = 36;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
}
break;
case 48:
{
- if((($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("name")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("abstract")) || ($__uri.equals("") && $__local.equals("default"))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if((($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
@@ -579,21 +557,43 @@
}
}
break;
- case 28:
+ case 1:
{
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 30;
+ $_ngcc_current_state = 0;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 3:
+ {
+ if(($__uri.equals("") && $__local.equals("type"))) {
+ $_ngcc_current_state = 6;
}
else {
- $_ngcc_current_state = 24;
+ $_ngcc_current_state = 1;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
}
break;
- case 11:
+ case 13:
{
- $_ngcc_current_state = 3;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("substitutionGroup"))) {
+ $_ngcc_current_state = 15;
+ }
+ else {
+ $_ngcc_current_state = 11;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
+ case 36:
+ {
+ if(($__uri.equals("") && $__local.equals("final"))) {
+ $_ngcc_current_state = 38;
+ }
+ else {
+ $_ngcc_current_state = 32;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
default:
@@ -610,16 +610,85 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 40:
+ case 21:
{
- $_ngcc_current_state = 36;
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 17;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 17:
+ {
+ $_ngcc_current_state = 13;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 14:
+ case 18:
+ {
+ if(($__uri.equals("") && $__local.equals("nillable"))) {
+ $_ngcc_current_state = 13;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 25:
+ {
+ if(($__uri.equals("") && $__local.equals("form"))) {
+ $_ngcc_current_state = 23;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 41:
+ {
+ if(($__uri.equals("") && $__local.equals("block"))) {
+ $_ngcc_current_state = 36;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 28:
{
- if(($__uri.equals("") && $__local.equals("substitutionGroup"))) {
- $_ngcc_current_state = 11;
+ $_ngcc_current_state = 24;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 32:
+ {
+ $_ngcc_current_state = 28;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 24:
+ {
+ $_ngcc_current_state = 23;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 11:
+ {
+ $_ngcc_current_state = 3;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 33:
+ {
+ if(($__uri.equals("") && $__local.equals("default"))) {
+ $_ngcc_current_state = 28;
}
else {
unexpectedLeaveAttribute($__qname);
@@ -636,89 +705,60 @@
}
}
break;
- case 1:
+ case 44:
{
- $_ngcc_current_state = 0;
+ $_ngcc_current_state = 40;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 33:
+ case 14:
{
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 28;
+ if(($__uri.equals("") && $__local.equals("substitutionGroup"))) {
+ $_ngcc_current_state = 11;
}
else {
unexpectedLeaveAttribute($__qname);
}
}
break;
- case 21:
+ case 40:
{
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 17;
+ $_ngcc_current_state = 36;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 45:
+ {
+ if(($__uri.equals("") && $__local.equals("abstract"))) {
+ $_ngcc_current_state = 40;
}
else {
unexpectedLeaveAttribute($__qname);
}
}
break;
- case 36:
+ case 1:
{
- $_ngcc_current_state = 32;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 44:
- {
- $_ngcc_current_state = 40;
+ $_ngcc_current_state = 0;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 41:
- {
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 36;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
case 3:
{
$_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 32:
+ case 13:
{
- $_ngcc_current_state = 28;
+ $_ngcc_current_state = 11;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 29:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 24;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 18:
+ case 36:
{
- if(($__uri.equals("") && $__local.equals("nillable"))) {
- $_ngcc_current_state = 13;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 32;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 5:
@@ -732,50 +772,10 @@
}
}
break;
- case 13:
- {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 25:
- {
- if(($__uri.equals("") && $__local.equals("form"))) {
- $_ngcc_current_state = 23;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 24:
+ case 29:
{
- $_ngcc_current_state = 23;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 28:
- {
- $_ngcc_current_state = 24;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 17:
- {
- $_ngcc_current_state = 13;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 45:
- {
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 40;
+ if(($__uri.equals("") && $__local.equals("fixed"))) {
+ $_ngcc_current_state = 24;
}
else {
unexpectedLeaveAttribute($__qname);
@@ -793,82 +793,38 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 40:
+ case 17:
{
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendText(super._cookie, $value);
}
else {
- $_ngcc_current_state = 36;
+ $_ngcc_current_state = 13;
$runtime.sendText(super._cookie, $value);
}
}
break;
+ case 34:
+ {
+ defaultValue = $value;
+ $_ngcc_current_state = 33;
+ }
+ break;
case 22:
{
name = $value;
$_ngcc_current_state = 21;
}
break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 30:
+ case 28:
{
- fixedValue = $value;
- $_ngcc_current_state = 29;
- }
- break;
- case 46:
- {
- abstractValue = $value;
- $_ngcc_current_state = 45;
- }
- break;
- case 36:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendText(super._cookie, $value);
}
else {
- $_ngcc_current_state = 32;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 23:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
+ $_ngcc_current_state = 24;
$runtime.sendText(super._cookie, $value);
}
}
@@ -885,53 +841,15 @@
}
}
break;
- case 42:
- {
- NGCCHandler h = new ersSet(this, super._source, $runtime, 165);
- spawnChildFromText(h, $value);
- }
- break;
- case 6:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 115);
- spawnChildFromText(h, $value);
- }
- break;
- case 19:
- {
- nillable = $value;
- $_ngcc_current_state = 18;
- }
- break;
case 0:
{
revertToParentFromText(makeResult(), super._cookie, $value);
}
break;
- case 13:
+ case 6:
{
- if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 26:
- {
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 145);
- spawnChildFromText(h, $value);
- }
- else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 145);
- spawnChildFromText(h, $value);
- }
- }
+ NGCCHandler h = new qname(this, super._source, $runtime, 10);
+ spawnChildFromText(h, $value);
}
break;
case 24:
@@ -946,64 +864,90 @@
}
}
break;
- case 28:
+ case 11:
+ {
+ $_ngcc_current_state = 3;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 23:
{
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 44:
+ {
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendText(super._cookie, $value);
}
else {
- $_ngcc_current_state = 24;
+ $_ngcc_current_state = 40;
$runtime.sendText(super._cookie, $value);
}
}
break;
- case 17:
+ case 46:
+ {
+ abstractValue = $value;
+ $_ngcc_current_state = 45;
+ }
+ break;
+ case 19:
{
- if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
+ nillable = $value;
+ $_ngcc_current_state = 18;
+ }
+ break;
+ case 40:
+ {
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
$runtime.consumeAttribute($ai);
$runtime.sendText(super._cookie, $value);
}
else {
- $_ngcc_current_state = 13;
+ $_ngcc_current_state = 36;
$runtime.sendText(super._cookie, $value);
}
}
break;
case 48:
{
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
else {
if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
else {
if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 174, fa);
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
spawnChildFromText(h, $value);
}
}
@@ -1014,28 +958,84 @@
}
}
break;
- case 15:
+ case 30:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 132);
- spawnChildFromText(h, $value);
+ fixedValue = $value;
+ $_ngcc_current_state = 29;
+ }
+ break;
+ case 1:
+ {
+ $_ngcc_current_state = 0;
+ $runtime.sendText(super._cookie, $value);
}
break;
- case 11:
+ case 3:
{
- $_ngcc_current_state = 3;
- $runtime.sendText(super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 13:
+ {
+ if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 11;
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 38:
{
- NGCCHandler h = new erSet(this, super._source, $runtime, 160);
+ NGCCHandler h = new erSet(this, super._source, $runtime, 55);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 15:
+ {
+ NGCCHandler h = new qname(this, super._source, $runtime, 27);
spawnChildFromText(h, $value);
}
break;
- case 34:
+ case 26:
{
- defaultValue = $value;
- $_ngcc_current_state = 33;
+ if($value.equals("unqualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 40);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if($value.equals("qualified")) {
+ NGCCHandler h = new qualification(this, super._source, $runtime, 40);
+ spawnChildFromText(h, $value);
+ }
+ }
+ }
+ break;
+ case 36:
+ {
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 32;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 42:
+ {
+ NGCCHandler h = new ersSet(this, super._source, $runtime, 60);
+ spawnChildFromText(h, $value);
}
break;
}
@@ -1043,81 +1043,81 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 145:
+ case 24:
+ {
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 3;
+ }
+ break;
+ case 27:
+ {
+ substRef = ((UName)$__result__);
+ action2();
+ $_ngcc_current_state = 14;
+ }
+ break;
+ case 10:
+ {
+ typeName = ((UName)$__result__);
+ $_ngcc_current_state = 5;
+ }
+ break;
+ case 60:
+ {
+ blockValue = ((Integer)$__result__);
+ $_ngcc_current_state = 41;
+ }
+ break;
+ case 69:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 44;
+ }
+ break;
+ case 19:
+ {
+ type = ((SimpleTypeImpl)$__result__);
+ $_ngcc_current_state = 1;
+ }
+ break;
+ case 20:
+ {
+ type = ((ComplexTypeImpl)$__result__);
+ $_ngcc_current_state = 1;
+ }
+ break;
+ case 40:
{
form = ((Boolean)$__result__).booleanValue();
action3();
$_ngcc_current_state = 25;
}
break;
- case 174:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 44;
- }
- break;
- case 129:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 3;
- }
- break;
- case 115:
- {
- typeName = ((UName)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 165:
- {
- blockValue = ((Integer)$__result__);
- $_ngcc_current_state = 41;
- }
- break;
- case 111:
+ case 6:
{
idc = ((IdentityConstraintImpl)$__result__);
action0();
$_ngcc_current_state = 0;
}
break;
- case 132:
- {
- substRef = ((UName)$__result__);
- action2();
- $_ngcc_current_state = 14;
- }
- break;
- case 124:
- {
- type = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 125:
- {
- type = ((ComplexTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 160:
- {
- finalValue = ((Integer)$__result__);
- $_ngcc_current_state = 37;
- }
- break;
- case 112:
+ case 7:
{
idc = ((IdentityConstraintImpl)$__result__);
action0();
$_ngcc_current_state = 0;
}
break;
+ case 55:
+ {
+ finalValue = ((Integer)$__result__);
+ $_ngcc_current_state = 37;
+ }
+ break;
}
}
public boolean accepted() {
- return((($_ngcc_current_state == 1) || (($_ngcc_current_state == 3) || (($_ngcc_current_state == 0) || (($_ngcc_current_state == 11) || (($_ngcc_current_state == 17) || ($_ngcc_current_state == 13)))))));
+ return((($_ngcc_current_state == 1) || (($_ngcc_current_state == 0) || (($_ngcc_current_state == 3) || (($_ngcc_current_state == 17) || (($_ngcc_current_state == 13) || ($_ngcc_current_state == 11)))))));
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/erSet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/erSet.java Fri Sep 06 14:20:58 2013 -0700
@@ -143,17 +143,17 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromText(makeResult(), super._cookie, $value);
+ }
+ break;
case 1:
{
v = $value;
$_ngcc_current_state = 0;
}
break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/ersSet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/ersSet.java Fri Sep 06 14:20:58 2013 -0700
@@ -143,17 +143,17 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromText(makeResult(), super._cookie, $value);
+ }
+ break;
case 1:
{
v = $value;
$_ngcc_current_state = 0;
}
break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/facet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/facet.java Fri Sep 06 14:20:58 2013 -0700
@@ -85,18 +85,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 418, null,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 12:
{
if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
@@ -109,26 +97,10 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 4:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 420, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 230, fa);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -148,6 +120,34 @@
}
}
break;
+ case 11:
+ {
+ if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 228, null,AnnotationContext.SIMPLETYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -162,44 +162,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 4:
{
if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 420, fa);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 230, fa);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -219,6 +185,40 @@
}
}
break;
+ case 1:
+ {
+ if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ action0();
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 11:
+ {
+ if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -233,15 +233,15 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
+ case 5:
{
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("fixed"))) {
+ $_ngcc_current_state = 7;
+ }
+ else {
+ $_ngcc_current_state = 4;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
case 11:
@@ -254,15 +254,15 @@
}
}
break;
- case 5:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 7;
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -279,10 +279,25 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
+ case 5:
+ {
+ $_ngcc_current_state = 4;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 9:
{
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("value"))) {
+ $_ngcc_current_state = 5;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
case 6:
@@ -295,24 +310,9 @@
}
}
break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 9:
+ case 2:
{
- if(($__uri.equals("") && $__local.equals("value"))) {
- $_ngcc_current_state = 5;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 4;
+ $_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -327,15 +327,16 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 2:
+ case 5:
{
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 4;
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 7:
@@ -358,16 +359,15 @@
$_ngcc_current_state = 9;
}
break;
- case 5:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendText(super._cookie, $value);
- }
+ revertToParentFromText(result, super._cookie, $value);
+ }
+ break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
}
break;
}
@@ -375,18 +375,18 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 418:
+ case 230:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 2;
+ }
+ break;
+ case 228:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 1;
}
break;
- case 420:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java Fri Sep 06 14:20:58 2013 -0700
@@ -95,34 +95,22 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 15:
+ case 10:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action2();
- $_ngcc_current_state = 11;
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
else {
unexpectedEnterElement($__qname);
}
}
break;
- case 3:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 593, mloc,compositorName);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
+ case 5:
{
if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 3;
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 357, null);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
unexpectedEnterElement($__qname);
@@ -141,32 +129,10 @@
}
}
break;
- case 5:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 595, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 6:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 597, null,AnnotationContext.MODELGROUP_DECL);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 359, null,AnnotationContext.MODELGROUP_DECL);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -180,6 +146,40 @@
revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
+ case 4:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ $_ngcc_current_state = 3;
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 15:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action2();
+ $_ngcc_current_state = 11;
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 3:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))))) {
+ NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 355, mloc,compositorName);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -194,22 +194,11 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 3:
+ case 10:
{
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 593, mloc,compositorName);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -240,17 +229,6 @@
}
}
break;
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 6:
{
$_ngcc_current_state = 5;
@@ -262,6 +240,28 @@
revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 2:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 3:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
+ NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 355, mloc,compositorName);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -276,6 +276,16 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 10:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 9;
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
case 11:
{
if(($__uri.equals("") && $__local.equals("ID"))) {
@@ -287,16 +297,6 @@
}
}
break;
- case 10:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 9;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
case 6:
{
$_ngcc_current_state = 5;
@@ -322,32 +322,12 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("ID"))) {
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
case 11:
{
$_ngcc_current_state = 10;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
case 6:
{
$_ngcc_current_state = 5;
@@ -359,6 +339,26 @@
revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 12:
+ {
+ if(($__uri.equals("") && $__local.equals("ID"))) {
+ $_ngcc_current_state = 10;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 8:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 6;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -370,15 +370,12 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 13:
+ case 10:
{
- $_ngcc_current_state = 12;
- }
- break;
- case 9:
- {
- name = $value;
- $_ngcc_current_state = 8;
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 11:
@@ -393,14 +390,6 @@
}
}
break;
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
case 6:
{
$_ngcc_current_state = 5;
@@ -412,30 +401,41 @@
revertToParentFromText(result, super._cookie, $value);
}
break;
+ case 9:
+ {
+ name = $value;
+ $_ngcc_current_state = 8;
+ }
+ break;
+ case 13:
+ {
+ $_ngcc_current_state = 12;
+ }
+ break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 593:
- {
- term = ((ModelGroupImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- case 595:
+ case 357:
{
fa = ((ForeignAttributesImpl)$__result__);
action1();
$_ngcc_current_state = 4;
}
break;
- case 597:
+ case 359:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 5;
}
break;
+ case 355:
+ {
+ term = ((ModelGroupImpl)$__result__);
+ $_ngcc_current_state = 2;
+ }
+ break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java Fri Sep 06 14:20:58 2013 -0700
@@ -96,6 +96,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 16:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
@@ -107,43 +118,15 @@
}
}
break;
- case 17:
+ case 0:
{
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 254, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
+ revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 241);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 16:
+ case 17:
{
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 237);
+ if((($ai = $runtime.getAttributeIndex("","name"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -162,6 +145,52 @@
}
}
break;
+ case 18:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ action2();
+ $_ngcc_current_state = 17;
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 3:
+ {
+ if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 270);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 4:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
+ $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
+ $_ngcc_current_state = 3;
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 8:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 277, null,AnnotationContext.IDENTITY_CONSTRAINT);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 10:
{
if(($ai = $runtime.getAttributeIndex("","refer"))>=0) {
@@ -174,42 +203,13 @@
}
}
break;
- case 0:
+ case 6:
{
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 8:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 244, null,AnnotationContext.IDENTITY_CONSTRAINT);
+ if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 274);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 18:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action2();
- $_ngcc_current_state = 17;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 3;
- }
- else {
unexpectedEnterElement($__qname);
}
}
@@ -228,33 +228,11 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 1:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 17:
+ case 5:
{
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 254, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 6:
- {
- if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector")))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 241);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 4;
}
else {
unexpectedLeaveElement($__qname);
@@ -272,10 +250,37 @@
}
}
break;
- case 3:
+ case 1:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 2:
{
- if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field")))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 237);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 17:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -283,6 +288,23 @@
}
}
break;
+ case 3:
+ {
+ if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field")))) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 270);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 8:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 10:
{
if(($ai = $runtime.getAttributeIndex("","refer"))>=0) {
@@ -295,39 +317,17 @@
}
}
break;
- case 5:
+ case 6:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 4;
+ if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector")))) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 274);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
}
}
break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveElement($__qname);
@@ -342,28 +342,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 17:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 254, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 241);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
case 16:
{
if(($__uri.equals("") && $__local.equals("name"))) {
@@ -374,10 +352,15 @@
}
}
break;
- case 3:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 237);
+ revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 17:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
@@ -385,6 +368,23 @@
}
}
break;
+ case 3:
+ {
+ if(($__uri.equals("") && $__local.equals("xpath"))) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 270);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 8:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 10:
{
if(($__uri.equals("") && $__local.equals("refer"))) {
@@ -396,15 +396,15 @@
}
}
break;
- case 0:
+ case 6:
{
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("xpath"))) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 274);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
}
break;
default:
@@ -421,6 +421,11 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 14:
{
if(($__uri.equals("") && $__local.equals("name"))) {
@@ -431,6 +436,18 @@
}
}
break;
+ case 8:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 10:
+ {
+ $_ngcc_current_state = 8;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 11:
{
if(($__uri.equals("") && $__local.equals("refer"))) {
@@ -441,23 +458,6 @@
}
}
break;
- case 10:
- {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -469,20 +469,10 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 17:
+ case 15:
{
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 254, null);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 241);
- spawnChildFromText(h, $value);
- }
+ name = $value;
+ $_ngcc_current_state = 14;
}
break;
case 16:
@@ -493,18 +483,37 @@
}
}
break;
- case 3:
+ case 0:
+ {
+ revertToParentFromText(makeResult(), super._cookie, $value);
+ }
+ break;
+ case 12:
{
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 237);
+ NGCCHandler h = new qname(this, super._source, $runtime, 280);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 17:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
spawnChildFromText(h, $value);
}
}
break;
- case 15:
+ case 3:
{
- name = $value;
- $_ngcc_current_state = 14;
+ if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 270);
+ spawnChildFromText(h, $value);
+ }
+ }
+ break;
+ case 8:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 10:
@@ -519,21 +528,12 @@
}
}
break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 12:
+ case 6:
{
- NGCCHandler h = new qname(this, super._source, $runtime, 247);
- spawnChildFromText(h, $value);
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
+ NGCCHandler h = new xpath(this, super._source, $runtime, 274);
+ spawnChildFromText(h, $value);
+ }
}
break;
}
@@ -541,36 +541,36 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 241:
- {
- selector = ((XPathImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 237:
+ case 270:
{
field = ((XPathImpl)$__result__);
action0();
$_ngcc_current_state = 2;
}
break;
- case 244:
+ case 287:
{
- ann = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 7;
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 16;
}
break;
- case 247:
+ case 280:
{
ref = ((UName)$__result__);
action1();
$_ngcc_current_state = 11;
}
break;
- case 254:
+ case 277:
{
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 16;
+ ann = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 7;
+ }
+ break;
+ case 274:
+ {
+ selector = ((XPathImpl)$__result__);
+ $_ngcc_current_state = 5;
}
break;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.java Fri Sep 06 14:20:58 2013 -0700
@@ -78,9 +78,16 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
+ case 4:
{
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
}
break;
case 8:
@@ -109,7 +116,7 @@
case 2:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 498, null,AnnotationContext.SCHEMA);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 340, null,AnnotationContext.SCHEMA);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -118,16 +125,9 @@
}
}
break;
- case 4:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
+ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
default:
@@ -144,9 +144,16 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
+ case 4:
{
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
+ if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
case 8:
@@ -161,6 +168,12 @@
}
}
break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
@@ -173,22 +186,9 @@
}
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
+ revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -205,9 +205,15 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
+ case 4:
{
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
+ $_ngcc_current_state = 6;
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
}
break;
case 8:
@@ -227,15 +233,9 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 4:
+ case 0:
{
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 6;
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
+ revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -262,9 +262,10 @@
}
}
break;
- case 0:
+ case 4:
{
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 8:
@@ -273,12 +274,6 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 5:
{
if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
@@ -289,12 +284,17 @@
}
}
break;
- case 4:
+ case 2:
{
- $_ngcc_current_state = 2;
+ $_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -306,9 +306,16 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 0:
+ case 4:
{
- revertToParentFromText(this, super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendText(super._cookie, $value);
+ }
}
break;
case 8:
@@ -323,10 +330,10 @@
}
}
break;
- case 6:
+ case 10:
{
- schemaLocation = $value;
- $_ngcc_current_state = 5;
+ ns = $value;
+ $_ngcc_current_state = 9;
}
break;
case 2:
@@ -335,22 +342,15 @@
$runtime.sendText(super._cookie, $value);
}
break;
- case 4:
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
+ revertToParentFromText(this, super._cookie, $value);
}
break;
- case 10:
+ case 6:
{
- ns = $value;
- $_ngcc_current_state = 9;
+ schemaLocation = $value;
+ $_ngcc_current_state = 5;
}
break;
}
@@ -358,7 +358,7 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 498:
+ case 340:
{
$_ngcc_current_state = 1;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java Fri Sep 06 14:20:58 2013 -0700
@@ -74,21 +74,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 2:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 610, null,AnnotationContext.SCHEMA);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 372, null,AnnotationContext.SCHEMA);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -97,6 +86,11 @@
}
}
break;
+ case 0:
+ {
+ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
case 7:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
@@ -108,9 +102,15 @@
}
}
break;
- case 0:
+ case 6:
{
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
}
break;
default:
@@ -127,17 +127,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
@@ -161,6 +150,17 @@
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 6:
+ {
+ if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -175,16 +175,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 5;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -196,6 +186,16 @@
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 6:
+ {
+ if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
+ $_ngcc_current_state = 5;
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -210,16 +210,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
@@ -231,6 +221,16 @@
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 4:
+ {
+ if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
+ $_ngcc_current_state = 2;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -242,6 +242,17 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromText(this, super._cookie, $value);
+ }
+ break;
case 5:
{
schemaLocation = $value;
@@ -256,23 +267,12 @@
}
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 610:
+ case 372:
{
$_ngcc_current_state = 1;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/modelGroupBody.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/modelGroupBody.java Fri Sep 06 14:20:58 2013 -0700
@@ -97,10 +97,27 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 4:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 174, null,AnnotationContext.MODELGROUP);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 2:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))) {
- NGCCHandler h = new particle(this, super._source, $runtime, 515);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
+ NGCCHandler h = new particle(this, super._source, $runtime, 171);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -111,20 +128,20 @@
break;
case 6:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 520, null);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 520, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
}
break;
case 1:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))) {
- NGCCHandler h = new particle(this, super._source, $runtime, 514);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
+ NGCCHandler h = new particle(this, super._source, $runtime, 170);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -134,23 +151,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 518, null,AnnotationContext.MODELGROUP);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
default:
{
unexpectedEnterElement($__qname);
@@ -165,6 +165,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 4:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 2:
{
$_ngcc_current_state = 1;
@@ -173,7 +184,7 @@
break;
case 6:
{
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 520, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
break;
@@ -184,17 +195,6 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveElement($__qname);
@@ -209,6 +209,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 4:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 2:
{
$_ngcc_current_state = 1;
@@ -217,7 +228,7 @@
break;
case 6:
{
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 520, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
break;
@@ -228,17 +239,6 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -253,6 +253,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 4:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 2:
{
$_ngcc_current_state = 1;
@@ -261,7 +272,7 @@
break;
case 6:
{
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 520, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
}
break;
@@ -272,17 +283,6 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -294,25 +294,6 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 6:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 520, null);
- spawnChildFromText(h, $value);
- }
- break;
- case 1:
- {
- action0();
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
case 0:
{
revertToParentFromText(result, super._cookie, $value);
@@ -324,42 +305,61 @@
$runtime.sendText(super._cookie, $value);
}
break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 6:
+ {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 1:
+ {
+ action0();
+ $_ngcc_current_state = 0;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 520:
+ case 174:
+ {
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 2;
+ }
+ break;
+ case 176:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 4;
}
break;
- case 515:
+ case 171:
{
childParticle = ((ParticleImpl)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 514:
+ case 170:
{
childParticle = ((ParticleImpl)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 518:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
}
}
public boolean accepted() {
- return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 4) || (($_ngcc_current_state == 1) || ($_ngcc_current_state == 2)))));
+ return((($_ngcc_current_state == 1) || (($_ngcc_current_state == 2) || (($_ngcc_current_state == 4) || ($_ngcc_current_state == 0)))));
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java Fri Sep 06 14:20:58 2013 -0700
@@ -78,26 +78,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 15:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
case 2:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 539, null,AnnotationContext.NOTATION);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 209, null,AnnotationContext.NOTATION);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -106,41 +90,6 @@
}
}
break;
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 16:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
@@ -153,6 +102,57 @@
}
}
break;
+ case 14:
+ {
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 15:
+ {
+ if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 4:
+ {
+ if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 8:
+ {
+ if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 4;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -167,16 +167,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
+ case 2:
{
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
+ case 14:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -186,7 +187,7 @@
case 15:
{
if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -194,12 +195,6 @@
}
}
break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 4:
{
if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
@@ -212,11 +207,11 @@
}
}
break;
- case 14:
+ case 1:
{
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
}
else {
unexpectedLeaveElement($__qname);
@@ -235,6 +230,11 @@
}
}
break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -249,26 +249,31 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
+ case 2:
{
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 15:
+ case 14:
{
if(($__uri.equals("") && $__local.equals("name"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 13;
}
else {
unexpectedEnterAttribute($__qname);
}
}
break;
- case 2:
+ case 15:
{
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
}
break;
case 4:
@@ -282,16 +287,6 @@
}
}
break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 13;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
case 8:
{
if(($__uri.equals("") && $__local.equals("public"))) {
@@ -303,6 +298,11 @@
}
}
break;
+ case 0:
+ {
+ revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -317,39 +317,12 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 2:
{
$_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("system"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 9:
{
if(($__uri.equals("") && $__local.equals("public"))) {
@@ -370,6 +343,33 @@
}
}
break;
+ case 5:
+ {
+ if(($__uri.equals("") && $__local.equals("system"))) {
+ $_ngcc_current_state = 2;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 4:
+ {
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 8:
+ {
+ $_ngcc_current_state = 4;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -381,9 +381,10 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 0:
+ case 2:
{
- revertToParentFromText(makeResult(), super._cookie, $value);
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
}
break;
case 10:
@@ -392,24 +393,20 @@
$_ngcc_current_state = 9;
}
break;
- case 15:
+ case 14:
{
if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
- spawnChildFromText(h, $value);
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
}
}
break;
- case 2:
+ case 15:
{
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 13:
- {
- name = $value;
- $_ngcc_current_state = 12;
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
+ spawnChildFromText(h, $value);
+ }
}
break;
case 4:
@@ -424,20 +421,6 @@
}
}
break;
- case 6:
- {
- sys = $value;
- $_ngcc_current_state = 5;
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
case 8:
{
if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
@@ -450,23 +433,40 @@
}
}
break;
+ case 13:
+ {
+ name = $value;
+ $_ngcc_current_state = 12;
+ }
+ break;
+ case 6:
+ {
+ sys = $value;
+ $_ngcc_current_state = 5;
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromText(makeResult(), super._cookie, $value);
+ }
+ break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 554:
+ case 209:
+ {
+ ann = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 1;
+ }
+ break;
+ case 224:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 14;
}
break;
- case 539:
- {
- ann = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/occurs.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/occurs.java Fri Sep 06 14:20:58 2013 -0700
@@ -83,18 +83,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 1:
{
if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
@@ -112,6 +100,18 @@
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
}
break;
+ case 5:
+ {
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
default:
{
unexpectedEnterElement($__qname);
@@ -126,18 +126,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 1:
{
if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
@@ -155,6 +143,18 @@
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 5:
+ {
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -169,17 +169,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("maxOccurs"))) {
- $_ngcc_current_state = 7;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 1:
{
if(($__uri.equals("") && $__local.equals("minOccurs"))) {
@@ -196,6 +185,17 @@
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 5:
+ {
+ if(($__uri.equals("") && $__local.equals("maxOccurs"))) {
+ $_ngcc_current_state = 7;
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -210,18 +210,33 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ $_ngcc_current_state = 0;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("") && $__local.equals("minOccurs"))) {
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
case 5:
{
$_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 6:
{
if(($__uri.equals("") && $__local.equals("maxOccurs"))) {
@@ -232,21 +247,6 @@
}
}
break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("minOccurs"))) {
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -258,18 +258,6 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
case 1:
{
if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
@@ -287,6 +275,25 @@
revertToParentFromText(this, super._cookie, $value);
}
break;
+ case 3:
+ {
+ v = $value;
+ $_ngcc_current_state = 2;
+ action0();
+ }
+ break;
+ case 5:
+ {
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
case 7:
{
if($value.equals("unbounded")) {
@@ -300,13 +307,6 @@
}
}
break;
- case 3:
- {
- v = $value;
- $_ngcc_current_state = 2;
- action0();
- }
- break;
}
}
@@ -316,7 +316,7 @@
}
public boolean accepted() {
- return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 1) || ($_ngcc_current_state == 5))));
+ return((($_ngcc_current_state == 5) || (($_ngcc_current_state == 0) || ($_ngcc_current_state == 1))));
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/particle.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/particle.java Fri Sep 06 14:20:58 2013 -0700
@@ -131,10 +131,10 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 4:
+ case 29:
{
- if(((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))))) {
+ NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 136, loc,compositorName);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -142,21 +142,10 @@
}
}
break;
- case 3:
+ case 4:
{
- if((($ai = $runtime.getAttributeIndex("","processContents"))>=0 || (($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 617, wloc);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 30:
- {
- if(((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 648);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || (($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -166,8 +155,8 @@
break;
case 26:
{
- if(((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || (($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 643);
+ if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || (($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 132);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -175,25 +164,6 @@
}
}
break;
- case 11:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 626, null,AnnotationContext.PARTICLE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
case 1:
{
if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
@@ -227,14 +197,44 @@
}
}
break;
- case 29:
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 20:
+ {
+ action5();
+ $_ngcc_current_state = 19;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 8:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 647, loc,compositorName);
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if((($ai = $runtime.getAttributeIndex("","default"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ break;
+ case 11:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 115, null,AnnotationContext.PARTICLE);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- unexpectedEnterElement($__qname);
+ $_ngcc_current_state = 10;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
}
}
break;
@@ -249,10 +249,39 @@
}
}
break;
+ case 10:
+ {
+ action3();
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 3:
+ {
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0))) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 16:
+ {
+ if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))))))))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
case 21:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 638, null,AnnotationContext.PARTICLE);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 127, null,AnnotationContext.PARTICLE);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -261,10 +290,10 @@
}
}
break;
- case 16:
+ case 30:
{
- if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","abstract"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($ai = $runtime.getAttributeIndex("","ref"))>=0 && (((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 137);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -272,35 +301,6 @@
}
}
break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","default"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
default:
{
unexpectedEnterElement($__qname);
@@ -315,10 +315,32 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 29:
+ {
+ if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
+ NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 136, loc,compositorName);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 4:
{
- if(((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
+ if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 26:
+ {
+ if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || (($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 132);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -326,11 +348,57 @@
}
}
break;
- case 3:
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 8:
{
- if(((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 617, wloc);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ if(((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))))))) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ }
+ break;
+ case 20:
+ {
+ action5();
+ $_ngcc_current_state = 19;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 11:
+ {
+ $_ngcc_current_state = 10;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 25:
+ {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -348,34 +416,6 @@
}
}
break;
- case 30:
- {
- if(((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || (($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 648);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 26:
- {
- if(((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || (($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 643);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 10:
{
action3();
@@ -383,17 +423,6 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
case 7:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
@@ -405,10 +434,10 @@
}
}
break;
- case 29:
+ case 3:
{
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 647, loc,compositorName);
+ if(((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -416,11 +445,11 @@
}
}
break;
- case 25:
+ case 16:
{
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))))))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
unexpectedLeaveElement($__qname);
@@ -433,10 +462,10 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 16:
+ case 30:
{
- if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 137);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
@@ -444,23 +473,6 @@
}
}
break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- }
- break;
case 28:
{
if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
@@ -472,18 +484,6 @@
}
}
break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveElement($__qname);
@@ -498,43 +498,9 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 4:
- {
- if((($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("processContents")) || (($__uri.equals("") && $__local.equals("maxOccurs")) || ($__uri.equals("") && $__local.equals("namespace")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 21:
- {
- $_ngcc_current_state = 20;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
+ case 0:
{
- if((($__uri.equals("") && $__local.equals("processContents")) || ($__uri.equals("") && $__local.equals("namespace")))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 617, wloc);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 16:
- {
- if((($__uri.equals("") && $__local.equals("name")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("abstract")) || ($__uri.equals("") && $__local.equals("ref")))))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
}
break;
case 8:
@@ -543,8 +509,8 @@
$_ngcc_current_state = 14;
}
else {
- if((($__uri.equals("") && $__local.equals("name")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("default")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
+ if((($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
@@ -553,15 +519,11 @@
}
}
break;
- case 30:
+ case 20:
{
- if((($__uri.equals("") && $__local.equals("minOccurs")) || ($__uri.equals("") && $__local.equals("maxOccurs")))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 648);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
+ action5();
+ $_ngcc_current_state = 19;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
case 11:
@@ -570,10 +532,20 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 26:
+ case 25:
{
- if((($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("maxOccurs")) || ($__uri.equals("") && $__local.equals("ref"))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 643);
+ if(($__uri.equals("") && $__local.equals("ref"))) {
+ $_ngcc_current_state = 24;
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 4:
+ {
+ if((($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
@@ -588,22 +560,50 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 20:
+ case 26:
+ {
+ if((($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("ref")) || ($__uri.equals("") && $__local.equals("minOccurs"))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 132);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 3:
{
- action5();
- $_ngcc_current_state = 19;
+ if((($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 16:
+ {
+ if((($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("ref")) || (($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract")))))))))))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
+ case 21:
+ {
+ $_ngcc_current_state = 20;
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
+ case 30:
{
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 25:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 24;
+ if((($__uri.equals("") && $__local.equals("maxOccurs")) || ($__uri.equals("") && $__local.equals("minOccurs")))) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 137);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
unexpectedEnterAttribute($__qname);
@@ -624,6 +624,41 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 23:
+ {
+ if(($__uri.equals("") && $__local.equals("ref"))) {
+ $_ngcc_current_state = 21;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 20:
+ {
+ action5();
+ $_ngcc_current_state = 19;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 11:
+ {
+ $_ngcc_current_state = 10;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 10:
+ {
+ action3();
+ $_ngcc_current_state = 7;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 21:
{
$_ngcc_current_state = 20;
@@ -640,41 +675,6 @@
}
}
break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 23:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 21;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -688,23 +688,23 @@
switch($_ngcc_current_state) {
case 4:
{
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
+ if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
+ if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 618);
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 107);
spawnChildFromText(h, $value);
}
}
@@ -712,50 +712,96 @@
}
}
break;
- case 3:
+ case 26:
{
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 617, wloc);
+ if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 132);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 617, wloc);
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 132);
spawnChildFromText(h, $value);
}
+ else {
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 132);
+ spawnChildFromText(h, $value);
+ }
+ }
}
}
break;
- case 30:
+ case 14:
+ {
+ NGCCHandler h = new qname(this, super._source, $runtime, 118);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 24:
+ {
+ NGCCHandler h = new qname(this, super._source, $runtime, 130);
+ spawnChildFromText(h, $value);
+ }
+ break;
+ case 0:
{
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 648);
- spawnChildFromText(h, $value);
+ revertToParentFromText(result, super._cookie, $value);
+ }
+ break;
+ case 20:
+ {
+ action5();
+ $_ngcc_current_state = 19;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 8:
+ {
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 648);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 26:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 643);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 643);
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 643);
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
spawnChildFromText(h, $value);
}
+ else {
+ if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
+ spawnChildFromText(h, $value);
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
@@ -766,19 +812,6 @@
$runtime.sendText(super._cookie, $value);
}
break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 14:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 629);
- spawnChildFromText(h, $value);
- }
- break;
case 25:
{
if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
@@ -787,61 +820,76 @@
}
}
break;
- case 21:
+ case 10:
+ {
+ action3();
+ $_ngcc_current_state = 7;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 3:
{
- $_ngcc_current_state = 20;
- $runtime.sendText(super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
+ spawnChildFromText(h, $value);
+ }
+ }
}
break;
case 16:
{
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 632);
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 121);
spawnChildFromText(h, $value);
}
}
@@ -855,72 +903,24 @@
}
}
break;
- case 8:
+ case 21:
{
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 623, loc,false);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 24:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 641);
- spawnChildFromText(h, $value);
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
+ $_ngcc_current_state = 20;
$runtime.sendText(super._cookie, $value);
}
break;
- case 0:
+ case 30:
{
- revertToParentFromText(result, super._cookie, $value);
+ if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 137);
+ spawnChildFromText(h, $value);
+ }
+ else {
+ if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
+ NGCCHandler h = new occurs(this, super._source, $runtime, 137);
+ spawnChildFromText(h, $value);
+ }
+ }
}
break;
}
@@ -928,73 +928,73 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 617:
- {
- wcBody = ((WildcardImpl)$__result__);
- action0();
- $_ngcc_current_state = 2;
- }
- break;
- case 647:
+ case 136:
{
term = ((ModelGroupImpl)$__result__);
action7();
$_ngcc_current_state = 28;
}
break;
- case 632:
+ case 107:
+ {
+ occurs = ((occurs)$__result__);
+ $_ngcc_current_state = 3;
+ }
+ break;
+ case 106:
+ {
+ wcBody = ((WildcardImpl)$__result__);
+ action0();
+ $_ngcc_current_state = 2;
+ }
+ break;
+ case 121:
{
occurs = ((occurs)$__result__);
$_ngcc_current_state = 8;
}
break;
- case 618:
+ case 127:
{
- occurs = ((occurs)$__result__);
- $_ngcc_current_state = 3;
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 20;
}
break;
- case 648:
+ case 137:
{
occurs = ((occurs)$__result__);
$_ngcc_current_state = 29;
}
break;
- case 643:
+ case 132:
{
occurs = ((occurs)$__result__);
$_ngcc_current_state = 25;
}
break;
- case 626:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 10;
- }
- break;
- case 629:
+ case 118:
{
elementTypeName = ((UName)$__result__);
$_ngcc_current_state = 13;
}
break;
- case 638:
+ case 130:
{
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 20;
+ groupName = ((UName)$__result__);
+ $_ngcc_current_state = 23;
}
break;
- case 623:
+ case 112:
{
anonymousElementDecl = ((ElementDecl)$__result__);
action2();
$_ngcc_current_state = 7;
}
break;
- case 641:
+ case 115:
{
- groupName = ((UName)$__result__);
- $_ngcc_current_state = 23;
+ annotation = ((AnnotationImpl)$__result__);
+ $_ngcc_current_state = 10;
}
break;
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java Fri Sep 06 14:20:58 2013 -0700
@@ -143,17 +143,17 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value);
+ }
+ break;
case 1:
{
qvalue = $value;
$_ngcc_current_state = 0;
}
break;
- case 0:
- {
- revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value);
- }
- break;
}
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java Fri Sep 06 14:20:58 2013 -0700
@@ -118,30 +118,81 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
+ case 0:
+ {
+ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 581, null,AnnotationContext.SCHEMA);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 684, null,AnnotationContext.SCHEMA);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 582);
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 685);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 583);
+ NGCCHandler h = new complexType(this, super._source, $runtime, 686);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 584);
+ NGCCHandler h = new group(this, super._source, $runtime, 687);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 585);
+ NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 688);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ }
+ }
+ }
+ }
+ break;
+ case 14:
+ {
+ if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 689, null,AnnotationContext.SCHEMA);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
+ NGCCHandler h = new simpleType(this, super._source, $runtime, 690);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
+ NGCCHandler h = new complexType(this, super._source, $runtime, 691);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
+ NGCCHandler h = new group(this, super._source, $runtime, 692);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
+ NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 693);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -165,57 +216,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 576, null,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 577);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 578);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 579);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 580);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- }
- }
- break;
default:
{
unexpectedEnterElement($__qname);
@@ -230,17 +230,22 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 0:
{
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 1:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
+ $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 14:
{
if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
@@ -252,15 +257,10 @@
}
}
break;
- case 1:
+ case 2:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -277,12 +277,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 0:
{
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
@@ -298,6 +292,12 @@
}
}
break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -312,10 +312,9 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
+ case 0:
{
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
}
break;
case 12:
@@ -328,9 +327,10 @@
}
}
break;
- case 0:
+ case 2:
{
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
+ $_ngcc_current_state = 1;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
default:
@@ -344,19 +344,6 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 13:
- {
- schemaLocation = $value;
- $_ngcc_current_state = 12;
- action4();
- }
- break;
case 0:
{
revertToParentFromText(this, super._cookie, $value);
@@ -370,71 +357,84 @@
}
}
break;
+ case 2:
+ {
+ $_ngcc_current_state = 1;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 13:
+ {
+ schemaLocation = $value;
+ $_ngcc_current_state = 12;
+ action4();
+ }
+ break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 581:
+ case 689:
{
$_ngcc_current_state = 1;
}
break;
- case 582:
+ case 690:
{
newSt = ((SimpleTypeImpl)$__result__);
action3();
$_ngcc_current_state = 1;
}
break;
- case 583:
+ case 691:
{
newCt = ((ComplexTypeImpl)$__result__);
action2();
$_ngcc_current_state = 1;
}
break;
- case 584:
+ case 692:
{
newGrp = ((ModelGroupDeclImpl)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 585:
+ case 693:
{
newAg = ((AttGroupDeclImpl)$__result__);
action0();
$_ngcc_current_state = 1;
}
break;
- case 576:
+ case 684:
{
$_ngcc_current_state = 1;
}
break;
- case 577:
+ case 685:
{
newSt = ((SimpleTypeImpl)$__result__);
action3();
$_ngcc_current_state = 1;
}
break;
- case 578:
+ case 686:
{
newCt = ((ComplexTypeImpl)$__result__);
action2();
$_ngcc_current_state = 1;
}
break;
- case 579:
+ case 687:
{
newGrp = ((ModelGroupDeclImpl)$__result__);
action1();
$_ngcc_current_state = 1;
}
break;
- case 580:
+ case 688:
{
newAg = ((AttGroupDeclImpl)$__result__);
action0();
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java Fri Sep 06 14:20:58 2013 -0700
@@ -81,36 +81,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new SimpleType_Restriction(this, super._source, $runtime, 182, annotation,locator,fa,name,finalSet);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
- NGCCHandler h = new SimpleType_List(this, super._source, $runtime, 183, annotation,locator,fa,name,finalSet);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- NGCCHandler h = new SimpleType_Union(this, super._source, $runtime, 177, annotation,locator,fa,name,finalSet);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- break;
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
case 15:
{
if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
@@ -123,11 +93,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
case 11:
{
if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
@@ -152,10 +117,22 @@
}
}
break;
+ case 8:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
+ NGCCHandler h = new annotation(this, super._source, $runtime, 89, null,AnnotationContext.SIMPLETYPE_DECL);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 7;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 10:
{
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 188, fa);
+ if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 91, fa);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -163,15 +140,38 @@
}
}
break;
- case 8:
+ case 7:
{
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 186, null,AnnotationContext.SIMPLETYPE_DECL);
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 2:
+ {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
+ NGCCHandler h = new SimpleType_Restriction(this, super._source, $runtime, 85, annotation,locator,fa,name,finalSet);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
+ NGCCHandler h = new SimpleType_List(this, super._source, $runtime, 86, annotation,locator,fa,name,finalSet);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
+ NGCCHandler h = new SimpleType_Union(this, super._source, $runtime, 80, annotation,locator,fa,name,finalSet);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
}
}
break;
@@ -189,13 +189,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 15:
{
if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
@@ -208,11 +201,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 11:
{
if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
@@ -231,6 +219,13 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 7:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
@@ -242,6 +237,11 @@
}
}
break;
+ case 0:
+ {
+ revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveElement($__qname);
@@ -256,13 +256,6 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 15:
{
if(($__uri.equals("") && $__local.equals("final"))) {
@@ -274,11 +267,6 @@
}
}
break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 11:
{
if(($__uri.equals("") && $__local.equals("name"))) {
@@ -296,6 +284,18 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 7:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -310,44 +310,12 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 15:
{
$_ngcc_current_state = 11;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 16:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 11:
{
$_ngcc_current_state = 10;
@@ -360,6 +328,38 @@
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 7:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 12:
+ {
+ if(($__uri.equals("") && $__local.equals("name"))) {
+ $_ngcc_current_state = 10;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 16:
+ {
+ if(($__uri.equals("") && $__local.equals("final"))) {
+ $_ngcc_current_state = 11;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -371,11 +371,10 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
- case 7:
+ case 13:
{
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
+ name = $value;
+ $_ngcc_current_state = 12;
}
break;
case 15:
@@ -390,17 +389,6 @@
}
}
break;
- case 13:
- {
- name = $value;
- $_ngcc_current_state = 12;
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
case 11:
{
if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
@@ -413,16 +401,28 @@
}
}
break;
+ case 8:
+ {
+ $_ngcc_current_state = 7;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
+ case 7:
+ {
+ action0();
+ $_ngcc_current_state = 2;
+ $runtime.sendText(super._cookie, $value);
+ }
+ break;
case 17:
{
finalValue = $value;
$_ngcc_current_state = 16;
}
break;
- case 8:
+ case 0:
{
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
+ revertToParentFromText(result, super._cookie, $value);
}
break;
}
@@ -430,31 +430,31 @@
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 186:
+ case 89:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 7;
}
break;
- case 188:
+ case 91:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 8;
}
break;
- case 182:
+ case 85:
{
result = ((RestrictionSimpleTypeImpl)$__result__);
$_ngcc_current_state = 1;
}
break;
- case 183:
+ case 86:
{
result = ((ListSimpleTypeImpl)$__result__);
$_ngcc_current_state = 1;
}
break;
- case 177:
+ case 80:
{
result = ((UnionSimpleTypeImpl)$__result__);
$_ngcc_current_state = 1;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/wildcardBody.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/wildcardBody.java Fri Sep 06 14:20:58 2013 -0700
@@ -77,6 +77,18 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ $_ngcc_current_state = 0;
+ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ }
+ break;
case 5:
{
if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
@@ -91,12 +103,12 @@
break;
case 9:
{
- if((($ai = $runtime.getAttributeIndex("","processContents"))>=0 || ($ai = $runtime.getAttributeIndex("","namespace"))>=0)) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ if((($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0)) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
}
@@ -104,7 +116,7 @@
case 10:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 414, null,AnnotationContext.WILDCARD);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 411, null,AnnotationContext.WILDCARD);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -113,18 +125,6 @@
}
}
break;
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
case 0:
{
revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
@@ -144,6 +144,18 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ else {
+ $_ngcc_current_state = 0;
+ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
case 5:
{
if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
@@ -158,12 +170,12 @@
break;
case 9:
{
- if((($ai = $runtime.getAttributeIndex("","processContents"))>=0 || ($ai = $runtime.getAttributeIndex("","namespace"))>=0)) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ if((($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0)) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
}
}
@@ -174,18 +186,6 @@
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 0:
{
revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
@@ -205,6 +205,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ if(($__uri.equals("") && $__local.equals("namespace"))) {
+ $_ngcc_current_state = 3;
+ }
+ else {
+ $_ngcc_current_state = 0;
+ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ }
+ break;
case 5:
{
if(($__uri.equals("") && $__local.equals("processContents"))) {
@@ -218,12 +229,12 @@
break;
case 9:
{
- if((($__uri.equals("") && $__local.equals("processContents")) || ($__uri.equals("") && $__local.equals("namespace")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ if((($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
}
}
@@ -234,17 +245,6 @@
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 3;
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
case 0:
{
revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
@@ -264,37 +264,15 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
- case 5:
+ case 1:
{
- $_ngcc_current_state = 1;
+ $_ngcc_current_state = 0;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 9:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 2:
+ case 5:
{
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
+ $_ngcc_current_state = 1;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
@@ -308,11 +286,33 @@
}
}
break;
+ case 9:
+ {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
+ spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
+ }
+ break;
+ case 10:
+ {
+ $_ngcc_current_state = 9;
+ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 0:
{
revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
}
break;
+ case 2:
+ {
+ if(($__uri.equals("") && $__local.equals("namespace"))) {
+ $_ngcc_current_state = 0;
+ }
+ else {
+ unexpectedLeaveAttribute($__qname);
+ }
+ }
+ break;
default:
{
unexpectedLeaveAttribute($__qname);
@@ -324,6 +324,24 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 1:
+ {
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ $runtime.consumeAttribute($ai);
+ $runtime.sendText(super._cookie, $value);
+ }
+ else {
+ $_ngcc_current_state = 0;
+ $runtime.sendText(super._cookie, $value);
+ }
+ }
+ break;
+ case 3:
+ {
+ ns = $value;
+ $_ngcc_current_state = 2;
+ }
+ break;
case 5:
{
if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
@@ -336,71 +354,53 @@
}
}
break;
- case 7:
- {
- modeValue = $value;
- $_ngcc_current_state = 6;
- }
- break;
case 9:
{
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromText(h, $value);
}
else {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromText(h, $value);
}
else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 412, null);
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
spawnChildFromText(h, $value);
}
}
}
break;
- case 3:
- {
- ns = $value;
- $_ngcc_current_state = 2;
- }
- break;
case 10:
{
$_ngcc_current_state = 9;
$runtime.sendText(super._cookie, $value);
}
break;
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
case 0:
{
revertToParentFromText(makeResult(), super._cookie, $value);
}
break;
+ case 7:
+ {
+ modeValue = $value;
+ $_ngcc_current_state = 6;
+ }
+ break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 412:
+ case 409:
{
fa = ((ForeignAttributesImpl)$__result__);
$_ngcc_current_state = 5;
}
break;
- case 414:
+ case 411:
{
annotation = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 9;
@@ -410,7 +410,7 @@
}
public boolean accepted() {
- return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 1) || ($_ngcc_current_state == 5))));
+ return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 5) || ($_ngcc_current_state == 1))));
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/xpath.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/xpath.java Fri Sep 06 14:20:58 2013 -0700
@@ -72,10 +72,26 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
+ }
+ break;
+ case 6:
+ {
+ if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
+ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
+ }
+ else {
+ unexpectedEnterElement($__qname);
+ }
+ }
+ break;
case 1:
{
if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 679, null,AnnotationContext.XPATH);
+ NGCCHandler h = new annotation(this, super._source, $runtime, 72, null,AnnotationContext.XPATH);
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
}
else {
@@ -95,22 +111,6 @@
}
}
break;
- case 6:
- {
- if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 684, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
default:
{
unexpectedEnterElement($__qname);
@@ -125,6 +125,22 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 6:
+ {
+ if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
+ spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedLeaveElement($__qname);
+ }
+ }
+ break;
case 1:
{
$_ngcc_current_state = 0;
@@ -142,22 +158,6 @@
}
}
break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 684, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedLeaveElement($__qname);
@@ -172,6 +172,22 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
+ case 6:
+ {
+ if(($__uri.equals("") && $__local.equals("xpath"))) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
+ spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
+ }
+ else {
+ unexpectedEnterAttribute($__qname);
+ }
+ }
+ break;
case 1:
{
$_ngcc_current_state = 0;
@@ -188,22 +204,6 @@
}
}
break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 684, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
default:
{
unexpectedEnterAttribute($__qname);
@@ -218,17 +218,17 @@
$localName = $__local;
$qname = $__qname;
switch($_ngcc_current_state) {
+ case 0:
+ {
+ revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
+ }
+ break;
case 1:
{
$_ngcc_current_state = 0;
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
}
break;
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
case 3:
{
if(($__uri.equals("") && $__local.equals("xpath"))) {
@@ -250,6 +250,25 @@
public void text(String $value) throws SAXException {
int $ai;
switch($_ngcc_current_state) {
+ case 4:
+ {
+ xpath = $value;
+ $_ngcc_current_state = 3;
+ }
+ break;
+ case 0:
+ {
+ revertToParentFromText(makeResult(), super._cookie, $value);
+ }
+ break;
+ case 6:
+ {
+ if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
+ NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
+ spawnChildFromText(h, $value);
+ }
+ }
+ break;
case 1:
{
$_ngcc_current_state = 0;
@@ -264,47 +283,28 @@
}
}
break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 684, null);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 4:
- {
- xpath = $value;
- $_ngcc_current_state = 3;
- }
- break;
}
}
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
switch($__cookie__) {
- case 679:
+ case 77:
+ {
+ fa = ((ForeignAttributesImpl)$__result__);
+ $_ngcc_current_state = 5;
+ }
+ break;
+ case 72:
{
ann = ((AnnotationImpl)$__result__);
$_ngcc_current_state = 0;
}
break;
- case 684:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
}
}
public boolean accepted() {
- return((($_ngcc_current_state == 0) || ($_ngcc_current_state == 1)));
+ return((($_ngcc_current_state == 1) || ($_ngcc_current_state == 0)));
}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/JAXPParser.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/JAXPParser.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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,18 +27,14 @@
import java.io.IOException;
import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
+import org.xml.sax.*;
import org.xml.sax.helpers.XMLFilterImpl;
import com.sun.xml.internal.xsom.impl.parser.Messages;
@@ -51,6 +47,11 @@
*/
public class JAXPParser implements XMLParser {
+ // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
+ private static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
+
+ private static final Logger LOGGER = Logger.getLogger(JAXPParser.class.getName());
+
private final SAXParserFactory factory;
public JAXPParser( SAXParserFactory factory ) {
@@ -58,6 +59,11 @@
this.factory = factory;
}
+ /**
+ * @deprecated Unsafe, use JAXPParser(factory) instead with
+ * security features initialized by setting
+ * XMLConstants.FEATURE_SECURE_PROCESSING feature.
+ */
public JAXPParser() {
this( SAXParserFactory.newInstance());
}
@@ -68,8 +74,8 @@
throws SAXException, IOException {
try {
- XMLReader reader = factory.newSAXParser().getXMLReader();
- reader = new XMLReaderEx(reader);
+ SAXParser saxParser = allowFileAccess(factory.newSAXParser(), false);
+ XMLReader reader = new XMLReaderEx(saxParser.getXMLReader());
reader.setContentHandler(handler);
if(errorHandler!=null)
@@ -85,6 +91,24 @@
}
}
+ private static SAXParser allowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) throws SAXException {
+
+ // if feature secure processing enabled, nothing to do, file is allowed,
+ // or user is able to control access by standard JAXP mechanisms
+ if (disableSecureProcessing) {
+ return saxParser;
+ }
+
+ try {
+ saxParser.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
+ LOGGER.log(Level.FINE, Messages.format(Messages.JAXP_SUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA));
+ } catch (SAXException ignored) {
+ // nothing to do; support depends on version JDK or SAX implementation
+ LOGGER.log(Level.CONFIG, Messages.format(Messages.JAXP_UNSUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA), ignored);
+ }
+ return saxParser;
+ }
+
/**
* XMLReader with improved error message for entity resolution failure.
*
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XSOMParser.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XSOMParser.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, 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
@@ -64,6 +64,9 @@
/**
* Creates a new XSOMParser by using a SAX parser from JAXP.
+ * @deprecated Unsafe, use XSOMParser(factory) instead with
+ * security features initialized by setting
+ * XMLConstants.FEATURE_SECURE_PROCESSING feature.
*/
public XSOMParser() {
this(new JAXPParser());
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, 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
@@ -29,6 +29,7 @@
import com.sun.xml.internal.xsom.parser.AnnotationContext;
import com.sun.xml.internal.xsom.parser.AnnotationParser;
import com.sun.xml.internal.xsom.parser.AnnotationParserFactory;
+import javax.xml.XMLConstants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -56,10 +57,15 @@
* @author Kohsuke Kawaguchi
*/
public class DomAnnotationParserFactory implements AnnotationParserFactory {
+
public AnnotationParser create() {
return new AnnotationParserImpl();
}
+ public AnnotationParser create(boolean disableSecureProcessing) {
+ return new AnnotationParserImpl();
+ }
+
private static final SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
private static class AnnotationParserImpl extends AnnotationParser {
@@ -71,8 +77,13 @@
private DOMResult result;
AnnotationParserImpl() {
+ this(false);
+ }
+
+ AnnotationParserImpl(boolean disableSecureProcessing) {
try {
transformer = stf.newTransformerHandler();
+ stf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, disableSecureProcessing);
} catch (TransformerConfigurationException e) {
throw new Error(e); // impossible
}
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Binder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Binder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ContextFinder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ContextFinder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -310,17 +310,16 @@
}
}
- if (getContextClassLoader() == classLoader) {
- Class factory = lookupUsingOSGiServiceLoader("javax.xml.bind.JAXBContext");
- if (factory != null) {
- logger.fine("OSGi environment detected");
- return newInstance(contextPath, factory, classLoader, properties);
- }
+ // OSGi search
+ Class jaxbContext = lookupJaxbContextUsingOsgiServiceLoader();
+ if (jaxbContext != null) {
+ logger.fine("OSGi environment detected");
+ return newInstance(contextPath, jaxbContext, classLoader, properties);
}
logger.fine("Searching META-INF/services");
// search META-INF services next
- BufferedReader r;
+ BufferedReader r = null;
try {
final StringBuilder resource = new StringBuilder().append("META-INF/services/").append(jaxbContextFQCN);
final InputStream resourceStream =
@@ -328,7 +327,10 @@
if (resourceStream != null) {
r = new BufferedReader(new InputStreamReader(resourceStream, "UTF-8"));
- factoryClassName = r.readLine().trim();
+ factoryClassName = r.readLine();
+ if (factoryClassName != null) {
+ factoryClassName = factoryClassName.trim();
+ }
r.close();
return newInstance(contextPath, factoryClassName, classLoader, properties);
} else {
@@ -339,6 +341,14 @@
throw new JAXBException(e);
} catch (IOException e) {
throw new JAXBException(e);
+ } finally {
+ try {
+ if (r != null) {
+ r.close();
+ }
+ } catch (IOException ex) {
+ Logger.getLogger(ContextFinder.class.getName()).log(Level.SEVERE, null, ex);
+ }
}
// else no provider found
@@ -402,15 +412,16 @@
}
}
- Class factory = lookupUsingOSGiServiceLoader("javax.xml.bind.JAXBContext");
- if (factory != null) {
+ // OSGi search
+ Class jaxbContext = lookupJaxbContextUsingOsgiServiceLoader();
+ if (jaxbContext != null) {
logger.fine("OSGi environment detected");
- return newInstance(classes, properties, factory);
+ return newInstance(classes, properties, jaxbContext);
}
// search META-INF services next
logger.fine("Checking META-INF/services");
- BufferedReader r;
+ BufferedReader r = null;
try {
final String resource = new StringBuilder("META-INF/services/").append(jaxbContextFQCN).toString();
ClassLoader classLoader = getContextClassLoader();
@@ -423,7 +434,10 @@
if (resourceURL != null) {
logger.log(Level.FINE, "Reading {0}", resourceURL);
r = new BufferedReader(new InputStreamReader(resourceURL.openStream(), "UTF-8"));
- factoryClassName = r.readLine().trim();
+ factoryClassName = r.readLine();
+ if (factoryClassName != null) {
+ factoryClassName = factoryClassName.trim();
+ }
return newInstance(classes, properties, factoryClassName);
} else {
logger.log(Level.FINE, "Unable to find: {0}", resource);
@@ -433,6 +447,14 @@
throw new JAXBException(e);
} catch (IOException e) {
throw new JAXBException(e);
+ } finally {
+ if (r != null) {
+ try {
+ r.close();
+ } catch (IOException ex) {
+ logger.log(Level.FINE, "Unable to close stream", ex);
+ }
+ }
}
// else no provider found
@@ -440,16 +462,15 @@
return newInstance(classes, properties, PLATFORM_DEFAULT_FACTORY_CLASS);
}
- private static Class lookupUsingOSGiServiceLoader(String factoryId) {
+ private static Class lookupJaxbContextUsingOsgiServiceLoader() {
try {
- // Use reflection to avoid having any dependendcy on ServiceLoader class
- Class serviceClass = Class.forName(factoryId);
+ // Use reflection to avoid having any dependency on ServiceLoader class
Class target = Class.forName("com.sun.org.glassfish.hk2.osgiresourcelocator.ServiceLoader");
Method m = target.getMethod("lookupProviderClasses", Class.class);
- Iterator iter = ((Iterable) m.invoke(null, serviceClass)).iterator();
+ Iterator iter = ((Iterable) m.invoke(null, JAXBContext.class)).iterator();
return iter.hasNext() ? (Class)iter.next() : null;
} catch(Exception e) {
- logger.log(Level.FINE, "Unable to find from OSGi: {0}", factoryId);
+ logger.log(Level.FINE, "Unable to find from OSGi: javax.xml.bind.JAXBContext");
return null;
}
}
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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 @@
final public class DatatypeConverter {
// delegate to this instance of DatatypeConverter
- private static DatatypeConverterInterface theConverter = null;
+ private static volatile DatatypeConverterInterface theConverter = null;
private final static JAXBPermission SET_DATATYPE_CONVERTER_PERMISSION =
new JAXBPermission("setDatatypeConverter");
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Element.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Element.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/GetPropertyAction.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/GetPropertyAction.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXB.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXB.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/MarshalException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/MarshalException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Validator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Validator.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/WhiteSpaceProcessor.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/WhiteSpaceProcessor.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
@@ -64,7 +64,7 @@
// we now know that the input contains spaces.
// let's sit down and do the collapsing normally.
- StringBuffer result = new StringBuffer(len /*allocate enough size to avoid re-allocation*/ );
+ StringBuilder result = new StringBuilder(len /*allocate enough size to avoid re-allocation*/ );
if(s!=0) {
for( int i=0; i<s; i++ )
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
- Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
- Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2004, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2005, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
- Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
- Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -41,6 +41,7 @@
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.transform.sax.SAXSource;
+import org.xml.sax.XMLFilter;
/**
* JAXP {@link javax.xml.transform.Source} implementation
@@ -210,7 +211,7 @@
// SAX allows ContentHandler to be changed during the parsing,
// but JAXB doesn't. So this repeater will sit between those
// two components.
- private XMLFilterImpl repeater = new XMLFilterImpl();
+ private XMLFilter repeater = new XMLFilterImpl();
public void setContentHandler(ContentHandler handler) {
repeater.setContentHandler(handler);
@@ -240,7 +241,7 @@
// SAX events will be sent to the repeater, and the repeater
// will further forward it to an appropriate component.
try {
- marshaller.marshal( contentObject, repeater );
+ marshaller.marshal( contentObject, (XMLFilterImpl)repeater );
} catch( JAXBException e ) {
// wrap it to a SAXException
SAXParseException se =
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/Messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/Messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/package.html Wed Sep 04 19:58:16 2013 +0530
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/package.html Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
- Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2003, 2013, 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
--- a/jdk/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
8ed8e2b4b90e0ac9aa5b3efef51cd576a9db96a9 jdk8-b102
e0f6039c0290b7381042a6fec3100a69a5a67e37 jdk8-b103
f1d8d15bfcb5ada858a942f8a31f6598f23214d1 jdk8-b104
+1fe211ae3d2b8cc2dfc4f58d9a6eb96418679672 jdk8-b105
+c817276bd870dfe1dcc3a3dbbc092436b6907f75 jdk8-b106
--- a/jdk/make/com/sun/security/auth/FILES_java.gmk Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/make/com/sun/security/auth/FILES_java.gmk Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2013, 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
@@ -43,8 +43,6 @@
com/sun/security/auth/UserPrincipal.java \
com/sun/security/auth/LdapPrincipal.java \
com/sun/security/auth/PolicyFile.java \
- com/sun/security/auth/SubjectCodeSource.java \
- com/sun/security/auth/PolicyParser.java \
com/sun/security/auth/PrincipalComparator.java \
com/sun/security/auth/callback/TextCallbackHandler.java \
com/sun/security/auth/callback/DialogCallbackHandler.java
--- a/jdk/makefiles/Profiles.gmk Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/makefiles/Profiles.gmk Fri Sep 06 14:20:58 2013 -0700
@@ -65,10 +65,6 @@
$(if $(PROFILE_2_JRE_JAR_FILES), $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_2_JRE_JAR_FILES))) \
$(PROFILE_1_JARS)
-ifneq ($(ENABLE_JFR), true)
- PROFILE_3_JRE_JAR_FILES := $(filter-out jfr.jar, $(PROFILE_3_JRE_JAR_FILES))
-endif
-
PROFILE_3_JARS := \
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_3_JRE_JAR_FILES)) \
$(PROFILE_2_JARS)
@@ -77,6 +73,10 @@
FULL_JRE_JAR_FILES := $(filter-out alt-rt.jar, $(FULL_JRE_JAR_FILES))
endif
+ifneq ($(ENABLE_JFR), true)
+ FULL_JRE_JAR_FILES := $(filter-out jfr.jar, $(FULL_JRE_JAR_FILES))
+endif
+
FULL_JRE_JARS := \
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(FULL_JRE_JAR_FILES)) \
$(PROFILE_3_JARS)
--- a/jdk/src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java Fri Sep 06 14:20:58 2013 -0700
@@ -87,6 +87,7 @@
private int incomingInterruptFD;
static {
+ IOUtil.load();
initStructSizes();
String datamodel = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.arch.data.model")
--- a/jdk/src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -246,9 +246,4 @@
}
return this;
}
-
-
- static {
- Util.load();
- }
}
--- a/jdk/src/share/back/SDE.c Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/back/SDE.c Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,12 @@
#include "util.h"
#include "SDE.h"
+#ifdef __APPLE__
+/* use setjmp/longjmp versions that do not save/restore the signal mask */
+#define setjmp _setjmp
+#define longjmp _longjmp
+#endif
+
/**
* This SourceDebugExtension code does not
* allow concurrent translation - due to caching method.
--- a/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
@@ -59,7 +59,7 @@
* {@link java.lang.instrument} for a detailed description on how these agents
* are loaded and started). The {@link #loadAgentLibrary loadAgentLibrary} and
* {@link #loadAgentPath loadAgentPath} methods are used to load agents that
- * are deployed in a dynamic library and make use of the <a
+ * are deployed either in a dynamic library or statically linked into the VM and make use of the <a
* href="../../../../../../../../technotes/guides/jvmti/index.html">JVM Tools
* Interface</a>. </p>
*
@@ -298,25 +298,29 @@
* <p> A <a href="../../../../../../../../technotes/guides/jvmti/index.html">JVM
* TI</a> client is called an <i>agent</i>. It is developed in a native language.
* A JVM TI agent is deployed in a platform specific manner but it is typically the
- * platform equivalent of a dynamic library. This method causes the given agent
- * library to be loaded into the target VM (if not already loaded).
+ * platform equivalent of a dynamic library. Alternatively, it may be statically linked into the VM.
+ * This method causes the given agent library to be loaded into the target
+ * VM (if not already loaded or if not statically linked into the VM).
* It then causes the target VM to invoke the <code>Agent_OnAttach</code> function
+ * or, for a statically linked agent named 'L', the <code>Agent_OnAttach_L</code> function
* as specified in the
* <a href="../../../../../../../../technotes/guides/jvmti/index.html"> JVM Tools
- * Interface</a> specification. Note that the <code>Agent_OnAttach</code>
+ * Interface</a> specification. Note that the <code>Agent_OnAttach[_L]</code>
* function is invoked even if the agent library was loaded prior to invoking
* this method.
*
* <p> The agent library provided is the name of the agent library. It is interpreted
* in the target virtual machine in an implementation-dependent manner. Typically an
* implementation will expand the library name into an operating system specific file
- * name. For example, on UNIX systems, the name <tt>foo</tt> might be expanded to
- * <tt>libfoo.so</tt>, and located using the search path specified by the
- * <tt>LD_LIBRARY_PATH</tt> environment variable.</p>
+ * name. For example, on UNIX systems, the name <tt>L</tt> might be expanded to
+ * <tt>libL.so</tt>, and located using the search path specified by the
+ * <tt>LD_LIBRARY_PATH</tt> environment variable. If the agent named 'L' is
+ * statically linked into the VM then the VM must export a function named
+ * <code>Agent_OnAttach_L</code>.</p>
*
- * <p> If the <code>Agent_OnAttach</code> function in the agent library returns
+ * <p> If the <code>Agent_OnAttach[_L]</code> function in the agent library returns
* an error then an {@link com.sun.tools.attach.AgentInitializationException} is
- * thrown. The return value from the <code>Agent_OnAttach</code> can then be
+ * thrown. The return value from the <code>Agent_OnAttach[_L]</code> can then be
* obtained by invoking the {@link
* com.sun.tools.attach.AgentInitializationException#returnValue() returnValue}
* method on the exception. </p>
@@ -325,15 +329,16 @@
* The name of the agent library.
*
* @param options
- * The options to provide to the <code>Agent_OnAttach</code>
+ * The options to provide to the <code>Agent_OnAttach[_L]</code>
* function (can be <code>null</code>).
*
* @throws AgentLoadException
- * If the agent library does not exist, or cannot be loaded for
- * another reason.
+ * If the agent library does not exist, the agent library is not
+ * statically linked with the VM, or the agent library cannot be
+ * loaded for another reason.
*
* @throws AgentInitializationException
- * If the <code>Agent_OnAttach</code> function returns an error
+ * If the <code>Agent_OnAttach[_L]</code> function returns an error.
*
* @throws IOException
* If an I/O error occurs
@@ -359,11 +364,12 @@
* The name of the agent library.
*
* @throws AgentLoadException
- * If the agent library does not exist, or cannot be loaded for
- * another reason.
+ * If the agent library does not exist, the agent library is not
+ * statically linked with the VM, or the agent library cannot be
+ * loaded for another reason.
*
* @throws AgentInitializationException
- * If the <code>Agent_OnAttach</code> function returns an error
+ * If the <code>Agent_OnAttach[_L]</code> function returns an error.
*
* @throws IOException
* If an I/O error occurs
@@ -383,12 +389,23 @@
* <p> A <a href="../../../../../../../../technotes/guides/jvmti/index.html">JVM
* TI</a> client is called an <i>agent</i>. It is developed in a native language.
* A JVM TI agent is deployed in a platform specific manner but it is typically the
- * platform equivalent of a dynamic library. This method causes the given agent
- * library to be loaded into the target VM (if not already loaded).
- * It then causes the target VM to invoke the <code>Agent_OnAttach</code> function
- * as specified in the
+ * platform equivalent of a dynamic library. Alternatively, the native
+ * library specified by the agentPath parameter may be statically
+ * linked with the VM. The parsing of the agentPath parameter into
+ * a statically linked library name is done in a platform
+ * specific manner in the VM. For example, in UNIX, an agentPath parameter
+ * of <code>/a/b/libL.so</code> would name a library 'L'.
+ *
+ * See the JVM TI Specification for more details.
+ *
+ * This method causes the given agent library to be loaded into the target
+ * VM (if not already loaded or if not statically linked into the VM).
+ * It then causes the target VM to invoke the <code>Agent_OnAttach</code>
+ * function or, for a statically linked agent named 'L', the
+ * <code>Agent_OnAttach_L</code> function as specified in the
* <a href="../../../../../../../../technotes/guides/jvmti/index.html"> JVM Tools
- * Interface</a> specification. Note that the <code>Agent_OnAttach</code>
+ * Interface</a> specification.
+ * Note that the <code>Agent_OnAttach[_L]</code>
* function is invoked even if the agent library was loaded prior to invoking
* this method.
*
@@ -396,9 +413,9 @@
* agent library. Unlike {@link #loadAgentLibrary loadAgentLibrary}, the library name
* is not expanded in the target virtual machine. </p>
*
- * <p> If the <code>Agent_OnAttach</code> function in the agent library returns
+ * <p> If the <code>Agent_OnAttach[_L]</code> function in the agent library returns
* an error then an {@link com.sun.tools.attach.AgentInitializationException} is
- * thrown. The return value from the <code>Agent_OnAttach</code> can then be
+ * thrown. The return value from the <code>Agent_OnAttach[_L]</code> can then be
* obtained by invoking the {@link
* com.sun.tools.attach.AgentInitializationException#returnValue() returnValue}
* method on the exception. </p>
@@ -407,15 +424,16 @@
* The full path of the agent library.
*
* @param options
- * The options to provide to the <code>Agent_OnAttach</code>
+ * The options to provide to the <code>Agent_OnAttach[_L]</code>
* function (can be <code>null</code>).
*
* @throws AgentLoadException
- * If the agent library does not exist, or cannot be loaded for
- * another reason.
+ * If the agent library does not exist, the agent library is not
+ * statically linked with the VM, or the agent library cannot be
+ * loaded for another reason.
*
* @throws AgentInitializationException
- * If the <code>Agent_OnAttach</code> function returns an error
+ * If the <code>Agent_OnAttach[_L]</code> function returns an error.
*
* @throws IOException
* If an I/O error occurs
@@ -441,11 +459,12 @@
* The full path to the agent library.
*
* @throws AgentLoadException
- * If the agent library does not exist, or cannot be loaded for
- * another reason.
+ * If the agent library does not exist, the agent library is not
+ * statically linked with the VM, or the agent library cannot be
+ * loaded for another reason.
*
* @throws AgentInitializationException
- * If the <code>Agent_OnAttach</code> function returns an error
+ * If the <code>Agent_OnAttach[_L]</code> function returns an error.
*
* @throws IOException
* If an I/O error occurs
--- a/jdk/src/share/classes/java/io/BufferedInputStream.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/io/BufferedInputStream.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2013, 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
@@ -50,7 +50,15 @@
public
class BufferedInputStream extends FilterInputStream {
- private static int defaultBufferSize = 8192;
+ private static int DEFAULT_BUFFER_SIZE = 8192;
+
+ /**
+ * The maximum size of array to allocate.
+ * Some VMs reserve some header words in an array.
+ * Attempts to allocate larger arrays may result in
+ * OutOfMemoryError: Requested array size exceeds VM limit
+ */
+ private static int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
/**
* The internal buffer array where the data is stored. When necessary,
@@ -172,7 +180,7 @@
* @param in the underlying input stream.
*/
public BufferedInputStream(InputStream in) {
- this(in, defaultBufferSize);
+ this(in, DEFAULT_BUFFER_SIZE);
}
/**
@@ -215,8 +223,11 @@
} else if (buffer.length >= marklimit) {
markpos = -1; /* buffer got too big, invalidate mark */
pos = 0; /* drop buffer contents */
+ } else if (buffer.length >= MAX_BUFFER_SIZE) {
+ throw new OutOfMemoryError("Required array size too large");
} else { /* grow buffer */
- int nsz = pos * 2;
+ int nsz = (pos <= MAX_BUFFER_SIZE - pos) ?
+ pos * 2 : MAX_BUFFER_SIZE;
if (nsz > marklimit)
nsz = marklimit;
byte nbuf[] = new byte[nsz];
--- a/jdk/src/share/classes/java/lang/AbstractStringBuilder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/lang/AbstractStringBuilder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1307,7 +1307,7 @@
* specified substring, starting at the specified index. The integer
* returned is the smallest value {@code k} for which:
* <blockquote><pre>
- * k >= Math.min(fromIndex, str.length()) &&
+ * k >= Math.min(fromIndex, this.length()) &&
* this.toString().startsWith(str, k)
* </pre></blockquote>
* If no such value of <i>k</i> exists, then -1 is returned.
@@ -1346,7 +1346,7 @@
* specified substring. The integer returned is the largest value <i>k</i>
* such that:
* <blockquote><pre>
- * k <= Math.min(fromIndex, str.length()) &&
+ * k <= Math.min(fromIndex, this.length()) &&
* this.toString().startsWith(str, k)
* </pre></blockquote>
* If no such value of <i>k</i> exists, then -1 is returned.
--- a/jdk/src/share/classes/java/lang/Class.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/lang/Class.java Fri Sep 06 14:20:58 2013 -0700
@@ -3338,8 +3338,16 @@
* @since 1.8
*/
public AnnotatedType getAnnotatedSuperclass() {
- return TypeAnnotationParser.buildAnnotatedSuperclass(getRawTypeAnnotations(), getConstantPool(), this);
-}
+ if (this == Object.class ||
+ isInterface() ||
+ isArray() ||
+ isPrimitive() ||
+ this == Void.TYPE) {
+ return null;
+ }
+
+ return TypeAnnotationParser.buildAnnotatedSuperclass(getRawTypeAnnotations(), getConstantPool(), this);
+ }
/**
* Returns an array of AnnotatedType objects that represent the use of types to
--- a/jdk/src/share/classes/java/lang/Math.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/lang/Math.java Fri Sep 06 14:20:58 2013 -0700
@@ -698,11 +698,8 @@
return 0;
}
- private static Random randomNumberGenerator;
-
- private static synchronized Random initRNG() {
- Random rnd = randomNumberGenerator;
- return (rnd == null) ? (randomNumberGenerator = new Random()) : rnd;
+ private static final class RandomNumberGeneratorHolder {
+ static final Random randomNumberGenerator = new Random();
}
/**
@@ -729,9 +726,7 @@
* @see Random#nextDouble()
*/
public static double random() {
- Random rnd = randomNumberGenerator;
- if (rnd == null) rnd = initRNG();
- return rnd.nextDouble();
+ return RandomNumberGeneratorHolder.randomNumberGenerator.nextDouble();
}
/**
--- a/jdk/src/share/classes/java/lang/ProcessBuilder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/lang/ProcessBuilder.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,7 +29,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.security.AccessControlException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
@@ -1033,9 +1032,9 @@
// Can not disclose the fail reason for read-protected files.
try {
security.checkRead(prog);
- } catch (AccessControlException ace) {
+ } catch (SecurityException se) {
exceptionInfo = "";
- cause = ace;
+ cause = se;
}
}
// It's much easier for us to create a high-quality error
--- a/jdk/src/share/classes/java/lang/StrictMath.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/lang/StrictMath.java Fri Sep 06 14:20:58 2013 -0700
@@ -678,11 +678,8 @@
return Math.round(a);
}
- private static Random randomNumberGenerator;
-
- private static synchronized Random initRNG() {
- Random rnd = randomNumberGenerator;
- return (rnd == null) ? (randomNumberGenerator = new Random()) : rnd;
+ private static final class RandomNumberGeneratorHolder {
+ static final Random randomNumberGenerator = new Random();
}
/**
@@ -709,9 +706,7 @@
* @see Random#nextDouble()
*/
public static double random() {
- Random rnd = randomNumberGenerator;
- if (rnd == null) rnd = initRNG();
- return rnd.nextDouble();
+ return RandomNumberGeneratorHolder.randomNumberGenerator.nextDouble();
}
/**
--- a/jdk/src/share/classes/java/math/BigDecimal.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/math/BigDecimal.java Fri Sep 06 14:20:58 2013 -0700
@@ -2659,28 +2659,32 @@
if (ys == 0)
return 1;
- int sdiff = this.scale - val.scale;
+ long sdiff = (long)this.scale - val.scale;
if (sdiff != 0) {
// Avoid matching scales if the (adjusted) exponents differ
- int xae = this.precision() - this.scale; // [-1]
- int yae = val.precision() - val.scale; // [-1]
+ long xae = (long)this.precision() - this.scale; // [-1]
+ long yae = (long)val.precision() - val.scale; // [-1]
if (xae < yae)
return -1;
if (xae > yae)
return 1;
BigInteger rb = null;
if (sdiff < 0) {
- if ( (xs == INFLATED ||
- (xs = longMultiplyPowerTen(xs, -sdiff)) == INFLATED) &&
+ // The cases sdiff <= Integer.MIN_VALUE intentionally fall through.
+ if ( sdiff > Integer.MIN_VALUE &&
+ (xs == INFLATED ||
+ (xs = longMultiplyPowerTen(xs, (int)-sdiff)) == INFLATED) &&
ys == INFLATED) {
- rb = bigMultiplyPowerTen(-sdiff);
+ rb = bigMultiplyPowerTen((int)-sdiff);
return rb.compareMagnitude(val.intVal);
}
} else { // sdiff > 0
- if ( (ys == INFLATED ||
- (ys = longMultiplyPowerTen(ys, sdiff)) == INFLATED) &&
+ // The cases sdiff > Integer.MAX_VALUE intentionally fall through.
+ if ( sdiff <= Integer.MAX_VALUE &&
+ (ys == INFLATED ||
+ (ys = longMultiplyPowerTen(ys, (int)sdiff)) == INFLATED) &&
xs == INFLATED) {
- rb = val.bigMultiplyPowerTen(sdiff);
+ rb = val.bigMultiplyPowerTen((int)sdiff);
return this.intVal.compareMagnitude(rb);
}
}
@@ -4545,7 +4549,7 @@
if(cmp > 0) { // satisfy constraint (b)
yscale -= 1; // [that is, divisor *= 10]
int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
- if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+ if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
// assert newScale >= xscale
int raise = checkScaleNonZero((long) mcp + yscale - xscale);
long scaledXs;
@@ -4626,7 +4630,7 @@
// return BigDecimal object whose scale will be set to 'scl'.
int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
BigDecimal quotient;
- if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+ if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
int raise = checkScaleNonZero((long) mcp + yscale - xscale);
long scaledXs;
if ((scaledXs = longMultiplyPowerTen(xs, raise)) == INFLATED) {
@@ -4673,7 +4677,7 @@
// return BigDecimal object whose scale will be set to 'scl'.
BigDecimal quotient;
int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
- if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+ if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
int raise = checkScaleNonZero((long) mcp + yscale - xscale);
BigInteger rb = bigMultiplyPowerTen(xs,raise);
quotient = divideAndRound(rb, ys, scl, roundingMode, checkScaleNonZero(preferredScale));
@@ -4714,7 +4718,7 @@
// return BigDecimal object whose scale will be set to 'scl'.
BigDecimal quotient;
int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
- if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+ if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
int raise = checkScaleNonZero((long) mcp + yscale - xscale);
BigInteger rb = bigMultiplyPowerTen(xs,raise);
quotient = divideAndRound(rb, ys, scl, roundingMode, checkScaleNonZero(preferredScale));
@@ -4745,7 +4749,7 @@
// return BigDecimal object whose scale will be set to 'scl'.
BigDecimal quotient;
int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
- if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+ if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
int raise = checkScaleNonZero((long) mcp + yscale - xscale);
BigInteger rb = bigMultiplyPowerTen(xs,raise);
quotient = divideAndRound(rb, ys, scl, roundingMode, checkScaleNonZero(preferredScale));
--- a/jdk/src/share/classes/java/math/BigInteger.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/math/BigInteger.java Fri Sep 06 14:20:58 2013 -0700
@@ -2109,7 +2109,7 @@
// This is a quick way to approximate the size of the result,
// similar to doing log2[n] * exponent. This will give an upper bound
// of how big the result can be, and which algorithm to use.
- int scaleFactor = remainingBits * exponent;
+ long scaleFactor = (long)remainingBits * exponent;
// Use slightly different algorithms for small and large operands.
// See if the result will safely fit into a long. (Largest 2^63-1)
--- a/jdk/src/share/classes/java/rmi/server/RMISocketFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/rmi/server/RMISocketFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -50,13 +50,13 @@
* @implNote
* <p>You can use the {@code RMISocketFactory} class to create a server socket that
* is bound to a specific address, restricting the origin of requests. For example,
- * the following code implements a socket factory that binds server sockets to the
+ * the following code implements a socket factory that binds server sockets to an IPv4
* loopback address. This restricts RMI to processing requests only from the local host.
*
* <pre>{@code
* class LoopbackSocketFactory extends RMISocketFactory {
* public ServerSocket createServerSocket(int port) throws IOException {
- * return new ServerSocket(port, 5, InetAddress.getLoopbackAddress());
+ * return new ServerSocket(port, 5, InetAddress.getByName("127.0.0.1"));
* }
*
* public Socket createSocket(String host, int port) throws IOException {
@@ -72,8 +72,8 @@
* }</pre>
*
* Set the {@code java.rmi.server.hostname} system property
- * to a host name (typically {@code localhost}) that resolves to the loopback
- * interface to ensure that the generated stubs use the right network interface.
+ * to {@code 127.0.0.1} to ensure that the generated stubs connect to the right
+ * network interface.
*
* @author Ann Wollrath
* @author Peter Jones
--- a/jdk/src/share/classes/java/util/Collections.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/Collections.java Fri Sep 06 14:20:58 2013 -0700
@@ -27,7 +27,6 @@
import java.io.Serializable;
import java.io.ObjectOutputStream;
import java.io.IOException;
-import java.io.InvalidObjectException;
import java.lang.reflect.Array;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
@@ -35,6 +34,7 @@
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
+import java.util.stream.IntStream;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
@@ -1148,7 +1148,16 @@
public Spliterator<E> spliterator() {
return (Spliterator<E>)c.spliterator();
}
-
+ @SuppressWarnings("unchecked")
+ @Override
+ public Stream<E> stream() {
+ return (Stream<E>)c.stream();
+ }
+ @SuppressWarnings("unchecked")
+ @Override
+ public Stream<E> parallelStream() {
+ return (Stream<E>)c.parallelStream();
+ }
}
/**
@@ -2009,8 +2018,8 @@
* through the returned collection.<p>
*
* It is imperative that the user manually synchronize on the returned
- * collection when traversing it via {@link Iterator} or
- * {@link Spliterator}:
+ * collection when traversing it via {@link Iterator}, {@link Spliterator}
+ * or {@link Stream}:
* <pre>
* Collection c = Collections.synchronizedCollection(myCollection);
* ...
@@ -2120,6 +2129,14 @@
public Spliterator<E> spliterator() {
return c.spliterator(); // Must be manually synched by user!
}
+ @Override
+ public Stream<E> stream() {
+ return c.stream(); // Must be manually synched by user!
+ }
+ @Override
+ public Stream<E> parallelStream() {
+ return c.parallelStream(); // Must be manually synched by user!
+ }
private void writeObject(ObjectOutputStream s) throws IOException {
synchronized (mutex) {s.defaultWriteObject();}
}
@@ -3172,6 +3189,10 @@
}
@Override
public Spliterator<E> spliterator() {return c.spliterator();}
+ @Override
+ public Stream<E> stream() {return c.stream();}
+ @Override
+ public Stream<E> parallelStream() {return c.parallelStream();}
}
/**
@@ -5096,6 +5117,22 @@
") > toIndex(" + toIndex + ")");
return new CopiesList<>(toIndex - fromIndex, element);
}
+
+ // Override default methods in Collection
+ @Override
+ public Stream<E> stream() {
+ return IntStream.range(0, n).mapToObj(i -> element);
+ }
+
+ @Override
+ public Stream<E> parallelStream() {
+ return IntStream.range(0, n).parallel().mapToObj(i -> element);
+ }
+
+ @Override
+ public Spliterator<E> spliterator() {
+ return stream().spliterator();
+ }
}
/**
@@ -5503,6 +5540,10 @@
@Override
public Spliterator<E> spliterator() {return s.spliterator();}
+ @Override
+ public Stream<E> stream() {return s.stream();}
+ @Override
+ public Stream<E> parallelStream() {return s.parallelStream();}
private static final long serialVersionUID = 2454657854757543876L;
@@ -5568,10 +5609,14 @@
@Override
public void forEach(Consumer<? super E> action) {q.forEach(action);}
@Override
- public Spliterator<E> spliterator() {return q.spliterator();}
- @Override
public boolean removeIf(Predicate<? super E> filter) {
return q.removeIf(filter);
}
+ @Override
+ public Spliterator<E> spliterator() {return q.spliterator();}
+ @Override
+ public Stream<E> stream() {return q.stream();}
+ @Override
+ public Stream<E> parallelStream() {return q.parallelStream();}
}
}
--- a/jdk/src/share/classes/java/util/ComparableTimSort.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/ComparableTimSort.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009 Google Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -146,7 +147,7 @@
*/
int stackLen = (len < 120 ? 5 :
len < 1542 ? 10 :
- len < 119151 ? 19 : 40);
+ len < 119151 ? 24 : 40);
runBase = new int[stackLen];
runLen = new int[stackLen];
}
--- a/jdk/src/share/classes/java/util/Comparator.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/Comparator.java Fri Sep 06 14:20:58 2013 -0700
@@ -199,7 +199,7 @@
* composed using following code,
*
* <pre>{@code
- * Comparator<String> cmp = Comparator.comparing(String::length)
+ * Comparator<String> cmp = Comparator.comparingInt(String::length)
* .thenComparing(String.CASE_INSENSITIVE_ORDER);
* }</pre>
*
@@ -270,18 +270,18 @@
* extracts a {@code int} sort key.
*
* @implSpec This default implementation behaves as if {@code
- * thenComparing(comparing(keyExtractor))}.
+ * thenComparing(comparingInt(keyExtractor))}.
*
* @param keyExtractor the function used to extract the integer sort key
* @return a lexicographic-order comparator composed of this and then the
* {@code int} sort key
* @throws NullPointerException if the argument is null.
- * @see #comparing(ToIntFunction)
+ * @see #comparingInt(ToIntFunction)
* @see #thenComparing(Comparator)
* @since 1.8
*/
- default Comparator<T> thenComparing(ToIntFunction<? super T> keyExtractor) {
- return thenComparing(comparing(keyExtractor));
+ default Comparator<T> thenComparingInt(ToIntFunction<? super T> keyExtractor) {
+ return thenComparing(comparingInt(keyExtractor));
}
/**
@@ -289,18 +289,18 @@
* extracts a {@code long} sort key.
*
* @implSpec This default implementation behaves as if {@code
- * thenComparing(comparing(keyExtractor))}.
+ * thenComparing(comparingLong(keyExtractor))}.
*
* @param keyExtractor the function used to extract the long sort key
* @return a lexicographic-order comparator composed of this and then the
* {@code long} sort key
* @throws NullPointerException if the argument is null.
- * @see #comparing(ToLongFunction)
+ * @see #comparingLong(ToLongFunction)
* @see #thenComparing(Comparator)
* @since 1.8
*/
- default Comparator<T> thenComparing(ToLongFunction<? super T> keyExtractor) {
- return thenComparing(comparing(keyExtractor));
+ default Comparator<T> thenComparingLong(ToLongFunction<? super T> keyExtractor) {
+ return thenComparing(comparingLong(keyExtractor));
}
/**
@@ -308,18 +308,18 @@
* extracts a {@code double} sort key.
*
* @implSpec This default implementation behaves as if {@code
- * thenComparing(comparing(keyExtractor))}.
+ * thenComparing(comparingDouble(keyExtractor))}.
*
* @param keyExtractor the function used to extract the double sort key
* @return a lexicographic-order comparator composed of this and then the
* {@code double} sort key
* @throws NullPointerException if the argument is null.
- * @see #comparing(ToDoubleFunction)
+ * @see #comparingDouble(ToDoubleFunction)
* @see #thenComparing(Comparator)
* @since 1.8
*/
- default Comparator<T> thenComparing(ToDoubleFunction<? super T> keyExtractor) {
- return thenComparing(comparing(keyExtractor));
+ default Comparator<T> thenComparingDouble(ToDoubleFunction<? super T> keyExtractor) {
+ return thenComparing(comparingDouble(keyExtractor));
}
/**
@@ -484,7 +484,7 @@
* @throws NullPointerException if the argument is null
* @since 1.8
*/
- public static <T> Comparator<T> comparing(ToIntFunction<? super T> keyExtractor) {
+ public static <T> Comparator<T> comparingInt(ToIntFunction<? super T> keyExtractor) {
Objects.requireNonNull(keyExtractor);
return (Comparator<T> & Serializable)
(c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2));
@@ -505,7 +505,7 @@
* @throws NullPointerException if the argument is null
* @since 1.8
*/
- public static <T> Comparator<T> comparing(ToLongFunction<? super T> keyExtractor) {
+ public static <T> Comparator<T> comparingLong(ToLongFunction<? super T> keyExtractor) {
Objects.requireNonNull(keyExtractor);
return (Comparator<T> & Serializable)
(c1, c2) -> Long.compare(keyExtractor.applyAsLong(c1), keyExtractor.applyAsLong(c2));
@@ -526,7 +526,7 @@
* @throws NullPointerException if the argument is null
* @since 1.8
*/
- public static<T> Comparator<T> comparing(ToDoubleFunction<? super T> keyExtractor) {
+ public static<T> Comparator<T> comparingDouble(ToDoubleFunction<? super T> keyExtractor) {
Objects.requireNonNull(keyExtractor);
return (Comparator<T> & Serializable)
(c1, c2) -> Double.compare(keyExtractor.applyAsDouble(c1), keyExtractor.applyAsDouble(c2));
--- a/jdk/src/share/classes/java/util/Random.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/Random.java Fri Sep 06 14:20:58 2013 -0700
@@ -26,9 +26,13 @@
package java.util;
import java.io.*;
import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.DoubleConsumer;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
+import java.util.stream.StreamSupport;
import sun.misc.Unsafe;
@@ -85,6 +89,13 @@
private static final long addend = 0xBL;
private static final long mask = (1L << 48) - 1;
+ private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
+
+ // IllegalArgumentException messages
+ static final String BadBound = "bound must be positive";
+ static final String BadRange = "bound must be greater than origin";
+ static final String BadSize = "size must be non-negative";
+
/**
* Creates a new random number generator. This constructor sets
* the seed of the random number generator to a value very likely
@@ -222,6 +233,82 @@
}
/**
+ * The form of nextLong used by LongStream Spliterators. If
+ * origin is greater than bound, acts as unbounded form of
+ * nextLong, else as bounded form.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final long internalNextLong(long origin, long bound) {
+ long r = nextLong();
+ if (origin < bound) {
+ long n = bound - origin, m = n - 1;
+ if ((n & m) == 0L) // power of two
+ r = (r & m) + origin;
+ else if (n > 0L) { // reject over-represented candidates
+ for (long u = r >>> 1; // ensure nonnegative
+ u + m - (r = u % n) < 0L; // rejection check
+ u = nextLong() >>> 1) // retry
+ ;
+ r += origin;
+ }
+ else { // range not representable as long
+ while (r < origin || r >= bound)
+ r = nextLong();
+ }
+ }
+ return r;
+ }
+
+ /**
+ * The form of nextInt used by IntStream Spliterators.
+ * For the unbounded case: uses nextInt().
+ * For the bounded case with representable range: uses nextInt(int bound)
+ * For the bounded case with unrepresentable range: uses nextInt()
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final int internalNextInt(int origin, int bound) {
+ if (origin < bound) {
+ int n = bound - origin;
+ if (n > 0) {
+ return nextInt(n) + origin;
+ }
+ else { // range not representable as int
+ int r;
+ do {
+ r = nextInt();
+ } while (r < origin || r >= bound);
+ return r;
+ }
+ }
+ else {
+ return nextInt();
+ }
+ }
+
+ /**
+ * The form of nextDouble used by DoubleStream Spliterators.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final double internalNextDouble(double origin, double bound) {
+ double r = nextDouble();
+ if (origin < bound) {
+ r = r * (bound - origin) + origin;
+ if (r >= bound) // correct for rounding
+ r = Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
+ }
+ return r;
+ }
+
+ /**
* Returns the next pseudorandom, uniformly distributed {@code int}
* value from this random number generator's sequence. The general
* contract of {@code nextInt} is that one {@code int} value is
@@ -247,23 +334,23 @@
* between 0 (inclusive) and the specified value (exclusive), drawn from
* this random number generator's sequence. The general contract of
* {@code nextInt} is that one {@code int} value in the specified range
- * is pseudorandomly generated and returned. All {@code n} possible
+ * is pseudorandomly generated and returned. All {@code bound} possible
* {@code int} values are produced with (approximately) equal
- * probability. The method {@code nextInt(int n)} is implemented by
+ * probability. The method {@code nextInt(int bound)} is implemented by
* class {@code Random} as if by:
* <pre> {@code
- * public int nextInt(int n) {
- * if (n <= 0)
- * throw new IllegalArgumentException("n must be positive");
+ * public int nextInt(int bound) {
+ * if (bound <= 0)
+ * throw new IllegalArgumentException("bound must be positive");
*
- * if ((n & -n) == n) // i.e., n is a power of 2
- * return (int)((n * (long)next(31)) >> 31);
+ * if ((bound & -bound) == bound) // i.e., bound is a power of 2
+ * return (int)((bound * (long)next(31)) >> 31);
*
* int bits, val;
* do {
* bits = next(31);
- * val = bits % n;
- * } while (bits - val + (n-1) < 0);
+ * val = bits % bound;
+ * } while (bits - val + (bound-1) < 0);
* return val;
* }}</pre>
*
@@ -289,28 +376,28 @@
* greatly increases the length of the sequence of values returned by
* successive calls to this method if n is a small power of two.
*
- * @param n the bound on the random number to be returned. Must be
- * positive.
+ * @param bound the upper bound (exclusive). Must be positive.
* @return the next pseudorandom, uniformly distributed {@code int}
- * value between {@code 0} (inclusive) and {@code n} (exclusive)
+ * value between zero (inclusive) and {@code bound} (exclusive)
* from this random number generator's sequence
- * @throws IllegalArgumentException if n is not positive
+ * @throws IllegalArgumentException if bound is not positive
* @since 1.2
*/
-
- public int nextInt(int n) {
- if (n <= 0)
- throw new IllegalArgumentException("n must be positive");
+ public int nextInt(int bound) {
+ if (bound <= 0)
+ throw new IllegalArgumentException(BadBound);
- if ((n & -n) == n) // i.e., n is a power of 2
- return (int)((n * (long)next(31)) >> 31);
-
- int bits, val;
- do {
- bits = next(31);
- val = bits % n;
- } while (bits - val + (n-1) < 0);
- return val;
+ int r = next(31);
+ int m = bound - 1;
+ if ((bound & m) == 0) // i.e., bound is a power of 2
+ r = (int)((bound * (long)r) >> 31);
+ else {
+ for (int u = r;
+ u - (r = u % bound) + m < 0;
+ u = next(31))
+ ;
+ }
+ return r;
}
/**
@@ -442,8 +529,7 @@
* @see Math#random
*/
public double nextDouble() {
- return (((long)(next(26)) << 27) + next(27))
- / (double)(1L << 53);
+ return (((long)(next(26)) << 27) + next(27)) * DOUBLE_UNIT;
}
private double nextNextGaussian;
@@ -513,57 +599,563 @@
}
}
+ // stream methods, coded in a way intended to better isolate for
+ // maintenance purposes the small differences across forms.
+
/**
- * Returns a stream of pseudorandom, uniformly distributed
- * {@code integer} values from this random number generator's
- * sequence. Values are obtained as needed by calling
- * {@link #nextInt()}.
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code int} values.
+ *
+ * <p>A pseudorandom {@code int} value is generated as if it's the result of
+ * calling the method {@link #nextInt()}.
*
- * @return an infinite stream of {@code integer} values
+ * @param streamSize the number of values to generate
+ * @return a stream of pseudorandom {@code int} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @since 1.8
+ */
+ public IntStream ints(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, streamSize, Integer.MAX_VALUE, 0),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code int}
+ * values.
+ *
+ * <p>A pseudorandom {@code int} value is generated as if it's the result of
+ * calling the method {@link #nextInt()}.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * ints(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code int} values
* @since 1.8
*/
public IntStream ints() {
- return IntStream.generate(this::nextInt);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, Long.MAX_VALUE, Integer.MAX_VALUE, 0),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number
+ * of pseudorandom {@code int} values, each conforming to the given
+ * origin (inclusive) and bound (exclusive).
+ *
+ * <p>A pseudorandom {@code int} value is generated as if it's the result of
+ * calling the following method with the origin and bound:
+ * <pre> {@code
+ * int nextInt(int origin, int bound) {
+ * int n = bound - origin;
+ * if (n > 0) {
+ * return nextInt(n) + origin;
+ * }
+ * else { // range not representable as int
+ * int r;
+ * do {
+ * r = nextInt();
+ * } while (r < origin || r >= bound);
+ * return r;
+ * }
+ * }}</pre>
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code int} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero, or {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public IntStream ints(long streamSize, int randomNumberOrigin,
+ int randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
}
/**
- * Returns a stream of pseudorandom, uniformly distributed
- * {@code long} values from this random number generator's
- * sequence. Values are obtained as needed by calling
- * {@link #nextLong()}.
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * int} values, each conforming to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * <p>A pseudorandom {@code int} value is generated as if it's the result of
+ * calling the following method with the origin and bound:
+ * <pre> {@code
+ * int nextInt(int origin, int bound) {
+ * int n = bound - origin;
+ * if (n > 0) {
+ * return nextInt(n) + origin;
+ * }
+ * else { // range not representable as int
+ * int r;
+ * do {
+ * r = nextInt();
+ * } while (r < origin || r >= bound);
+ * return r;
+ * }
+ * }}</pre>
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * ints(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
*
- * @return an infinite stream of {@code long} values
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code int} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public IntStream ints(int randomNumberOrigin, int randomNumberBound) {
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code long} values.
+ *
+ * <p>A pseudorandom {@code long} value is generated as if it's the result
+ * of calling the method {@link #nextLong()}.
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of pseudorandom {@code long} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @since 1.8
+ */
+ public LongStream longs(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, streamSize, Long.MAX_VALUE, 0L),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code long}
+ * values.
+ *
+ * <p>A pseudorandom {@code long} value is generated as if it's the result
+ * of calling the method {@link #nextLong()}.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * longs(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code long} values
* @since 1.8
*/
public LongStream longs() {
- return LongStream.generate(this::nextLong);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, Long.MAX_VALUE, Long.MAX_VALUE, 0L),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code long}, each conforming to the given origin
+ * (inclusive) and bound (exclusive).
+ *
+ * <p>A pseudorandom {@code long} value is generated as if it's the result
+ * of calling the following method with the origin and bound:
+ * <pre> {@code
+ * long nextLong(long origin, long bound) {
+ * long r = nextLong();
+ * long n = bound - origin, m = n - 1;
+ * if ((n & m) == 0L) // power of two
+ * r = (r & m) + origin;
+ * else if (n > 0L) { // reject over-represented candidates
+ * for (long u = r >>> 1; // ensure nonnegative
+ * u + m - (r = u % n) < 0L; // rejection check
+ * u = nextLong() >>> 1) // retry
+ * ;
+ * r += origin;
+ * }
+ * else { // range not representable as long
+ * while (r < origin || r >= bound)
+ * r = nextLong();
+ * }
+ * return r;
+ * }}</pre>
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code long} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero, or {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public LongStream longs(long streamSize, long randomNumberOrigin,
+ long randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
}
/**
- * Returns a stream of pseudorandom, uniformly distributed
- * {@code double} values between {@code 0.0} and {@code 1.0}
- * from this random number generator's sequence. Values are
- * obtained as needed by calling {@link #nextDouble()}.
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * long} values, each conforming to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * <p>A pseudorandom {@code long} value is generated as if it's the result
+ * of calling the following method with the origin and bound:
+ * <pre> {@code
+ * long nextLong(long origin, long bound) {
+ * long r = nextLong();
+ * long n = bound - origin, m = n - 1;
+ * if ((n & m) == 0L) // power of two
+ * r = (r & m) + origin;
+ * else if (n > 0L) { // reject over-represented candidates
+ * for (long u = r >>> 1; // ensure nonnegative
+ * u + m - (r = u % n) < 0L; // rejection check
+ * u = nextLong() >>> 1) // retry
+ * ;
+ * r += origin;
+ * }
+ * else { // range not representable as long
+ * while (r < origin || r >= bound)
+ * r = nextLong();
+ * }
+ * return r;
+ * }}</pre>
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * longs(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
*
- * @return an infinite stream of {@code double} values
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code long} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public LongStream longs(long randomNumberOrigin, long randomNumberBound) {
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code double} values, each between zero
+ * (inclusive) and one (exclusive).
+ *
+ * <p>A pseudorandom {@code double} value is generated as if it's the result
+ * of calling the method {@link #nextDouble()}}.
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of {@code double} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @since 1.8
+ */
+ public DoubleStream doubles(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, streamSize, Double.MAX_VALUE, 0.0),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * double} values, each between zero (inclusive) and one
+ * (exclusive).
+ *
+ * <p>A pseudorandom {@code double} value is generated as if it's the result
+ * of calling the method {@link #nextDouble()}}.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * doubles(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code double} values
* @since 1.8
*/
public DoubleStream doubles() {
- return DoubleStream.generate(this::nextDouble);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, Long.MAX_VALUE, Double.MAX_VALUE, 0.0),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code double} values, each conforming to the given origin
+ * (inclusive) and bound (exclusive).
+ *
+ * <p>A pseudorandom {@code double} value is generated as if it's the result
+ * of calling the following method with the origin and bound:
+ * <pre> {@code
+ * double nextDouble(double origin, double bound) {
+ * double r = nextDouble();
+ * r = r * (bound - origin) + origin;
+ * if (r >= bound) // correct for rounding
+ * r = Math.nextDown(bound);
+ * return r;
+ * }}</pre>
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code double} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public DoubleStream doubles(long streamSize, double randomNumberOrigin,
+ double randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (!(randomNumberOrigin < randomNumberBound))
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * double} values, each conforming to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * <p>A pseudorandom {@code double} value is generated as if it's the result
+ * of calling the following method with the origin and bound:
+ * <pre> {@code
+ * double nextDouble(double origin, double bound) {
+ * double r = nextDouble();
+ * r = r * (bound - origin) + origin;
+ * if (r >= bound) // correct for rounding
+ * r = Math.nextDown(bound);
+ * return r;
+ * }}</pre>
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * doubles(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code double} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) {
+ if (!(randomNumberOrigin < randomNumberBound))
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
}
/**
- * Returns a stream of pseudorandom, Gaussian ("normally")
- * distributed {@code double} values with mean {@code 0.0}
- * and standard deviation {@code 1.0} from this random number
- * generator's sequence. Values are obtained as needed by
- * calling {@link #nextGaussian()}.
- *
- * @return an infinite stream of {@code double} values
- * @since 1.8
+ * Spliterator for int streams. We multiplex the four int
+ * versions into one class by treating a bound less than origin as
+ * unbounded, and also by treating "infinite" as equivalent to
+ * Long.MAX_VALUE. For splits, it uses the standard divide-by-two
+ * approach. The long and double versions of this class are
+ * identical except for types.
+ */
+ static final class RandomIntsSpliterator implements Spliterator.OfInt {
+ final Random rng;
+ long index;
+ final long fence;
+ final int origin;
+ final int bound;
+ RandomIntsSpliterator(Random rng, long index, long fence,
+ int origin, int bound) {
+ this.rng = rng; this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomIntsSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomIntsSpliterator(rng, i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(IntConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rng.internalNextInt(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(IntConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ Random r = rng;
+ int o = origin, b = bound;
+ do {
+ consumer.accept(r.internalNextInt(o, b));
+ } while (++i < f);
+ }
+ }
+ }
+
+ /**
+ * Spliterator for long streams.
*/
- public DoubleStream gaussians() {
- return DoubleStream.generate(this::nextGaussian);
+ static final class RandomLongsSpliterator implements Spliterator.OfLong {
+ final Random rng;
+ long index;
+ final long fence;
+ final long origin;
+ final long bound;
+ RandomLongsSpliterator(Random rng, long index, long fence,
+ long origin, long bound) {
+ this.rng = rng; this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomLongsSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomLongsSpliterator(rng, i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(LongConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rng.internalNextLong(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(LongConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ Random r = rng;
+ long o = origin, b = bound;
+ do {
+ consumer.accept(r.internalNextLong(o, b));
+ } while (++i < f);
+ }
+ }
+
+ }
+
+ /**
+ * Spliterator for double streams.
+ */
+ static final class RandomDoublesSpliterator implements Spliterator.OfDouble {
+ final Random rng;
+ long index;
+ final long fence;
+ final double origin;
+ final double bound;
+ RandomDoublesSpliterator(Random rng, long index, long fence,
+ double origin, double bound) {
+ this.rng = rng; this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomDoublesSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomDoublesSpliterator(rng, i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(DoubleConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rng.internalNextDouble(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(DoubleConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ Random r = rng;
+ double o = origin, b = bound;
+ do {
+ consumer.accept(r.internalNextDouble(o, b));
+ } while (++i < f);
+ }
+ }
}
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/util/SplittableRandom.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,1002 @@
+/*
+ * Copyright (c) 2013, 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 java.util;
+
+import java.security.SecureRandom;
+import java.net.InetAddress;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
+import java.util.function.DoubleConsumer;
+import java.util.stream.StreamSupport;
+import java.util.stream.IntStream;
+import java.util.stream.LongStream;
+import java.util.stream.DoubleStream;
+
+/**
+ * A generator of uniform pseudorandom values applicable for use in
+ * (among other contexts) isolated parallel computations that may
+ * generate subtasks. Class {@code SplittableRandom} supports methods for
+ * producing pseudorandom numbers of type {@code int}, {@code long},
+ * and {@code double} with similar usages as for class
+ * {@link java.util.Random} but differs in the following ways:
+ *
+ * <ul>
+ *
+ * <li>Series of generated values pass the DieHarder suite testing
+ * independence and uniformity properties of random number generators.
+ * (Most recently validated with <a
+ * href="http://www.phy.duke.edu/~rgb/General/dieharder.php"> version
+ * 3.31.1</a>.) These tests validate only the methods for certain
+ * types and ranges, but similar properties are expected to hold, at
+ * least approximately, for others as well. The <em>period</em>
+ * (length of any series of generated values before it repeats) is at
+ * least 2<sup>64</sup>. </li>
+ *
+ * <li> Method {@link #split} constructs and returns a new
+ * SplittableRandom instance that shares no mutable state with the
+ * current instance. However, with very high probability, the
+ * values collectively generated by the two objects have the same
+ * statistical properties as if the same quantity of values were
+ * generated by a single thread using a single {@code
+ * SplittableRandom} object. </li>
+ *
+ * <li>Instances of SplittableRandom are <em>not</em> thread-safe.
+ * They are designed to be split, not shared, across threads. For
+ * example, a {@link java.util.concurrent.ForkJoinTask
+ * fork/join-style} computation using random numbers might include a
+ * construction of the form {@code new
+ * Subtask(aSplittableRandom.split()).fork()}.
+ *
+ * <li>This class provides additional methods for generating random
+ * streams, that employ the above techniques when used in {@code
+ * stream.parallel()} mode.</li>
+ *
+ * </ul>
+ *
+ * <p>Instances of {@code SplittableRandom} are not cryptographically
+ * secure. Consider instead using {@link java.security.SecureRandom}
+ * in security-sensitive applications. Additionally,
+ * default-constructed instances do not use a cryptographically random
+ * seed unless the {@linkplain System#getProperty system property}
+ * {@code java.util.secureRandomSeed} is set to {@code true}.
+ *
+ * @author Guy Steele
+ * @author Doug Lea
+ * @since 1.8
+ */
+public final class SplittableRandom {
+
+ /*
+ * Implementation Overview.
+ *
+ * This algorithm was inspired by the "DotMix" algorithm by
+ * Leiserson, Schardl, and Sukha "Deterministic Parallel
+ * Random-Number Generation for Dynamic-Multithreading Platforms",
+ * PPoPP 2012, as well as those in "Parallel random numbers: as
+ * easy as 1, 2, 3" by Salmon, Morae, Dror, and Shaw, SC 2011. It
+ * differs mainly in simplifying and cheapening operations.
+ *
+ * The primary update step (method nextSeed()) is to add a
+ * constant ("gamma") to the current (64 bit) seed, forming a
+ * simple sequence. The seed and the gamma values for any two
+ * SplittableRandom instances are highly likely to be different.
+ *
+ * Methods nextLong, nextInt, and derivatives do not return the
+ * sequence (seed) values, but instead a hash-like bit-mix of
+ * their bits, producing more independently distributed sequences.
+ * For nextLong, the mix64 bit-mixing function computes the same
+ * value as the "64-bit finalizer" function in Austin Appleby's
+ * MurmurHash3 algorithm. See
+ * http://code.google.com/p/smhasher/wiki/MurmurHash3 , which
+ * comments: "The constants for the finalizers were generated by a
+ * simple simulated-annealing algorithm, and both avalanche all
+ * bits of 'h' to within 0.25% bias." The mix32 function is
+ * equivalent to (int)(mix64(seed) >>> 32), but faster because it
+ * omits a step that doesn't contribute to result.
+ *
+ * The split operation uses the current generator to form the seed
+ * and gamma for another SplittableRandom. To conservatively
+ * avoid potential correlations between seed and value generation,
+ * gamma selection (method nextGamma) uses the "Mix13" constants
+ * for MurmurHash3 described by David Stafford
+ * (http://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html)
+ * To avoid potential weaknesses in bit-mixing transformations, we
+ * restrict gammas to odd values with at least 12 and no more than
+ * 52 bits set. Rather than rejecting candidates with too few or
+ * too many bits set, method nextGamma flips some bits (which has
+ * the effect of mapping at most 4 to any given gamma value).
+ * This reduces the effective set of 64bit odd gamma values by
+ * about 2<sup>14</sup>, a very tiny percentage, and serves as an
+ * automated screening for sequence constant selection that is
+ * left as an empirical decision in some other hashing and crypto
+ * algorithms.
+ *
+ * The resulting generator thus transforms a sequence in which
+ * (typically) many bits change on each step, with an inexpensive
+ * mixer with good (but less than cryptographically secure)
+ * avalanching.
+ *
+ * The default (no-argument) constructor, in essence, invokes
+ * split() for a common "seeder" SplittableRandom. Unlike other
+ * cases, this split must be performed in a thread-safe manner, so
+ * we use an AtomicLong to represent the seed rather than use an
+ * explicit SplittableRandom. To bootstrap the seeder, we start
+ * off using a seed based on current time and host unless the
+ * java.util.secureRandomSeed property is set. This serves as a
+ * slimmed-down (and insecure) variant of SecureRandom that also
+ * avoids stalls that may occur when using /dev/random.
+ *
+ * It is a relatively simple matter to apply the basic design here
+ * to use 128 bit seeds. However, emulating 128bit arithmetic and
+ * carrying around twice the state add more overhead than appears
+ * warranted for current usages.
+ *
+ * File organization: First the non-public methods that constitute
+ * the main algorithm, then the main public methods, followed by
+ * some custom spliterator classes needed for stream methods.
+ */
+
+ /**
+ * The initial gamma value for (unsplit) SplittableRandoms. Must
+ * be odd with at least 12 and no more than 52 bits set. Currently
+ * set to the golden ratio scaled to 64bits.
+ */
+ private static final long INITIAL_GAMMA = 0x9e3779b97f4a7c15L;
+
+ /**
+ * The least non-zero value returned by nextDouble(). This value
+ * is scaled by a random value of 53 bits to produce a result.
+ */
+ private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
+
+ /**
+ * The seed. Updated only via method nextSeed.
+ */
+ private long seed;
+
+ /**
+ * The step value.
+ */
+ private final long gamma;
+
+ /**
+ * Internal constructor used by all others except default constructor.
+ */
+ private SplittableRandom(long seed, long gamma) {
+ this.seed = seed;
+ this.gamma = gamma;
+ }
+
+ /**
+ * Computes MurmurHash3 64bit mix function.
+ */
+ private static long mix64(long z) {
+ z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
+ z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
+ return z ^ (z >>> 33);
+ }
+
+ /**
+ * Returns the 32 high bits of mix64(z) as int.
+ */
+ private static int mix32(long z) {
+ z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
+ return (int)(((z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L) >>> 32);
+ }
+
+ /**
+ * Returns the gamma value to use for a new split instance.
+ */
+ private static long nextGamma(long z) {
+ z = (z ^ (z >>> 30)) * 0xbf58476d1ce4e5b9L; // Stafford "Mix13"
+ z = (z ^ (z >>> 27)) * 0x94d049bb133111ebL;
+ z = (z ^ (z >>> 31)) | 1L; // force to be odd
+ int n = Long.bitCount(z); // ensure enough 0 and 1 bits
+ return (n < 12 || n > 52) ? z ^ 0xaaaaaaaaaaaaaaaaL : z;
+ }
+
+ /**
+ * Adds gamma to seed.
+ */
+ private long nextSeed() {
+ return seed += gamma;
+ }
+
+ /**
+ * The seed generator for default constructors.
+ */
+ private static final AtomicLong seeder = new AtomicLong(initialSeed());
+
+ private static long initialSeed() {
+ String pp = java.security.AccessController.doPrivileged(
+ new sun.security.action.GetPropertyAction(
+ "java.util.secureRandomSeed"));
+ if (pp != null && pp.equalsIgnoreCase("true")) {
+ byte[] seedBytes = java.security.SecureRandom.getSeed(8);
+ long s = (long)(seedBytes[0]) & 0xffL;
+ for (int i = 1; i < 8; ++i)
+ s = (s << 8) | ((long)(seedBytes[i]) & 0xffL);
+ return s;
+ }
+ int hh = 0; // hashed host address
+ try {
+ hh = InetAddress.getLocalHost().hashCode();
+ } catch (Exception ignore) {
+ }
+ return (mix64((((long)hh) << 32) ^ System.currentTimeMillis()) ^
+ mix64(System.nanoTime()));
+ }
+
+ // IllegalArgumentException messages
+ static final String BadBound = "bound must be positive";
+ static final String BadRange = "bound must be greater than origin";
+ static final String BadSize = "size must be non-negative";
+
+ /*
+ * Internal versions of nextX methods used by streams, as well as
+ * the public nextX(origin, bound) methods. These exist mainly to
+ * avoid the need for multiple versions of stream spliterators
+ * across the different exported forms of streams.
+ */
+
+ /**
+ * The form of nextLong used by LongStream Spliterators. If
+ * origin is greater than bound, acts as unbounded form of
+ * nextLong, else as bounded form.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final long internalNextLong(long origin, long bound) {
+ /*
+ * Four Cases:
+ *
+ * 1. If the arguments indicate unbounded form, act as
+ * nextLong().
+ *
+ * 2. If the range is an exact power of two, apply the
+ * associated bit mask.
+ *
+ * 3. If the range is positive, loop to avoid potential bias
+ * when the implicit nextLong() bound (2<sup>64</sup>) is not
+ * evenly divisible by the range. The loop rejects candidates
+ * computed from otherwise over-represented values. The
+ * expected number of iterations under an ideal generator
+ * varies from 1 to 2, depending on the bound. The loop itself
+ * takes an unlovable form. Because the first candidate is
+ * already available, we need a break-in-the-middle
+ * construction, which is concisely but cryptically performed
+ * within the while-condition of a body-less for loop.
+ *
+ * 4. Otherwise, the range cannot be represented as a positive
+ * long. The loop repeatedly generates unbounded longs until
+ * obtaining a candidate meeting constraints (with an expected
+ * number of iterations of less than two).
+ */
+
+ long r = mix64(nextSeed());
+ if (origin < bound) {
+ long n = bound - origin, m = n - 1;
+ if ((n & m) == 0L) // power of two
+ r = (r & m) + origin;
+ else if (n > 0L) { // reject over-represented candidates
+ for (long u = r >>> 1; // ensure nonnegative
+ u + m - (r = u % n) < 0L; // rejection check
+ u = mix64(nextSeed()) >>> 1) // retry
+ ;
+ r += origin;
+ }
+ else { // range not representable as long
+ while (r < origin || r >= bound)
+ r = mix64(nextSeed());
+ }
+ }
+ return r;
+ }
+
+ /**
+ * The form of nextInt used by IntStream Spliterators.
+ * Exactly the same as long version, except for types.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final int internalNextInt(int origin, int bound) {
+ int r = mix32(nextSeed());
+ if (origin < bound) {
+ int n = bound - origin, m = n - 1;
+ if ((n & m) == 0)
+ r = (r & m) + origin;
+ else if (n > 0) {
+ for (int u = r >>> 1;
+ u + m - (r = u % n) < 0;
+ u = mix32(nextSeed()) >>> 1)
+ ;
+ r += origin;
+ }
+ else {
+ while (r < origin || r >= bound)
+ r = mix32(nextSeed());
+ }
+ }
+ return r;
+ }
+
+ /**
+ * The form of nextDouble used by DoubleStream Spliterators.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final double internalNextDouble(double origin, double bound) {
+ double r = (nextLong() >>> 11) * DOUBLE_UNIT;
+ if (origin < bound) {
+ r = r * (bound - origin) + origin;
+ if (r >= bound) // correct for rounding
+ r = Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
+ }
+ return r;
+ }
+
+ /* ---------------- public methods ---------------- */
+
+ /**
+ * Creates a new SplittableRandom instance using the specified
+ * initial seed. SplittableRandom instances created with the same
+ * seed in the same program generate identical sequences of values.
+ *
+ * @param seed the initial seed
+ */
+ public SplittableRandom(long seed) {
+ this(seed, INITIAL_GAMMA);
+ }
+
+ /**
+ * Creates a new SplittableRandom instance that is likely to
+ * generate sequences of values that are statistically independent
+ * of those of any other instances in the current program; and
+ * may, and typically does, vary across program invocations.
+ */
+ public SplittableRandom() { // emulate seeder.split()
+ this.gamma = nextGamma(this.seed = seeder.addAndGet(INITIAL_GAMMA));
+ }
+
+ /**
+ * Constructs and returns a new SplittableRandom instance that
+ * shares no mutable state with this instance. However, with very
+ * high probability, the set of values collectively generated by
+ * the two objects has the same statistical properties as if the
+ * same quantity of values were generated by a single thread using
+ * a single SplittableRandom object. Either or both of the two
+ * objects may be further split using the {@code split()} method,
+ * and the same expected statistical properties apply to the
+ * entire set of generators constructed by such recursive
+ * splitting.
+ *
+ * @return the new SplittableRandom instance
+ */
+ public SplittableRandom split() {
+ long s = nextSeed();
+ return new SplittableRandom(s, nextGamma(s));
+ }
+
+ /**
+ * Returns a pseudorandom {@code int} value.
+ *
+ * @return a pseudorandom {@code int} value
+ */
+ public int nextInt() {
+ return mix32(nextSeed());
+ }
+
+ /**
+ * Returns a pseudorandom {@code int} value between zero (inclusive)
+ * and the specified bound (exclusive).
+ *
+ * @param bound the upper bound (exclusive). Must be positive.
+ * @return a pseudorandom {@code int} value between zero
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code bound} is not positive
+ */
+ public int nextInt(int bound) {
+ if (bound <= 0)
+ throw new IllegalArgumentException(BadBound);
+ // Specialize internalNextInt for origin 0
+ int r = mix32(nextSeed());
+ int m = bound - 1;
+ if ((bound & m) == 0) // power of two
+ r &= m;
+ else { // reject over-represented candidates
+ for (int u = r >>> 1;
+ u + m - (r = u % bound) < 0;
+ u = mix32(nextSeed()) >>> 1)
+ ;
+ }
+ return r;
+ }
+
+ /**
+ * Returns a pseudorandom {@code int} value between the specified
+ * origin (inclusive) and the specified bound (exclusive).
+ *
+ * @param origin the least value returned
+ * @param bound the upper bound (exclusive)
+ * @return a pseudorandom {@code int} value between the origin
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code origin} is greater than
+ * or equal to {@code bound}
+ */
+ public int nextInt(int origin, int bound) {
+ if (origin >= bound)
+ throw new IllegalArgumentException(BadRange);
+ return internalNextInt(origin, bound);
+ }
+
+ /**
+ * Returns a pseudorandom {@code long} value.
+ *
+ * @return a pseudorandom {@code long} value
+ */
+ public long nextLong() {
+ return mix64(nextSeed());
+ }
+
+ /**
+ * Returns a pseudorandom {@code long} value between zero (inclusive)
+ * and the specified bound (exclusive).
+ *
+ * @param bound the upper bound (exclusive). Must be positive.
+ * @return a pseudorandom {@code long} value between zero
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code bound} is not positive
+ */
+ public long nextLong(long bound) {
+ if (bound <= 0)
+ throw new IllegalArgumentException(BadBound);
+ // Specialize internalNextLong for origin 0
+ long r = mix64(nextSeed());
+ long m = bound - 1;
+ if ((bound & m) == 0L) // power of two
+ r &= m;
+ else { // reject over-represented candidates
+ for (long u = r >>> 1;
+ u + m - (r = u % bound) < 0L;
+ u = mix64(nextSeed()) >>> 1)
+ ;
+ }
+ return r;
+ }
+
+ /**
+ * Returns a pseudorandom {@code long} value between the specified
+ * origin (inclusive) and the specified bound (exclusive).
+ *
+ * @param origin the least value returned
+ * @param bound the upper bound (exclusive)
+ * @return a pseudorandom {@code long} value between the origin
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code origin} is greater than
+ * or equal to {@code bound}
+ */
+ public long nextLong(long origin, long bound) {
+ if (origin >= bound)
+ throw new IllegalArgumentException(BadRange);
+ return internalNextLong(origin, bound);
+ }
+
+ /**
+ * Returns a pseudorandom {@code double} value between zero
+ * (inclusive) and one (exclusive).
+ *
+ * @return a pseudorandom {@code double} value between zero
+ * (inclusive) and one (exclusive)
+ */
+ public double nextDouble() {
+ return (mix64(nextSeed()) >>> 11) * DOUBLE_UNIT;
+ }
+
+ /**
+ * Returns a pseudorandom {@code double} value between 0.0
+ * (inclusive) and the specified bound (exclusive).
+ *
+ * @param bound the upper bound (exclusive). Must be positive.
+ * @return a pseudorandom {@code double} value between zero
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code bound} is not positive
+ */
+ public double nextDouble(double bound) {
+ if (!(bound > 0.0))
+ throw new IllegalArgumentException(BadBound);
+ double result = (mix64(nextSeed()) >>> 11) * DOUBLE_UNIT * bound;
+ return (result < bound) ? result : // correct for rounding
+ Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
+ }
+
+ /**
+ * Returns a pseudorandom {@code double} value between the specified
+ * origin (inclusive) and bound (exclusive).
+ *
+ * @param origin the least value returned
+ * @param bound the upper bound (exclusive)
+ * @return a pseudorandom {@code double} value between the origin
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code origin} is greater than
+ * or equal to {@code bound}
+ */
+ public double nextDouble(double origin, double bound) {
+ if (!(origin < bound))
+ throw new IllegalArgumentException(BadRange);
+ return internalNextDouble(origin, bound);
+ }
+
+ /**
+ * Returns a pseudorandom {@code boolean} value.
+ *
+ * @return a pseudorandom {@code boolean} value
+ */
+ public boolean nextBoolean() {
+ return mix32(nextSeed()) < 0;
+ }
+
+ // stream methods, coded in a way intended to better isolate for
+ // maintenance purposes the small differences across forms.
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number
+ * of pseudorandom {@code int} values from this generator and/or
+ * one split from it.
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of pseudorandom {@code int} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ */
+ public IntStream ints(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, streamSize, Integer.MAX_VALUE, 0),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code int}
+ * values from this generator and/or one split from it.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * ints(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code int} values
+ */
+ public IntStream ints() {
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, Long.MAX_VALUE, Integer.MAX_VALUE, 0),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number
+ * of pseudorandom {@code int} values from this generator and/or one split
+ * from it; each value conforms to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code int} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero, or {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ */
+ public IntStream ints(long streamSize, int randomNumberOrigin,
+ int randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * int} values from this generator and/or one split from it; each value
+ * conforms to the given origin (inclusive) and bound (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * ints(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code int} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ */
+ public IntStream ints(int randomNumberOrigin, int randomNumberBound) {
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number
+ * of pseudorandom {@code long} values from this generator and/or
+ * one split from it.
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of pseudorandom {@code long} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ */
+ public LongStream longs(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, streamSize, Long.MAX_VALUE, 0L),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * long} values from this generator and/or one split from it.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * longs(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code long} values
+ */
+ public LongStream longs() {
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, Long.MAX_VALUE, Long.MAX_VALUE, 0L),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code long} values from this generator and/or one split
+ * from it; each value conforms to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code long} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero, or {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ */
+ public LongStream longs(long streamSize, long randomNumberOrigin,
+ long randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * long} values from this generator and/or one split from it; each value
+ * conforms to the given origin (inclusive) and bound (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * longs(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code long} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ */
+ public LongStream longs(long randomNumberOrigin, long randomNumberBound) {
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code double} values from this generator and/or one split
+ * from it; each value is between zero (inclusive) and one (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of {@code double} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ */
+ public DoubleStream doubles(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, streamSize, Double.MAX_VALUE, 0.0),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * double} values from this generator and/or one split from it; each value
+ * is between zero (inclusive) and one (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * doubles(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code double} values
+ */
+ public DoubleStream doubles() {
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, Long.MAX_VALUE, Double.MAX_VALUE, 0.0),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code double} values from this generator and/or one split
+ * from it; each value conforms to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code double} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ */
+ public DoubleStream doubles(long streamSize, double randomNumberOrigin,
+ double randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (!(randomNumberOrigin < randomNumberBound))
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * double} values from this generator and/or one split from it; each value
+ * conforms to the given origin (inclusive) and bound (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * doubles(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code double} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ */
+ public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) {
+ if (!(randomNumberOrigin < randomNumberBound))
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Spliterator for int streams. We multiplex the four int
+ * versions into one class by treating a bound less than origin as
+ * unbounded, and also by treating "infinite" as equivalent to
+ * Long.MAX_VALUE. For splits, it uses the standard divide-by-two
+ * approach. The long and double versions of this class are
+ * identical except for types.
+ */
+ static final class RandomIntsSpliterator implements Spliterator.OfInt {
+ final SplittableRandom rng;
+ long index;
+ final long fence;
+ final int origin;
+ final int bound;
+ RandomIntsSpliterator(SplittableRandom rng, long index, long fence,
+ int origin, int bound) {
+ this.rng = rng; this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomIntsSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomIntsSpliterator(rng.split(), i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(IntConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rng.internalNextInt(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(IntConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ SplittableRandom r = rng;
+ int o = origin, b = bound;
+ do {
+ consumer.accept(r.internalNextInt(o, b));
+ } while (++i < f);
+ }
+ }
+ }
+
+ /**
+ * Spliterator for long streams.
+ */
+ static final class RandomLongsSpliterator implements Spliterator.OfLong {
+ final SplittableRandom rng;
+ long index;
+ final long fence;
+ final long origin;
+ final long bound;
+ RandomLongsSpliterator(SplittableRandom rng, long index, long fence,
+ long origin, long bound) {
+ this.rng = rng; this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomLongsSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomLongsSpliterator(rng.split(), i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(LongConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rng.internalNextLong(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(LongConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ SplittableRandom r = rng;
+ long o = origin, b = bound;
+ do {
+ consumer.accept(r.internalNextLong(o, b));
+ } while (++i < f);
+ }
+ }
+
+ }
+
+ /**
+ * Spliterator for double streams.
+ */
+ static final class RandomDoublesSpliterator implements Spliterator.OfDouble {
+ final SplittableRandom rng;
+ long index;
+ final long fence;
+ final double origin;
+ final double bound;
+ RandomDoublesSpliterator(SplittableRandom rng, long index, long fence,
+ double origin, double bound) {
+ this.rng = rng; this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomDoublesSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomDoublesSpliterator(rng.split(), i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(DoubleConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rng.internalNextDouble(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(DoubleConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ SplittableRandom r = rng;
+ double o = origin, b = bound;
+ do {
+ consumer.accept(r.internalNextDouble(o, b));
+ } while (++i < f);
+ }
+ }
+ }
+
+}
--- a/jdk/src/share/classes/java/util/TimSort.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/TimSort.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009 Google Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -176,7 +177,7 @@
*/
int stackLen = (len < 120 ? 5 :
len < 1542 ? 10 :
- len < 119151 ? 19 : 40);
+ len < 119151 ? 24 : 40);
runBase = new int[stackLen];
runLen = new int[stackLen];
}
--- a/jdk/src/share/classes/java/util/TreeMap.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/TreeMap.java Fri Sep 06 14:20:58 2013 -0700
@@ -973,6 +973,27 @@
}
@Override
+ public boolean replace(K key, V oldValue, V newValue) {
+ Entry<K,V> p = getEntry(key);
+ if (p!=null && Objects.equals(oldValue, p.value)) {
+ p.value = newValue;
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public V replace(K key, V value) {
+ Entry<K,V> p = getEntry(key);
+ if (p!=null) {
+ V oldValue = p.value;
+ p.value = value;
+ return oldValue;
+ }
+ return null;
+ }
+
+ @Override
public void forEach(BiConsumer<? super K, ? super V> action) {
Objects.requireNonNull(action);
int expectedModCount = modCount;
--- a/jdk/src/share/classes/java/util/concurrent/ThreadLocalRandom.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/concurrent/ThreadLocalRandom.java Fri Sep 06 14:20:58 2013 -0700
@@ -37,11 +37,16 @@
import java.io.ObjectStreamField;
import java.util.Random;
+import java.util.Spliterator;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.DoubleConsumer;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
+import java.util.stream.StreamSupport;
/**
* A random number generator isolated to the current thread. Like the
@@ -64,6 +69,10 @@
* <p>This class also provides additional commonly used bounded random
* generation methods.
*
+ * <p>Instances of {@code ThreadLocalRandom} are not cryptographically
+ * secure. Consider instead using {@link java.security.SecureRandom}
+ * in security-sensitive applications.
+ *
* @since 1.7
* @author Doug Lea
*/
@@ -85,28 +94,26 @@
* application-level overhead and footprint of most concurrent
* programs.
*
+ * Even though this class subclasses java.util.Random, it uses the
+ * same basic algorithm as java.util.SplittableRandom. (See its
+ * internal documentation for explanations, which are not repeated
+ * here.) Because ThreadLocalRandoms are not splittable
+ * though, we use only a single 64bit gamma.
+ *
* Because this class is in a different package than class Thread,
* field access methods use Unsafe to bypass access control rules.
- * The base functionality of Random methods is conveniently
- * isolated in method next(bits), that just reads and writes the
- * Thread field rather than its own field. However, to conform to
- * the requirements of the Random superclass constructor, the
- * common static ThreadLocalRandom maintains an "initialized"
- * field for the sake of rejecting user calls to setSeed while
- * still allowing a call from constructor. Note that
- * serialization is completely unnecessary because there is only a
- * static singleton. But we generate a serial form containing
- * "rnd" and "initialized" fields to ensure compatibility across
- * versions.
+ * To conform to the requirements of the Random superclass
+ * constructor, the common static ThreadLocalRandom maintains an
+ * "initialized" field for the sake of rejecting user calls to
+ * setSeed while still allowing a call from constructor. Note
+ * that serialization is completely unnecessary because there is
+ * only a static singleton. But we generate a serial form
+ * containing "rnd" and "initialized" fields to ensure
+ * compatibility across versions.
*
- * Per-thread initialization is similar to that in the no-arg
- * Random constructor, but we avoid correlation among not only
- * initial seeds of those created in different threads, but also
- * those created using class Random itself; while at the same time
- * not changing any statistical properties. So we use the same
- * underlying multiplicative sequence, but start the sequence far
- * away from the base version, and then merge (xor) current time
- * and per-thread probe bits to generate initial values.
+ * Implementations of non-core methods are mostly the same as in
+ * SplittableRandom, that were in part derived from a previous
+ * version of this class.
*
* The nextLocalGaussian ThreadLocal supports the very rarely used
* nextGaussian method by providing a holder for the second of a
@@ -115,24 +122,51 @@
* but we provide identical statistical properties.
*/
- // same constants as Random, but must be redeclared because private
- private static final long multiplier = 0x5DEECE66DL;
- private static final long addend = 0xBL;
- private static final long mask = (1L << 48) - 1;
- private static final int PROBE_INCREMENT = 0x61c88647;
-
- /** Generates the basis for per-thread initial seed values */
- private static final AtomicLong seedGenerator =
- new AtomicLong(1269533684904616924L);
-
/** Generates per-thread initialization/probe field */
private static final AtomicInteger probeGenerator =
- new AtomicInteger(0xe80f8647);
+ new AtomicInteger();
+
+ /**
+ * The next seed for default constructors.
+ */
+ private static final AtomicLong seeder =
+ new AtomicLong(mix64(System.currentTimeMillis()) ^
+ mix64(System.nanoTime()));
+
+ /**
+ * The seed increment
+ */
+ private static final long GAMMA = 0x9e3779b97f4a7c15L;
+
+ /**
+ * The increment for generating probe values
+ */
+ private static final int PROBE_INCREMENT = 0x9e3779b9;
+
+ /**
+ * The increment of seeder per new instance
+ */
+ private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL;
+
+ // Constants from SplittableRandom
+ private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
+ private static final float FLOAT_UNIT = 1.0f / (1 << 24);
/** Rarely-used holder for the second of a pair of Gaussians */
private static final ThreadLocal<Double> nextLocalGaussian =
new ThreadLocal<Double>();
+ private static long mix64(long z) {
+ z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
+ z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
+ return z ^ (z >>> 33);
+ }
+
+ private static int mix32(long z) {
+ z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
+ return (int)(((z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L) >>> 32);
+ }
+
/**
* Field used only during singleton initialization.
* True when constructor completes.
@@ -155,16 +189,11 @@
* rely on (static) atomic generators to initialize the values.
*/
static final void localInit() {
- int p = probeGenerator.getAndAdd(PROBE_INCREMENT);
+ int p = probeGenerator.addAndGet(PROBE_INCREMENT);
int probe = (p == 0) ? 1 : p; // skip 0
- long current, next;
- do { // same sequence as j.u.Random but different initial value
- current = seedGenerator.get();
- next = current * 181783497276652981L;
- } while (!seedGenerator.compareAndSet(current, next));
- long r = next ^ ((long)probe << 32) ^ System.nanoTime();
+ long seed = mix64(seeder.getAndAdd(SEEDER_INCREMENT));
Thread t = Thread.currentThread();
- UNSAFE.putLong(t, SEED, r);
+ UNSAFE.putLong(t, SEED, seed);
UNSAFE.putInt(t, PROBE, probe);
}
@@ -191,124 +220,264 @@
throw new UnsupportedOperationException();
}
- protected int next(int bits) {
+ final long nextSeed() {
Thread t; long r; // read and update per-thread seed
- UNSAFE.putLong
- (t = Thread.currentThread(), SEED,
- r = (UNSAFE.getLong(t, SEED) * multiplier + addend) & mask);
- return (int) (r >>> (48-bits));
+ UNSAFE.putLong(t = Thread.currentThread(), SEED,
+ r = UNSAFE.getLong(t, SEED) + GAMMA);
+ return r;
+ }
+
+ // We must define this, but never use it.
+ protected int next(int bits) {
+ return (int)(mix64(nextSeed()) >>> (64 - bits));
+ }
+
+ // IllegalArgumentException messages
+ static final String BadBound = "bound must be positive";
+ static final String BadRange = "bound must be greater than origin";
+ static final String BadSize = "size must be non-negative";
+
+ /**
+ * The form of nextLong used by LongStream Spliterators. If
+ * origin is greater than bound, acts as unbounded form of
+ * nextLong, else as bounded form.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final long internalNextLong(long origin, long bound) {
+ long r = mix64(nextSeed());
+ if (origin < bound) {
+ long n = bound - origin, m = n - 1;
+ if ((n & m) == 0L) // power of two
+ r = (r & m) + origin;
+ else if (n > 0L) { // reject over-represented candidates
+ for (long u = r >>> 1; // ensure nonnegative
+ u + m - (r = u % n) < 0L; // rejection check
+ u = mix64(nextSeed()) >>> 1) // retry
+ ;
+ r += origin;
+ }
+ else { // range not representable as long
+ while (r < origin || r >= bound)
+ r = mix64(nextSeed());
+ }
+ }
+ return r;
}
/**
- * Returns a pseudorandom, uniformly distributed value between the
- * given least value (inclusive) and bound (exclusive).
+ * The form of nextInt used by IntStream Spliterators.
+ * Exactly the same as long version, except for types.
+ *
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final int internalNextInt(int origin, int bound) {
+ int r = mix32(nextSeed());
+ if (origin < bound) {
+ int n = bound - origin, m = n - 1;
+ if ((n & m) == 0)
+ r = (r & m) + origin;
+ else if (n > 0) {
+ for (int u = r >>> 1;
+ u + m - (r = u % n) < 0;
+ u = mix32(nextSeed()) >>> 1)
+ ;
+ r += origin;
+ }
+ else {
+ while (r < origin || r >= bound)
+ r = mix32(nextSeed());
+ }
+ }
+ return r;
+ }
+
+ /**
+ * The form of nextDouble used by DoubleStream Spliterators.
*
- * @param least the least value returned
- * @param bound the upper bound (exclusive)
- * @throws IllegalArgumentException if least greater than or equal
- * to bound
- * @return the next value
+ * @param origin the least value, unless greater than bound
+ * @param bound the upper bound (exclusive), must not equal origin
+ * @return a pseudorandom value
+ */
+ final double internalNextDouble(double origin, double bound) {
+ double r = (nextLong() >>> 11) * DOUBLE_UNIT;
+ if (origin < bound) {
+ r = r * (bound - origin) + origin;
+ if (r >= bound) // correct for rounding
+ r = Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
+ }
+ return r;
+ }
+
+ /**
+ * Returns a pseudorandom {@code int} value.
+ *
+ * @return a pseudorandom {@code int} value
*/
- public int nextInt(int least, int bound) {
- if (least >= bound)
- throw new IllegalArgumentException();
- return nextInt(bound - least) + least;
+ public int nextInt() {
+ return mix32(nextSeed());
+ }
+
+ /**
+ * Returns a pseudorandom {@code int} value between zero (inclusive)
+ * and the specified bound (exclusive).
+ *
+ * @param bound the upper bound (exclusive). Must be positive.
+ * @return a pseudorandom {@code int} value between zero
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code bound} is not positive
+ */
+ public int nextInt(int bound) {
+ if (bound <= 0)
+ throw new IllegalArgumentException(BadBound);
+ int r = mix32(nextSeed());
+ int m = bound - 1;
+ if ((bound & m) == 0) // power of two
+ r &= m;
+ else { // reject over-represented candidates
+ for (int u = r >>> 1;
+ u + m - (r = u % bound) < 0;
+ u = mix32(nextSeed()) >>> 1)
+ ;
+ }
+ return r;
}
/**
- * Returns a pseudorandom, uniformly distributed value
- * between 0 (inclusive) and the specified value (exclusive).
+ * Returns a pseudorandom {@code int} value between the specified
+ * origin (inclusive) and the specified bound (exclusive).
*
- * @param n the bound on the random number to be returned. Must be
- * positive.
- * @return the next value
- * @throws IllegalArgumentException if n is not positive
+ * @param origin the least value returned
+ * @param bound the upper bound (exclusive)
+ * @return a pseudorandom {@code int} value between the origin
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code origin} is greater than
+ * or equal to {@code bound}
*/
- public long nextLong(long n) {
- if (n <= 0)
- throw new IllegalArgumentException("n must be positive");
- // Divide n by two until small enough for nextInt. On each
- // iteration (at most 31 of them but usually much less),
- // randomly choose both whether to include high bit in result
- // (offset) and whether to continue with the lower vs upper
- // half (which makes a difference only if odd).
- long offset = 0;
- while (n >= Integer.MAX_VALUE) {
- int bits = next(2);
- long half = n >>> 1;
- long nextn = ((bits & 2) == 0) ? half : n - half;
- if ((bits & 1) == 0)
- offset += n - nextn;
- n = nextn;
- }
- return offset + nextInt((int) n);
+ public int nextInt(int origin, int bound) {
+ if (origin >= bound)
+ throw new IllegalArgumentException(BadRange);
+ return internalNextInt(origin, bound);
}
- @Override
- public IntStream ints() {
- return IntStream.generate(() -> current().nextInt());
+ /**
+ * Returns a pseudorandom {@code long} value.
+ *
+ * @return a pseudorandom {@code long} value
+ */
+ public long nextLong() {
+ return mix64(nextSeed());
}
- @Override
- public LongStream longs() {
- return LongStream.generate(() -> current().nextLong());
- }
-
- @Override
- public DoubleStream doubles() {
- return DoubleStream.generate(() -> current().nextDouble());
- }
-
- @Override
- public DoubleStream gaussians() {
- return DoubleStream.generate(() -> current().nextGaussian());
+ /**
+ * Returns a pseudorandom {@code long} value between zero (inclusive)
+ * and the specified bound (exclusive).
+ *
+ * @param bound the upper bound (exclusive). Must be positive.
+ * @return a pseudorandom {@code long} value between zero
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code bound} is not positive
+ */
+ public long nextLong(long bound) {
+ if (bound <= 0)
+ throw new IllegalArgumentException(BadBound);
+ long r = mix64(nextSeed());
+ long m = bound - 1;
+ if ((bound & m) == 0L) // power of two
+ r &= m;
+ else { // reject over-represented candidates
+ for (long u = r >>> 1;
+ u + m - (r = u % bound) < 0L;
+ u = mix64(nextSeed()) >>> 1)
+ ;
+ }
+ return r;
}
/**
- * Returns a pseudorandom, uniformly distributed value between the
- * given least value (inclusive) and bound (exclusive).
+ * Returns a pseudorandom {@code long} value between the specified
+ * origin (inclusive) and the specified bound (exclusive).
*
- * @param least the least value returned
+ * @param origin the least value returned
* @param bound the upper bound (exclusive)
- * @return the next value
- * @throws IllegalArgumentException if least greater than or equal
- * to bound
+ * @return a pseudorandom {@code long} value between the origin
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code origin} is greater than
+ * or equal to {@code bound}
*/
- public long nextLong(long least, long bound) {
- if (least >= bound)
- throw new IllegalArgumentException();
- return nextLong(bound - least) + least;
+ public long nextLong(long origin, long bound) {
+ if (origin >= bound)
+ throw new IllegalArgumentException(BadRange);
+ return internalNextLong(origin, bound);
+ }
+
+ /**
+ * Returns a pseudorandom {@code double} value between zero
+ * (inclusive) and one (exclusive).
+ *
+ * @return a pseudorandom {@code double} value between zero
+ * (inclusive) and one (exclusive)
+ */
+ public double nextDouble() {
+ return (mix64(nextSeed()) >>> 11) * DOUBLE_UNIT;
}
/**
- * Returns a pseudorandom, uniformly distributed {@code double} value
- * between 0 (inclusive) and the specified value (exclusive).
+ * Returns a pseudorandom {@code double} value between 0.0
+ * (inclusive) and the specified bound (exclusive).
*
- * @param n the bound on the random number to be returned. Must be
- * positive.
- * @return the next value
- * @throws IllegalArgumentException if n is not positive
+ * @param bound the upper bound (exclusive). Must be positive.
+ * @return a pseudorandom {@code double} value between zero
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code bound} is not positive
*/
- public double nextDouble(double n) {
- if (n <= 0)
- throw new IllegalArgumentException("n must be positive");
- return nextDouble() * n;
+ public double nextDouble(double bound) {
+ if (!(bound > 0.0))
+ throw new IllegalArgumentException(BadBound);
+ double result = (mix64(nextSeed()) >>> 11) * DOUBLE_UNIT * bound;
+ return (result < bound) ? result : // correct for rounding
+ Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
}
/**
- * Returns a pseudorandom, uniformly distributed value between the
- * given least value (inclusive) and bound (exclusive).
+ * Returns a pseudorandom {@code double} value between the specified
+ * origin (inclusive) and bound (exclusive).
*
- * @param least the least value returned
+ * @param origin the least value returned
* @param bound the upper bound (exclusive)
- * @return the next value
- * @throws IllegalArgumentException if least greater than or equal
- * to bound
+ * @return a pseudorandom {@code double} value between the origin
+ * (inclusive) and the bound (exclusive)
+ * @throws IllegalArgumentException if {@code origin} is greater than
+ * or equal to {@code bound}
*/
- public double nextDouble(double least, double bound) {
- if (least >= bound)
- throw new IllegalArgumentException();
- return nextDouble() * (bound - least) + least;
+ public double nextDouble(double origin, double bound) {
+ if (!(origin < bound))
+ throw new IllegalArgumentException(BadRange);
+ return internalNextDouble(origin, bound);
+ }
+
+ /**
+ * Returns a pseudorandom {@code boolean} value.
+ *
+ * @return a pseudorandom {@code boolean} value
+ */
+ public boolean nextBoolean() {
+ return mix32(nextSeed()) < 0;
+ }
+
+ /**
+ * Returns a pseudorandom {@code float} value between zero
+ * (inclusive) and one (exclusive).
+ *
+ * @return a pseudorandom {@code float} value between zero
+ * (inclusive) and one (exclusive)
+ */
+ public float nextFloat() {
+ return (mix32(nextSeed()) >>> 8) * FLOAT_UNIT;
}
public double nextGaussian() {
@@ -329,6 +498,445 @@
return v1 * multiplier;
}
+ // stream methods, coded in a way intended to better isolate for
+ // maintenance purposes the small differences across forms.
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code int} values.
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of pseudorandom {@code int} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @since 1.8
+ */
+ public IntStream ints(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (0L, streamSize, Integer.MAX_VALUE, 0),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code int}
+ * values.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * ints(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code int} values
+ * @since 1.8
+ */
+ public IntStream ints() {
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (0L, Long.MAX_VALUE, Integer.MAX_VALUE, 0),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number
+ * of pseudorandom {@code int} values, each conforming to the given
+ * origin (inclusive) and bound (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code int} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero, or {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public IntStream ints(long streamSize, int randomNumberOrigin,
+ int randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * int} values, each conforming to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * ints(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code int} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public IntStream ints(int randomNumberOrigin, int randomNumberBound) {
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.intStream
+ (new RandomIntsSpliterator
+ (0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code long} values.
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of pseudorandom {@code long} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @since 1.8
+ */
+ public LongStream longs(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (0L, streamSize, Long.MAX_VALUE, 0L),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code long}
+ * values.
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * longs(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code long} values
+ * @since 1.8
+ */
+ public LongStream longs() {
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (0L, Long.MAX_VALUE, Long.MAX_VALUE, 0L),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code long}, each conforming to the given origin
+ * (inclusive) and bound (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code long} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero, or {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public LongStream longs(long streamSize, long randomNumberOrigin,
+ long randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * long} values, each conforming to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * longs(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code long} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public LongStream longs(long randomNumberOrigin, long randomNumberBound) {
+ if (randomNumberOrigin >= randomNumberBound)
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.longStream
+ (new RandomLongsSpliterator
+ (0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code double} values, each between zero
+ * (inclusive) and one (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @return a stream of {@code double} values
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @since 1.8
+ */
+ public DoubleStream doubles(long streamSize) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (0L, streamSize, Double.MAX_VALUE, 0.0),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * double} values, each between zero (inclusive) and one
+ * (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * doubles(Long.MAX_VALUE)}.
+ *
+ * @return a stream of pseudorandom {@code double} values
+ * @since 1.8
+ */
+ public DoubleStream doubles() {
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (0L, Long.MAX_VALUE, Double.MAX_VALUE, 0.0),
+ false);
+ }
+
+ /**
+ * Returns a stream producing the given {@code streamSize} number of
+ * pseudorandom {@code double} values, each conforming to the given origin
+ * (inclusive) and bound (exclusive).
+ *
+ * @param streamSize the number of values to generate
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code double} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code streamSize} is
+ * less than zero
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public DoubleStream doubles(long streamSize, double randomNumberOrigin,
+ double randomNumberBound) {
+ if (streamSize < 0L)
+ throw new IllegalArgumentException(BadSize);
+ if (!(randomNumberOrigin < randomNumberBound))
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (0L, streamSize, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Returns an effectively unlimited stream of pseudorandom {@code
+ * double} values, each conforming to the given origin (inclusive) and bound
+ * (exclusive).
+ *
+ * @implNote This method is implemented to be equivalent to {@code
+ * doubles(Long.MAX_VALUE, randomNumberOrigin, randomNumberBound)}.
+ *
+ * @param randomNumberOrigin the origin (inclusive) of each random value
+ * @param randomNumberBound the bound (exclusive) of each random value
+ * @return a stream of pseudorandom {@code double} values,
+ * each with the given origin (inclusive) and bound (exclusive)
+ * @throws IllegalArgumentException if {@code randomNumberOrigin}
+ * is greater than or equal to {@code randomNumberBound}
+ * @since 1.8
+ */
+ public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) {
+ if (!(randomNumberOrigin < randomNumberBound))
+ throw new IllegalArgumentException(BadRange);
+ return StreamSupport.doubleStream
+ (new RandomDoublesSpliterator
+ (0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
+ false);
+ }
+
+ /**
+ * Spliterator for int streams. We multiplex the four int
+ * versions into one class by treating a bound less than origin as
+ * unbounded, and also by treating "infinite" as equivalent to
+ * Long.MAX_VALUE. For splits, it uses the standard divide-by-two
+ * approach. The long and double versions of this class are
+ * identical except for types.
+ */
+ static final class RandomIntsSpliterator implements Spliterator.OfInt {
+ long index;
+ final long fence;
+ final int origin;
+ final int bound;
+ RandomIntsSpliterator(long index, long fence,
+ int origin, int bound) {
+ this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomIntsSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomIntsSpliterator(i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(IntConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(ThreadLocalRandom.current().internalNextInt(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(IntConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ int o = origin, b = bound;
+ ThreadLocalRandom rng = ThreadLocalRandom.current();
+ do {
+ consumer.accept(rng.internalNextInt(o, b));
+ } while (++i < f);
+ }
+ }
+ }
+
+ /**
+ * Spliterator for long streams.
+ */
+ static final class RandomLongsSpliterator implements Spliterator.OfLong {
+ long index;
+ final long fence;
+ final long origin;
+ final long bound;
+ RandomLongsSpliterator(long index, long fence,
+ long origin, long bound) {
+ this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomLongsSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomLongsSpliterator(i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(LongConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(ThreadLocalRandom.current().internalNextLong(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(LongConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ long o = origin, b = bound;
+ ThreadLocalRandom rng = ThreadLocalRandom.current();
+ do {
+ consumer.accept(rng.internalNextLong(o, b));
+ } while (++i < f);
+ }
+ }
+
+ }
+
+ /**
+ * Spliterator for double streams.
+ */
+ static final class RandomDoublesSpliterator implements Spliterator.OfDouble {
+ long index;
+ final long fence;
+ final double origin;
+ final double bound;
+ RandomDoublesSpliterator(long index, long fence,
+ double origin, double bound) {
+ this.index = index; this.fence = fence;
+ this.origin = origin; this.bound = bound;
+ }
+
+ public RandomDoublesSpliterator trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomDoublesSpliterator(i, index = m, origin, bound);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ public boolean tryAdvance(DoubleConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(ThreadLocalRandom.current().internalNextDouble(origin, bound));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+
+ public void forEachRemaining(DoubleConsumer consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ index = f;
+ double o = origin, b = bound;
+ ThreadLocalRandom rng = ThreadLocalRandom.current();
+ do {
+ consumer.accept(rng.internalNextDouble(o, b));
+ } while (++i < f);
+ }
+ }
+ }
+
+
// Within-package utilities
/*
@@ -401,23 +1009,26 @@
*/
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("rnd", long.class),
- new ObjectStreamField("initialized", boolean.class)
+ new ObjectStreamField("initialized", boolean.class),
};
/**
* Saves the {@code ThreadLocalRandom} to a stream (that is, serializes it).
+ * @param s the stream
+ * @throws java.io.IOException if an I/O error occurs
*/
- private void writeObject(java.io.ObjectOutputStream out)
+ private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
- java.io.ObjectOutputStream.PutField fields = out.putFields();
+ java.io.ObjectOutputStream.PutField fields = s.putFields();
fields.put("rnd", UNSAFE.getLong(Thread.currentThread(), SEED));
fields.put("initialized", true);
- out.writeFields();
+ s.writeFields();
}
/**
* Returns the {@link #current() current} thread's {@code ThreadLocalRandom}.
+ * @return the {@link #current() current} thread's {@code ThreadLocalRandom}
*/
private Object readResolve() {
return current();
--- a/jdk/src/share/classes/java/util/concurrent/locks/StampedLock.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/concurrent/locks/StampedLock.java Fri Sep 06 14:20:58 2013 -0700
@@ -226,7 +226,11 @@
* incoming reader arrives while read lock is held but there is a
* queued writer, this incoming reader is queued. (This rule is
* responsible for some of the complexity of method acquireRead,
- * but without it, the lock becomes highly unfair.)
+ * but without it, the lock becomes highly unfair.) Method release
+ * does not (and sometimes cannot) itself wake up cowaiters. This
+ * is done by the primary thread, but helped by any other threads
+ * with nothing better to do in methods acquireRead and
+ * acquireWrite.
*
* These rules apply to threads actually queued. All tryLock forms
* opportunistically try to acquire locks regardless of preference
@@ -267,11 +271,14 @@
/** Number of processors, for spin control */
private static final int NCPU = Runtime.getRuntime().availableProcessors();
- /** Maximum number of retries before blocking on acquisition */
+ /** Maximum number of retries before enqueuing on acquisition */
private static final int SPINS = (NCPU > 1) ? 1 << 6 : 0;
+ /** Maximum number of retries before blocking at head on acquisition */
+ private static final int HEAD_SPINS = (NCPU > 1) ? 1 << 10 : 0;
+
/** Maximum number of retries before re-blocking */
- private static final int MAX_HEAD_SPINS = (NCPU > 1) ? 1 << 12 : 0;
+ private static final int MAX_HEAD_SPINS = (NCPU > 1) ? 1 << 16 : 0;
/** The period for yielding when waiting for overflow spinlock */
private static final int OVERFLOW_YIELD_RATE = 7; // must be power 2 - 1
@@ -415,8 +422,8 @@
* @return a stamp that can be used to unlock or convert mode
*/
public long readLock() {
- long s, next; // bypass acquireRead on fully unlocked case only
- return ((((s = state) & ABITS) == 0L &&
+ long s = state, next; // bypass acquireRead on common uncontended case
+ return ((whead == wtail && (s & ABITS) < RFULL &&
U.compareAndSwapLong(this, STATE, s, next = s + RUNIT)) ?
next : acquireRead(false, 0L));
}
@@ -1012,17 +1019,8 @@
if (t.status <= 0)
q = t;
}
- if (q != null) {
- for (WNode r = q;;) { // release co-waiters too
- if ((w = r.thread) != null) {
- r.thread = null;
- U.unpark(w);
- }
- if ((r = q.cowait) == null)
- break;
- U.compareAndSwapObject(q, WCOWAIT, r, r.cowait);
- }
- }
+ if (q != null && (w = q.thread) != null)
+ U.unpark(w);
}
}
@@ -1038,22 +1036,22 @@
private long acquireWrite(boolean interruptible, long deadline) {
WNode node = null, p;
for (int spins = -1;;) { // spin while enqueuing
- long s, ns;
- if (((s = state) & ABITS) == 0L) {
+ long m, s, ns;
+ if ((m = (s = state) & ABITS) == 0L) {
if (U.compareAndSwapLong(this, STATE, s, ns = s + WBIT))
return ns;
}
+ else if (spins < 0)
+ spins = (m == WBIT && wtail == whead) ? SPINS : 0;
else if (spins > 0) {
if (LockSupport.nextSecondarySeed() >= 0)
--spins;
}
else if ((p = wtail) == null) { // initialize queue
- WNode h = new WNode(WMODE, null);
- if (U.compareAndSwapObject(this, WHEAD, null, h))
- wtail = h;
+ WNode hd = new WNode(WMODE, null);
+ if (U.compareAndSwapObject(this, WHEAD, null, hd))
+ wtail = hd;
}
- else if (spins < 0)
- spins = (p == whead) ? SPINS : 0;
else if (node == null)
node = new WNode(WMODE, p);
else if (node.prev != p)
@@ -1064,14 +1062,18 @@
}
}
- for (int spins = SPINS;;) {
- WNode np, pp; int ps; long s, ns; Thread w;
- while ((np = node.prev) != p && np != null)
- (p = np).next = node; // stale
- if (whead == p) {
+ for (int spins = -1;;) {
+ WNode h, np, pp; int ps;
+ if ((h = whead) == p) {
+ if (spins < 0)
+ spins = HEAD_SPINS;
+ else if (spins < MAX_HEAD_SPINS)
+ spins <<= 1;
for (int k = spins;;) { // spin at head
+ long s, ns;
if (((s = state) & ABITS) == 0L) {
- if (U.compareAndSwapLong(this, STATE, s, ns = s+WBIT)) {
+ if (U.compareAndSwapLong(this, STATE, s,
+ ns = s + WBIT)) {
whead = node;
node.prev = null;
return ns;
@@ -1081,33 +1083,45 @@
--k <= 0)
break;
}
- if (spins < MAX_HEAD_SPINS)
- spins <<= 1;
}
- if ((ps = p.status) == 0)
- U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
- else if (ps == CANCELLED) {
- if ((pp = p.prev) != null) {
- node.prev = pp;
- pp.next = node;
+ else if (h != null) { // help release stale waiters
+ WNode c; Thread w;
+ while ((c = h.cowait) != null) {
+ if (U.compareAndSwapObject(h, WCOWAIT, c, c.cowait) &&
+ (w = c.thread) != null)
+ U.unpark(w);
}
}
- else {
- long time; // 0 argument to park means no timeout
- if (deadline == 0L)
- time = 0L;
- else if ((time = deadline - System.nanoTime()) <= 0L)
- return cancelWaiter(node, node, false);
- Thread wt = Thread.currentThread();
- U.putObject(wt, PARKBLOCKER, this); // emulate LockSupport.park
- node.thread = wt;
- if (node.prev == p && p.status == WAITING && // recheck
- (p != whead || (state & ABITS) != 0L))
- U.park(false, time);
- node.thread = null;
- U.putObject(wt, PARKBLOCKER, null);
- if (interruptible && Thread.interrupted())
- return cancelWaiter(node, node, true);
+ if (whead == h) {
+ if ((np = node.prev) != p) {
+ if (np != null)
+ (p = np).next = node; // stale
+ }
+ else if ((ps = p.status) == 0)
+ U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
+ else if (ps == CANCELLED) {
+ if ((pp = p.prev) != null) {
+ node.prev = pp;
+ pp.next = node;
+ }
+ }
+ else {
+ long time; // 0 argument to park means no timeout
+ if (deadline == 0L)
+ time = 0L;
+ else if ((time = deadline - System.nanoTime()) <= 0L)
+ return cancelWaiter(node, node, false);
+ Thread wt = Thread.currentThread();
+ U.putObject(wt, PARKBLOCKER, this);
+ node.thread = wt;
+ if (p.status < 0 && (p != h || (state & ABITS) != 0L) &&
+ whead == h && node.prev == p)
+ U.park(false, time); // emulate LockSupport.park
+ node.thread = null;
+ U.putObject(wt, PARKBLOCKER, null);
+ if (interruptible && Thread.interrupted())
+ return cancelWaiter(node, node, true);
+ }
}
}
}
@@ -1122,138 +1136,159 @@
* @return next state, or INTERRUPTED
*/
private long acquireRead(boolean interruptible, long deadline) {
- WNode node = null, group = null, p;
+ WNode node = null, p;
for (int spins = -1;;) {
- for (;;) {
- long s, m, ns; WNode h, q; Thread w; // anti-barging guard
- if (group == null && (h = whead) != null &&
- (q = h.next) != null && q.mode != RMODE)
- break;
- if ((m = (s = state) & ABITS) < RFULL ?
- U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
- (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L)) {
- if (group != null) { // help release others
- for (WNode r = group;;) {
- if ((w = r.thread) != null) {
- r.thread = null;
- U.unpark(w);
+ WNode h;
+ if ((h = whead) == (p = wtail)) {
+ for (long m, s, ns;;) {
+ if ((m = (s = state) & ABITS) < RFULL ?
+ U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
+ (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L))
+ return ns;
+ else if (m >= WBIT) {
+ if (spins > 0) {
+ if (LockSupport.nextSecondarySeed() >= 0)
+ --spins;
+ }
+ else {
+ if (spins == 0) {
+ WNode nh = whead, np = wtail;
+ if ((nh == h && np == p) || (h = nh) != (p = np))
+ break;
}
- if ((r = group.cowait) == null)
- break;
- U.compareAndSwapObject(group, WCOWAIT, r, r.cowait);
+ spins = SPINS;
}
}
- return ns;
}
- if (m >= WBIT)
- break;
+ }
+ if (p == null) { // initialize queue
+ WNode hd = new WNode(WMODE, null);
+ if (U.compareAndSwapObject(this, WHEAD, null, hd))
+ wtail = hd;
}
- if (spins > 0) {
- if (LockSupport.nextSecondarySeed() >= 0)
- --spins;
- }
- else if ((p = wtail) == null) {
- WNode h = new WNode(WMODE, null);
- if (U.compareAndSwapObject(this, WHEAD, null, h))
- wtail = h;
+ else if (node == null)
+ node = new WNode(RMODE, p);
+ else if (h == p || p.mode != RMODE) {
+ if (node.prev != p)
+ node.prev = p;
+ else if (U.compareAndSwapObject(this, WTAIL, p, node)) {
+ p.next = node;
+ break;
+ }
}
- else if (spins < 0)
- spins = (p == whead) ? SPINS : 0;
- else if (node == null)
- node = new WNode(WMODE, p);
- else if (node.prev != p)
- node.prev = p;
- else if (p.mode == RMODE && p != whead) {
- WNode pp = p.prev; // become co-waiter with group p
- if (pp != null && p == wtail &&
- U.compareAndSwapObject(p, WCOWAIT,
- node.cowait = p.cowait, node)) {
- node.thread = Thread.currentThread();
- for (long time;;) {
+ else if (!U.compareAndSwapObject(p, WCOWAIT,
+ node.cowait = p.cowait, node))
+ node.cowait = null;
+ else {
+ for (;;) {
+ WNode pp, c; Thread w;
+ if ((h = whead) != null && (c = h.cowait) != null &&
+ U.compareAndSwapObject(h, WCOWAIT, c, c.cowait) &&
+ (w = c.thread) != null) // help release
+ U.unpark(w);
+ if (h == (pp = p.prev) || h == p || pp == null) {
+ long m, s, ns;
+ do {
+ if ((m = (s = state) & ABITS) < RFULL ?
+ U.compareAndSwapLong(this, STATE, s,
+ ns = s + RUNIT) :
+ (m < WBIT &&
+ (ns = tryIncReaderOverflow(s)) != 0L))
+ return ns;
+ } while (m < WBIT);
+ }
+ if (whead == h && p.prev == pp) {
+ long time;
+ if (pp == null || h == p || p.status > 0) {
+ node = null; // throw away
+ break;
+ }
if (deadline == 0L)
time = 0L;
else if ((time = deadline - System.nanoTime()) <= 0L)
return cancelWaiter(node, p, false);
- if (node.thread == null)
- break;
- if (p.prev != pp || p.status == CANCELLED ||
- p == whead || p.prev != pp) {
- node.thread = null;
- break;
- }
Thread wt = Thread.currentThread();
U.putObject(wt, PARKBLOCKER, this);
- if (node.thread == null) // must recheck
- break;
- U.park(false, time);
+ node.thread = wt;
+ if ((h != pp || (state & ABITS) == WBIT) &&
+ whead == h && p.prev == pp)
+ U.park(false, time);
+ node.thread = null;
U.putObject(wt, PARKBLOCKER, null);
if (interruptible && Thread.interrupted())
return cancelWaiter(node, p, true);
}
- group = p;
}
- node = null; // throw away
- }
- else if (U.compareAndSwapObject(this, WTAIL, p, node)) {
- p.next = node;
- break;
}
}
- for (int spins = SPINS;;) {
- WNode np, pp, r; int ps; long m, s, ns; Thread w;
- while ((np = node.prev) != p && np != null)
- (p = np).next = node;
- if (whead == p) {
- for (int k = spins;;) {
- if ((m = (s = state) & ABITS) != WBIT) {
- if (m < RFULL ?
- U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT):
- (ns = tryIncReaderOverflow(s)) != 0L) {
- whead = node;
- node.prev = null;
- while ((r = node.cowait) != null) {
- if (U.compareAndSwapObject(node, WCOWAIT,
- r, r.cowait) &&
- (w = r.thread) != null) {
- r.thread = null;
- U.unpark(w); // release co-waiter
- }
- }
- return ns;
+ for (int spins = -1;;) {
+ WNode h, np, pp; int ps;
+ if ((h = whead) == p) {
+ if (spins < 0)
+ spins = HEAD_SPINS;
+ else if (spins < MAX_HEAD_SPINS)
+ spins <<= 1;
+ for (int k = spins;;) { // spin at head
+ long m, s, ns;
+ if ((m = (s = state) & ABITS) < RFULL ?
+ U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
+ (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L)) {
+ WNode c; Thread w;
+ whead = node;
+ node.prev = null;
+ while ((c = node.cowait) != null) {
+ if (U.compareAndSwapObject(node, WCOWAIT,
+ c, c.cowait) &&
+ (w = c.thread) != null)
+ U.unpark(w);
}
+ return ns;
}
- else if (LockSupport.nextSecondarySeed() >= 0 &&
- --k <= 0)
+ else if (m >= WBIT &&
+ LockSupport.nextSecondarySeed() >= 0 && --k <= 0)
break;
}
- if (spins < MAX_HEAD_SPINS)
- spins <<= 1;
}
- if ((ps = p.status) == 0)
- U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
- else if (ps == CANCELLED) {
- if ((pp = p.prev) != null) {
- node.prev = pp;
- pp.next = node;
+ else if (h != null) {
+ WNode c; Thread w;
+ while ((c = h.cowait) != null) {
+ if (U.compareAndSwapObject(h, WCOWAIT, c, c.cowait) &&
+ (w = c.thread) != null)
+ U.unpark(w);
}
}
- else {
- long time;
- if (deadline == 0L)
- time = 0L;
- else if ((time = deadline - System.nanoTime()) <= 0L)
- return cancelWaiter(node, node, false);
- Thread wt = Thread.currentThread();
- U.putObject(wt, PARKBLOCKER, this);
- node.thread = wt;
- if (node.prev == p && p.status == WAITING &&
- (p != whead || (state & ABITS) != WBIT))
- U.park(false, time);
- node.thread = null;
- U.putObject(wt, PARKBLOCKER, null);
- if (interruptible && Thread.interrupted())
- return cancelWaiter(node, node, true);
+ if (whead == h) {
+ if ((np = node.prev) != p) {
+ if (np != null)
+ (p = np).next = node; // stale
+ }
+ else if ((ps = p.status) == 0)
+ U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
+ else if (ps == CANCELLED) {
+ if ((pp = p.prev) != null) {
+ node.prev = pp;
+ pp.next = node;
+ }
+ }
+ else {
+ long time;
+ if (deadline == 0L)
+ time = 0L;
+ else if ((time = deadline - System.nanoTime()) <= 0L)
+ return cancelWaiter(node, node, false);
+ Thread wt = Thread.currentThread();
+ U.putObject(wt, PARKBLOCKER, this);
+ node.thread = wt;
+ if (p.status < 0 &&
+ (p != h || (state & ABITS) == WBIT) &&
+ whead == h && node.prev == p)
+ U.park(false, time);
+ node.thread = null;
+ U.putObject(wt, PARKBLOCKER, null);
+ if (interruptible && Thread.interrupted())
+ return cancelWaiter(node, node, true);
+ }
}
}
}
@@ -1278,22 +1313,19 @@
if (node != null && group != null) {
Thread w;
node.status = CANCELLED;
- node.thread = null;
// unsplice cancelled nodes from group
for (WNode p = group, q; (q = p.cowait) != null;) {
- if (q.status == CANCELLED)
- U.compareAndSwapObject(p, WNEXT, q, q.next);
+ if (q.status == CANCELLED) {
+ U.compareAndSwapObject(p, WCOWAIT, q, q.cowait);
+ p = group; // restart
+ }
else
p = q;
}
if (group == node) {
- WNode r; // detach and wake up uncancelled co-waiters
- while ((r = node.cowait) != null) {
- if (U.compareAndSwapObject(node, WCOWAIT, r, r.cowait) &&
- (w = r.thread) != null) {
- r.thread = null;
- U.unpark(w);
- }
+ for (WNode r = group.cowait; r != null; r = r.cowait) {
+ if ((w = r.thread) != null)
+ U.unpark(w); // wake up uncancelled co-waiters
}
for (WNode pred = node.prev; pred != null; ) { // unsplice
WNode succ, pp; // find valid successor
--- a/jdk/src/share/classes/java/util/jar/JarVerifier.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/jar/JarVerifier.java Fri Sep 06 14:20:58 2013 -0700
@@ -32,6 +32,7 @@
import java.security.cert.CertificateException;
import java.util.zip.ZipEntry;
+import sun.misc.JarIndex;
import sun.security.util.ManifestDigester;
import sun.security.util.ManifestEntryVerifier;
import sun.security.util.SignatureFileVerifier;
@@ -139,7 +140,8 @@
return;
}
- if (uname.equals(JarFile.MANIFEST_NAME)) {
+ if (uname.equals(JarFile.MANIFEST_NAME) ||
+ uname.equals(JarIndex.INDEX_NAME)) {
return;
}
--- a/jdk/src/share/classes/java/util/logging/Logger.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/logging/Logger.java Fri Sep 06 14:20:58 2013 -0700
@@ -457,13 +457,15 @@
* of the subsystem, such as java.net
* or javax.swing
* @param resourceBundleName name of ResourceBundle to be used for localizing
- * messages for this logger. May be <CODE>null</CODE> if none of
- * the messages require localization.
+ * messages for this logger. May be {@code null}
+ * if none of the messages require localization.
* @return a suitable Logger
* @throws MissingResourceException if the resourceBundleName is non-null and
* no corresponding resource can be found.
* @throws IllegalArgumentException if the Logger already exists and uses
- * a different resource bundle name.
+ * a different resource bundle name; or if
+ * {@code resourceBundleName} is {@code null} but the named
+ * logger has a resource bundle set.
* @throws NullPointerException if the name is null.
*/
@@ -1731,10 +1733,6 @@
// Synchronized to prevent races in setting the fields.
private synchronized void setupResourceInfo(String name,
Class<?> callersClass) {
- if (name == null) {
- return;
- }
-
if (resourceBundleName != null) {
// this Logger already has a ResourceBundle
@@ -1748,6 +1746,10 @@
resourceBundleName + " != " + name);
}
+ if (name == null) {
+ return;
+ }
+
setCallersClassLoaderRef(callersClass);
if (findResourceBundle(name, true) == null) {
// We've failed to find an expected ResourceBundle.
--- a/jdk/src/share/classes/java/util/regex/Pattern.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/regex/Pattern.java Fri Sep 06 14:20:58 2013 -0700
@@ -219,7 +219,7 @@
*
* <tr><th> </th></tr>
* <tr align="left"><th colspan="2" id="unicode">Classes for Unicode scripts, blocks, categories and binary properties</th></tr>
- * * <tr><td valign="top" headers="construct unicode">{@code \p{IsLatin}}</td>
+ * <tr><td valign="top" headers="construct unicode">{@code \p{IsLatin}}</td>
* <td headers="matches">A Latin script character (<a href="#usc">script</a>)</td></tr>
* <tr><td valign="top" headers="construct unicode">{@code \p{InGreek}}</td>
* <td headers="matches">A character in the Greek block (<a href="#ubc">block</a>)</td></tr>
@@ -4456,16 +4456,16 @@
groups[groupIndex+1] = i;
groups[groupIndex] = i - k;
}
- i = i - k;
return true;
}
// backing off
+ i = i - k;
if (capture) {
groups[groupIndex+1] = i;
groups[groupIndex] = i - k;
}
- i = i - k;
j--;
+
}
break;
}
@@ -4883,7 +4883,6 @@
int k = matcher.groups[groupIndex+1];
int groupSize = k - j;
-
// If the referenced group didn't match, neither can this
if (j < 0)
return false;
@@ -4893,7 +4892,6 @@
matcher.hitEnd = true;
return false;
}
-
// Check each new char to make sure it matches what the group
// referenced matched last time around
for (int index=0; index<groupSize; index++)
--- a/jdk/src/share/classes/java/util/stream/Collectors.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/Collectors.java Fri Sep 06 14:20:58 2013 -0700
@@ -137,6 +137,11 @@
return (u,v) -> { throw new IllegalStateException(String.format("Duplicate key %s", u)); };
}
+ @SuppressWarnings("unchecked")
+ private static <I, R> Function<I, R> castingIdentity() {
+ return i -> (R) i;
+ }
+
/**
* Simple implementation class for {@code Collector}.
*
@@ -166,7 +171,7 @@
BiConsumer<A, T> accumulator,
BinaryOperator<A> combiner,
Set<Characteristics> characteristics) {
- this(supplier, accumulator, combiner, i -> (R) i, characteristics);
+ this(supplier, accumulator, combiner, castingIdentity(), characteristics);
}
@Override
@@ -209,7 +214,7 @@
*/
public static <T, C extends Collection<T>>
Collector<T, ?, C> toCollection(Supplier<C> collectionFactory) {
- return new CollectorImpl<>(collectionFactory, Collection::add,
+ return new CollectorImpl<>(collectionFactory, Collection<T>::add,
(r1, r2) -> { r1.addAll(r2); return r1; },
CH_ID);
}
@@ -1046,30 +1051,23 @@
public static <T, D, A>
Collector<T, ?, Map<Boolean, D>> partitioningBy(Predicate<? super T> predicate,
Collector<? super T, A, D> downstream) {
- @SuppressWarnings("unchecked")
- BiConsumer<D, ? super T> downstreamAccumulator = (BiConsumer<D, ? super T>) downstream.accumulator();
- BiConsumer<Map<Boolean, A>, T> accumulator = (result, t) -> {
- Partition<D> asPartition = ((Partition<D>) result);
- downstreamAccumulator.accept(predicate.test(t) ? asPartition.forTrue : asPartition.forFalse, t);
- };
+ BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
+ BiConsumer<Partition<A>, T> accumulator = (result, t) ->
+ downstreamAccumulator.accept(predicate.test(t) ? result.forTrue : result.forFalse, t);
BinaryOperator<A> op = downstream.combiner();
- BinaryOperator<Map<Boolean, A>> merger = (m1, m2) -> {
- Partition<A> left = (Partition<A>) m1;
- Partition<A> right = (Partition<A>) m2;
- return new Partition<>(op.apply(left.forTrue, right.forTrue),
- op.apply(left.forFalse, right.forFalse));
- };
- Supplier<Map<Boolean, A>> supplier = () -> new Partition<>(downstream.supplier().get(),
- downstream.supplier().get());
+ BinaryOperator<Partition<A>> merger = (left, right) ->
+ new Partition<>(op.apply(left.forTrue, right.forTrue),
+ op.apply(left.forFalse, right.forFalse));
+ Supplier<Partition<A>> supplier = () ->
+ new Partition<>(downstream.supplier().get(),
+ downstream.supplier().get());
if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
return new CollectorImpl<>(supplier, accumulator, merger, CH_ID);
}
else {
- Function<Map<Boolean, A>, Map<Boolean, D>> finisher = (Map<Boolean, A> par) -> {
- Partition<A> asAPartition = (Partition<A>) par;
- return new Partition<>(downstream.finisher().apply(asAPartition.forTrue),
- downstream.finisher().apply(asAPartition.forFalse));
- };
+ Function<Partition<A>, Map<Boolean, D>> finisher = par ->
+ new Partition<>(downstream.finisher().apply(par.forTrue),
+ downstream.finisher().apply(par.forFalse));
return new CollectorImpl<>(supplier, accumulator, merger, finisher, CH_NOID);
}
}
--- a/jdk/src/share/classes/java/util/stream/DistinctOps.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/DistinctOps.java Fri Sep 06 14:20:58 2013 -0700
@@ -101,7 +101,7 @@
if (StreamOpFlag.DISTINCT.isKnown(flags)) {
return sink;
} else if (StreamOpFlag.SORTED.isKnown(flags)) {
- return new Sink.ChainedReference<T>(sink) {
+ return new Sink.ChainedReference<T, T>(sink) {
boolean seenNull;
T lastSeen;
@@ -132,7 +132,7 @@
}
};
} else {
- return new Sink.ChainedReference<T>(sink) {
+ return new Sink.ChainedReference<T, T>(sink) {
Set<T> seen;
@Override
--- a/jdk/src/share/classes/java/util/stream/DoublePipeline.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/DoublePipeline.java Fri Sep 06 14:20:58 2013 -0700
@@ -191,7 +191,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Double>(sink) {
@Override
public void accept(double t) {
downstream.accept(mapper.applyAsDouble(t));
@@ -208,9 +208,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Double> opWrapSink(int flags, Sink<U> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<U>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(double t) {
downstream.accept(mapper.apply(t));
}
@@ -226,7 +225,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Double> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Integer>(sink) {
@Override
public void accept(double t) {
downstream.accept(mapper.applyAsInt(t));
@@ -243,7 +242,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Double> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Long>(sink) {
@Override
public void accept(double t) {
downstream.accept(mapper.applyAsLong(t));
@@ -259,7 +258,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Double>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
@@ -296,7 +295,7 @@
StreamOpFlag.NOT_SIZED) {
@Override
Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Double>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
@@ -319,7 +318,7 @@
0) {
@Override
Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Double>(sink) {
@Override
public void accept(double t) {
consumer.accept(t);
--- a/jdk/src/share/classes/java/util/stream/IntPipeline.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/IntPipeline.java Fri Sep 06 14:20:58 2013 -0700
@@ -189,9 +189,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Long>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(int t) {
downstream.accept((long) t);
}
@@ -206,9 +205,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Double>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(int t) {
downstream.accept((double) t);
}
@@ -229,7 +227,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Integer>(sink) {
@Override
public void accept(int t) {
downstream.accept(mapper.applyAsInt(t));
@@ -246,9 +244,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<U> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<U>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(int t) {
downstream.accept(mapper.apply(t));
}
@@ -264,7 +261,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Long>(sink) {
@Override
public void accept(int t) {
downstream.accept(mapper.applyAsLong(t));
@@ -281,7 +278,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Double>(sink) {
@Override
public void accept(int t) {
downstream.accept(mapper.applyAsDouble(t));
@@ -297,7 +294,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Integer>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
@@ -334,7 +331,7 @@
StreamOpFlag.NOT_SIZED) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Integer>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
@@ -357,7 +354,7 @@
0) {
@Override
Sink<Integer> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Integer>(sink) {
@Override
public void accept(int t) {
consumer.accept(t);
--- a/jdk/src/share/classes/java/util/stream/LongPipeline.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/LongPipeline.java Fri Sep 06 14:20:58 2013 -0700
@@ -186,7 +186,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Double>(sink) {
@Override
public void accept(long t) {
downstream.accept((double) t);
@@ -208,9 +208,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Long>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(long t) {
downstream.accept(mapper.applyAsLong(t));
}
@@ -226,9 +225,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Long> opWrapSink(int flags, Sink<U> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<U>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(long t) {
downstream.accept(mapper.apply(t));
}
@@ -244,9 +242,8 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Integer>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(long t) {
downstream.accept(mapper.applyAsInt(t));
}
@@ -262,7 +259,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Double>(sink) {
@Override
public void accept(long t) {
downstream.accept(mapper.applyAsDouble(t));
@@ -278,7 +275,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Long>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
@@ -315,7 +312,7 @@
StreamOpFlag.NOT_SIZED) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Long>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
@@ -338,7 +335,7 @@
0) {
@Override
Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Long>(sink) {
@Override
public void accept(long t) {
consumer.accept(t);
--- a/jdk/src/share/classes/java/util/stream/ReferencePipeline.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/ReferencePipeline.java Fri Sep 06 14:20:58 2013 -0700
@@ -163,17 +163,16 @@
StreamOpFlag.NOT_SIZED) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, P_OUT>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
}
@Override
- @SuppressWarnings("unchecked")
public void accept(P_OUT u) {
if (predicate.test(u))
- downstream.accept((Object) u);
+ downstream.accept(u);
}
};
}
@@ -188,7 +187,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<R> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, R>(sink) {
@Override
public void accept(P_OUT u) {
downstream.accept(mapper.apply(u));
@@ -205,7 +204,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, Integer>(sink) {
@Override
public void accept(P_OUT u) {
downstream.accept(mapper.applyAsInt(u));
@@ -222,7 +221,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, Long>(sink) {
@Override
public void accept(P_OUT u) {
downstream.accept(mapper.applyAsLong(u));
@@ -239,7 +238,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, Double>(sink) {
@Override
public void accept(P_OUT u) {
downstream.accept(mapper.applyAsDouble(u));
@@ -257,14 +256,13 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<R> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, R>(sink) {
@Override
public void begin(long size) {
downstream.begin(-1);
}
@Override
- @SuppressWarnings("unchecked")
public void accept(P_OUT u) {
// We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
Stream<? extends R> result = mapper.apply(u);
@@ -284,7 +282,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, Integer>(sink) {
IntConsumer downstreamAsInt = downstream::accept;
@Override
public void begin(long size) {
@@ -311,7 +309,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, Double>(sink) {
DoubleConsumer downstreamAsDouble = downstream::accept;
@Override
public void begin(long size) {
@@ -338,7 +336,7 @@
StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, Long>(sink) {
LongConsumer downstreamAsLong = downstream::accept;
@Override
public void begin(long size) {
@@ -364,9 +362,8 @@
0) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) {
- return new Sink.ChainedReference<P_OUT>(sink) {
+ return new Sink.ChainedReference<P_OUT, P_OUT>(sink) {
@Override
- @SuppressWarnings("unchecked")
public void accept(P_OUT u) {
tee.accept(u);
downstream.accept(u);
@@ -495,6 +492,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
public final <R, A> R collect(Collector<? super P_OUT, A, ? extends R> collector) {
A container;
if (isParallel()
--- a/jdk/src/share/classes/java/util/stream/Sink.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/Sink.java Fri Sep 06 14:20:58 2013 -0700
@@ -241,11 +241,10 @@
* implementation of the {@code accept()} method must call the correct
* {@code accept()} method on the downstream {@code Sink}.
*/
- static abstract class ChainedReference<T> implements Sink<T> {
- @SuppressWarnings("rawtypes")
- protected final Sink downstream;
+ static abstract class ChainedReference<T, E_OUT> implements Sink<T> {
+ protected final Sink<? super E_OUT> downstream;
- public ChainedReference(Sink downstream) {
+ public ChainedReference(Sink<? super E_OUT> downstream) {
this.downstream = Objects.requireNonNull(downstream);
}
@@ -274,11 +273,10 @@
* The implementation of the {@code accept()} method must call the correct
* {@code accept()} method on the downstream {@code Sink}.
*/
- static abstract class ChainedInt implements Sink.OfInt {
- @SuppressWarnings("rawtypes")
- protected final Sink downstream;
+ static abstract class ChainedInt<E_OUT> implements Sink.OfInt {
+ protected final Sink<? super E_OUT> downstream;
- public ChainedInt(Sink downstream) {
+ public ChainedInt(Sink<? super E_OUT> downstream) {
this.downstream = Objects.requireNonNull(downstream);
}
@@ -307,11 +305,10 @@
* The implementation of the {@code accept()} method must call the correct
* {@code accept()} method on the downstream {@code Sink}.
*/
- static abstract class ChainedLong implements Sink.OfLong {
- @SuppressWarnings("rawtypes")
- protected final Sink downstream;
+ static abstract class ChainedLong<E_OUT> implements Sink.OfLong {
+ protected final Sink<? super E_OUT> downstream;
- public ChainedLong(Sink downstream) {
+ public ChainedLong(Sink<? super E_OUT> downstream) {
this.downstream = Objects.requireNonNull(downstream);
}
@@ -340,11 +337,10 @@
* The implementation of the {@code accept()} method must call the correct
* {@code accept()} method on the downstream {@code Sink}.
*/
- static abstract class ChainedDouble implements Sink.OfDouble {
- @SuppressWarnings("rawtypes")
- protected final Sink downstream;
+ static abstract class ChainedDouble<E_OUT> implements Sink.OfDouble {
+ protected final Sink<? super E_OUT> downstream;
- public ChainedDouble(Sink downstream) {
+ public ChainedDouble(Sink<? super E_OUT> downstream) {
this.downstream = Objects.requireNonNull(downstream);
}
--- a/jdk/src/share/classes/java/util/stream/SliceOps.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/SliceOps.java Fri Sep 06 14:20:58 2013 -0700
@@ -96,6 +96,11 @@
}
}
+ @SuppressWarnings("unchecked")
+ private static <T> IntFunction<T[]> castingArray() {
+ return size -> (T[]) new Object[size];
+ }
+
/**
* Appends a "slice" operation to the provided stream. The slice operation
* may be may be skip-only, limit-only, or skip-and-limit.
@@ -107,12 +112,12 @@
* is to be imposed
*/
public static <T> Stream<T> makeRef(AbstractPipeline<?, T, ?> upstream,
- long skip, long limit) {
+ long skip, long limit) {
if (skip < 0)
throw new IllegalArgumentException("Skip must be non-negative: " + skip);
- return new ReferencePipeline.StatefulOp<T,T>(upstream, StreamShape.REFERENCE,
- flags(limit)) {
+ return new ReferencePipeline.StatefulOp<T, T>(upstream, StreamShape.REFERENCE,
+ flags(limit)) {
Spliterator<T> unorderedSkipLimitSpliterator(Spliterator<T> s,
long skip, long limit, long sizeIfKnown) {
if (skip <= sizeIfKnown) {
@@ -146,7 +151,7 @@
// cancellation will be more aggressive cancelling later tasks
// if the target slice size has been reached from a given task,
// cancellation should also clear local results if any
- return new SliceTask<>(this, helper, spliterator, i -> (T[]) new Object[i], skip, limit).
+ return new SliceTask<>(this, helper, spliterator, castingArray(), skip, limit).
invoke().spliterator();
}
}
@@ -182,7 +187,7 @@
@Override
Sink<T> opWrapSink(int flags, Sink<T> sink) {
- return new Sink.ChainedReference<T>(sink) {
+ return new Sink.ChainedReference<T, T>(sink) {
long n = skip;
long m = limit >= 0 ? limit : Long.MAX_VALUE;
@@ -291,7 +296,7 @@
@Override
Sink<Integer> opWrapSink(int flags, Sink<Integer> sink) {
- return new Sink.ChainedInt(sink) {
+ return new Sink.ChainedInt<Integer>(sink) {
long n = skip;
long m = limit >= 0 ? limit : Long.MAX_VALUE;
@@ -400,7 +405,7 @@
@Override
Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
- return new Sink.ChainedLong(sink) {
+ return new Sink.ChainedLong<Long>(sink) {
long n = skip;
long m = limit >= 0 ? limit : Long.MAX_VALUE;
@@ -509,7 +514,7 @@
@Override
Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
- return new Sink.ChainedDouble(sink) {
+ return new Sink.ChainedDouble<Double>(sink) {
long n = skip;
long m = limit >= 0 ? limit : Long.MAX_VALUE;
@@ -560,13 +565,13 @@
private volatile boolean completed;
- SliceTask(AbstractPipeline<?, P_OUT, ?> op,
+ SliceTask(AbstractPipeline<P_OUT, P_OUT, ?> op,
PipelineHelper<P_OUT> helper,
Spliterator<P_IN> spliterator,
IntFunction<P_OUT[]> generator,
long offset, long size) {
super(helper, spliterator);
- this.op = (AbstractPipeline<P_OUT, P_OUT, ?>) op;
+ this.op = op;
this.generator = generator;
this.targetOffset = offset;
this.targetSize = size;
--- a/jdk/src/share/classes/java/util/stream/SortedOps.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/stream/SortedOps.java Fri Sep 06 14:20:58 2013 -0700
@@ -129,7 +129,7 @@
}
@Override
- public Sink<T> opWrapSink(int flags, Sink sink) {
+ public Sink<T> opWrapSink(int flags, Sink<T> sink) {
Objects.requireNonNull(sink);
// If the input is already naturally sorted and this operation
@@ -280,12 +280,12 @@
/**
* {@link ForkJoinTask} for implementing sort on SIZED reference streams.
*/
- private static final class SizedRefSortingSink<T> extends Sink.ChainedReference<T> {
+ private static final class SizedRefSortingSink<T> extends Sink.ChainedReference<T, T> {
private final Comparator<? super T> comparator;
private T[] array;
private int offset;
- SizedRefSortingSink(Sink<T> sink, Comparator<? super T> comparator) {
+ SizedRefSortingSink(Sink<? super T> sink, Comparator<? super T> comparator) {
super(sink);
this.comparator = comparator;
}
@@ -320,11 +320,11 @@
/**
* {@link Sink} for implementing sort on reference streams.
*/
- private static final class RefSortingSink<T> extends Sink.ChainedReference<T> {
+ private static final class RefSortingSink<T> extends Sink.ChainedReference<T, T> {
private final Comparator<? super T> comparator;
private ArrayList<T> list;
- RefSortingSink(Sink<T> sink, Comparator<? super T> comparator) {
+ RefSortingSink(Sink<? super T> sink, Comparator<? super T> comparator) {
super(sink);
this.comparator = comparator;
}
@@ -352,11 +352,11 @@
/**
* {@link Sink} for implementing sort on SIZED int streams.
*/
- private static final class SizedIntSortingSink extends Sink.ChainedInt {
+ private static final class SizedIntSortingSink extends Sink.ChainedInt<Integer> {
private int[] array;
private int offset;
- SizedIntSortingSink(Sink downstream) {
+ SizedIntSortingSink(Sink<? super Integer> downstream) {
super(downstream);
}
@@ -386,10 +386,10 @@
/**
* {@link Sink} for implementing sort on int streams.
*/
- private static final class IntSortingSink extends Sink.ChainedInt {
+ private static final class IntSortingSink extends Sink.ChainedInt<Integer> {
private SpinedBuffer.OfInt b;
- IntSortingSink(Sink sink) {
+ IntSortingSink(Sink<? super Integer> sink) {
super(sink);
}
@@ -417,11 +417,11 @@
/**
* {@link Sink} for implementing sort on SIZED long streams.
*/
- private static final class SizedLongSortingSink extends Sink.ChainedLong {
+ private static final class SizedLongSortingSink extends Sink.ChainedLong<Long> {
private long[] array;
private int offset;
- SizedLongSortingSink(Sink downstream) {
+ SizedLongSortingSink(Sink<? super Long> downstream) {
super(downstream);
}
@@ -451,10 +451,10 @@
/**
* {@link Sink} for implementing sort on long streams.
*/
- private static final class LongSortingSink extends Sink.ChainedLong {
+ private static final class LongSortingSink extends Sink.ChainedLong<Long> {
private SpinedBuffer.OfLong b;
- LongSortingSink(Sink sink) {
+ LongSortingSink(Sink<? super Long> sink) {
super(sink);
}
@@ -482,11 +482,11 @@
/**
* {@link Sink} for implementing sort on SIZED double streams.
*/
- private static final class SizedDoubleSortingSink extends Sink.ChainedDouble {
+ private static final class SizedDoubleSortingSink extends Sink.ChainedDouble<Double> {
private double[] array;
private int offset;
- SizedDoubleSortingSink(Sink downstream) {
+ SizedDoubleSortingSink(Sink<? super Double> downstream) {
super(downstream);
}
@@ -516,10 +516,10 @@
/**
* {@link Sink} for implementing sort on double streams.
*/
- private static final class DoubleSortingSink extends Sink.ChainedDouble {
+ private static final class DoubleSortingSink extends Sink.ChainedDouble<Double> {
private SpinedBuffer.OfDouble b;
- DoubleSortingSink(Sink sink) {
+ DoubleSortingSink(Sink<? super Double> sink) {
super(sink);
}
--- a/jdk/src/share/classes/java/util/zip/ZipOutputStream.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/java/util/zip/ZipOutputStream.java Fri Sep 06 14:20:58 2013 -0700
@@ -663,6 +663,9 @@
while (off + 4 <= len) {
int tag = get16(extra, off);
int sz = get16(extra, off + 2);
+ if (sz < 0 || (off + 4 + sz) > len) {
+ break;
+ }
if (tag == EXTID_EXTT || tag == EXTID_ZIP64) {
skipped += (sz + 4);
}
@@ -684,11 +687,18 @@
while (off + 4 <= len) {
int tag = get16(extra, off);
int sz = get16(extra, off + 2);
+ if (sz < 0 || (off + 4 + sz) > len) {
+ writeBytes(extra, off, len - off);
+ return;
+ }
if (tag != EXTID_EXTT && tag != EXTID_ZIP64) {
writeBytes(extra, off, sz + 4);
}
off += (sz + 4);
}
+ if (off < len) {
+ writeBytes(extra, off, len - off);
+ }
}
}
--- a/jdk/src/share/classes/javax/net/ssl/SNIHostName.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/javax/net/ssl/SNIHostName.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, 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
@@ -293,6 +293,7 @@
* the <a href="{@docRoot}/java/util/regex/Pattern.html#sum">
* regular expression pattern</a>
* representing the hostname(s) to match
+ * @return a {@code SNIMatcher} object for {@code SNIHostName}s
* @throws NullPointerException if {@code regex} is
* {@code null}
* @throws java.util.regex.PatternSyntaxException if the regular expression's
--- a/jdk/src/share/classes/javax/net/ssl/X509KeyManager.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/javax/net/ssl/X509KeyManager.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -40,7 +40,7 @@
* <UL>
* <LI> determine the set of aliases that are available for negotiations
* based on the criteria presented,
- * <LI> select the <ITALIC> best alias </ITALIC> based on
+ * <LI> select the <i> best alias</i> based on
* the criteria presented, and
* <LI> obtain the corresponding key material for given aliases.
* </UL>
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java Fri Sep 06 14:20:58 2013 -0700
@@ -197,8 +197,7 @@
* {@code KerberosPrincipal} and the two
* {@code KerberosPrincipal} instances are equivalent.
* More formally two {@code KerberosPrincipal} instances are equal
- * if the values returned by {@code getName()} are equal and the
- * values returned by {@code getNameType()} are equal.
+ * if the values returned by {@code getName()} are equal.
*
* @param other the Object to compare to
* @return true if the Object passed in represents the same principal
@@ -211,15 +210,10 @@
if (! (other instanceof KerberosPrincipal)) {
return false;
- } else {
- String myFullName = getName();
- String otherFullName = ((KerberosPrincipal) other).getName();
- if (nameType == ((KerberosPrincipal)other).nameType &&
- myFullName.equals(otherFullName)) {
- return true;
- }
}
- return false;
+ String myFullName = getName();
+ String otherFullName = ((KerberosPrincipal) other).getName();
+ return myFullName.equals(otherFullName);
}
/**
--- a/jdk/src/share/classes/sun/misc/Compare.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1996, 1997, 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.
- */
-
-/**
- * Compare: an interface to enable users to define the result of
- * a comparison of two objects.
- *
- * @author Sunita Mani
- */
-
-package sun.misc;
-
-public interface Compare {
-
- /**
- * doCompare
- *
- * @param obj1 first object to compare.
- * @param obj2 second object to compare.
- * @return -1 if obj1 < obj2, 0 if obj1 == obj2, 1 if obj1 > obj2.
- */
- public int doCompare(Object obj1, Object obj2);
-
-}
--- a/jdk/src/share/classes/sun/misc/Sort.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1996, 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.
- */
-
-/**
- * Sort: a class that uses the quicksort algorithm to sort an
- * array of objects.
- *
- * @author Sunita Mani
- */
-
-package sun.misc;
-
-public class Sort {
-
- private static void swap(Object arr[], int i, int j) {
- Object tmp;
-
- tmp = arr[i];
- arr[i] = arr[j];
- arr[j] = tmp;
- }
-
- /**
- * quicksort the array of objects.
- *
- * @param arr[] - an array of objects
- * @param left - the start index - from where to begin sorting
- * @param right - the last index.
- * @param comp - an object that implemnts the Compare interface to resolve thecomparison.
- */
- public static void quicksort(Object arr[], int left, int right, Compare comp) {
- int i, last;
-
- if (left >= right) { /* do nothing if array contains fewer than two */
- return; /* two elements */
- }
- swap(arr, left, (left+right) / 2);
- last = left;
- for (i = left+1; i <= right; i++) {
- if (comp.doCompare(arr[i], arr[left]) < 0) {
- swap(arr, ++last, i);
- }
- }
- swap(arr, left, last);
- quicksort(arr, left, last-1, comp);
- quicksort(arr, last+1, right, comp);
- }
-
- public static void quicksort(Object arr[], Compare comp) {
- quicksort(arr, 0, arr.length-1, comp);
- }
-}
--- a/jdk/src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -193,9 +193,4 @@
if (!selch.isOpen() && !selch.isRegistered())
((SelChImpl)selch).kill();
}
-
- static {
- Util.load();
- }
-
}
--- a/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1138,7 +1138,7 @@
throws IOException;
static {
- Util.load();
+ IOUtil.load();
initIDs();
}
--- a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1162,7 +1162,7 @@
private static native long initIDs();
static {
- Util.load();
+ IOUtil.load();
allocationGranularity = initIDs();
}
--- a/jdk/src/share/classes/sun/nio/ch/IOUtil.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/IOUtil.java Fri Sep 06 14:20:58 2013 -0700
@@ -347,9 +347,23 @@
static native void initIDs();
+ /**
+ * Used to trigger loading of native libraries
+ */
+ public static void load() { }
+
static {
- // Note that IOUtil.initIDs is called from within Util.load.
- Util.load();
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Void>() {
+ public Void run() {
+ System.loadLibrary("net");
+ System.loadLibrary("nio");
+ return null;
+ }
+ });
+
+ initIDs();
+
IOV_MAX = iovMax();
}
--- a/jdk/src/share/classes/sun/nio/ch/Net.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/Net.java Fri Sep 06 14:20:58 2013 -0700
@@ -582,7 +582,7 @@
private static native void initIDs();
static {
- Util.load();
+ IOUtil.load();
initIDs();
}
--- a/jdk/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -416,7 +416,7 @@
private static native void initIDs();
static {
- Util.load();
+ IOUtil.load();
initIDs();
nd = new SocketDispatcher();
}
--- a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1024,7 +1024,7 @@
throws IOException;
static {
- Util.load();
+ IOUtil.load();
nd = new SocketDispatcher();
}
--- a/jdk/src/share/classes/sun/nio/ch/Util.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/nio/ch/Util.java Fri Sep 06 14:20:58 2013 -0700
@@ -401,30 +401,4 @@
return bugLevel.equals(bl);
}
-
-
- // -- Initialization --
-
- private static boolean loaded = false;
-
- public static void load() {
- synchronized (Util.class) {
- if (loaded)
- return;
- loaded = true;
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<Void>() {
- public Void run() {
- System.loadLibrary("net");
- System.loadLibrary("nio");
- return null;
- }
- });
-
- // IOUtil must be initialized; Its native methods are called from
- // other places in native nio code so they must be set up.
- IOUtil.initIDs();
- }
- }
-
}
--- a/jdk/src/share/classes/sun/tools/jconsole/ConnectDialog.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/ConnectDialog.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
@@ -268,8 +268,13 @@
public void revalidate() {
// Adjust some colors
+ Color disabledForeground = UIManager.getColor("Label.disabledForeground");
+ if (disabledForeground == null) {
+ // fall back for Nimbus that doesn't support 'Label.disabledForeground'
+ disabledForeground = UIManager.getColor("Label.disabledText");
+ }
hintTextColor =
- ensureContrast(UIManager.getColor("Label.disabledForeground"),
+ ensureContrast(disabledForeground,
UIManager.getColor("Panel.background"));
disabledTableCellColor =
ensureContrast(new Color(0x808080),
--- a/jdk/src/share/classes/sun/tools/jconsole/JConsole.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/JConsole.java Fri Sep 06 14:20:58 2013 -0700
@@ -858,6 +858,10 @@
try {
updateInterval = Integer.parseInt(arg.substring(10)) *
1000;
+ if (updateInterval <= 0) {
+ usage();
+ return;
+ }
} catch (NumberFormatException ex) {
usage();
return;
--- a/jdk/src/share/classes/sun/tools/jconsole/Messages.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/Messages.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -146,7 +146,6 @@
public static String HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME;
public static String HELP_ABOUT_DIALOG_MASTHEAD_TITLE;
public static String HELP_ABOUT_DIALOG_TITLE;
- public static String HELP_ABOUT_DIALOG_USER_GUIDE_LINK;
public static String HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL;
public static String HELP_MENU_ABOUT_TITLE;
public static String HELP_MENU_USER_GUIDE_TITLE;
@@ -272,6 +271,7 @@
public static String THREADS;
public static String THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME;
public static String THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME;
+ public static String THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE;
public static String THRESHOLD;
public static String TILE;
public static String TIME_RANGE_COLON;
--- a/jdk/src/share/classes/sun/tools/jconsole/Plotter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/Plotter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
@@ -337,6 +337,13 @@
public void paintComponent(Graphics g) {
super.paintComponent(g);
+ int width = getWidth()-rightMargin-leftMargin-10;
+ int height = getHeight()-topMargin-bottomMargin;
+ if (width <= 0 || height <= 0) {
+ // not enough room to paint anything
+ return;
+ }
+
Color oldColor = g.getColor();
Font oldFont = g.getFont();
Color fg = getForeground();
--- a/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java Fri Sep 06 14:20:58 2013 -0700
@@ -595,6 +595,8 @@
setBorder(thinEmptyBorder);
+ setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ textArea.setText(Messages.THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE);
addListSelectionListener(ThreadTab.this);
setCellRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList<?> list, Object value, int index,
--- a/jdk/src/share/classes/sun/tools/jconsole/VMPanel.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/VMPanel.java Fri Sep 06 14:20:58 2013 -0700
@@ -153,9 +153,11 @@
// in order to reserve space for the connect toggle.
public void setUI(TabbedPaneUI ui) {
Insets insets = (Insets) UIManager.getLookAndFeelDefaults().get("TabbedPane.tabAreaInsets");
- insets = (Insets) insets.clone();
- insets.right += connectedIcon24.getIconWidth() + 8;
- UIManager.put("TabbedPane.tabAreaInsets", insets);
+ if (insets != null) {
+ insets = (Insets) insets.clone();
+ insets.right += connectedIcon24.getIconWidth() + 8;
+ UIManager.put("TabbedPane.tabAreaInsets", insets);
+ }
super.setUI(ui);
}
--- a/jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties Fri Sep 06 14:20:58 2013 -0700
@@ -104,7 +104,6 @@
HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=Masthead Graphic
HELP_ABOUT_DIALOG_MASTHEAD_TITLE=About JConsole
HELP_ABOUT_DIALOG_TITLE=JConsole: About
-HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole &User Guide:<br>{0}
HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://docs.oracle.com/javase/{0}/docs/technotes/guides/management/jconsole.html
HELP_MENU_ABOUT_TITLE=&About JConsole
HELP_MENU_USER_GUIDE_TITLE=Online &User Guide
@@ -230,6 +229,7 @@
THREADS=Threads
THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=Thread Information
THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=Chart for number of threads.
+THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE=[No thread selected]
THRESHOLD=Threshold
TILE=&Tile
TIME_RANGE_COLON=&Time Range:
--- a/jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties Fri Sep 06 14:20:58 2013 -0700
@@ -104,7 +104,6 @@
HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u30DE\u30B9\u30C8\u30D8\u30C3\u30C9\u56F3\u5F62
HELP_ABOUT_DIALOG_MASTHEAD_TITLE=JConsole\u306B\u3064\u3044\u3066
HELP_ABOUT_DIALOG_TITLE=JConsole: \u8A73\u7D30
-HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole\u30E6\u30FC\u30B6\u30FC\u30FB\u30AC\u30A4\u30C9(&U):<br>{0}
HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://docs.oracle.com/javase/{0}/docs/technotes/guides/management/jconsole.html
HELP_MENU_ABOUT_TITLE=JConsole\u306B\u3064\u3044\u3066(&A)
HELP_MENU_USER_GUIDE_TITLE=\u30AA\u30F3\u30E9\u30A4\u30F3\u30FB\u30E6\u30FC\u30B6\u30FC\u30FB\u30AC\u30A4\u30C9(&U)
--- a/jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties Fri Sep 06 14:20:58 2013 -0700
@@ -104,7 +104,6 @@
HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u62A5\u5934\u56FE
HELP_ABOUT_DIALOG_MASTHEAD_TITLE=\u5173\u4E8E JConsole
HELP_ABOUT_DIALOG_TITLE=JConsole: \u5173\u4E8E
-HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole \u7528\u6237\u6307\u5357(&U):<br>{0}
HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://docs.oracle.com/javase/{0}/docs/technotes/guides/management/jconsole.html
HELP_MENU_ABOUT_TITLE=\u5173\u4E8E JConsole(&A)
HELP_MENU_USER_GUIDE_TITLE=\u8054\u673A\u7528\u6237\u6307\u5357(&U)
--- a/jdk/src/share/lib/security/java.security-linux Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/lib/security/java.security-linux Fri Sep 06 14:20:58 2013 -0700
@@ -181,6 +181,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
@@ -225,6 +226,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
--- a/jdk/src/share/lib/security/java.security-macosx Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/lib/security/java.security-macosx Fri Sep 06 14:20:58 2013 -0700
@@ -182,6 +182,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
@@ -226,6 +227,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
--- a/jdk/src/share/lib/security/java.security-solaris Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/lib/security/java.security-solaris Fri Sep 06 14:20:58 2013 -0700
@@ -183,6 +183,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
@@ -226,6 +227,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
--- a/jdk/src/share/lib/security/java.security-windows Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/lib/security/java.security-windows Fri Sep 06 14:20:58 2013 -0700
@@ -182,6 +182,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
@@ -226,6 +227,7 @@
com.sun.imageio.,\
com.sun.istack.internal.,\
com.sun.jmx.,\
+ com.sun.media.sound.,\
com.sun.proxy.,\
com.sun.org.apache.bcel.internal.,\
com.sun.org.apache.regexp.internal.,\
--- a/jdk/src/share/native/common/check_code.c Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/share/native/common/check_code.c Fri Sep 06 14:20:58 2013 -0700
@@ -90,6 +90,12 @@
#include "classfile_constants.h"
#include "opcodes.in_out"
+#ifdef __APPLE__
+/* use setjmp/longjmp versions that do not save/restore the signal mask */
+#define setjmp _setjmp
+#define longjmp _longjmp
+#endif
+
#define MAX_ARRAY_DIMENSIONS 255
/* align byte code */
#ifndef ALIGN_UP
--- a/jdk/src/solaris/classes/sun/nio/ch/DatagramDispatcher.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/DatagramDispatcher.java Fri Sep 06 14:20:58 2013 -0700
@@ -36,7 +36,7 @@
class DatagramDispatcher extends NativeDispatcher
{
static {
- Util.load();
+ IOUtil.load();
}
int read(FileDescriptor fd, long address, int len) throws IOException {
--- a/jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java Fri Sep 06 14:20:58 2013 -0700
@@ -316,4 +316,8 @@
private native int poll0(long pollAddress, int numfds, long timeout,
int wfd);
private static native void interrupt(int fd);
+
+ static {
+ IOUtil.load();
+ }
}
--- a/jdk/src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -196,9 +196,4 @@
}
return this;
}
-
- static {
- Util.load();
- }
-
}
--- a/jdk/src/solaris/classes/sun/nio/ch/EPoll.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/EPoll.java Fri Sep 06 14:20:58 2013 -0700
@@ -113,6 +113,6 @@
throws IOException;
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java Fri Sep 06 14:20:58 2013 -0700
@@ -318,6 +318,7 @@
}
static {
+ IOUtil.load();
init();
}
--- a/jdk/src/solaris/classes/sun/nio/ch/EPollPort.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/EPollPort.java Fri Sep 06 14:20:58 2013 -0700
@@ -318,6 +318,6 @@
private static native void close0(int fd);
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -196,8 +196,4 @@
}
return this;
}
-
- static {
- Util.load();
- }
}
--- a/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -31,7 +31,7 @@
{
static {
- Util.load();
+ IOUtil.load();
init();
}
--- a/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java Fri Sep 06 14:20:58 2013 -0700
@@ -235,6 +235,6 @@
private static native int peerPort0(int fd);
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/KQueue.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/KQueue.java Fri Sep 06 14:20:58 2013 -0700
@@ -115,6 +115,6 @@
throws IOException;
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/KQueuePort.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/KQueuePort.java Fri Sep 06 14:20:58 2013 -0700
@@ -326,6 +326,6 @@
private static native void close0(int fd);
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/NativeThread.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/NativeThread.java Fri Sep 06 14:20:58 2013 -0700
@@ -54,7 +54,7 @@
private static native void init();
static {
- Util.load();
+ IOUtil.load();
init();
}
--- a/jdk/src/solaris/classes/sun/nio/ch/PollArrayWrapper.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/PollArrayWrapper.java Fri Sep 06 14:20:58 2013 -0700
@@ -126,4 +126,7 @@
private static native void interrupt(int fd);
+ static {
+ IOUtil.load();
+ }
}
--- a/jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -37,7 +37,7 @@
{
// Used to make native read and write calls
- private static NativeDispatcher nd;
+ private static final NativeDispatcher nd = new FileDispatcherImpl();
// The file descriptor associated with this channel
FileDescriptor fd;
@@ -206,10 +206,4 @@
throw new IndexOutOfBoundsException();
return write(Util.subsequence(srcs, offset, length));
}
-
- static {
- Util.load();
- nd = new FileDispatcherImpl();
- }
-
}
--- a/jdk/src/solaris/classes/sun/nio/ch/SolarisEventPort.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/SolarisEventPort.java Fri Sep 06 14:20:58 2013 -0700
@@ -260,6 +260,6 @@
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -37,7 +37,7 @@
{
// Used to make native read and write calls
- private static NativeDispatcher nd;
+ private static final NativeDispatcher nd = new FileDispatcherImpl();
// The file descriptor associated with this channel
FileDescriptor fd;
@@ -206,10 +206,4 @@
}
}
}
-
- static {
- Util.load();
- nd = new FileDispatcherImpl();
- }
-
}
--- a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -345,7 +345,7 @@
throws IOException;
static {
- Util.load();
+ IOUtil.load();
initIDs();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -748,6 +748,6 @@
private static native void checkConnect(int fdVal) throws IOException;
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -1106,7 +1106,7 @@
boolean ready) throws IOException;
static {
- Util.load(); /* loads nio & net native libraries */
+ IOUtil.load(); /* loads nio & net native libraries */
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
--- a/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -995,7 +995,7 @@
}
static {
- Util.load(); /* loads nio & net native libraries */
+ IOUtil.load(); /* loads nio & net native libraries */
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
--- a/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -426,7 +426,7 @@
FileDescriptor newfd, InetSocketAddress[] isaa) throws IOException;
static {
- Util.load(); // loads nio & net native libraries
+ IOUtil.load(); // loads nio & net native libraries
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
--- a/jdk/src/windows/classes/sun/nio/ch/DatagramDispatcher.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/DatagramDispatcher.java Fri Sep 06 14:20:58 2013 -0700
@@ -36,7 +36,7 @@
class DatagramDispatcher extends NativeDispatcher
{
static {
- Util.load();
+ IOUtil.load();
}
int read(FileDescriptor fd, long address, int len) throws IOException {
--- a/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -32,7 +32,7 @@
class FileDispatcherImpl extends FileDispatcher
{
static {
- Util.load();
+ IOUtil.load();
}
/**
--- a/jdk/src/windows/classes/sun/nio/ch/FileKey.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/FileKey.java Fri Sep 06 14:20:58 2013 -0700
@@ -73,6 +73,7 @@
private static native void initIDs();
static {
+ IOUtil.load();
initIDs();
}
}
--- a/jdk/src/windows/classes/sun/nio/ch/Iocp.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/Iocp.java Fri Sep 06 14:20:58 2013 -0700
@@ -443,7 +443,7 @@
private static native String getErrorMessage(int error);
static {
- Util.load();
+ IOUtil.load();
initIDs();
// thread agnostic I/O on Vista/2008 or newer
--- a/jdk/src/windows/classes/sun/nio/ch/PipeImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/PipeImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -56,7 +56,6 @@
private static final Random rnd;
static {
- Util.load();
byte[] someBytes = new byte[8];
boolean resultOK = IOUtil.randomBytes(someBytes);
if (resultOK) {
--- a/jdk/src/windows/classes/sun/nio/ch/SocketDispatcher.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/SocketDispatcher.java Fri Sep 06 14:20:58 2013 -0700
@@ -36,7 +36,7 @@
{
static {
- Util.load();
+ IOUtil.load();
}
int read(FileDescriptor fd, long address, int len) throws IOException {
--- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -750,6 +750,6 @@
private static native void close0(long handle);
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -363,7 +363,7 @@
private static native void closesocket0(long socket) throws IOException;
static {
- Util.load();
+ IOUtil.load();
initIDs();
}
}
--- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -919,7 +919,7 @@
private static native void closesocket0(long socket) throws IOException;
static {
- Util.load();
+ IOUtil.load();
initIDs();
}
}
--- a/jdk/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -611,6 +611,6 @@
}
static {
- Util.load();
+ IOUtil.load();
}
}
--- a/jdk/test/ProblemList.txt Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/ProblemList.txt Fri Sep 06 14:20:58 2013 -0700
@@ -166,6 +166,13 @@
# 8021186
jdk/lambda/vm/DefaultMethodsTest.java generic-all
+# 8024423 - JVMTI: GetLoadedClasses doesn't enumerate anonymous classes
+demo/jvmti/hprof/HeapAllTest.java generic-all
+demo/jvmti/hprof/HeapBinaryFormatTest.java generic-all
+demo/jvmti/hprof/HeapDumpTest.java generic-all
+demo/jvmti/hprof/OptionsTest.java generic-all
+demo/jvmti/hprof/StackMapTableTest.java generic-all
+
############################################################################
# jdk_net
@@ -208,7 +215,7 @@
# jdk_io
# 7160013
-java/io/File/MaxPathLength.java windows-all
+#java/io/File/MaxPathLength.java windows-all
############################################################################
@@ -336,12 +343,6 @@
# Filed 6653793
com/sun/jdi/RedefineCrossEvent.java generic-all
-# Filed 6987312
-com/sun/jdi/DoubleAgentTest.java generic-all
-
-# Filed 7020857
-com/sun/jdi/FieldWatchpoints.java generic-all
-
# Filed 6402201
com/sun/jdi/ProcessAttachTest.sh generic-all
--- a/jdk/test/TEST.ROOT Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/TEST.ROOT Fri Sep 06 14:20:58 2013 -0700
@@ -9,3 +9,6 @@
# Tests that cannot run concurrently
exclusiveAccess.dirs=java/rmi/Naming java/util/Currency java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi
+
+# Group definitions
+groups=TEST.groups [closed/TEST.groups]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/TEST.groups Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,214 @@
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+jdk_lang = \
+ java/lang \
+ -java/lang/management \
+ -java/lang/instrument \
+ sun/invoke \
+ sun/misc \
+ sun/reflect \
+ vm
+
+jdk_util = \
+ java/util \
+ sun/util
+
+jdk_math = \
+ java/math
+
+jdk_io = \
+ java/io
+
+jdk_nio = \
+ java/nio \
+ sun/nio
+
+jdk_net = \
+ java/net \
+ com/sun/net \
+ com/oracle/net \
+ sun/net
+
+jdk_time = \
+ java/time
+
+jdk_rmi = \
+ java/rmi \
+ javax/rmi/ssl \
+ sun/rmi
+
+jdk_security1 = \
+ java/security
+
+jdk_security2 = \
+ javax/crypto \
+ javax/xml/crypto \
+ com/sun/crypto
+
+jdk_security3 = \
+ javax/security \
+ com/sun/security \
+ com/sun/org/apache/xml/internal/security \
+ com/oracle/security \
+ sun/security \
+ lib/security
+
+jdk_security = \
+ :jdk_security1 \
+ :jdk_security2 \
+ :jdk_security3
+
+jdk_text = \
+ java/text \
+ sun/text
+
+jdk_management = \
+ java/lang/management \
+ com/sun/management \
+ sun/management
+
+jdk_instrument = \
+ java/lang/instrument
+
+jdk_jmx = \
+ javax/management \
+ com/sun/jmx
+
+jdk_jdi = \
+ com/sun/jdi
+
+#
+# Tool (and tool API) tests are split into core and svc groups
+#
+core_tools = \
+ tools \
+ com/sun/tools/extcheck \
+ sun/tools/java \
+ sun/tools/native2ascii \
+ sun/tools/jrunscript
+
+svc_tools = \
+ com/sun/tools/attach \
+ com/sun/tracing \
+ sun/tools \
+ -sun/tools/java \
+ -sun/tools/native2ascii \
+ -sun/tools/jrunscript \
+ sun/jvmstat \
+ demo/jvmti
+
+jdk_tools = \
+ :core_tools \
+ :svc_tools
+
+#
+# Catch-all for other areas with a small number of tests
+#
+jdk_other = \
+ java/sql \
+ javax/sql \
+ javax/naming \
+ javax/script \
+ javax/smartcardio \
+ javax/xml \
+ -javax/xml/crypto \
+ jdk/asm \
+ jdk/lambda \
+ com/sun/jndi \
+ com/sun/corba \
+ lib/testlibrary \
+ demo/zipfs \
+ sample
+
+#
+# SCTP is its own group as it is highly sensitive to kernel/network config
+#
+jdk_sctp = \
+ com/sun/nio/sctp
+
+
+#
+# core group to run all core area tests
+#
+jdk_core = \
+ :jdk_lang \
+ :jdk_util \
+ :jdk_math \
+ :jdk_io \
+ :jdk_nio \
+ :jdk_net \
+ :jdk_rmi \
+ :jdk_time \
+ :jdk_security \
+ :jdk_text \
+ :core_tools \
+ :jdk_other
+
+#
+# svc group to run all serviceability area tests
+#
+jdk_svc = \
+ :jdk_management \
+ :jdk_instrument \
+ :jdk_jmx \
+ :jdk_jdi \
+ :svc_tools
+
+#############################
+
+#
+# Client area groups
+#
+
+jdk_awt = \
+ java/awt \
+ com/sun/awt \
+ com/apple/eawt \
+ sun/awt
+
+jdk_2d = \
+ javax/print \
+ sun/pisces \
+ sun/java2d
+
+jdk_beans = \
+ java/beans
+
+jdk_swing = \
+ javax/accessibility \
+ javax/swing \
+ com/sun/java/swing
+
+jdk_sound = \
+ javax/sound
+
+jdk_imageio = \
+ javax/imageio
+
+jdk_desktop = \
+ :jdk_awt \
+ :jdk_2d \
+ :jdk_beans \
+ :jdk_swing \
+ :jdk_sound \
+ :jdk_imageio
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/BufferedInputStream/LargeCopyWithMark.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 7129312
+ * @summary BufferedInputStream calculates negative array size with large
+ * streams and mark
+ * @library /lib/testlibrary
+ * @run main/othervm LargeCopyWithMark
+ */
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import static jdk.testlibrary.ProcessTools.*;
+
+
+public class LargeCopyWithMark {
+
+ public static void main(String[] args) throws Exception {
+ if (! System.getProperty("os.arch").contains("64")) {
+ System.out.println("Test runs on 64 bit platforms");
+ return;
+ }
+ ProcessBuilder pb = createJavaProcessBuilder("-Xmx4G",
+ "-ea:LargeCopyWithMark$Child",
+ "LargeCopyWithMark$Child");
+ int res = pb.inheritIO().start().waitFor();
+ if (res != 0) {
+ throw new AssertionError("Test failed: exit code = " + res);
+ }
+ }
+
+ public static class Child {
+ static final int BUFF_SIZE = 8192;
+ static final int BIS_BUFF_SIZE = Integer.MAX_VALUE / 2 + 100;
+ static final long BYTES_TO_COPY = 2L * Integer.MAX_VALUE;
+
+ static {
+ assert BIS_BUFF_SIZE * 2 < 0 : "doubling must overflow";
+ }
+
+ public static void main(String[] args) throws Exception {
+ byte[] buff = new byte[BUFF_SIZE];
+
+ try (InputStream myis = new MyInputStream(BYTES_TO_COPY);
+ InputStream bis = new BufferedInputStream(myis, BIS_BUFF_SIZE);
+ OutputStream myos = new MyOutputStream()) {
+
+ // will require a buffer bigger than BIS_BUFF_SIZE
+ bis.mark(BIS_BUFF_SIZE + 100);
+
+ for (;;) {
+ int count = bis.read(buff, 0, BUFF_SIZE);
+ if (count == -1)
+ break;
+ myos.write(buff, 0, count);
+ }
+ } catch (java.lang.NegativeArraySizeException e) {
+ e.printStackTrace();
+ System.exit(11);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+}
+
+class MyInputStream extends InputStream {
+ private long bytesLeft;
+ public MyInputStream(long bytesLeft) {
+ this.bytesLeft = bytesLeft;
+ }
+ @Override public int read() throws IOException {
+ return 0;
+ }
+ @Override public int read(byte[] b) throws IOException {
+ return read(b, 0, b.length);
+ }
+ @Override public int read(byte[] b, int off, int len) throws IOException {
+ if (bytesLeft <= 0)
+ return -1;
+ long result = Math.min(bytesLeft, (long)len);
+ bytesLeft -= result;
+ return (int)result;
+ }
+ @Override public int available() throws IOException {
+ return (bytesLeft > 0) ? 1 : 0;
+ }
+}
+
+class MyOutputStream extends OutputStream {
+ @Override public void write(int b) throws IOException {}
+ @Override public void write(byte[] b) throws IOException {}
+ @Override public void write(byte[] b, int off, int len) throws IOException {}
+}
--- a/jdk/test/java/io/File/MaxPathLength.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/io/File/MaxPathLength.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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,6 +27,7 @@
*/
import java.io.*;
+import java.nio.file.Files;
public class MaxPathLength {
private static String sep = File.separator;
@@ -87,10 +88,8 @@
System.err.println("Warning: Test directory structure exists already!");
return;
}
- boolean couldMakeTestDirectory = dirFile.mkdirs();
- if (!couldMakeTestDirectory) {
- throw new RuntimeException ("Could not create test directory structure");
- }
+ Files.createDirectories(dirFile.toPath());
+
try {
if (tryAbsolute)
dirFile = new File(dirFile.getCanonicalPath());
--- a/jdk/test/java/io/pathNames/General.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/io/pathNames/General.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,7 @@
import java.io.*;
import java.util.*;
+import java.nio.file.*;
public class General {
@@ -57,7 +58,7 @@
for (int i = 0; i < dl.length; i++) {
File f = new File(subdir, dl[i]);
File df = new File(dir, f.getPath());
- if (df.exists() && df.isFile()) {
+ if (Files.isRegularFile(df.toPath(), LinkOption.NOFOLLOW_LINKS)) {
return f.getPath();
}
}
@@ -65,7 +66,7 @@
File f = (subdir.length() == 0) ? new File(dl[i])
: new File(subdir, dl[i]);
File df = new File(dir, f.getPath());
- if (df.exists() && df.isDirectory()) {
+ if (Files.isDirectory(df.toPath(), LinkOption.NOFOLLOW_LINKS)) {
String[] dl2 = df.list();
if (dl2 != null) {
String ff = findSomeFile(dir, f.getPath(), dl2);
@@ -90,7 +91,7 @@
}
for (int i = 0; i < dl.length; i++) {
File f = new File(dir, dl[i]);
- if (f.isFile()) {
+ if (Files.isRegularFile(f.toPath(), LinkOption.NOFOLLOW_LINKS)) {
return dl[i];
}
}
@@ -127,7 +128,7 @@
}
for (int i = 0; i < dl.length; i++) {
File f = new File(d, dl[i]);
- if (f.isDirectory()) {
+ if (Files.isDirectory(f.toPath(), LinkOption.NOFOLLOW_LINKS)) {
String[] dl2 = f.list();
if (dl2 == null || dl2.length >= 250) {
/* Heuristic to avoid scanning huge directories */
@@ -314,7 +315,7 @@
/* Normal name */
if (f.exists()) {
- if (f.isDirectory() && f.list() != null) {
+ if (Files.isDirectory(f.toPath(), LinkOption.NOFOLLOW_LINKS) && f.list() != null) {
if ((n = findSomeFile(ans, create)) != null)
checkSlashes(d, create, ans + n, ask + n);
if ((n = findSomeDir(ans, create)) != null)
--- a/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Sep 06 14:20:58 2013 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6741606 7146431 8000450
+ * @bug 6741606 7146431 8000450 8019830
* @summary Make sure all restricted packages listed in the package.access
* property in the java.security file are blocked
* @run main/othervm CheckPackageAccess
@@ -54,6 +54,7 @@
"com.sun.imageio.",
"com.sun.istack.internal.",
"com.sun.jmx.",
+ "com.sun.media.sound.",
"com.sun.proxy.",
"com.sun.org.apache.bcel.internal.",
"com.sun.org.apache.regexp.internal.",
--- a/jdk/test/java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -28,6 +28,9 @@
*/
import java.lang.annotation.Retention;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
@@ -66,17 +69,6 @@
}
}
- static void dumpState(Task task) {
- System.err.println(
- "Task[" + task.getName() + "].state: " +
- task.getState() + " ..."
- );
- for (StackTraceElement ste : task.getStackTrace()) {
- System.err.println("\tat " + ste);
- }
- System.err.println();
- }
-
public static void main(String[] args) throws Exception {
CountDownLatch prepareLatch = new CountDownLatch(2);
AtomicInteger goLatch = new AtomicInteger(1);
@@ -88,18 +80,22 @@
prepareLatch.await();
// let them go
goLatch.set(0);
- // attempt to join them
- taskA.join(5000L);
- taskB.join(5000L);
-
- if (taskA.isAlive() || taskB.isAlive()) {
- dumpState(taskA);
- dumpState(taskB);
- throw new IllegalStateException(
- taskA.getState() == Thread.State.BLOCKED &&
- taskB.getState() == Thread.State.BLOCKED
- ? "deadlock detected"
- : "unexpected condition");
+ // obtain ThreadMXBean
+ ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
+ // wait for threads to finish or dead-lock
+ while (taskA.isAlive() || taskB.isAlive()) {
+ // attempt to join threads
+ taskA.join(500L);
+ taskB.join(500L);
+ // detect dead-lock
+ long[] deadlockedIds = threadBean.findMonitorDeadlockedThreads();
+ if (deadlockedIds != null && deadlockedIds.length > 0) {
+ StringBuilder sb = new StringBuilder("deadlock detected:\n\n");
+ for (ThreadInfo ti : threadBean.getThreadInfo(deadlockedIds, Integer.MAX_VALUE)) {
+ sb.append(ti);
+ }
+ throw new IllegalStateException(sb.toString());
+ }
}
}
}
--- a/jdk/test/java/lang/annotation/TypeAnnotationReflection.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/lang/annotation/TypeAnnotationReflection.java Fri Sep 06 14:20:58 2013 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8004698 8007073
+ * @bug 8004698 8007073 8022343
* @summary Unit test for type annotations
*/
@@ -58,7 +58,7 @@
}
private static void testSuper() throws Exception {
- check(Object.class.getAnnotatedSuperclass().getAnnotations().length == 0);
+ check(Object.class.getAnnotatedSuperclass() == null);
check(Class.class.getAnnotatedSuperclass().getAnnotations().length == 0);
AnnotatedType a;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedSuperclass.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8022343
+ * @summary make sure Class.getAnnotatedSuperclass() returns null when specified to do so
+ */
+
+public class GetAnnotatedSuperclass {
+ private static final Class<?>[] testData = {
+ Object.class,
+ If.class,
+ Object[].class,
+ void.class,
+ int.class,
+ };
+
+ public static void main(String[] args) throws Exception {
+ int failed = 0;
+ for (Class<?> toTest : testData) {
+ Object res = toTest.getAnnotatedSuperclass();
+
+ if (res != null) {
+ failed++;
+ System.out.println(toTest + ".getAnnotatedSuperclass() returns: "
+ + res + ", should be null");
+ }
+ }
+
+ if (failed != 0)
+ throw new RuntimeException("Test failed, check log for details");
+ }
+
+ interface If {}
+}
--- a/jdk/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java Fri Sep 06 14:20:58 2013 -0700
@@ -33,10 +33,10 @@
* @author Mandy Chung
*
* @build ResetPeakMemoryUsage MemoryUtil
- * @run main/othervm -XX:+UseSerialGC -XX:MarkSweepAlwaysCompactCount=1 -Xmn8m ResetPeakMemoryUsage
- * @run main/othervm -XX:+UseConcMarkSweepGC -Xmn8m ResetPeakMemoryUsage
- * @run main/othervm -XX:+UseParallelGC -Xmn8m ResetPeakMemoryUsage
- * @run main/othervm -XX:+UseG1GC -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseSerialGC -Xms256m -XX:MarkSweepAlwaysCompactCount=1 -Xmn8m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -Xms256m -Xmn8m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseParallelGC -Xms256m -Xmn8m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseG1GC -Xms256m -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
*/
import java.lang.management.*;
--- a/jdk/test/java/math/BigDecimal/IntegralDivisionTests.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/math/BigDecimal/IntegralDivisionTests.java Fri Sep 06 14:20:58 2013 -0700
@@ -22,7 +22,7 @@
*/
/*
* @test
- * @bug 4904082 4917089 6337226
+ * @bug 4904082 4917089 6337226 6378503
* @summary Tests that integral division and related methods return the proper result and scale.
* @author Joseph D. Darcy
*/
@@ -47,6 +47,9 @@
{new BigDecimal("400e1"), new BigDecimal("5"), new BigDecimal("80e1")},
{new BigDecimal("400e1"), new BigDecimal("4.999999999"), new BigDecimal("8e2")},
{new BigDecimal("40e2"), new BigDecimal("5"), new BigDecimal("8e2")},
+ {BigDecimal.valueOf(1, Integer.MIN_VALUE),
+ BigDecimal.valueOf(1, -(Integer.MAX_VALUE & 0x7fffff00)),
+ BigDecimal.valueOf(1, -256)},
};
for(BigDecimal [] testCase: moreTestCases) {
--- a/jdk/test/java/nio/file/WatchService/SensitivityModifier.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/nio/file/WatchService/SensitivityModifier.java Fri Sep 06 14:20:58 2013 -0700
@@ -54,60 +54,66 @@
@SuppressWarnings("unchecked")
static void doTest(Path top) throws Exception {
FileSystem fs = top.getFileSystem();
- WatchService watcher = fs.newWatchService();
+ try (WatchService watcher = fs.newWatchService()) {
- // create directories and files
- int nDirs = 5 + rand.nextInt(20);
- int nFiles = 50 + rand.nextInt(50);
- Path[] dirs = new Path[nDirs];
- Path[] files = new Path[nFiles];
- for (int i=0; i<nDirs; i++) {
- dirs[i] = Files.createDirectory(top.resolve("dir" + i));
- }
- for (int i=0; i<nFiles; i++) {
- Path dir = dirs[rand.nextInt(nDirs)];
- files[i] = Files.createFile(dir.resolve("file" + i));
- }
+ // create directories and files
+ int nDirs = 5 + rand.nextInt(20);
+ int nFiles = 50 + rand.nextInt(50);
+ Path[] dirs = new Path[nDirs];
+ Path[] files = new Path[nFiles];
+ for (int i=0; i<nDirs; i++) {
+ dirs[i] = Files.createDirectory(top.resolve("dir" + i));
+ }
+ for (int i=0; i<nFiles; i++) {
+ Path dir = dirs[rand.nextInt(nDirs)];
+ files[i] = Files.createFile(dir.resolve("file" + i));
+ }
- // register the directories (random sensitivity)
- register(dirs, watcher);
+ // register the directories (random sensitivity)
+ register(dirs, watcher);
- // sleep a bit here to ensure that modification to the first file
- // can be detected by polling implementations (ie: last modified time
- // may not change otherwise).
- try { Thread.sleep(1000); } catch (InterruptedException e) { }
+ // sleep a bit here to ensure that modification to the first file
+ // can be detected by polling implementations (ie: last modified time
+ // may not change otherwise).
+ try { Thread.sleep(1000); } catch (InterruptedException e) { }
- // modify files and check that events are received
- for (int i=0; i<10; i++) {
- Path file = files[rand.nextInt(nFiles)];
- System.out.println("Modify: " + file);
- try (OutputStream out = Files.newOutputStream(file)) {
- out.write(new byte[100]);
+ // modify files and check that events are received
+ for (int i=0; i<10; i++) {
+ Path file = files[rand.nextInt(nFiles)];
+ System.out.println("Modify: " + file);
+ try (OutputStream out = Files.newOutputStream(file)) {
+ out.write(new byte[100]);
+ }
+
+ System.out.println("Waiting for event(s)...");
+ boolean eventReceived = false;
+ WatchKey key = watcher.take();
+ do {
+ for (WatchEvent<?> event: key.pollEvents()) {
+ if (event.kind() != ENTRY_MODIFY)
+ throw new RuntimeException("Unexpected event: " + event);
+ Path name = ((WatchEvent<Path>)event).context();
+ if (name.equals(file.getFileName())) {
+ eventReceived = true;
+ break;
+ }
+ }
+ key.reset();
+ key = watcher.poll(1, TimeUnit.SECONDS);
+ } while (key != null && !eventReceived);
+
+ // we should have received at least one ENTRY_MODIFY event
+ if (eventReceived) {
+ System.out.println("Event OK");
+ } else {
+ throw new RuntimeException("No ENTRY_MODIFY event received for " + file);
+ }
+
+ // re-register the directories to force changing their sensitivity
+ // level
+ register(dirs, watcher);
}
- System.out.println("Waiting for event...");
- WatchKey key = watcher.take();
- WatchEvent<?> event = key.pollEvents().iterator().next();
- if (event.kind() != ENTRY_MODIFY)
- throw new RuntimeException("Unexpected event: " + event);
- Path name = ((WatchEvent<Path>)event).context();
- if (!name.equals(file.getFileName()))
- throw new RuntimeException("Unexpected context: " + name);
- System.out.println("Event OK");
-
- // drain events (to avoid interference)
- do {
- key.pollEvents();
- key.reset();
- key = watcher.poll(1, TimeUnit.SECONDS);
- } while (key != null);
-
- // re-register the directories to force changing their sensitivity
- // level
- register(dirs, watcher);
}
-
- // done
- watcher.close();
}
public static void main(String[] args) throws Exception {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Arrays/TimSortStackSize.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8011944
+ * @summary Test TimSort stack size
+ */
+import java.util.Arrays;
+import java.util.ArrayDeque;
+
+public class TimSortStackSize {
+
+ public static void main(String[] args) {
+ testComparableTimSort();
+ testTimSort();
+ }
+
+ static void testComparableTimSort() {
+ System.out.printf("testComparableTimSort()%n");
+ Arrays.sort(genData());
+ }
+
+ static void testTimSort() {
+ System.out.printf("testTimSort()%n");
+ Arrays.sort(genData(), Integer::compare);
+ }
+
+ private static final int MIN = 16;
+
+ private static final int BOUND1 = 2 * MIN + 1;
+ private static final int BOUND2 = BOUND1 + MIN + 2;
+ private static final int BOUND3 = BOUND1 + 1 + BOUND2;
+ private static final int BOUND4 = BOUND2 + 1 + BOUND3;
+ private static final int BOUND5 = BOUND3 + 1 + BOUND4;
+
+ static int build(int size, int B, ArrayDeque<Integer> chunks) {
+ chunks.addFirst(B);
+ if (size < BOUND1) {
+ chunks.addFirst(size);
+ return size;
+ }
+
+ int asize = (size + 2) / 2;
+ if (size >= BOUND2 && asize < BOUND1) {
+ asize = BOUND1;
+ } else if (size >= BOUND3 && asize < BOUND2) {
+ asize = BOUND2;
+ } else if (size >= BOUND4 && asize < BOUND3) {
+ asize = BOUND3;
+ } else if (size >= BOUND5 && asize < BOUND4) {
+ asize = BOUND4;
+ }
+ if (size - asize >= B) {
+ throw new AssertionError(" " + size + " , " + asize + " , " + B);
+ }
+ return build(asize, size - asize, chunks);
+ }
+
+ static Integer[] genData() {
+ ArrayDeque<Integer> chunks = new ArrayDeque<Integer>();
+ chunks.addFirst(MIN);
+
+ int B = MIN + 4;
+ int A = B + MIN + 1;
+
+ for (int i = 0; i < 8; i++) {
+ int eps = build(A, B, chunks);
+ B = B + A + 1;
+ A = B + eps + 1;
+ }
+ chunks.addFirst(B);
+ chunks.addFirst(A);
+ int total = 0;
+ for (Integer len : chunks) {
+ total += len;
+ }
+ int pow = MIN;
+ while (pow < total) {
+ pow += pow;
+ }
+ chunks.addLast(pow - total);
+ System.out.println(" Total: " + total);
+ Integer[] array = new Integer[pow];
+ int off = 0;
+ int pos = 0;
+ for (Integer len : chunks) {
+ for (int i = 0; i < len; i++) {
+ array[pos++] = Integer.valueOf(i == 0 ? 0 : 1);
+ }
+ off++;
+ }
+ return array;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Collections/Wrappers.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @run testng Wrappers
+ * @summary Ensure Collections wrapping classes provide non-default implementations
+ */
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Objects;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.DataProvider;
+
+import static org.testng.Assert.assertFalse;
+
+@Test(groups = "unit")
+public class Wrappers {
+ static Object[][] collections;
+
+ @DataProvider(name="collections")
+ public static Object[][] collectionCases() {
+ if (collections != null) {
+ return collections;
+ }
+
+ List<Object[]> cases = new ArrayList<>();
+ LinkedList<Integer> seedList = new LinkedList<>();
+ ArrayList<Integer> seedRandomAccess = new ArrayList<>();
+ TreeSet<Integer> seedSet = new TreeSet<>();
+ TreeMap<Integer, Integer> seedMap = new TreeMap<>();
+
+ for (int i = 1; i <= 10; i++) {
+ seedList.add(i);
+ seedRandomAccess.add(i);
+ seedSet.add(i);
+ seedMap.put(i, i);
+ }
+
+ cases.add(new Object[] { Collections.unmodifiableCollection(seedList) });
+ cases.add(new Object[] { Collections.unmodifiableList(seedList) });
+ cases.add(new Object[] { Collections.unmodifiableList(seedRandomAccess) });
+ cases.add(new Object[] { Collections.unmodifiableSet(seedSet) });
+ cases.add(new Object[] { Collections.unmodifiableSortedSet(seedSet) });
+ cases.add(new Object[] { Collections.unmodifiableNavigableSet(seedSet) });
+
+ // As sets from map also need to be unmodifiable, thus a wrapping
+ // layer exist and should not have default methods
+ cases.add(new Object[] { Collections.unmodifiableMap(seedMap).entrySet() });
+ cases.add(new Object[] { Collections.unmodifiableMap(seedMap).keySet() });
+ cases.add(new Object[] { Collections.unmodifiableMap(seedMap).values() });
+ cases.add(new Object[] { Collections.unmodifiableSortedMap(seedMap).entrySet() });
+ cases.add(new Object[] { Collections.unmodifiableSortedMap(seedMap).keySet() });
+ cases.add(new Object[] { Collections.unmodifiableSortedMap(seedMap).values() });
+ cases.add(new Object[] { Collections.unmodifiableNavigableMap(seedMap).entrySet() });
+ cases.add(new Object[] { Collections.unmodifiableNavigableMap(seedMap).keySet() });
+ cases.add(new Object[] { Collections.unmodifiableNavigableMap(seedMap).values() });
+
+ // Synchronized
+ cases.add(new Object[] { Collections.synchronizedCollection(seedList) });
+ cases.add(new Object[] { Collections.synchronizedList(seedList) });
+ cases.add(new Object[] { Collections.synchronizedList(seedRandomAccess) });
+ cases.add(new Object[] { Collections.synchronizedSet(seedSet) });
+ cases.add(new Object[] { Collections.synchronizedSortedSet(seedSet) });
+ cases.add(new Object[] { Collections.synchronizedNavigableSet(seedSet) });
+
+ // As sets from map also need to be synchronized on the map, thus a
+ // wrapping layer exist and should not have default methods
+ cases.add(new Object[] { Collections.synchronizedMap(seedMap).entrySet() });
+ cases.add(new Object[] { Collections.synchronizedMap(seedMap).keySet() });
+ cases.add(new Object[] { Collections.synchronizedMap(seedMap).values() });
+ cases.add(new Object[] { Collections.synchronizedSortedMap(seedMap).entrySet() });
+ cases.add(new Object[] { Collections.synchronizedSortedMap(seedMap).keySet() });
+ cases.add(new Object[] { Collections.synchronizedSortedMap(seedMap).values() });
+ cases.add(new Object[] { Collections.synchronizedNavigableMap(seedMap).entrySet() });
+ cases.add(new Object[] { Collections.synchronizedNavigableMap(seedMap).keySet() });
+ cases.add(new Object[] { Collections.synchronizedNavigableMap(seedMap).values() });
+
+ // Checked
+ cases.add(new Object[] { Collections.checkedCollection(seedList, Integer.class) });
+ cases.add(new Object[] { Collections.checkedList(seedList, Integer.class) });
+ cases.add(new Object[] { Collections.checkedList(seedRandomAccess, Integer.class) });
+ cases.add(new Object[] { Collections.checkedSet(seedSet, Integer.class) });
+ cases.add(new Object[] { Collections.checkedSortedSet(seedSet, Integer.class) });
+ cases.add(new Object[] { Collections.checkedNavigableSet(seedSet, Integer.class) });
+ cases.add(new Object[] { Collections.checkedQueue(seedList, Integer.class) });
+
+ // asLifoQueue is another wrapper
+ cases.add(new Object[] { Collections.asLifoQueue(seedList) });
+
+ collections = cases.toArray(new Object[0][]);
+ return collections;
+ }
+
+ static Method[] defaultMethods;
+
+ static {
+ List<Method> list = new ArrayList<>();
+ Method[] methods = Collection.class.getMethods();
+ for (Method m: methods) {
+ if (m.isDefault()) {
+ list.add(m);
+ }
+ }
+ defaultMethods = list.toArray(new Method[0]);
+ }
+
+ @Test(dataProvider = "collections")
+ public static void testAllDefaultMethodsOverridden(Collection c) throws NoSuchMethodException {
+ Class cls = c.getClass();
+ for (Method m: defaultMethods) {
+ Method m2 = cls.getMethod(m.getName(), m.getParameterTypes());
+ // default had been override
+ assertFalse(m2.isDefault(), cls.getCanonicalName());
+ }
+ }
+}
+
--- a/jdk/test/java/util/Comparator/BasicTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/util/Comparator/BasicTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -90,7 +90,7 @@
Thing[] things = new Thing[intValues.length];
for (int i=0; i<intValues.length; i++)
things[i] = new Thing(intValues[i], 0L, 0.0, null);
- Comparator<Thing> comp = Comparator.comparing(new ToIntFunction<Thing>() {
+ Comparator<Thing> comp = Comparator.comparingInt(new ToIntFunction<Thing>() {
@Override
public int applyAsInt(Thing thing) {
return thing.getIntField();
@@ -104,7 +104,7 @@
Thing[] things = new Thing[longValues.length];
for (int i=0; i<longValues.length; i++)
things[i] = new Thing(0, longValues[i], 0.0, null);
- Comparator<Thing> comp = Comparator.comparing(new ToLongFunction<Thing>() {
+ Comparator<Thing> comp = Comparator.comparingLong(new ToLongFunction<Thing>() {
@Override
public long applyAsLong(Thing thing) {
return thing.getLongField();
@@ -118,7 +118,7 @@
Thing[] things = new Thing[doubleValues.length];
for (int i=0; i<doubleValues.length; i++)
things[i] = new Thing(0, 0L, doubleValues[i], null);
- Comparator<Thing> comp = Comparator.comparing(new ToDoubleFunction<Thing>() {
+ Comparator<Thing> comp = Comparator.comparingDouble(new ToDoubleFunction<Thing>() {
@Override
public double applyAsDouble(Thing thing) {
return thing.getDoubleField();
@@ -211,8 +211,8 @@
};
public void testComparatorDefaultMethods() {
- Comparator<People> cmp = Comparator.comparing((Function<People, String>) People::getFirstName);
- Comparator<People> cmp2 = Comparator.comparing((Function<People, String>) People::getLastName);
+ Comparator<People> cmp = Comparator.comparing(People::getFirstName);
+ Comparator<People> cmp2 = Comparator.comparing(People::getLastName);
// reverseOrder
assertComparison(cmp.reversed(), people[1], people[0]);
// thenComparing(Comparator)
@@ -222,20 +222,20 @@
assertComparison(cmp.thenComparing(People::getLastName), people[0], people[1]);
assertComparison(cmp.thenComparing(People::getLastName), people[4], people[0]);
// thenComparing(ToIntFunction)
- assertComparison(cmp.thenComparing(People::getAge), people[0], people[1]);
- assertComparison(cmp.thenComparing(People::getAge), people[1], people[5]);
+ assertComparison(cmp.thenComparingInt(People::getAge), people[0], people[1]);
+ assertComparison(cmp.thenComparingInt(People::getAge), people[1], people[5]);
// thenComparing(ToLongFunction)
- assertComparison(cmp.thenComparing(People::getAgeAsLong), people[0], people[1]);
- assertComparison(cmp.thenComparing(People::getAgeAsLong), people[1], people[5]);
+ assertComparison(cmp.thenComparingLong(People::getAgeAsLong), people[0], people[1]);
+ assertComparison(cmp.thenComparingLong(People::getAgeAsLong), people[1], people[5]);
// thenComparing(ToDoubleFunction)
- assertComparison(cmp.thenComparing(People::getAgeAsDouble), people[0], people[1]);
- assertComparison(cmp.thenComparing(People::getAgeAsDouble), people[1], people[5]);
+ assertComparison(cmp.thenComparingDouble(People::getAgeAsDouble), people[0], people[1]);
+ assertComparison(cmp.thenComparingDouble(People::getAgeAsDouble), people[1], people[5]);
}
public void testNullsFirst() {
Comparator<String> strcmp = Comparator.nullsFirst(Comparator.naturalOrder());
- Comparator<People> cmp = Comparator.<People, String>comparing(People::getLastName, strcmp)
+ Comparator<People> cmp = Comparator.comparing(People::getLastName, strcmp)
.thenComparing(People::getFirstName, strcmp);
// Mary.null vs Mary.Cook - solve by last name
assertComparison(cmp, people[6], people[5]);
@@ -243,7 +243,7 @@
assertComparison(cmp, people[7], people[6]);
// More than one thenComparing
- strcmp = Comparator.nullsFirst(Comparator.comparing((ToIntFunction<String>) String::length)
+ strcmp = Comparator.nullsFirst(Comparator.comparingInt(String::length)
.thenComparing(String.CASE_INSENSITIVE_ORDER));
assertComparison(strcmp, null, "abc");
assertComparison(strcmp, "ab", "abc");
@@ -273,7 +273,7 @@
public void testNullsLast() {
Comparator<String> strcmp = Comparator.nullsLast(Comparator.naturalOrder());
- Comparator<People> cmp = Comparator.<People, String>comparing(People::getLastName, strcmp)
+ Comparator<People> cmp = Comparator.comparing(People::getLastName, strcmp)
.thenComparing(People::getFirstName, strcmp);
// Mary.null vs Mary.Cook - solve by last name
assertComparison(cmp, people[5], people[6]);
@@ -281,7 +281,7 @@
assertComparison(cmp, people[7], people[6]);
// More than one thenComparing
- strcmp = Comparator.nullsLast(Comparator.comparing((ToIntFunction<String>) String::length)
+ strcmp = Comparator.nullsLast(Comparator.comparingInt(String::length)
.thenComparing(String.CASE_INSENSITIVE_ORDER));
assertComparison(strcmp, "abc", null);
assertComparison(strcmp, "ab", "abc");
@@ -341,28 +341,28 @@
} catch (NullPointerException npe) {}
try {
- Comparator<People> cmp = Comparator.comparing((Function<People, String>) null, Comparator.<String>naturalOrder());
+ Comparator<People> cmp = Comparator.comparing(null, Comparator.<String>naturalOrder());
fail("comparing(null, cmp) should throw NPE");
} catch (NullPointerException npe) {}
try {
- Comparator<People> cmp = Comparator.comparing((Function<People, String>) People::getFirstName, null);
+ Comparator<People> cmp = Comparator.comparing(People::getFirstName, null);
fail("comparing(f, null) should throw NPE");
} catch (NullPointerException npe) {}
try {
- Comparator<People> cmp = Comparator.comparing((Function<People, String>) null);
+ Comparator<People> cmp = Comparator.comparing(null);
fail("comparing(null) should throw NPE");
} catch (NullPointerException npe) {}
try {
- Comparator<People> cmp = Comparator.comparing((ToIntFunction<People>) null);
+ Comparator<People> cmp = Comparator.comparingInt(null);
fail("comparing(null) should throw NPE");
} catch (NullPointerException npe) {}
try {
- Comparator<People> cmp = Comparator.comparing((ToLongFunction<People>) null);
+ Comparator<People> cmp = Comparator.comparingLong(null);
fail("comparing(null) should throw NPE");
} catch (NullPointerException npe) {}
try {
- Comparator<People> cmp = Comparator.comparing((ToDoubleFunction<People>) null);
+ Comparator<People> cmp = Comparator.comparingDouble(null);
fail("comparing(null) should throw NPE");
} catch (NullPointerException npe) {}
}
--- a/jdk/test/java/util/Map/EntryComparators.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/util/Map/EntryComparators.java Fri Sep 06 14:20:58 2013 -0700
@@ -115,8 +115,8 @@
// Comparator<People> cmp = Comparator.naturalOrder(); // Should fail to compiler as People is not comparable
// We can use simple comparator, but those have been tested above.
// Thus choose to do compose for some level of interation.
- Comparator<People> cmp1 = Comparator.comparing((Function<People, String>) People::getFirstName);
- Comparator<People> cmp2 = Comparator.comparing((Function<People, String>) People::getLastName);
+ Comparator<People> cmp1 = Comparator.comparing(People::getFirstName);
+ Comparator<People> cmp2 = Comparator.comparing(People::getLastName);
Comparator<People> cmp = cmp1.thenComparing(cmp2);
assertPairComparison(people[0], people[0], people[1], people[1],
--- a/jdk/test/java/util/Random/RandomStreamTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/util/Random/RandomStreamTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -82,13 +82,6 @@
assertEquals(destination.size(), count);
}
- @Test(dataProvider = "suppliers")
- public void testRandomGaussianStream(final Random random, final int count) {
- final List<Double> destination = new ArrayList<>(count);
- random.gaussians().limit(count).forEach(destination::add);
- assertEquals(destination.size(), count);
- }
-
@Test
public void testIntStream() {
final long seed = System.currentTimeMillis();
@@ -132,20 +125,6 @@
}
@Test
- public void testGaussianStream() {
- final long seed = System.currentTimeMillis();
- final Random r1 = new Random(seed);
- final double[] a = new double[SIZE];
- for (int i=0; i < SIZE; i++) {
- a[i] = r1.nextGaussian();
- }
-
- final Random r2 = new Random(seed); // same seed
- final double[] b = r2.gaussians().limit(SIZE).toArray();
- assertEquals(a, b);
- }
-
- @Test
public void testThreadLocalIntStream() throws InterruptedException, ExecutionException, TimeoutException {
ThreadLocalRandom tlr = ThreadLocalRandom.current();
testRandomResultSupplierConcurrently(() -> tlr.ints().limit(SIZE).boxed().collect(toList()));
@@ -163,12 +142,6 @@
testRandomResultSupplierConcurrently(() -> tlr.doubles().limit(SIZE).boxed().collect(toList()));
}
- @Test
- public void testThreadLocalGaussianStream() throws InterruptedException, ExecutionException, TimeoutException {
- ThreadLocalRandom tlr = ThreadLocalRandom.current();
- testRandomResultSupplierConcurrently(() -> tlr.gaussians().limit(SIZE).boxed().collect(toList()));
- }
-
<T> void testRandomResultSupplierConcurrently(Supplier<T> s) throws InterruptedException, ExecutionException, TimeoutException {
// Produce 10 completable future tasks
final int tasks = 10;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Random/RandomTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,430 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.LongAdder;
+import java.util.function.BiConsumer;
+
+import static org.testng.Assert.*;
+
+/**
+ * @test
+ * @run testng RandomTest
+ * @summary test methods on Random
+ */
+@Test
+public class RandomTest {
+
+ // Note: this test was adapted from the 166 TCK ThreadLocalRandomTest test
+ // and modified to be a TestNG test
+
+ /*
+ * Testing coverage notes:
+ *
+ * We don't test randomness properties, but only that repeated
+ * calls, up to NCALLS tries, produce at least one different
+ * result. For bounded versions, we sample various intervals
+ * across multiples of primes.
+ */
+
+ // max numbers of calls to detect getting stuck on one value
+ static final int NCALLS = 10000;
+
+ // max sampled int bound
+ static final int MAX_INT_BOUND = (1 << 28);
+
+ // max sampled long bound
+ static final long MAX_LONG_BOUND = (1L << 42);
+
+ // Number of replications for other checks
+ static final int REPS = 20;
+
+ /**
+ * Repeated calls to nextInt produce at least two distinct results
+ */
+ public void testNextInt() {
+ Random r = new Random();
+ int f = r.nextInt();
+ int i = 0;
+ while (i < NCALLS && r.nextInt() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextLong produce at least two distinct results
+ */
+ public void testNextLong() {
+ Random r = new Random();
+ long f = r.nextLong();
+ int i = 0;
+ while (i < NCALLS && r.nextLong() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextBoolean produce at least two distinct results
+ */
+ public void testNextBoolean() {
+ Random r = new Random();
+ boolean f = r.nextBoolean();
+ int i = 0;
+ while (i < NCALLS && r.nextBoolean() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextFloat produce at least two distinct results
+ */
+ public void testNextFloat() {
+ Random r = new Random();
+ float f = r.nextFloat();
+ int i = 0;
+ while (i < NCALLS && r.nextFloat() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextDouble produce at least two distinct results
+ */
+ public void testNextDouble() {
+ Random r = new Random();
+ double f = r.nextDouble();
+ int i = 0;
+ while (i < NCALLS && r.nextDouble() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextGaussian produce at least two distinct results
+ */
+ public void testNextGaussian() {
+ Random r = new Random();
+ double f = r.nextGaussian();
+ int i = 0;
+ while (i < NCALLS && r.nextGaussian() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * nextInt(negative) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextIntBoundedNeg() {
+ Random r = new Random();
+ int f = r.nextInt(-17);
+ }
+
+ /**
+ * nextInt(bound) returns 0 <= value < bound; repeated calls produce at
+ * least two distinct results
+ */
+ public void testNextIntBounded() {
+ Random r = new Random();
+ // sample bound space across prime number increments
+ for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) {
+ int f = r.nextInt(bound);
+ assertTrue(0 <= f && f < bound);
+ int i = 0;
+ int j;
+ while (i < NCALLS &&
+ (j = r.nextInt(bound)) == f) {
+ assertTrue(0 <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * Invoking sized ints, long, doubles, with negative sizes throws
+ * IllegalArgumentException
+ */
+ public void testBadStreamSize() {
+ Random r = new Random();
+ executeAndCatchIAE(() -> r.ints(-1L));
+ executeAndCatchIAE(() -> r.ints(-1L, 2, 3));
+ executeAndCatchIAE(() -> r.longs(-1L));
+ executeAndCatchIAE(() -> r.longs(-1L, -1L, 1L));
+ executeAndCatchIAE(() -> r.doubles(-1L));
+ executeAndCatchIAE(() -> r.doubles(-1L, .5, .6));
+ }
+
+ /**
+ * Invoking bounded ints, long, doubles, with illegal bounds throws
+ * IllegalArgumentException
+ */
+ public void testBadStreamBounds() {
+ Random r = new Random();
+ executeAndCatchIAE(() -> r.ints(2, 1));
+ executeAndCatchIAE(() -> r.ints(10, 42, 42));
+ executeAndCatchIAE(() -> r.longs(-1L, -1L));
+ executeAndCatchIAE(() -> r.longs(10, 1L, -2L));
+
+ testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b));
+ }
+
+ // An arbitrary finite double value
+ static final double FINITE = Math.PI;
+
+ void testDoubleBadOriginBound(BiConsumer<Double, Double> bi) {
+ executeAndCatchIAE(() -> bi.accept(17.0, 2.0));
+ executeAndCatchIAE(() -> bi.accept(0.0, 0.0));
+ executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE));
+ executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN));
+ executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+
+ // Returns NaN
+// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
+// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+
+ executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
+
+ // Returns Double.MAX_VALUE
+// executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
+
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
+ }
+
+ private void executeAndCatchIAE(Runnable r) {
+ executeAndCatch(IllegalArgumentException.class, r);
+ }
+
+ private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
+ Exception caught = null;
+ try {
+ r.run();
+ }
+ catch (Exception e) {
+ caught = e;
+ }
+
+ assertNotNull(caught,
+ String.format("No Exception was thrown, expected an Exception of %s to be thrown",
+ expected.getName()));
+ Assert.assertTrue(expected.isInstance(caught),
+ String.format("Exception thrown %s not an instance of %s",
+ caught.getClass().getName(), expected.getName()));
+ }
+
+ /**
+ * A sequential sized stream of ints generates the given number of values
+ */
+ public void testIntsCount() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.ints(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * A sequential sized stream of longs generates the given number of values
+ */
+ public void testLongsCount() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.longs(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * A sequential sized stream of doubles generates the given number of values
+ */
+ public void testDoublesCount() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.doubles(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * Each of a sequential sized stream of bounded ints is within bounds
+ */
+ public void testBoundedInts() {
+ AtomicInteger fails = new AtomicInteger(0);
+ Random r = new Random();
+ long size = 12345L;
+ for (int least = -15485867; least < MAX_INT_BOUND; least += 524959) {
+ for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 67867967) {
+ final int lo = least, hi = bound;
+ r.ints(size, lo, hi).
+ forEach(x -> {
+ if (x < lo || x >= hi)
+ fails.getAndIncrement();
+ });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * Each of a sequential sized stream of bounded longs is within bounds
+ */
+ public void testBoundedLongs() {
+ AtomicInteger fails = new AtomicInteger(0);
+ Random r = new Random();
+ long size = 123L;
+ for (long least = -86028121; least < MAX_LONG_BOUND; least += 1982451653L) {
+ for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUND; bound += Math.abs(bound * 7919)) {
+ final long lo = least, hi = bound;
+ r.longs(size, lo, hi).
+ forEach(x -> {
+ if (x < lo || x >= hi)
+ fails.getAndIncrement();
+ });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * Each of a sequential sized stream of bounded doubles is within bounds
+ */
+ public void testBoundedDoubles() {
+ AtomicInteger fails = new AtomicInteger(0);
+ Random r = new Random();
+ long size = 456;
+ for (double least = 0.00011; least < 1.0e20; least *= 9) {
+ for (double bound = least * 1.0011; bound < 1.0e20; bound *= 17) {
+ final double lo = least, hi = bound;
+ r.doubles(size, lo, hi).
+ forEach(x -> {
+ if (x < lo || x >= hi)
+ fails.getAndIncrement();
+ });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * A parallel unsized stream of ints generates at least 100 values
+ */
+ public void testUnsizedIntsCount() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 100;
+ r.ints().limit(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A parallel unsized stream of longs generates at least 100 values
+ */
+ public void testUnsizedLongsCount() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 100;
+ r.longs().limit(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A parallel unsized stream of doubles generates at least 100 values
+ */
+ public void testUnsizedDoublesCount() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 100;
+ r.doubles().limit(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of ints generates at least 100 values
+ */
+ public void testUnsizedIntsCountSeq() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 100;
+ r.ints().limit(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of longs generates at least 100 values
+ */
+ public void testUnsizedLongsCountSeq() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 100;
+ r.longs().limit(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of doubles generates at least 100 values
+ */
+ public void testUnsizedDoublesCountSeq() {
+ LongAdder counter = new LongAdder();
+ Random r = new Random();
+ long size = 100;
+ r.doubles().limit(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/SplittableRandom/SplittableRandomTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,560 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.SplittableRandom;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.LongAdder;
+import java.util.function.BiConsumer;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * @test
+ * @run testng SplittableRandomTest
+ * @run testng/othervm -Djava.util.secureRandomSeed=true SplittableRandomTest
+ * @summary test methods on SplittableRandom
+ */
+@Test
+public class SplittableRandomTest {
+
+ // Note: this test was copied from the 166 TCK SplittableRandomTest test
+ // and modified to be a TestNG test
+
+ /*
+ * Testing coverage notes:
+ *
+ * 1. Many of the test methods are adapted from ThreadLocalRandomTest.
+ *
+ * 2. These tests do not check for random number generator quality.
+ * But we check for minimal API compliance by requiring that
+ * repeated calls to nextX methods, up to NCALLS tries, produce at
+ * least two distinct results. (In some possible universe, a
+ * "correct" implementation might fail, but the odds are vastly
+ * less than that of encountering a hardware failure while running
+ * the test.) For bounded nextX methods, we sample various
+ * intervals across multiples of primes. In other tests, we repeat
+ * under REPS different values.
+ */
+
+ // max numbers of calls to detect getting stuck on one value
+ static final int NCALLS = 10000;
+
+ // max sampled int bound
+ static final int MAX_INT_BOUND = (1 << 28);
+
+ // max sampled long bound
+ static final long MAX_LONG_BOUND = (1L << 42);
+
+ // Number of replications for other checks
+ static final int REPS = 20;
+
+ /**
+ * Repeated calls to nextInt produce at least two distinct results
+ */
+ public void testNextInt() {
+ SplittableRandom sr = new SplittableRandom();
+ int f = sr.nextInt();
+ int i = 0;
+ while (i < NCALLS && sr.nextInt() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextLong produce at least two distinct results
+ */
+ public void testNextLong() {
+ SplittableRandom sr = new SplittableRandom();
+ long f = sr.nextLong();
+ int i = 0;
+ while (i < NCALLS && sr.nextLong() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextDouble produce at least two distinct results
+ */
+ public void testNextDouble() {
+ SplittableRandom sr = new SplittableRandom();
+ double f = sr.nextDouble();
+ int i = 0;
+ while (i < NCALLS && sr.nextDouble() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Two SplittableRandoms created with the same seed produce the
+ * same values for nextLong.
+ */
+ public void testSeedConstructor() {
+ for (long seed = 2; seed < MAX_LONG_BOUND; seed += 15485863) {
+ SplittableRandom sr1 = new SplittableRandom(seed);
+ SplittableRandom sr2 = new SplittableRandom(seed);
+ for (int i = 0; i < REPS; ++i)
+ assertEquals(sr1.nextLong(), sr2.nextLong());
+ }
+ }
+
+ /**
+ * A SplittableRandom produced by split() of a default-constructed
+ * SplittableRandom generates a different sequence
+ */
+ public void testSplit1() {
+ SplittableRandom sr = new SplittableRandom();
+ for (int reps = 0; reps < REPS; ++reps) {
+ SplittableRandom sc = sr.split();
+ int i = 0;
+ while (i < NCALLS && sr.nextLong() == sc.nextLong())
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * A SplittableRandom produced by split() of a seeded-constructed
+ * SplittableRandom generates a different sequence
+ */
+ public void testSplit2() {
+ SplittableRandom sr = new SplittableRandom(12345);
+ for (int reps = 0; reps < REPS; ++reps) {
+ SplittableRandom sc = sr.split();
+ int i = 0;
+ while (i < NCALLS && sr.nextLong() == sc.nextLong())
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * nextInt(negative) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextIntBoundedNeg() {
+ SplittableRandom sr = new SplittableRandom();
+ int f = sr.nextInt(-17);
+ }
+
+ /**
+ * nextInt(least >= bound) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextIntBadBounds() {
+ SplittableRandom sr = new SplittableRandom();
+ int f = sr.nextInt(17, 2);
+ }
+
+ /**
+ * nextInt(bound) returns 0 <= value < bound;
+ * repeated calls produce at least two distinct results
+ */
+ public void testNextIntBounded() {
+ SplittableRandom sr = new SplittableRandom();
+ // sample bound space across prime number increments
+ for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) {
+ int f = sr.nextInt(bound);
+ assertTrue(0 <= f && f < bound);
+ int i = 0;
+ int j;
+ while (i < NCALLS &&
+ (j = sr.nextInt(bound)) == f) {
+ assertTrue(0 <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * nextInt(least, bound) returns least <= value < bound;
+ * repeated calls produce at least two distinct results
+ */
+ public void testNextIntBounded2() {
+ SplittableRandom sr = new SplittableRandom();
+ for (int least = -15485863; least < MAX_INT_BOUND; least += 524959) {
+ for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 49979687) {
+ int f = sr.nextInt(least, bound);
+ assertTrue(least <= f && f < bound);
+ int i = 0;
+ int j;
+ while (i < NCALLS &&
+ (j = sr.nextInt(least, bound)) == f) {
+ assertTrue(least <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+ }
+
+ /**
+ * nextLong(negative) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextLongBoundedNeg() {
+ SplittableRandom sr = new SplittableRandom();
+ long f = sr.nextLong(-17);
+ }
+
+ /**
+ * nextLong(least >= bound) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextLongBadBounds() {
+ SplittableRandom sr = new SplittableRandom();
+ long f = sr.nextLong(17, 2);
+ }
+
+ /**
+ * nextLong(bound) returns 0 <= value < bound;
+ * repeated calls produce at least two distinct results
+ */
+ public void testNextLongBounded() {
+ SplittableRandom sr = new SplittableRandom();
+ for (long bound = 2; bound < MAX_LONG_BOUND; bound += 15485863) {
+ long f = sr.nextLong(bound);
+ assertTrue(0 <= f && f < bound);
+ int i = 0;
+ long j;
+ while (i < NCALLS &&
+ (j = sr.nextLong(bound)) == f) {
+ assertTrue(0 <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * nextLong(least, bound) returns least <= value < bound;
+ * repeated calls produce at least two distinct results
+ */
+ public void testNextLongBounded2() {
+ SplittableRandom sr = new SplittableRandom();
+ for (long least = -86028121; least < MAX_LONG_BOUND; least += 982451653L) {
+ for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUND; bound += Math.abs(bound * 7919)) {
+ long f = sr.nextLong(least, bound);
+ assertTrue(least <= f && f < bound);
+ int i = 0;
+ long j;
+ while (i < NCALLS &&
+ (j = sr.nextLong(least, bound)) == f) {
+ assertTrue(least <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+ }
+
+ /**
+ * nextDouble(bound) throws IllegalArgumentException
+ */
+ public void testNextDoubleBadBound() {
+ SplittableRandom sr = new SplittableRandom();
+ executeAndCatchIAE(() -> sr.nextDouble(0.0));
+ executeAndCatchIAE(() -> sr.nextDouble(-0.0));
+ executeAndCatchIAE(() -> sr.nextDouble(+0.0));
+ executeAndCatchIAE(() -> sr.nextDouble(-1.0));
+ executeAndCatchIAE(() -> sr.nextDouble(Double.NaN));
+ executeAndCatchIAE(() -> sr.nextDouble(Double.NEGATIVE_INFINITY));
+
+ // Returns Double.MAX_VALUE
+// executeAndCatchIAE(() -> r.nextDouble(Double.POSITIVE_INFINITY));
+ }
+
+ /**
+ * nextDouble(origin, bound) throws IllegalArgumentException
+ */
+ public void testNextDoubleBadOriginBound() {
+ testDoubleBadOriginBound(new SplittableRandom()::nextDouble);
+ }
+
+ // An arbitrary finite double value
+ static final double FINITE = Math.PI;
+
+ void testDoubleBadOriginBound(BiConsumer<Double, Double> bi) {
+ executeAndCatchIAE(() -> bi.accept(17.0, 2.0));
+ executeAndCatchIAE(() -> bi.accept(0.0, 0.0));
+ executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE));
+ executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN));
+ executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+
+ // Returns NaN
+// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
+// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+
+ executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
+
+ // Returns Double.MAX_VALUE
+// executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
+
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
+ }
+
+ /**
+ * nextDouble(least, bound) returns least <= value < bound;
+ * repeated calls produce at least two distinct results
+ */
+ public void testNextDoubleBounded2() {
+ SplittableRandom sr = new SplittableRandom();
+ for (double least = 0.0001; least < 1.0e20; least *= 8) {
+ for (double bound = least * 1.001; bound < 1.0e20; bound *= 16) {
+ double f = sr.nextDouble(least, bound);
+ assertTrue(least <= f && f < bound);
+ int i = 0;
+ double j;
+ while (i < NCALLS &&
+ (j = sr.nextDouble(least, bound)) == f) {
+ assertTrue(least <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+ }
+
+ /**
+ * Invoking sized ints, long, doubles, with negative sizes throws
+ * IllegalArgumentException
+ */
+ public void testBadStreamSize() {
+ SplittableRandom r = new SplittableRandom();
+ executeAndCatchIAE(() -> r.ints(-1L));
+ executeAndCatchIAE(() -> r.ints(-1L, 2, 3));
+ executeAndCatchIAE(() -> r.longs(-1L));
+ executeAndCatchIAE(() -> r.longs(-1L, -1L, 1L));
+ executeAndCatchIAE(() -> r.doubles(-1L));
+ executeAndCatchIAE(() -> r.doubles(-1L, .5, .6));
+ }
+
+ /**
+ * Invoking bounded ints, long, doubles, with illegal bounds throws
+ * IllegalArgumentException
+ */
+ public void testBadStreamBounds() {
+ SplittableRandom r = new SplittableRandom();
+ executeAndCatchIAE(() -> r.ints(2, 1));
+ executeAndCatchIAE(() -> r.ints(10, 42, 42));
+ executeAndCatchIAE(() -> r.longs(-1L, -1L));
+ executeAndCatchIAE(() -> r.longs(10, 1L, -2L));
+
+ testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b));
+ }
+
+ private void executeAndCatchIAE(Runnable r) {
+ executeAndCatch(IllegalArgumentException.class, r);
+ }
+
+ private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
+ Exception caught = null;
+ try {
+ r.run();
+ }
+ catch (Exception e) {
+ caught = e;
+ }
+
+ assertNotNull(caught,
+ String.format("No Exception was thrown, expected an Exception of %s to be thrown",
+ expected.getName()));
+ Assert.assertTrue(expected.isInstance(caught),
+ String.format("Exception thrown %s not an instance of %s",
+ caught.getClass().getName(), expected.getName()));
+ }
+
+ /**
+ * A parallel sized stream of ints generates the given number of values
+ */
+ public void testIntsCount() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.ints(size).parallel().forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * A parallel sized stream of longs generates the given number of values
+ */
+ public void testLongsCount() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.longs(size).parallel().forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * A parallel sized stream of doubles generates the given number of values
+ */
+ public void testDoublesCount() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.doubles(size).parallel().forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * Each of a parallel sized stream of bounded ints is within bounds
+ */
+ public void testBoundedInts() {
+ AtomicInteger fails = new AtomicInteger(0);
+ SplittableRandom r = new SplittableRandom();
+ long size = 12345L;
+ for (int least = -15485867; least < MAX_INT_BOUND; least += 524959) {
+ for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 67867967) {
+ final int lo = least, hi = bound;
+ r.ints(size, lo, hi).parallel().
+ forEach(x -> {if (x < lo || x >= hi)
+ fails.getAndIncrement(); });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * Each of a parallel sized stream of bounded longs is within bounds
+ */
+ public void testBoundedLongs() {
+ AtomicInteger fails = new AtomicInteger(0);
+ SplittableRandom r = new SplittableRandom();
+ long size = 123L;
+ for (long least = -86028121; least < MAX_LONG_BOUND; least += 1982451653L) {
+ for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUND; bound += Math.abs(bound * 7919)) {
+ final long lo = least, hi = bound;
+ r.longs(size, lo, hi).parallel().
+ forEach(x -> {if (x < lo || x >= hi)
+ fails.getAndIncrement(); });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * Each of a parallel sized stream of bounded doubles is within bounds
+ */
+ public void testBoundedDoubles() {
+ AtomicInteger fails = new AtomicInteger(0);
+ SplittableRandom r = new SplittableRandom();
+ long size = 456;
+ for (double least = 0.00011; least < 1.0e20; least *= 9) {
+ for (double bound = least * 1.0011; bound < 1.0e20; bound *= 17) {
+ final double lo = least, hi = bound;
+ r.doubles(size, lo, hi).parallel().
+ forEach(x -> {if (x < lo || x >= hi)
+ fails.getAndIncrement(); });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * A parallel unsized stream of ints generates at least 100 values
+ */
+ public void testUnsizedIntsCount() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 100;
+ r.ints().limit(size).parallel().forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A parallel unsized stream of longs generates at least 100 values
+ */
+ public void testUnsizedLongsCount() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 100;
+ r.longs().limit(size).parallel().forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A parallel unsized stream of doubles generates at least 100 values
+ */
+ public void testUnsizedDoublesCount() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 100;
+ r.doubles().limit(size).parallel().forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of ints generates at least 100 values
+ */
+ public void testUnsizedIntsCountSeq() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 100;
+ r.ints().limit(size).forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of longs generates at least 100 values
+ */
+ public void testUnsizedLongsCountSeq() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 100;
+ r.longs().limit(size).forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of doubles generates at least 100 values
+ */
+ public void testUnsizedDoublesCountSeq() {
+ LongAdder counter = new LongAdder();
+ SplittableRandom r = new SplittableRandom();
+ long size = 100;
+ r.doubles().limit(size).forEach(x -> {counter.increment();});
+ assertEquals(counter.sum(), size);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ThreadLocalRandom/ThreadLocalRandomTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,559 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.LongAdder;
+import java.util.function.BiConsumer;
+
+import static org.testng.Assert.*;
+
+/**
+ * @test
+ * @run testng ThreadLocalRandomTest
+ * @summary test methods on ThreadLocalRandom
+ */
+@Test
+public class ThreadLocalRandomTest {
+
+ // Note: this test was copied from the 166 TCK ThreadLocalRandomTest test
+ // and modified to be a TestNG test
+
+ /*
+ * Testing coverage notes:
+ *
+ * We don't test randomness properties, but only that repeated
+ * calls, up to NCALLS tries, produce at least one different
+ * result. For bounded versions, we sample various intervals
+ * across multiples of primes.
+ */
+
+ // max numbers of calls to detect getting stuck on one value
+ static final int NCALLS = 10000;
+
+ // max sampled int bound
+ static final int MAX_INT_BOUND = (1 << 28);
+
+ // max sampled long bound
+ static final long MAX_LONG_BOUND = (1L << 42);
+
+ // Number of replications for other checks
+ static final int REPS = 20;
+
+ /**
+ * setSeed throws UnsupportedOperationException
+ */
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testSetSeed() {
+ ThreadLocalRandom.current().setSeed(17);
+ }
+
+ /**
+ * Repeated calls to nextInt produce at least two distinct results
+ */
+ public void testNextInt() {
+ int f = ThreadLocalRandom.current().nextInt();
+ int i = 0;
+ while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextLong produce at least two distinct results
+ */
+ public void testNextLong() {
+ long f = ThreadLocalRandom.current().nextLong();
+ int i = 0;
+ while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextBoolean produce at least two distinct results
+ */
+ public void testNextBoolean() {
+ boolean f = ThreadLocalRandom.current().nextBoolean();
+ int i = 0;
+ while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextFloat produce at least two distinct results
+ */
+ public void testNextFloat() {
+ float f = ThreadLocalRandom.current().nextFloat();
+ int i = 0;
+ while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextDouble produce at least two distinct results
+ */
+ public void testNextDouble() {
+ double f = ThreadLocalRandom.current().nextDouble();
+ int i = 0;
+ while (i < NCALLS && ThreadLocalRandom.current().nextDouble() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * Repeated calls to nextGaussian produce at least two distinct results
+ */
+ public void testNextGaussian() {
+ double f = ThreadLocalRandom.current().nextGaussian();
+ int i = 0;
+ while (i < NCALLS && ThreadLocalRandom.current().nextGaussian() == f)
+ ++i;
+ assertTrue(i < NCALLS);
+ }
+
+ /**
+ * nextInt(negative) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextIntBoundedNeg() {
+ int f = ThreadLocalRandom.current().nextInt(-17);
+ }
+
+ /**
+ * nextInt(least >= bound) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextIntBadBounds() {
+ int f = ThreadLocalRandom.current().nextInt(17, 2);
+ }
+
+ /**
+ * nextInt(bound) returns 0 <= value < bound; repeated calls produce at
+ * least two distinct results
+ */
+ public void testNextIntBounded() {
+ // sample bound space across prime number increments
+ for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) {
+ int f = ThreadLocalRandom.current().nextInt(bound);
+ assertTrue(0 <= f && f < bound);
+ int i = 0;
+ int j;
+ while (i < NCALLS &&
+ (j = ThreadLocalRandom.current().nextInt(bound)) == f) {
+ assertTrue(0 <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * nextInt(least, bound) returns least <= value < bound; repeated calls
+ * produce at least two distinct results
+ */
+ public void testNextIntBounded2() {
+ for (int least = -15485863; least < MAX_INT_BOUND; least += 524959) {
+ for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 49979687) {
+ int f = ThreadLocalRandom.current().nextInt(least, bound);
+ assertTrue(least <= f && f < bound);
+ int i = 0;
+ int j;
+ while (i < NCALLS &&
+ (j = ThreadLocalRandom.current().nextInt(least, bound)) == f) {
+ assertTrue(least <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+ }
+
+ /**
+ * nextLong(negative) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextLongBoundedNeg() {
+ long f = ThreadLocalRandom.current().nextLong(-17);
+ }
+
+ /**
+ * nextLong(least >= bound) throws IllegalArgumentException
+ */
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testNextLongBadBounds() {
+ long f = ThreadLocalRandom.current().nextLong(17, 2);
+ }
+
+ /**
+ * nextLong(bound) returns 0 <= value < bound; repeated calls produce at
+ * least two distinct results
+ */
+ public void testNextLongBounded() {
+ for (long bound = 2; bound < MAX_LONG_BOUND; bound += 15485863) {
+ long f = ThreadLocalRandom.current().nextLong(bound);
+ assertTrue(0 <= f && f < bound);
+ int i = 0;
+ long j;
+ while (i < NCALLS &&
+ (j = ThreadLocalRandom.current().nextLong(bound)) == f) {
+ assertTrue(0 <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+
+ /**
+ * nextLong(least, bound) returns least <= value < bound; repeated calls
+ * produce at least two distinct results
+ */
+ public void testNextLongBounded2() {
+ for (long least = -86028121; least < MAX_LONG_BOUND; least += 982451653L) {
+ for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUND; bound += Math.abs(bound * 7919)) {
+ long f = ThreadLocalRandom.current().nextLong(least, bound);
+ assertTrue(least <= f && f < bound);
+ int i = 0;
+ long j;
+ while (i < NCALLS &&
+ (j = ThreadLocalRandom.current().nextLong(least, bound)) == f) {
+ assertTrue(least <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+ }
+
+ /**
+ * nextDouble(bound) throws IllegalArgumentException
+ */
+ public void testNextDoubleBadBound() {
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ executeAndCatchIAE(() -> r.nextDouble(0.0));
+ executeAndCatchIAE(() -> r.nextDouble(-0.0));
+ executeAndCatchIAE(() -> r.nextDouble(+0.0));
+ executeAndCatchIAE(() -> r.nextDouble(-1.0));
+ executeAndCatchIAE(() -> r.nextDouble(Double.NaN));
+ executeAndCatchIAE(() -> r.nextDouble(Double.NEGATIVE_INFINITY));
+
+ // Returns Double.MAX_VALUE
+// executeAndCatchIAE(() -> r.nextDouble(Double.POSITIVE_INFINITY));
+ }
+
+ /**
+ * nextDouble(origin, bound) throws IllegalArgumentException
+ */
+ public void testNextDoubleBadOriginBound() {
+ testDoubleBadOriginBound(ThreadLocalRandom.current()::nextDouble);
+ }
+
+ // An arbitrary finite double value
+ static final double FINITE = Math.PI;
+
+ void testDoubleBadOriginBound(BiConsumer<Double, Double> bi) {
+ executeAndCatchIAE(() -> bi.accept(17.0, 2.0));
+ executeAndCatchIAE(() -> bi.accept(0.0, 0.0));
+ executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE));
+ executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN));
+ executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+
+ // Returns NaN
+// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
+// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+
+ executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
+
+ // Returns Double.MAX_VALUE
+// executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
+
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
+ executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
+ }
+
+ /**
+ * nextDouble(least, bound) returns least <= value < bound; repeated calls
+ * produce at least two distinct results
+ */
+ public void testNextDoubleBounded2() {
+ for (double least = 0.0001; least < 1.0e20; least *= 8) {
+ for (double bound = least * 1.001; bound < 1.0e20; bound *= 16) {
+ double f = ThreadLocalRandom.current().nextDouble(least, bound);
+ assertTrue(least <= f && f < bound);
+ int i = 0;
+ double j;
+ while (i < NCALLS &&
+ (j = ThreadLocalRandom.current().nextDouble(least, bound)) == f) {
+ assertTrue(least <= j && j < bound);
+ ++i;
+ }
+ assertTrue(i < NCALLS);
+ }
+ }
+ }
+
+ /**
+ * Invoking sized ints, long, doubles, with negative sizes throws
+ * IllegalArgumentException
+ */
+ public void testBadStreamSize() {
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ executeAndCatchIAE(() -> r.ints(-1L));
+ executeAndCatchIAE(() -> r.ints(-1L, 2, 3));
+ executeAndCatchIAE(() -> r.longs(-1L));
+ executeAndCatchIAE(() -> r.longs(-1L, -1L, 1L));
+ executeAndCatchIAE(() -> r.doubles(-1L));
+ executeAndCatchIAE(() -> r.doubles(-1L, .5, .6));
+ }
+
+ /**
+ * Invoking bounded ints, long, doubles, with illegal bounds throws
+ * IllegalArgumentException
+ */
+ public void testBadStreamBounds() {
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ executeAndCatchIAE(() -> r.ints(2, 1));
+ executeAndCatchIAE(() -> r.ints(10, 42, 42));
+ executeAndCatchIAE(() -> r.longs(-1L, -1L));
+ executeAndCatchIAE(() -> r.longs(10, 1L, -2L));
+
+ testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b));
+ }
+
+ private void executeAndCatchIAE(Runnable r) {
+ executeAndCatch(IllegalArgumentException.class, r);
+ }
+
+ private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
+ Exception caught = null;
+ try {
+ r.run();
+ }
+ catch (Exception e) {
+ caught = e;
+ }
+
+ assertNotNull(caught,
+ String.format("No Exception was thrown, expected an Exception of %s to be thrown",
+ expected.getName()));
+ Assert.assertTrue(expected.isInstance(caught),
+ String.format("Exception thrown %s not an instance of %s",
+ caught.getClass().getName(), expected.getName()));
+ }
+
+ /**
+ * A parallel sized stream of ints generates the given number of values
+ */
+ public void testIntsCount() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.ints(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * A parallel sized stream of longs generates the given number of values
+ */
+ public void testLongsCount() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.longs(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * A parallel sized stream of doubles generates the given number of values
+ */
+ public void testDoublesCount() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 0;
+ for (int reps = 0; reps < REPS; ++reps) {
+ counter.reset();
+ r.doubles(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ size += 524959;
+ }
+ }
+
+ /**
+ * Each of a parallel sized stream of bounded ints is within bounds
+ */
+ public void testBoundedInts() {
+ AtomicInteger fails = new AtomicInteger(0);
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 12345L;
+ for (int least = -15485867; least < MAX_INT_BOUND; least += 524959) {
+ for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 67867967) {
+ final int lo = least, hi = bound;
+ r.ints(size, lo, hi).parallel().
+ forEach(x -> {
+ if (x < lo || x >= hi)
+ fails.getAndIncrement();
+ });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * Each of a parallel sized stream of bounded longs is within bounds
+ */
+ public void testBoundedLongs() {
+ AtomicInteger fails = new AtomicInteger(0);
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 123L;
+ for (long least = -86028121; least < MAX_LONG_BOUND; least += 1982451653L) {
+ for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUND; bound += Math.abs(bound * 7919)) {
+ final long lo = least, hi = bound;
+ r.longs(size, lo, hi).parallel().
+ forEach(x -> {
+ if (x < lo || x >= hi)
+ fails.getAndIncrement();
+ });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * Each of a parallel sized stream of bounded doubles is within bounds
+ */
+ public void testBoundedDoubles() {
+ AtomicInteger fails = new AtomicInteger(0);
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 456;
+ for (double least = 0.00011; least < 1.0e20; least *= 9) {
+ for (double bound = least * 1.0011; bound < 1.0e20; bound *= 17) {
+ final double lo = least, hi = bound;
+ r.doubles(size, lo, hi).parallel().
+ forEach(x -> {
+ if (x < lo || x >= hi)
+ fails.getAndIncrement();
+ });
+ }
+ }
+ assertEquals(fails.get(), 0);
+ }
+
+ /**
+ * A parallel unsized stream of ints generates at least 100 values
+ */
+ public void testUnsizedIntsCount() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 100;
+ r.ints().limit(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A parallel unsized stream of longs generates at least 100 values
+ */
+ public void testUnsizedLongsCount() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 100;
+ r.longs().limit(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A parallel unsized stream of doubles generates at least 100 values
+ */
+ public void testUnsizedDoublesCount() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 100;
+ r.doubles().limit(size).parallel().forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of ints generates at least 100 values
+ */
+ public void testUnsizedIntsCountSeq() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 100;
+ r.ints().limit(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of longs generates at least 100 values
+ */
+ public void testUnsizedLongsCountSeq() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 100;
+ r.longs().limit(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+ /**
+ * A sequential unsized stream of doubles generates at least 100 values
+ */
+ public void testUnsizedDoublesCountSeq() {
+ LongAdder counter = new LongAdder();
+ ThreadLocalRandom r = ThreadLocalRandom.current();
+ long size = 100;
+ r.doubles().limit(size).forEach(x -> {
+ counter.increment();
+ });
+ assertEquals(counter.sum(), size);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/locks/StampedLock/ReadersUnlockAfterWriteUnlock.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,88 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @run main/othervm/timeout=60 ReadersUnlockAfterWriteUnlock
+ * @bug 8023234
+ * @summary StampedLock serializes readers on writer unlock
+ * @author Dmitry Chyuko
+ * @author Aleksey Shipilev
+ */
+
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.locks.StampedLock;
+
+public class ReadersUnlockAfterWriteUnlock {
+ static final int RNUM = 2;
+ static final StampedLock sl = new StampedLock();
+ static volatile boolean isDone;
+
+ static CyclicBarrier iterationStart = new CyclicBarrier(RNUM + 1);
+ static CyclicBarrier readersHaveLocks = new CyclicBarrier(RNUM);
+ static CyclicBarrier writerHasLock = new CyclicBarrier(RNUM + 1);
+
+ static class Reader extends Thread {
+ final String name;
+ Reader(String name) {
+ super();
+ this.name = name;
+ }
+ public void run() {
+ while (!isDone && !isInterrupted()) {
+ try {
+ iterationStart.await();
+ writerHasLock.await();
+ long rs = sl.readLock();
+
+ // single reader blocks here indefinitely if readers
+ // are serialized
+ readersHaveLocks.await();
+
+ sl.unlockRead(rs);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ }
+ }
+
+ public static void main(String[] args) throws InterruptedException {
+ for (int r = 0 ; r < RNUM; ++r) {
+ new Reader("r" + r).start();
+ }
+ int i;
+ for (i = 0; i < 1024; ++i) {
+ try {
+ iterationStart.await();
+ long ws = sl.writeLock();
+ writerHasLock.await();
+ Thread.sleep(10);
+ sl.unlockWrite(ws);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ isDone = true;
+ }
+
+}
--- a/jdk/test/java/util/function/BinaryOperator/BasicTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/util/function/BinaryOperator/BasicTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -67,26 +67,26 @@
};
public void testMaxBy() {
- Comparator<People> cmp = Comparator.comparing((Function<People, String>) People::getFirstName);
+ Comparator<People> cmp = Comparator.comparing(People::getFirstName);
// lesser
assertSame(maxBy(cmp).apply(people[0], people[1]), people[1]);
// euqal
- cmp = Comparator.comparing((Function<People, String>) People::getLastName);
+ cmp = Comparator.comparing(People::getLastName);
assertSame(maxBy(cmp).apply(people[0], people[1]), people[0]);
// greater
- cmp = Comparator.comparing((ToIntFunction<People>) People::getAge);
+ cmp = Comparator.comparingInt(People::getAge);
assertSame(maxBy(cmp).apply(people[0], people[1]), people[0]);
}
- public void testLesserOf() {
- Comparator<People> cmp = Comparator.comparing((Function<People, String>) People::getFirstName);
+ public void testMinBy() {
+ Comparator<People> cmp = Comparator.comparing(People::getFirstName);
// lesser
assertSame(minBy(cmp).apply(people[0], people[1]), people[0]);
// euqal
- cmp = Comparator.comparing((Function<People, String>) People::getLastName);
+ cmp = Comparator.comparing(People::getLastName);
assertSame(minBy(cmp).apply(people[0], people[1]), people[0]);
// greater
- cmp = Comparator.comparing((ToIntFunction<People>) People::getAge);
+ cmp = Comparator.comparingInt(People::getAge);
assertSame(minBy(cmp).apply(people[0], people[1]), people[1]);
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/Logger/getLogger/TestLogger.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+
+/**
+ * @test
+ * @bug 8005899
+ * @build TestLogger testlogger.MyResource
+ * @run main/othervm TestLogger
+ * @run main/othervm -Dsecurity=on TestLogger
+ **/
+public class TestLogger {
+
+ public static final String RESOURCE_BUNDLE = "testlogger.MyResource";
+ public static final String ORG_LOGGER = "org";
+ public static final String FOO_LOGGER = ORG_LOGGER + ".foo.Foo";
+ public static final String BAR_LOGGER = ORG_LOGGER + ".bar.Bar";
+ public static final String GEE_LOGGER = ORG_LOGGER + ".gee.Gee";
+ public static final String GEE_GEE_LOGGER = GEE_LOGGER+".Gee";
+
+ public static void main(String[] args) {
+ final String security = System.getProperty("security", "off");
+ System.out.println("Security is " + security);
+ if ("on".equals(security)) {
+ System.setSecurityManager(new SecurityManager());
+ }
+
+ newLogger(FOO_LOGGER, RESOURCE_BUNDLE);
+ newLogger(FOO_LOGGER);
+ newLogger(BAR_LOGGER);
+ newLogger(BAR_LOGGER, RESOURCE_BUNDLE);
+ newLogger(GEE_LOGGER, null);
+ newLogger(GEE_LOGGER, RESOURCE_BUNDLE);
+ newLogger(ORG_LOGGER);
+ newLogger(GEE_GEE_LOGGER);
+
+ for (String log : new String[] { FOO_LOGGER, BAR_LOGGER, GEE_LOGGER }) {
+ if (!RESOURCE_BUNDLE.equals(Logger.getLogger(log).getResourceBundleName())) {
+ throw new RuntimeException("Shouldn't allow to reset the resource bundle for " + log);
+ }
+ try {
+ Logger logger = Logger.getLogger(log, null);
+ if (!RESOURCE_BUNDLE.equals(logger.getResourceBundleName())) {
+ throw new RuntimeException("Shouldn't allow to reset the resource bundle for " + log);
+ }
+ throw new RuntimeException("Expected IllegalArgumentException not thrown for " + log);
+ } catch (IllegalArgumentException e) {
+ System.out.println("Got expected exception for " + log +": " + e);
+ }
+ }
+ for (String log : new String[] { ORG_LOGGER, GEE_GEE_LOGGER }) {
+ if (Logger.getLogger(log).getResourceBundleName() != null) {
+ throw new RuntimeException("Resource bundle is not null for log: "
+ + Logger.getLogger(log).getResourceBundleName());
+ }
+ try {
+ Logger logger = Logger.getLogger(log, null);
+ if (logger.getResourceBundleName() != null) {
+ throw new RuntimeException("Resource bundle is not null for log: "
+ + logger.getResourceBundleName());
+ }
+ System.out.println("Success calling Logger.getLogger(\""+log+"\", null)");
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException("Unexpected exception for " + log +": " + e, e);
+ }
+ }
+ }
+
+ private static List<Logger> strongRefs = new ArrayList<>();
+ private static void newLogger(String name) {
+ strongRefs.add(Logger.getLogger(name));
+ }
+ private static void newLogger(String name, String resourceBundleName) {
+ strongRefs.add(Logger.getLogger(name, resourceBundleName));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/Logger/getLogger/testlogger/MyResource.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package testlogger;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Properties;
+import java.util.ResourceBundle;
+
+/**
+ * A dummy resource bundle for testing purposes.
+ * @author danielfuchs
+ */
+public class MyResource extends ResourceBundle {
+ Map<String, Object> bundle = new HashMap<>();
+
+ @Override
+ protected Object handleGetObject(String key) {
+ bundle.put(key,"Localized: " + key);
+ return bundle.get(key);
+ }
+
+ @Override
+ public Enumeration<String> getKeys() {
+ final Hashtable<String, Object> h = new Hashtable<>(bundle);
+ return h.keys();
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/regex/PatternTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @summary Unit tests for wrapping classes should delegate to default methods
+ * @library ../stream/bootlib
+ * @build java.util.stream.OpTestCase
+ * @run testng/othervm PatternTest
+ */
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Supplier;
+import java.util.regex.Pattern;
+import java.util.stream.LambdaTestHelpers;
+import java.util.stream.OpTestCase;
+import java.util.stream.Stream;
+import java.util.stream.TestData;
+
+@Test
+public class PatternTest extends OpTestCase {
+
+ @DataProvider(name = "Stream<String>")
+ public static Object[][] makeStreamTestData() {
+ List<Object[]> data = new ArrayList<>();
+
+ String description = "";
+ String input = "awgqwefg1fefw4vssv1vvv1";
+ Pattern pattern = Pattern.compile("4");
+ List<String> expected = new ArrayList<>();
+ expected.add("awgqwefg1fefw");
+ expected.add("vssv1vvv1");
+
+ // Must match the type signature of the consumer of this data, testStrings
+ // String, String, Pattern, List<String>
+ data.add(new Object[]{description, input, pattern, expected});
+
+ input = "afbfq\u00a3abgwgb\u00a3awngnwggw\u00a3a\u00a3ahjrnhneerh";
+ pattern = Pattern.compile("\u00a3a");
+ expected = new ArrayList<>();
+ expected.add("afbfq");
+ expected.add("bgwgb");
+ expected.add("wngnwggw");
+ expected.add("");
+ expected.add("hjrnhneerh");
+
+ data.add(new Object[]{description, input, pattern, expected});
+
+
+ input = "awgqwefg1fefw4vssv1vvv1";
+ pattern = Pattern.compile("1");
+ expected = new ArrayList<>();
+ expected.add("awgqwefg");
+ expected.add("fefw4vssv");
+ expected.add("vvv");
+
+ data.add(new Object[]{description, input, pattern, expected});
+
+
+ input = "a\u4ebafg1fefw\u4eba4\u9f9cvssv\u9f9c1v\u672c\u672cvv";
+ pattern = Pattern.compile("1");
+ expected = new ArrayList<>();
+ expected.add("a\u4ebafg");
+ expected.add("fefw\u4eba4\u9f9cvssv\u9f9c");
+ expected.add("v\u672c\u672cvv");
+
+ data.add(new Object[]{description, input, pattern, expected});
+
+
+ input = "1\u56da23\u56da456\u56da7890";
+ pattern = Pattern.compile("\u56da");
+ expected = new ArrayList<>();
+ expected.add("1");
+ expected.add("23");
+ expected.add("456");
+ expected.add("7890");
+
+ data.add(new Object[]{description, input, pattern, expected});
+
+
+ input = "1\u56da23\u9f9c\u672c\u672c\u56da456\u56da\u9f9c\u672c7890";
+ pattern = Pattern.compile("\u56da");
+ expected = new ArrayList<>();
+ expected.add("1");
+ expected.add("23\u9f9c\u672c\u672c");
+ expected.add("456");
+ expected.add("\u9f9c\u672c7890");
+
+ data.add(new Object[]{description, input, pattern, expected});
+
+
+ input = "";
+ pattern = Pattern.compile("\u56da");
+ expected = new ArrayList<>();
+
+ data.add(new Object[]{description, input, pattern, expected});
+
+
+ description = "Multiple separators";
+ input = "This is,testing: with\tdifferent separators.";
+ pattern = Pattern.compile("[ \t,:.]");
+ expected = new ArrayList<>();
+ expected.add("This");
+ expected.add("is");
+ expected.add("testing");
+ expected.add("");
+ expected.add("with");
+ expected.add("different");
+ expected.add("separators");
+
+ data.add(new Object[] {description, input, pattern, expected});
+ return data.toArray(new Object[0][]);
+ }
+
+ @Test(dataProvider = "Stream<String>")
+ public void testStrings(String description, String input, Pattern pattern, List<String> expected) {
+ Supplier<Stream<String>> ss = () -> pattern.splitAsStream(input);
+ withData(TestData.Factory.ofSupplier(description, ss))
+ .stream(LambdaTestHelpers.identity())
+ .expectedResult(expected)
+ .exercise();
+ }
+}
--- a/jdk/test/java/util/regex/RegExTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/util/regex/RegExTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -33,7 +33,7 @@
* 5013885 5003322 4988891 5098443 5110268 6173522 4829857 5027748 6376940
* 6358731 6178785 6284152 6231989 6497148 6486934 6233084 6504326 6635133
* 6350801 6676425 6878475 6919132 6931676 6948903 6990617 7014645 7039066
- * 7067045 7014640 7189363 8007395 8013252 8013254 8012646
+ * 7067045 7014640 7189363 8007395 8013252 8013254 8012646 8023647
*/
import java.util.regex.*;
@@ -146,6 +146,7 @@
linebreakTest();
branchTest();
groupCurlyNotFoundSuppTest();
+ groupCurlyBackoffTest();
patternAsPredicate();
if (failure) {
throw new
@@ -3999,6 +4000,15 @@
report("GroupCurly NotFoundSupp");
}
+ // This test is for 8023647
+ private static void groupCurlyBackoffTest() throws Exception {
+ if (!"abc1c".matches("(\\w)+1\\1") ||
+ "abc11".matches("(\\w)+1\\1")) {
+ failCount++;
+ }
+ report("GroupCurly backoff");
+ }
+
// This test is for 8012646
private static void patternAsPredicate() throws Exception {
Predicate<String> p = Pattern.compile("[a-z]+").asPredicate();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/SplittableRandomTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,367 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.tests.java.util;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.Spliterator;
+import java.util.SplittableRandom;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.stream.DoubleStream;
+import java.util.stream.DoubleStreamTestScenario;
+import java.util.stream.IntStream;
+import java.util.stream.IntStreamTestScenario;
+import java.util.stream.LongStream;
+import java.util.stream.LongStreamTestScenario;
+import java.util.stream.OpTestCase;
+import java.util.stream.StreamSupport;
+import java.util.stream.TestData;
+
+@Test
+public class SplittableRandomTest extends OpTestCase {
+
+ static class RandomBoxedSpliterator<T> implements Spliterator<T> {
+ final SplittableRandom rng;
+ long index;
+ final long fence;
+ final Function<SplittableRandom, T> rngF;
+
+ RandomBoxedSpliterator(SplittableRandom rng, long index, long fence, Function<SplittableRandom, T> rngF) {
+ this.rng = rng;
+ this.index = index;
+ this.fence = fence;
+ this.rngF = rngF;
+ }
+
+ public RandomBoxedSpliterator<T> trySplit() {
+ long i = index, m = (i + fence) >>> 1;
+ return (m <= i) ? null :
+ new RandomBoxedSpliterator<>(rng.split(), i, index = m, rngF);
+ }
+
+ public long estimateSize() {
+ return fence - index;
+ }
+
+ public int characteristics() {
+ return (Spliterator.SIZED | Spliterator.SUBSIZED |
+ Spliterator.NONNULL | Spliterator.IMMUTABLE);
+ }
+
+ @Override
+ public boolean tryAdvance(Consumer<? super T> consumer) {
+ if (consumer == null) throw new NullPointerException();
+ long i = index, f = fence;
+ if (i < f) {
+ consumer.accept(rngF.apply(rng));
+ index = i + 1;
+ return true;
+ }
+ return false;
+ }
+ }
+
+ static final int SIZE = 1 << 16;
+
+ // Ensure there is a range of a power of 2
+ static final int[] BOUNDS = {256};
+ static final int[] ORIGINS = {-16, 0, 16};
+
+ static <T extends Comparable<T>> ResultAsserter<Iterable<T>> randomAsserter(int size, T origin, T bound) {
+ return (act, exp, ord, par) -> {
+ int count = 0;
+ Set<Comparable<T>> values = new HashSet<>();
+ for (Comparable<T> t : act) {
+ if (origin.compareTo(bound) < 0) {
+ assertTrue(t.compareTo(origin) >= 0);
+ assertTrue(t.compareTo(bound) < 0);
+ }
+ values.add(t);
+ count++;
+ }
+ assertEquals(count, size);
+ // Assert that at least one different result is produced
+ // For the size of the data it is highly improbable that this
+ // will cause a false negative (i.e. a false failure)
+ assertTrue(values.size() > 1);
+ };
+ }
+
+ @DataProvider(name = "ints")
+ public static Object[][] intsDataProvider() {
+ List<Object[]> data = new ArrayList<>();
+
+ // Function to create a stream using a RandomBoxedSpliterator
+
+ Function<Function<SplittableRandom, Integer>, IntStream> rbsf =
+ sf -> StreamSupport.stream(new RandomBoxedSpliterator<>(new SplittableRandom(), 0, SIZE, sf), false).
+ mapToInt(i -> i);
+
+ // Unbounded
+
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new SplittableRandom().ints().limit(%d)", SIZE),
+ () -> new SplittableRandom().ints().limit(SIZE)),
+ randomAsserter(SIZE, Integer.MAX_VALUE, 0)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new SplittableRandom().ints(%d)", SIZE),
+ () -> new SplittableRandom().ints(SIZE)),
+ randomAsserter(SIZE, Integer.MAX_VALUE, 0)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextInt())", SIZE),
+ () -> rbsf.apply(sr -> sr.nextInt())),
+ randomAsserter(SIZE, Integer.MAX_VALUE, 0)
+ });
+
+ // Bounded
+
+ for (int b : BOUNDS) {
+ for (int o : ORIGINS) {
+ final int origin = o;
+ final int bound = b;
+
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new SplittableRandom().ints(%d, %d).limit(%d)", origin, bound, SIZE),
+ () -> new SplittableRandom().ints(origin, bound).limit(SIZE)),
+ randomAsserter(SIZE, origin, bound)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new SplittableRandom().ints(%d, %d, %d)", SIZE, origin, bound),
+ () -> new SplittableRandom().ints(SIZE, origin, bound)),
+ randomAsserter(SIZE, origin, bound)
+ });
+
+ if (origin == 0) {
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextInt(%d))", SIZE, bound),
+ () -> rbsf.apply(sr -> sr.nextInt(bound))),
+ randomAsserter(SIZE, origin, bound)
+ });
+ }
+
+ data.add(new Object[]{
+ TestData.Factory.ofIntSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextInt(%d, %d))", SIZE, origin, bound),
+ () -> rbsf.apply(sr -> sr.nextInt(origin, bound))),
+ randomAsserter(SIZE, origin, bound)
+ });
+ }
+ }
+
+ return data.toArray(new Object[0][]);
+ }
+
+ @Test(dataProvider = "ints")
+ public void testInts(TestData.OfInt data, ResultAsserter<Iterable<Integer>> ra) {
+ withData(data).
+ stream(s -> s).
+ without(IntStreamTestScenario.PAR_STREAM_TO_ARRAY_CLEAR_SIZED).
+ resultAsserter(ra).
+ exercise();
+ }
+
+ @DataProvider(name = "longs")
+ public static Object[][] longsDataProvider() {
+ List<Object[]> data = new ArrayList<>();
+
+ // Function to create a stream using a RandomBoxedSpliterator
+
+ Function<Function<SplittableRandom, Long>, LongStream> rbsf =
+ sf -> StreamSupport.stream(new RandomBoxedSpliterator<>(new SplittableRandom(), 0, SIZE, sf), false).
+ mapToLong(i -> i);
+
+ // Unbounded
+
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new SplittableRandom().longs().limit(%d)", SIZE),
+ () -> new SplittableRandom().longs().limit(SIZE)),
+ randomAsserter(SIZE, Long.MAX_VALUE, 0L)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new SplittableRandom().longs(%d)", SIZE),
+ () -> new SplittableRandom().longs(SIZE)),
+ randomAsserter(SIZE, Long.MAX_VALUE, 0L)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextLong())", SIZE),
+ () -> rbsf.apply(sr -> sr.nextLong())),
+ randomAsserter(SIZE, Long.MAX_VALUE, 0L)
+ });
+
+ // Bounded
+
+ for (int b : BOUNDS) {
+ for (int o : ORIGINS) {
+ final long origin = o;
+ final long bound = b;
+
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new SplittableRandom().longs(%d, %d).limit(%d)", origin, bound, SIZE),
+ () -> new SplittableRandom().longs(origin, bound).limit(SIZE)),
+ randomAsserter(SIZE, origin, bound)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new SplittableRandom().longs(%d, %d, %d)", SIZE, origin, bound),
+ () -> new SplittableRandom().longs(SIZE, origin, bound)),
+ randomAsserter(SIZE, origin, bound)
+ });
+
+ if (origin == 0) {
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextLong(%d))", SIZE, bound),
+ () -> rbsf.apply(sr -> sr.nextLong(bound))),
+ randomAsserter(SIZE, origin, bound)
+ });
+ }
+
+ data.add(new Object[]{
+ TestData.Factory.ofLongSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextLong(%d, %d))", SIZE, origin, bound),
+ () -> rbsf.apply(sr -> sr.nextLong(origin, bound))),
+ randomAsserter(SIZE, origin, bound)
+ });
+ }
+ }
+
+ return data.toArray(new Object[0][]);
+ }
+
+ @Test(dataProvider = "longs")
+ public void testLongs(TestData.OfLong data, ResultAsserter<Iterable<Long>> ra) {
+ withData(data).
+ stream(s -> s).
+ without(LongStreamTestScenario.PAR_STREAM_TO_ARRAY_CLEAR_SIZED).
+ resultAsserter(ra).
+ exercise();
+ }
+
+ @DataProvider(name = "doubles")
+ public static Object[][] doublesDataProvider() {
+ List<Object[]> data = new ArrayList<>();
+
+ // Function to create a stream using a RandomBoxedSpliterator
+
+ Function<Function<SplittableRandom, Double>, DoubleStream> rbsf =
+ sf -> StreamSupport.stream(new RandomBoxedSpliterator<>(new SplittableRandom(), 0, SIZE, sf), false).
+ mapToDouble(i -> i);
+
+ // Unbounded
+
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new SplittableRandom().doubles().limit(%d)", SIZE),
+ () -> new SplittableRandom().doubles().limit(SIZE)),
+ randomAsserter(SIZE, Double.MAX_VALUE, 0d)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new SplittableRandom().doubles(%d)", SIZE),
+ () -> new SplittableRandom().doubles(SIZE)),
+ randomAsserter(SIZE, Double.MAX_VALUE, 0d)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextDouble())", SIZE),
+ () -> rbsf.apply(sr -> sr.nextDouble())),
+ randomAsserter(SIZE, Double.MAX_VALUE, 0d)
+ });
+
+ // Bounded
+
+ for (int b : BOUNDS) {
+ for (int o : ORIGINS) {
+ final double origin = o;
+ final double bound = b;
+
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new SplittableRandom().doubles(%f, %f).limit(%d)", origin, bound, SIZE),
+ () -> new SplittableRandom().doubles(origin, bound).limit(SIZE)),
+ randomAsserter(SIZE, origin, bound)
+ });
+
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new SplittableRandom().doubles(%d, %f, %f)", SIZE, origin, bound),
+ () -> new SplittableRandom().doubles(SIZE, origin, bound)),
+ randomAsserter(SIZE, origin, bound)
+ });
+
+ if (origin == 0) {
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextDouble(%f))", SIZE, bound),
+ () -> rbsf.apply(sr -> sr.nextDouble(bound))),
+ randomAsserter(SIZE, origin, bound)
+ });
+ }
+
+ data.add(new Object[]{
+ TestData.Factory.ofDoubleSupplier(
+ String.format("new RandomBoxedSpliterator(0, %d, sr -> sr.nextDouble(%f, %f))", SIZE, origin, bound),
+ () -> rbsf.apply(sr -> sr.nextDouble(origin, bound))),
+ randomAsserter(SIZE, origin, bound)
+ });
+ }
+ }
+
+ return data.toArray(new Object[0][]);
+ }
+
+ @Test(dataProvider = "doubles")
+ public void testDoubles(TestData.OfDouble data, ResultAsserter<Iterable<Double>> ra) {
+ withData(data).
+ stream(s -> s).
+ without(DoubleStreamTestScenario.PAR_STREAM_TO_ARRAY_CLEAR_SIZED).
+ resultAsserter(ra).
+ exercise();
+ }
+}
--- a/jdk/test/java/util/zip/TestExtraTime.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/java/util/zip/TestExtraTime.java Fri Sep 06 14:20:58 2013 -0700
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 4759491 6303183 7012868 8015666
+ * @bug 4759491 6303183 7012868 8015666 8023713
* @summary Test ZOS and ZIS timestamp in extra field correctly
*/
@@ -32,6 +32,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.FileTime;
+import java.util.Arrays;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
import java.util.zip.ZipEntry;
@@ -52,24 +53,26 @@
FileTime ctime = FileTime.from(time - 300000, TimeUnit.MILLISECONDS);
TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
- test(mtime, null, null, null);
- // ms-dos 1980 epoch problem
- test(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null);
- // non-default tz
- test(mtime, null, null, tz);
+ for (byte[] extra : new byte[][] { null, new byte[] {1, 2, 3}}) {
+ test(mtime, null, null, null, extra);
+ // ms-dos 1980 epoch problem
+ test(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null, extra);
+ // non-default tz
+ test(mtime, null, null, tz, extra);
- test(mtime, atime, null, null);
- test(mtime, null, ctime, null);
- test(mtime, atime, ctime, null);
+ test(mtime, atime, null, null, extra);
+ test(mtime, null, ctime, null, extra);
+ test(mtime, atime, ctime, null, extra);
- test(mtime, atime, null, tz);
- test(mtime, null, ctime, tz);
- test(mtime, atime, ctime, tz);
+ test(mtime, atime, null, tz, extra);
+ test(mtime, null, ctime, tz, extra);
+ test(mtime, atime, ctime, tz, extra);
+ }
}
}
static void test(FileTime mtime, FileTime atime, FileTime ctime,
- TimeZone tz) throws Throwable {
+ TimeZone tz, byte[] extra) throws Throwable {
System.out.printf("--------------------%nTesting: [%s]/[%s]/[%s]%n",
mtime, atime, ctime);
TimeZone tz0 = TimeZone.getDefault();
@@ -78,8 +81,8 @@
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(baos);
- ZipEntry ze = new ZipEntry("TestExtreTime.java");
-
+ ZipEntry ze = new ZipEntry("TestExtraTime.java");
+ ze.setExtra(extra);
ze.setLastModifiedTime(mtime);
if (atime != null)
ze.setLastAccessTime(atime);
@@ -87,6 +90,14 @@
ze.setCreationTime(ctime);
zos.putNextEntry(ze);
zos.write(new byte[] { 1,2 ,3, 4});
+
+ // append an extra entry to help check if the length and data
+ // of the extra field are being correctly written (in previous
+ // entry).
+ if (extra != null) {
+ ze = new ZipEntry("TestExtraEntry");
+ zos.putNextEntry(ze);
+ }
zos.close();
if (tz != null) {
TimeZone.setDefault(tz0);
@@ -96,23 +107,23 @@
new ByteArrayInputStream(baos.toByteArray()));
ze = zis.getNextEntry();
zis.close();
- check(mtime, atime, ctime, ze);
+ check(mtime, atime, ctime, ze, extra);
// ZipFile
Path zpath = Paths.get(System.getProperty("test.dir", "."),
- "TestExtraTimp.zip");
+ "TestExtraTime.zip");
Files.copy(new ByteArrayInputStream(baos.toByteArray()), zpath);
ZipFile zf = new ZipFile(zpath.toFile());
- ze = zf.getEntry("TestExtreTime.java");
+ ze = zf.getEntry("TestExtraTime.java");
// ZipFile read entry from cen, which does not have a/ctime,
// for now.
- check(mtime, null, null, ze);
+ check(mtime, null, null, ze, extra);
zf.close();
Files.delete(zpath);
}
static void check(FileTime mtime, FileTime atime, FileTime ctime,
- ZipEntry ze) {
+ ZipEntry ze, byte[] extra) {
/*
System.out.printf(" mtime [%tc]: [%tc]/[%tc]%n",
mtime.to(TimeUnit.MILLISECONDS),
@@ -130,5 +141,17 @@
ctime.to(TimeUnit.SECONDS) !=
ze.getCreationTime().to(TimeUnit.SECONDS))
throw new RuntimeException("Timestamp: storing ctime failed!");
+ if (extra != null) {
+ // if extra data exists, the current implementation put it at
+ // the end of the extra data array (implementation detail)
+ byte[] extra1 = ze.getExtra();
+ if (extra1 == null || extra1.length < extra.length ||
+ !Arrays.equals(Arrays.copyOfRange(extra1,
+ extra1.length - extra.length,
+ extra1.length),
+ extra)) {
+ throw new RuntimeException("Timestamp: storing extra field failed!");
+ }
+ }
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/KPEquals.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8015669
+ * @summary KerberosPrincipal::equals should ignore name-type
+ * @compile -XDignore.symbol.file KPEquals.java
+ * @run main/othervm KPEquals
+ */
+
+import sun.security.jgss.GSSUtil;
+
+import javax.security.auth.kerberos.KerberosKey;
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KeyTab;
+
+public class KPEquals {
+
+ public static void main(String[] args) throws Exception {
+ new OneKDC(null).writeJAASConf();
+ Context c = Context.fromJAAS("client");
+ Context s = Context.fromThinAir();
+ KerberosPrincipal kp = new KerberosPrincipal(
+ OneKDC.SERVER + "@" + OneKDC.REALM,
+ KerberosPrincipal.KRB_NT_SRV_INST);
+ s.s().getPrincipals().add(kp);
+ for (KerberosKey k: KeyTab.getInstance(kp).getKeys(kp)) {
+ s.s().getPrivateCredentials().add(k);
+ }
+ c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+ s.startAsServer(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+ Context.handshake(c, s);
+ }
+}
--- a/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -21,14 +21,16 @@
* questions.
*/
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
/*
* @test
* @bug 4366807
* @summary Need new APIs to get/set session timeout and session cache size.
* @run main/othervm SessionCacheSizeTests
- *
- * SunJSSE does not support dynamic system properties, no way to re-use
- * system properties in samevm/agentvm mode.
*/
import java.io.*;
@@ -113,7 +115,9 @@
/*
* Signal Client, we're ready for his connect.
*/
- serverReady = true;
+ if (createdPorts == serverPorts.length) {
+ serverReady = true;
+ }
int read = 0;
int nConnections = 0;
/*
@@ -310,7 +314,6 @@
* Fork off the other side, then do your work.
*/
SessionCacheSizeTests() throws Exception {
-
/*
* create the SSLServerSocket and SSLSocket factories
*/
@@ -323,46 +326,87 @@
int serverConns = MAX_ACTIVE_CONNECTIONS / (serverPorts.length);
int remainingConns = MAX_ACTIVE_CONNECTIONS % (serverPorts.length);
- if (separateServerThread) {
- for (int i = 0; i < serverPorts.length; i++) {
-
- // distribute remaining connections among the available ports
- if (i < remainingConns)
- startServer(serverPorts[i], (serverConns + 1), true);
- else
- startServer(serverPorts[i], serverConns, true);
+ Exception startException = null;
+ try {
+ if (separateServerThread) {
+ for (int i = 0; i < serverPorts.length; i++) {
+ // distribute remaining connections among the
+ // available ports
+ if (i < remainingConns)
+ startServer(serverPorts[i], (serverConns + 1), true);
+ else
+ startServer(serverPorts[i], serverConns, true);
+ }
+ startClient(false);
+ } else {
+ startClient(true);
+ for (int i = 0; i < serverPorts.length; i++) {
+ if (i < remainingConns)
+ startServer(serverPorts[i], (serverConns + 1), false);
+ else
+ startServer(serverPorts[i], serverConns, false);
+ }
}
- startClient(false);
- } else {
- startClient(true);
- for (int i = 0; i < serverPorts.length; i++) {
- if (i < remainingConns)
- startServer(serverPorts[i], (serverConns + 1), false);
- else
- startServer(serverPorts[i], serverConns, false);
- }
+ } catch (Exception e) {
+ startException = e;
}
/*
* Wait for other side to close down.
*/
if (separateServerThread) {
- serverThread.join();
+ if (serverThread != null) {
+ serverThread.join();
+ }
} else {
- clientThread.join();
+ if (clientThread != null) {
+ clientThread.join();
+ }
}
/*
* When we get here, the test is pretty much over.
- *
- * If the main thread excepted, that propagates back
- * immediately. If the other thread threw an exception, we
- * should report back.
+ */
+ Exception local;
+ Exception remote;
+
+ if (separateServerThread) {
+ remote = serverException;
+ local = clientException;
+ } else {
+ remote = clientException;
+ local = serverException;
+ }
+
+ Exception exception = null;
+
+ /*
+ * Check various exception conditions.
*/
- if (serverException != null)
- throw serverException;
- if (clientException != null)
- throw clientException;
+ if ((local != null) && (remote != null)) {
+ // If both failed, return the curthread's exception.
+ local.initCause(remote);
+ exception = local;
+ } else if (local != null) {
+ exception = local;
+ } else if (remote != null) {
+ exception = remote;
+ } else if (startException != null) {
+ exception = startException;
+ }
+
+ /*
+ * If there was an exception *AND* a startException,
+ * output it.
+ */
+ if (exception != null) {
+ if (exception != startException && startException != null) {
+ exception.addSuppressed(startException);
+ }
+ throw exception;
+ }
+
+ // Fall-through: no exception to throw!
}
void startServer(final int port, final int nConns,
@@ -387,7 +431,13 @@
};
serverThread.start();
} else {
- doServerSide(port, nConns);
+ try {
+ doServerSide(port, nConns);
+ } catch (Exception e) {
+ serverException = e;
+ } finally {
+ serverReady = true;
+ }
}
}
@@ -409,7 +459,11 @@
};
clientThread.start();
} else {
- doClientSide();
+ try {
+ doClientSide();
+ } catch (Exception e) {
+ clientException = e;
+ }
}
}
}
--- a/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -21,14 +21,14 @@
* questions.
*/
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
/*
* @test
* @bug 4366807
* @summary Need new APIs to get/set session timeout and session cache size.
* @run main/othervm SessionTimeOutTests
- *
- * SunJSSE does not support dynamic system properties, no way to re-use
- * system properties in samevm/agentvm mode.
*/
import java.io.*;
@@ -263,7 +263,7 @@
for (int i = 0; i < nConnections; i++) {
sslSockets[i].close();
}
- System.out.println("----------------------------------------"
+ System.out.println("----------------------------------------"
+ "-----------------------");
System.out.println("Session timeout test passed");
}
@@ -348,45 +348,88 @@
int serverConns = MAX_ACTIVE_CONNECTIONS / (serverPorts.length);
int remainingConns = MAX_ACTIVE_CONNECTIONS % (serverPorts.length);
- if (separateServerThread) {
- for (int i = 0; i < serverPorts.length; i++) {
- // distribute remaining connections among the available ports
- if (i < remainingConns)
- startServer(serverPorts[i], (serverConns + 1), true);
- else
- startServer(serverPorts[i], serverConns, true);
+ Exception startException = null;
+ try {
+ if (separateServerThread) {
+ for (int i = 0; i < serverPorts.length; i++) {
+ // distribute remaining connections among the
+ // vailable ports
+ if (i < remainingConns)
+ startServer(serverPorts[i], (serverConns + 1), true);
+ else
+ startServer(serverPorts[i], serverConns, true);
+ }
+ startClient(false);
+ } else {
+ startClient(true);
+ for (int i = 0; i < serverPorts.length; i++) {
+ if (i < remainingConns)
+ startServer(serverPorts[i], (serverConns + 1), false);
+ else
+ startServer(serverPorts[i], serverConns, false);
+ }
}
- startClient(false);
- } else {
- startClient(true);
- for (int i = 0; i < serverPorts.length; i++) {
- if (i < remainingConns)
- startServer(serverPorts[i], (serverConns + 1), false);
- else
- startServer(serverPorts[i], serverConns, false);
- }
+ } catch (Exception e) {
+ startException = e;
}
/*
* Wait for other side to close down.
*/
if (separateServerThread) {
- serverThread.join();
+ if (serverThread != null) {
+ serverThread.join();
+ }
} else {
- clientThread.join();
+ if (clientThread != null) {
+ clientThread.join();
+ }
}
/*
* When we get here, the test is pretty much over.
- *
- * If the main thread excepted, that propagates back
- * immediately. If the other thread threw an exception, we
- * should report back.
+ * Which side threw the error?
+ */
+ Exception local;
+ Exception remote;
+
+ if (separateServerThread) {
+ remote = serverException;
+ local = clientException;
+ } else {
+ remote = clientException;
+ local = serverException;
+ }
+
+ Exception exception = null;
+
+ /*
+ * Check various exception conditions.
*/
- if (serverException != null)
- throw serverException;
- if (clientException != null)
- throw clientException;
+ if ((local != null) && (remote != null)) {
+ // If both failed, return the curthread's exception.
+ local.initCause(remote);
+ exception = local;
+ } else if (local != null) {
+ exception = local;
+ } else if (remote != null) {
+ exception = remote;
+ } else if (startException != null) {
+ exception = startException;
+ }
+
+ /*
+ * If there was an exception *AND* a startException,
+ * output it.
+ */
+ if (exception != null) {
+ if (exception != startException && startException != null) {
+ exception.addSuppressed(startException);
+ }
+ throw exception;
+ }
+
+ // Fall-through: no exception to throw!
}
void startServer(final int port, final int nConns,
@@ -411,7 +454,13 @@
};
serverThread.start();
} else {
- doServerSide(port, nConns);
+ try {
+ doServerSide(port, nConns);
+ } catch (Exception e) {
+ serverException = e;
+ } finally {
+ serverReady = 0;
+ }
}
}
@@ -433,7 +482,11 @@
};
clientThread.start();
} else {
- doClientSide();
+ try {
+ doClientSide();
+ } catch (Exception e) {
+ clientException = e;
+ }
}
}
}
--- a/jdk/test/sun/security/ssl/templates/SSLSocketTemplate.java Wed Sep 04 19:58:16 2013 +0530
+++ b/jdk/test/sun/security/ssl/templates/SSLSocketTemplate.java Fri Sep 06 14:20:58 2013 -0700
@@ -243,7 +243,7 @@
* output it.
*/
if (exception != null) {
- if (exception != startException) {
+ if (exception != startException && startException != null) {
exception.addSuppressed(startException);
}
throw exception;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/jvindex.sh Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,76 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8022761
+# @summary regression: SecurityException is NOT thrown while trying to pack a wrongly signed Indexed Jar file
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+ JAVAC_CMD=`which javac`
+ TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+ Windows_* )
+ FS="\\"
+ ;;
+ * )
+ FS="/"
+ ;;
+esac
+
+F=abcde
+KS=jvindex.jks
+JFILE=jvindex.jar
+
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
+ -keystore $KS"
+JAR=$TESTJAVA${FS}bin${FS}jar
+JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit"
+
+rm $F $KS $JFILE 2> /dev/null
+
+echo 12345 > $F
+$JAR cvf $JFILE $F
+
+ERR=""
+
+$KT -alias a -dname CN=a -genkey -validity 300 || ERR="$ERR 1"
+
+$JARSIGNER $JFILE a || ERR="$ERR 2"
+$JAR i $JFILE
+
+# Make sure the $F line has "sm" (signed and in manifest)
+$JARSIGNER -verify -verbose $JFILE | grep $F | grep sm || ERR="$ERR 3"
+
+if [ "$ERR" = "" ]; then
+ exit 0
+else
+ echo "ERR is $ERR"
+ exit 1
+fi
+
+
--- a/langtools/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -226,3 +226,5 @@
453a305e116507847cc6577b80b4d9794bcb08bf jdk8-b102
76cfe7c61f2575ea5400845b8e80dab6f4b1d7d0 jdk8-b103
dd4a00c220c6e14d9b2ce93a2bd436a1d04f0d03 jdk8-b104
+375834b5cf086dd7ce9e49f602d81bb51d3e0fa9 jdk8-b105
+fcd768844b9926c5f994292ec6350c20cc7c0f76 jdk8-b106
--- a/langtools/src/share/classes/com/sun/source/tree/MethodTree.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/source/tree/MethodTree.java Fri Sep 06 14:20:58 2013 -0700
@@ -53,7 +53,15 @@
Tree getReturnType();
List<? extends TypeParameterTree> getTypeParameters();
List<? extends VariableTree> getParameters();
+
+ /**
+ * Return an explicit receiver parameter ("this" parameter).
+ *
+ * @return an explicit receiver parameter ("this" parameter)
+ * @since 1.8
+ */
VariableTree getReceiverParameter();
+
List<? extends ExpressionTree> getThrows();
BlockTree getBody();
Tree getDefaultValue(); // for annotation types
--- a/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java Fri Sep 06 14:20:58 2013 -0700
@@ -36,6 +36,8 @@
* <em>name</em>
*
* <em>name</em> extends <em>bounds</em>
+ *
+ * <em>annotations</em> <em>name</em>
* </pre>
*
* @jls section 4.4
@@ -48,5 +50,17 @@
public interface TypeParameterTree extends Tree {
Name getName();
List<? extends Tree> getBounds();
+
+ /**
+ * Return annotations on the type parameter declaration.
+ *
+ * Annotations need Target meta-annotations of
+ * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or
+ * {@link java.lang.annotation.ElementType#TYPE_USE}
+ * to appear in this position.
+ *
+ * @return annotations on the type parameter declaration
+ * @since 1.8
+ */
List<? extends AnnotationTree> getAnnotations();
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -102,7 +102,7 @@
configuration.standardmessage.
error("doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -304,7 +304,7 @@
subDiv.addContent(div);
} catch (Exception e) {
e.printStackTrace();
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -218,7 +218,7 @@
configuration.standardmessage.
error("doclet.exception_encountered",
exc.toString(), path.getPath());
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -610,7 +610,7 @@
subDiv.addContent(div);
} catch (Exception e) {
e.printStackTrace();
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -127,7 +127,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -87,7 +87,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -72,7 +72,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java Fri Sep 06 14:20:58 2013 -0700
@@ -196,7 +196,7 @@
}
} catch (Exception e) {
e.printStackTrace();
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
}
@@ -332,7 +332,7 @@
configuration.message.error((SourcePosition) null,
"doclet.perform_copy_exception_encountered",
exc.toString());
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -411,7 +411,7 @@
head.addContent(headComment);
}
if (configuration.charset.length() > 0) {
- Content meta = HtmlTree.META("Content-Type", "text/html",
+ Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
configuration.charset);
head.addContent(meta);
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -109,7 +109,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), DocPaths.PACKAGE_FRAME.getPath());
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -71,7 +71,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -98,7 +98,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -105,7 +105,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), path.getPath());
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -106,7 +106,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -74,7 +74,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -115,7 +115,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), DocPaths.PACKAGE_FRAME.getPath());
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -75,7 +75,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -79,7 +79,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -102,7 +102,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename.getPath());
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -93,7 +93,7 @@
configuration.standardmessage.error(
"doclet.exception_encountered",
exc.toString(), filename);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/Comment.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/Comment.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, 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
@@ -63,7 +63,7 @@
* is not supported.
*/
public void addContent(Content content) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
@@ -75,7 +75,7 @@
* is not supported.
*/
public void addContent(String stringContent) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, 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
@@ -70,7 +70,7 @@
* is not supported.
*/
public void addContent(Content content) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
@@ -82,7 +82,7 @@
* is not supported.
*/
public void addContent(String stringContent) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java Fri Sep 06 14:20:58 2013 -0700
@@ -40,7 +40,6 @@
BORDER,
CELLPADDING,
CELLSPACING,
- CHARSET,
CLASS,
CLEAR,
COLS,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -53,6 +53,8 @@
*/
public abstract class HtmlDocWriter extends HtmlWriter {
+ public static final String CONTENT_TYPE = "text/html";
+
/**
* Constructor. Initializes the destination file name through the super
* class HtmlWriter.
@@ -194,7 +196,7 @@
head.addContent(headComment);
}
if (configuration.charset.length() > 0) {
- Content meta = HtmlTree.META("Content-Type", "text/html",
+ Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
configuration.charset);
head.addContent(meta);
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, 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
@@ -91,7 +91,7 @@
* is not supported.
*/
public void addContent(String stringContent) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java Fri Sep 06 14:20:58 2013 -0700
@@ -456,9 +456,9 @@
*/
public static HtmlTree META(String httpEquiv, String content, String charSet) {
HtmlTree htmltree = new HtmlTree(HtmlTag.META);
+ String contentCharset = content + "; charset=" + charSet;
htmltree.addAttr(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv));
- htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content));
- htmltree.addAttr(HtmlAttr.CHARSET, nullCheck(charSet));
+ htmltree.addAttr(HtmlAttr.CONTENT, contentCharset);
return htmltree;
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java Fri Sep 06 14:20:58 2013 -0700
@@ -65,7 +65,7 @@
* is not supported.
*/
public void addContent(Content content) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
@@ -77,7 +77,7 @@
* is not supported.
*/
public void addContent(String stringContent) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java Fri Sep 06 14:20:58 2013 -0700
@@ -72,7 +72,7 @@
*/
@Override
public void addContent(Content content) {
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Fri Sep 06 14:20:58 2013 -0700
@@ -539,7 +539,7 @@
initProfiles();
initProfilePackages();
} catch (Exception e) {
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
setSpecificDocletOptions(root.options());
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java Fri Sep 06 14:20:58 2013 -0700
@@ -55,7 +55,7 @@
write(out, true);
} catch (IOException e) {
// cannot happen from StringWriter
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
return out.toString();
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -138,7 +138,7 @@
} catch (NoSuchMethodException e) {
e.printStackTrace();
configuration.root.printError("Unknown element: " + component);
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
} catch (InvocationTargetException e) {
e.getCause().printStackTrace();
} catch (Exception e) {
@@ -146,7 +146,7 @@
configuration.root.printError("Exception " +
e.getClass().getName() +
" thrown while processing element: " + component);
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -62,7 +62,7 @@
*/
public void build() throws DocletAbortException {
//You may not call the build method in a subbuilder.
- throw new DocletAbortException();
+ throw new DocletAbortException("not supported");
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -93,7 +93,7 @@
return xmlElementsMap.get(root);
} catch (Throwable t) {
t.printStackTrace();
- throw new DocletAbortException();
+ throw new DocletAbortException(t);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -125,7 +125,7 @@
return;
}
} catch (Exception e) {
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
build(layoutParser.parseXML(NAME), contentTree);
writer.close();
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java Fri Sep 06 14:20:58 2013 -0700
@@ -126,7 +126,7 @@
return (FieldDoc) tag.holder();
} else {
//This should never ever happen.
- throw new DocletAbortException();
+ throw new DocletAbortException("should not happen");
}
}
StringTokenizer st = new StringTokenizer(name, "#");
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -452,7 +452,7 @@
} else if (doc instanceof Parameter) {
annotations = ((Parameter) doc).annotations();
} else {
- throw new DocletAbortException();
+ throw new DocletAbortException("should not happen");
}
for (int i = 0; i < annotations.length; i++) {
AnnotationTypeDoc annotationDoc = annotations[i].annotationType();
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFile.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFile.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -197,7 +197,7 @@
}
} catch (IOException e) {
e.printStackTrace(System.err);
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -34,6 +34,11 @@
public class DocletAbortException extends RuntimeException {
private static final long serialVersionUID = -9131058909576418984L;
- public DocletAbortException() {
+ public DocletAbortException(String message) {
+ super(message);
+ }
+
+ public DocletAbortException(Throwable cause) {
+ super(cause);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -71,7 +71,7 @@
} catch (IOException exc) {
configuration.message.error("doclet.exception_encountered",
exc.toString(), DocPaths.PACKAGE_LIST);
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PathDocFileFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PathDocFileFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -77,7 +77,7 @@
Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
} catch (IOException e) {
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SimpleDocFileFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SimpleDocFileFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -269,7 +269,7 @@
configuration.message.error(
"doclet.Unable_to_create_directory_0", dir.getPath());
- throw new DocletAbortException();
+ throw new DocletAbortException("can't create directory");
}
/** Return a string to identify the contents of this object,
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/StandardDocFileFactory.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/StandardDocFileFactory.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -79,7 +79,7 @@
File dir = new File(dirName);
fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
} catch (IOException e) {
- throw new DocletAbortException();
+ throw new DocletAbortException(e);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java Fri Sep 06 14:20:58 2013 -0700
@@ -241,9 +241,9 @@
first = false;
}
} catch (SecurityException exc) {
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
} catch (IOException exc) {
- throw new DocletAbortException();
+ throw new DocletAbortException(exc);
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java Fri Sep 06 14:20:58 2013 -0700
@@ -42,12 +42,14 @@
*
* The intent of this class is to embody the semantics of W3C HTML 4.01
* to the extent supported/used by javadoc.
+ * In time, we may wish to transition javadoc and doclint to using HTML 5.
*
* This is derivative of com.sun.tools.doclets.formats.html.markup.HtmlTag.
* Eventually, these two should be merged back together, and possibly made
* public.
*
* @see <a href="http://www.w3.org/TR/REC-html40/">HTML 4.01 Specification</a>
+ * @see <a href="http://www.w3.org/TR/html5/">HTML 5 Specification</a>
* @author Bhavesh Patel
* @author Jonathan Gibbons (revised)
*/
@@ -119,7 +121,8 @@
HEAD(BlockType.OTHER, EndKind.REQUIRED),
- HR(BlockType.BLOCK, EndKind.NONE),
+ HR(BlockType.BLOCK, EndKind.NONE,
+ attrs(AttrKind.OK, WIDTH)), // OK in 4.01; not allowed in 5
HTML(BlockType.OTHER, EndKind.REQUIRED),
@@ -152,7 +155,7 @@
OL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
- attrs(AttrKind.USE_CSS, START, TYPE)){
+ attrs(AttrKind.OK, START, TYPE)) {
@Override
public boolean accepts(HtmlTag t) {
return (t == LI);
@@ -196,8 +199,8 @@
TABLE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.OK, SUMMARY, Attr.FRAME, RULES, BORDER,
- CELLPADDING, CELLSPACING),
- attrs(AttrKind.USE_CSS, ALIGN, WIDTH, BGCOLOR)) {
+ CELLPADDING, CELLSPACING, WIDTH), // width OK in 4.01; not allowed in 5
+ attrs(AttrKind.USE_CSS, ALIGN, BGCOLOR)) {
@Override
public boolean accepts(HtmlTag t) {
switch (t) {
@@ -267,7 +270,7 @@
UL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT),
- attrs(AttrKind.USE_CSS, COMPACT, TYPE)){
+ attrs(AttrKind.OK, COMPACT, TYPE)) { // OK in 4.01; not allowed in 5
@Override
public boolean accepts(HtmlTag t) {
return (t == LI);
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java Fri Sep 06 14:20:58 2013 -0700
@@ -27,8 +27,6 @@
import java.util.Locale;
-import javax.lang.model.type.TypeKind;
-
import com.sun.tools.javac.api.Messages;
import com.sun.tools.javac.code.Type.AnnotatedType;
import com.sun.tools.javac.code.Type.ArrayType;
@@ -191,7 +189,7 @@
void printBaseElementType(Type t, StringBuilder sb, Locale locale) {
Type arrel = t;
- while (arrel.getKind() == TypeKind.ARRAY) {
+ while (arrel.hasTag(TypeTag.ARRAY)) {
arrel = arrel.unannotatedType();
arrel = ((ArrayType) arrel).elemtype;
}
@@ -200,7 +198,7 @@
void printBrackets(Type t, StringBuilder sb, Locale locale) {
Type arrel = t;
- while (arrel.getKind() == TypeKind.ARRAY) {
+ while (arrel.hasTag(TypeTag.ARRAY)) {
if (arrel.isAnnotated()) {
sb.append(' ');
sb.append(arrel.getAnnotationMirrors());
@@ -264,12 +262,12 @@
public String visitAnnotatedType(AnnotatedType t, Locale locale) {
if (t.typeAnnotations != null &&
t.typeAnnotations.nonEmpty()) {
- if (t.underlyingType.getKind() == TypeKind.ARRAY) {
+ if (t.underlyingType.hasTag(TypeTag.ARRAY)) {
StringBuilder res = new StringBuilder();
printBaseElementType(t, res, locale);
printBrackets(t, res, locale);
return res.toString();
- } else if (t.underlyingType.getKind() == TypeKind.DECLARED &&
+ } else if (t.underlyingType.hasTag(TypeTag.CLASS) &&
t.underlyingType.getEnclosingType() != Type.noType) {
return visit(t.underlyingType.getEnclosingType(), locale) +
". " +
@@ -348,7 +346,7 @@
args = args.tail;
buf.append(',');
}
- if (args.head.unannotatedType().getKind() == TypeKind.ARRAY) {
+ if (args.head.unannotatedType().hasTag(TypeTag.ARRAY)) {
buf.append(visit(((ArrayType) args.head.unannotatedType()).elemtype, locale));
if (args.head.getAnnotationMirrors().nonEmpty()) {
buf.append(' ');
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java Fri Sep 06 14:20:58 2013 -0700
@@ -1179,7 +1179,7 @@
/**
* The variable's constant value, if this is a constant.
* Before the constant value is evaluated, it points to an
- * initalizer environment. If this is not a constant, it can
+ * initializer environment. If this is not a constant, it can
* be used for other stuff.
*/
private Object data;
@@ -1231,6 +1231,9 @@
/** The extra (synthetic/mandated) parameters of the method. */
public List<VarSymbol> extraParams = List.nil();
+ /** The captured local variables in an anonymous class */
+ public List<VarSymbol> capturedLocals = List.nil();
+
/** The parameters of the method. */
public List<VarSymbol> params = null;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Fri Sep 06 14:20:58 2013 -0700
@@ -29,6 +29,8 @@
import javax.lang.model.element.ElementKind;
import javax.lang.model.type.TypeKind;
+import javax.tools.JavaFileObject;
+
import com.sun.tools.javac.code.Attribute;
import com.sun.tools.javac.code.Attribute.TypeCompound;
import com.sun.tools.javac.code.Flags;
@@ -52,12 +54,16 @@
import com.sun.tools.javac.code.Symbol.MethodSymbol;
import com.sun.tools.javac.comp.Annotate;
import com.sun.tools.javac.comp.Annotate.Annotator;
+import com.sun.tools.javac.comp.AttrContext;
+import com.sun.tools.javac.comp.Env;
import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.TreeInfo;
import com.sun.tools.javac.tree.JCTree.JCBlock;
import com.sun.tools.javac.tree.JCTree.JCClassDecl;
import com.sun.tools.javac.tree.JCTree.JCExpression;
import com.sun.tools.javac.tree.JCTree.JCLambda;
import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
import com.sun.tools.javac.tree.JCTree.JCNewClass;
import com.sun.tools.javac.tree.JCTree.JCTypeApply;
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
@@ -90,11 +96,17 @@
* later processing.
*/
public static void organizeTypeAnnotationsSignatures(final Symtab syms, final Names names,
- final Log log, final JCClassDecl tree, Annotate annotate) {
+ final Log log, final Env<AttrContext> env, final JCClassDecl tree, final Annotate annotate) {
annotate.afterRepeated( new Annotator() {
@Override
public void enterAnnotation() {
- new TypeAnnotationPositions(syms, names, log, true).scan(tree);
+ JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile);
+
+ try {
+ new TypeAnnotationPositions(syms, names, log, true).scan(tree);
+ } finally {
+ log.useSource(oldSource);
+ }
}
} );
}
@@ -906,7 +918,14 @@
if (!invocation.typeargs.contains(tree)) {
Assert.error("{" + tree + "} is not an argument in the invocation: " + invocation);
}
- p.type = TargetType.METHOD_INVOCATION_TYPE_ARGUMENT;
+ MethodSymbol exsym = (MethodSymbol) TreeInfo.symbol(invocation.getMethodSelect());
+ if (exsym == null) {
+ Assert.error("could not determine symbol for {" + invocation + "}");
+ } else if (exsym.isConstructor()) {
+ p.type = TargetType.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT;
+ } else {
+ p.type = TargetType.METHOD_INVOCATION_TYPE_ARGUMENT;
+ }
p.pos = invocation.pos;
p.type_index = invocation.typeargs.indexOf(tree);
return;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Fri Sep 06 14:20:58 2013 -0700
@@ -505,12 +505,27 @@
//merge thrown types - form the intersection of all the thrown types in
//all the signatures in the list
+ boolean toErase = !bestSoFar.type.hasTag(FORALL);
List<Type> thrown = null;
- for (Symbol msym1 : methodSyms) {
- Type mt1 = memberType(origin.type, msym1);
+ Type mt1 = memberType(origin.type, bestSoFar);
+ for (Symbol msym2 : methodSyms) {
+ Type mt2 = memberType(origin.type, msym2);
+ List<Type> thrown_mt2 = mt2.getThrownTypes();
+ if (toErase) {
+ thrown_mt2 = erasure(thrown_mt2);
+ } else {
+ /* If bestSoFar is generic then all the methods are generic.
+ * The opposite is not true: a non generic method can override
+ * a generic method (raw override) so it's safe to cast mt1 and
+ * mt2 to ForAll.
+ */
+ ForAll fa1 = (ForAll)mt1;
+ ForAll fa2 = (ForAll)mt2;
+ thrown_mt2 = subst(thrown_mt2, fa2.tvars, fa1.tvars);
+ }
thrown = (thrown == null) ?
- mt1.getThrownTypes() :
- chk.intersect(mt1.getThrownTypes(), thrown);
+ thrown_mt2 :
+ chk.intersect(thrown_mt2, thrown);
}
final List<Type> thrown1 = thrown;
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Fri Sep 06 14:20:58 2013 -0700
@@ -1063,9 +1063,7 @@
if (tree.init != null) {
if ((v.flags_field & FINAL) != 0 &&
- !tree.init.hasTag(NEWCLASS) &&
- !tree.init.hasTag(LAMBDA) &&
- !tree.init.hasTag(REFERENCE)) {
+ memberEnter.needsLazyConstValue(tree.init)) {
// In this case, `v' is final. Ensure that it's initializer is
// evaluated.
v.getConstValue(); // ensure initializer is evaluated
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Fri Sep 06 14:20:58 2013 -0700
@@ -2216,11 +2216,11 @@
if (t.hasTag(TYPEVAR) && (t.tsym.flags() & UNATTRIBUTED) != 0)
return;
if (seen.contains(t)) {
- tv = (TypeVar)t;
+ tv = (TypeVar)t.unannotatedType();
tv.bound = types.createErrorType(t);
log.error(pos, "cyclic.inheritance", t);
} else if (t.hasTag(TYPEVAR)) {
- tv = (TypeVar)t;
+ tv = (TypeVar)t.unannotatedType();
seen = seen.prepend(tv);
for (Type b : types.getBounds(tv))
checkNonCyclic1(pos, b, seen);
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Fri Sep 06 14:20:58 2013 -0700
@@ -249,7 +249,7 @@
MethodType lambdaType = (MethodType) sym.type;
{
- MethodSymbol owner = (MethodSymbol) localContext.owner;
+ Symbol owner = localContext.owner;
ListBuffer<Attribute.TypeCompound> ownerTypeAnnos = new ListBuffer<Attribute.TypeCompound>();
ListBuffer<Attribute.TypeCompound> lambdaTypeAnnos = new ListBuffer<Attribute.TypeCompound>();
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java Fri Sep 06 14:20:58 2013 -0700
@@ -2735,9 +2735,9 @@
for (List<VarSymbol> l = fvs; l.nonEmpty(); l = l.tail) {
if (TreeInfo.isInitialConstructor(tree)) {
final Name pName = proxyName(l.head.name);
- m.extraParams =
- m.extraParams.append((VarSymbol)
- (proxies.lookup(pName).sym));
+ m.capturedLocals =
+ m.capturedLocals.append((VarSymbol)
+ (proxies.lookup(pName).sym));
added = added.prepend(
initField(tree.body.pos, pName));
}
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Fri Sep 06 14:20:58 2013 -0700
@@ -677,8 +677,7 @@
if (tree.init != null) {
v.flags_field |= HASINIT;
if ((v.flags_field & FINAL) != 0 &&
- !tree.init.hasTag(NEWCLASS) &&
- !tree.init.hasTag(LAMBDA)) {
+ needsLazyConstValue(tree.init)) {
Env<AttrContext> initEnv = getInitEnv(tree, env);
initEnv.info.enclVar = v;
v.setLazyConstValue(initEnv(tree, initEnv), attr, tree.init);
@@ -700,6 +699,59 @@
}
}
+ public boolean needsLazyConstValue(JCTree tree) {
+ InitTreeVisitor initTreeVisitor = new InitTreeVisitor();
+ tree.accept(initTreeVisitor);
+ return initTreeVisitor.result;
+ }
+
+ /** Visitor class for expressions which might be constant expressions.
+ */
+ static class InitTreeVisitor extends JCTree.Visitor {
+
+ private boolean result = true;
+
+ @Override
+ public void visitTree(JCTree tree) {}
+
+ @Override
+ public void visitNewClass(JCNewClass that) {
+ result = false;
+ }
+
+ @Override
+ public void visitLambda(JCLambda that) {
+ result = false;
+ }
+
+ @Override
+ public void visitReference(JCMemberReference that) {
+ result = false;
+ }
+
+ @Override
+ public void visitSelect(JCFieldAccess tree) {
+ tree.selected.accept(this);
+ }
+
+ @Override
+ public void visitConditional(JCConditional tree) {
+ tree.cond.accept(this);
+ tree.truepart.accept(this);
+ tree.falsepart.accept(this);
+ }
+
+ @Override
+ public void visitParens(JCParens tree) {
+ tree.expr.accept(this);
+ }
+
+ @Override
+ public void visitTypeCast(JCTypeCast tree) {
+ tree.expr.accept(this);
+ }
+ }
+
/** Create a fresh environment for a variable's initializer.
* If the variable is a field, the owner of the environment's scope
* is be the variable itself, otherwise the owner is the method
@@ -1089,7 +1141,7 @@
}
}
if (allowTypeAnnos) {
- TypeAnnotations.organizeTypeAnnotationsSignatures(syms, names, log, tree, annotate);
+ TypeAnnotations.organizeTypeAnnotationsSignatures(syms, names, log, env, tree, annotate);
}
}
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Sep 06 14:20:58 2013 -0700
@@ -1859,7 +1859,10 @@
}
}
- /** Find qualified member type.
+
+ /**
+ * Find a type declared in a scope (not inherited). Return null
+ * if none is found.
* @param env The current environment.
* @param site The original type from where the selection takes
* place.
@@ -1868,12 +1871,10 @@
* always a superclass or implemented interface of
* site's class.
*/
- Symbol findMemberType(Env<AttrContext> env,
- Type site,
- Name name,
- TypeSymbol c) {
- Symbol bestSoFar = typeNotFound;
- Symbol sym;
+ Symbol findImmediateMemberType(Env<AttrContext> env,
+ Type site,
+ Name name,
+ TypeSymbol c) {
Scope.Entry e = c.members().lookup(name);
while (e.scope != null) {
if (e.sym.kind == TYP) {
@@ -1883,6 +1884,24 @@
}
e = e.next();
}
+ return typeNotFound;
+ }
+
+ /** Find a member type inherited from a superclass or interface.
+ * @param env The current environment.
+ * @param site The original type from where the selection takes
+ * place.
+ * @param name The type's name.
+ * @param c The class to search for the member type. This is
+ * always a superclass or implemented interface of
+ * site's class.
+ */
+ Symbol findInheritedMemberType(Env<AttrContext> env,
+ Type site,
+ Name name,
+ TypeSymbol c) {
+ Symbol bestSoFar = typeNotFound;
+ Symbol sym;
Type st = types.supertype(c.type);
if (st != null && st.hasTag(CLASS)) {
sym = findMemberType(env, site, name, st.tsym);
@@ -1901,6 +1920,28 @@
return bestSoFar;
}
+ /** Find qualified member type.
+ * @param env The current environment.
+ * @param site The original type from where the selection takes
+ * place.
+ * @param name The type's name.
+ * @param c The class to search for the member type. This is
+ * always a superclass or implemented interface of
+ * site's class.
+ */
+ Symbol findMemberType(Env<AttrContext> env,
+ Type site,
+ Name name,
+ TypeSymbol c) {
+ Symbol sym = findImmediateMemberType(env, site, name, c);
+
+ if (sym != typeNotFound)
+ return sym;
+
+ return findInheritedMemberType(env, site, name, c);
+
+ }
+
/** Find a global type in given scope and load corresponding class.
* @param env The current environment.
* @param scope The scope in which to look for the type.
@@ -1919,6 +1960,21 @@
return bestSoFar;
}
+ Symbol findTypeVar(Env<AttrContext> env, Name name, boolean staticOnly) {
+ for (Scope.Entry e = env.info.scope.lookup(name);
+ e.scope != null;
+ e = e.next()) {
+ if (e.sym.kind == TYP) {
+ if (staticOnly &&
+ e.sym.type.hasTag(TYPEVAR) &&
+ e.sym.owner.kind == TYP)
+ return new StaticError(e.sym);
+ return e.sym;
+ }
+ }
+ return typeNotFound;
+ }
+
/** Find an unqualified type symbol.
* @param env The current environment.
* @param name The type's name.
@@ -1929,19 +1985,26 @@
boolean staticOnly = false;
for (Env<AttrContext> env1 = env; env1.outer != null; env1 = env1.outer) {
if (isStatic(env1)) staticOnly = true;
- for (Scope.Entry e = env1.info.scope.lookup(name);
- e.scope != null;
- e = e.next()) {
- if (e.sym.kind == TYP) {
- if (staticOnly &&
- e.sym.type.hasTag(TYPEVAR) &&
- e.sym.owner.kind == TYP) return new StaticError(e.sym);
- return e.sym;
- }
+ // First, look for a type variable and the first member type
+ final Symbol tyvar = findTypeVar(env1, name, staticOnly);
+ sym = findImmediateMemberType(env1, env1.enclClass.sym.type,
+ name, env1.enclClass.sym);
+
+ // Return the type variable if we have it, and have no
+ // immediate member, OR the type variable is for a method.
+ if (tyvar != typeNotFound) {
+ if (sym == typeNotFound ||
+ (tyvar.kind == TYP && tyvar.exists() &&
+ tyvar.owner.kind == MTH))
+ return tyvar;
}
- sym = findMemberType(env1, env1.enclClass.sym.type, name,
- env1.enclClass.sym);
+ // If the environment is a class def, finish up,
+ // otherwise, do the entire findMemberType
+ if (sym == typeNotFound)
+ sym = findInheritedMemberType(env1, env1.enclClass.sym.type,
+ name, env1.enclClass.sym);
+
if (staticOnly && sym.kind == TYP &&
sym.type.hasTag(CLASS) &&
sym.type.getEnclosingType().hasTag(CLASS) &&
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java Fri Sep 06 14:20:58 2013 -0700
@@ -657,6 +657,14 @@
databuf.appendChar(pool.put(s.name));
databuf.appendChar(flags);
}
+ // Now write the captured locals
+ for (VarSymbol s : m.capturedLocals) {
+ final int flags =
+ ((int) s.flags() & (FINAL | SYNTHETIC | MANDATED)) |
+ ((int) m.flags() & SYNTHETIC);
+ databuf.appendChar(pool.put(s.name));
+ databuf.appendChar(flags);
+ }
endAttr(attrIndex);
return 1;
} else
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Fri Sep 06 14:20:58 2013 -0700
@@ -446,7 +446,7 @@
}
if (target.compareTo(Target.JDK1_5) <= 0) {
- log.warning(LintCategory.OPTIONS, "option.obsolete.target", source.name);
+ log.warning(LintCategory.OPTIONS, "option.obsolete.target", target.name);
obsoleteOptionFound = true;
}
--- a/langtools/src/share/classes/com/sun/tools/javac/main/Option.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/Option.java Fri Sep 06 14:20:58 2013 -0700
@@ -389,6 +389,7 @@
XPREFER("-Xprefer:", "opt.prefer", EXTENDED, BASIC, ONEOF, "source", "newer"),
+ // see enum PkgInfo
XPKGINFO("-Xpkginfo:", "opt.pkginfo", EXTENDED, BASIC, ONEOF, "always", "legacy", "nonempty"),
/* -O is a no-op, accepted for backward compatibility. */
@@ -686,7 +687,28 @@
// For -XpkgInfo:value
public enum PkgInfo {
- ALWAYS, LEGACY, NONEMPTY;
+ /**
+ * Always generate package-info.class for every package-info.java file.
+ * The file may be empty if there annotations with a RetentionPolicy
+ * of CLASS or RUNTIME. This option may be useful in conjunction with
+ * build systems (such as Ant) that expect javac to generate at least
+ * one .class file for every .java file.
+ */
+ ALWAYS,
+ /**
+ * Generate a package-info.class file if package-info.java contains
+ * annotations. The file may be empty if all the annotations have
+ * a RetentionPolicy of SOURCE.
+ * This value is just for backwards compatibility with earlier behavior.
+ * Either of the other two values are to be preferred to using this one.
+ */
+ LEGACY,
+ /**
+ * Generate a package-info.class file if and only if there are annotations
+ * in package-info.java to be written into it.
+ */
+ NONEMPTY;
+
public static PkgInfo get(Options options) {
String v = options.get(XPKGINFO);
return (v == null
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java Fri Sep 06 14:20:58 2013 -0700
@@ -89,7 +89,7 @@
* deletion without notice.</b>
*/
public class JavacProcessingEnvironment implements ProcessingEnvironment, Closeable {
- Options options;
+ private final Options options;
private final boolean printProcessorInfo;
private final boolean printRounds;
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Fri Sep 06 14:20:58 2013 -0700
@@ -2248,7 +2248,7 @@
# TODO 308: make a better error message
# 0: unused
compiler.err.cant.annotate.nested.type=\
- nested type cannot be annotated
+ scoping construct for static nested type cannot be annotated
# 0: type, 1: type
compiler.err.incorrect.receiver.name=\
--- a/langtools/src/share/classes/com/sun/tools/javac/sym/Profiles.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/sym/Profiles.java Fri Sep 06 14:20:58 2013 -0700
@@ -148,7 +148,7 @@
}
}
- final static Map<String, Package> packages = new TreeMap<String, Package>();
+ final Map<String, Package> packages = new TreeMap<String, Package>();
final int maxProfile = 4; // Three compact profiles plus full JRE
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java Fri Sep 06 14:20:58 2013 -0700
@@ -944,10 +944,17 @@
try {
if (tree.elemtype != null) {
print("new ");
- printTypeAnnotations(tree.annotations);
JCTree elem = tree.elemtype;
printBaseElementType(elem);
- boolean isElemAnnoType = elem instanceof JCAnnotatedType;
+
+ if (!tree.annotations.isEmpty()) {
+ print(' ');
+ printTypeAnnotations(tree.annotations);
+ }
+ if (tree.elems != null) {
+ print("[]");
+ }
+
int i = 0;
List<List<JCAnnotation>> da = tree.dimAnnotations;
for (List<JCExpression> l = tree.dims; l.nonEmpty(); l = l.tail) {
@@ -960,17 +967,7 @@
printExpr(l.head);
print("]");
}
- if (tree.elems != null) {
- if (isElemAnnoType) {
- print(' ');
- printTypeAnnotations(((JCAnnotatedType)tree.elemtype).annotations);
- }
- print("[]");
- }
- if (isElemAnnoType)
- elem = ((JCAnnotatedType)elem).underlyingType;
- if (elem instanceof JCArrayTypeTree)
- printBrackets((JCArrayTypeTree) elem);
+ printBrackets(elem);
}
if (tree.elems != null) {
print("{");
@@ -1260,20 +1257,24 @@
}
// prints the brackets of a nested array in reverse order
- private void printBrackets(JCArrayTypeTree tree) throws IOException {
- JCTree elem;
+ // tree is either JCArrayTypeTree or JCAnnotatedTypeTree
+ private void printBrackets(JCTree tree) throws IOException {
+ JCTree elem = tree;
while (true) {
- elem = tree.elemtype;
if (elem.hasTag(ANNOTATED_TYPE)) {
JCAnnotatedType atype = (JCAnnotatedType) elem;
elem = atype.underlyingType;
- if (!elem.hasTag(TYPEARRAY)) break;
- print(' ');
- printTypeAnnotations(atype.annotations);
+ if (elem.hasTag(TYPEARRAY)) {
+ print(' ');
+ printTypeAnnotations(atype.annotations);
+ }
}
- print("[]");
- if (!elem.hasTag(TYPEARRAY)) break;
- tree = (JCArrayTypeTree) elem;
+ if (elem.hasTag(TYPEARRAY)) {
+ print("[]");
+ elem = ((JCArrayTypeTree)elem).elemtype;
+ } else {
+ break;
+ }
}
}
@@ -1378,22 +1379,15 @@
public void visitAnnotatedType(JCAnnotatedType tree) {
try {
- if (tree.underlyingType.getKind() == JCTree.Kind.MEMBER_SELECT) {
+ if (tree.underlyingType.hasTag(SELECT)) {
JCFieldAccess access = (JCFieldAccess) tree.underlyingType;
printExpr(access.selected, TreeInfo.postfixPrec);
print(".");
printTypeAnnotations(tree.annotations);
print(access.name);
- } else if (tree.underlyingType.getKind() == JCTree.Kind.ARRAY_TYPE) {
- JCArrayTypeTree array = (JCArrayTypeTree) tree.underlyingType;
+ } else if (tree.underlyingType.hasTag(TYPEARRAY)) {
printBaseElementType(tree);
- print(' ');
- printTypeAnnotations(tree.annotations);
- print("[]");
- JCExpression elem = array.elemtype;
- if (elem.hasTag(TYPEARRAY)) {
- printBrackets((JCArrayTypeTree) elem);
- }
+ printBrackets(tree);
} else {
printTypeAnnotations(tree.annotations);
printExpr(tree.underlyingType);
--- a/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java Fri Sep 06 14:20:58 2013 -0700
@@ -128,7 +128,14 @@
try {
return clazz.flags();
} catch (CompletionFailure ex) {
- // quietly ignore completion failures
+ /* Quietly ignore completion failures.
+ * Note that a CompletionFailure can only
+ * occur as a result of calling complete(),
+ * which will always remove the current
+ * completer, leaving it to be null or
+ * follow-up completer. Thus the loop
+ * is guaranteed to eventually terminate.
+ */
}
}
}
--- a/langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java Fri Sep 06 14:20:58 2013 -0700
@@ -30,9 +30,12 @@
import com.sun.tools.javac.code.Kinds;
import com.sun.tools.javac.code.Symbol.*;
import com.sun.tools.javac.comp.MemberEnter;
+import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.*;
import com.sun.tools.javac.util.Context;
+import static com.sun.tools.javac.code.Flags.*;
+
/**
* Javadoc's own memberEnter phase does a few things above and beyond that
* done by javac.
@@ -86,6 +89,17 @@
@Override
public void visitVarDef(JCVariableDecl tree) {
+ if (tree.init != null) {
+ boolean isFinal = (tree.mods.flags & FINAL) != 0
+ || (env.enclClass.mods.flags & INTERFACE) != 0;
+ if (!isFinal || containsNonConstantExpression(tree.init)) {
+ // Avoid unnecessary analysis and release resources.
+ // In particular, remove non-constant expressions
+ // which may trigger Attr.attribClass, since
+ // method bodies are also removed, in visitMethodDef.
+ tree.init = null;
+ }
+ }
super.visitVarDef(tree);
if (tree.sym != null &&
tree.sym.kind == Kinds.VAR &&
@@ -101,4 +115,95 @@
private static boolean isParameter(VarSymbol var) {
return (var.flags() & Flags.PARAMETER) != 0;
}
+
+ /**
+ * Simple analysis of an expression tree to see if it contains tree nodes
+ * for any non-constant expression. This does not include checking references
+ * to other fields which may or may not be constant.
+ */
+ private static boolean containsNonConstantExpression(JCExpression tree) {
+ return new MaybeConstantExpressionScanner().containsNonConstantExpression(tree);
+ }
+
+ /**
+ * See JLS 15.18, Constant Expression
+ */
+ private static class MaybeConstantExpressionScanner extends JCTree.Visitor {
+ boolean maybeConstantExpr = true;
+
+ public boolean containsNonConstantExpression(JCExpression tree) {
+ scan(tree);
+ return !maybeConstantExpr;
+ }
+
+ public void scan(JCTree tree) {
+ // short circuit scan when end result is definitely false
+ if (maybeConstantExpr && tree != null)
+ tree.accept(this);
+ }
+
+ @Override
+ /** default for any non-overridden visit method. */
+ public void visitTree(JCTree tree) {
+ maybeConstantExpr = false;
+ }
+
+ @Override
+ public void visitBinary(JCBinary tree) {
+ switch (tree.getTag()) {
+ case MUL: case DIV: case MOD:
+ case PLUS: case MINUS:
+ case SL: case SR: case USR:
+ case LT: case LE: case GT: case GE:
+ case EQ: case NE:
+ case BITAND: case BITXOR: case BITOR:
+ case AND: case OR:
+ break;
+ default:
+ maybeConstantExpr = false;
+ }
+ }
+
+ @Override
+ public void visitConditional(JCConditional tree) {
+ scan(tree.cond);
+ scan(tree.truepart);
+ scan(tree.falsepart);
+ }
+
+ @Override
+ public void visitIdent(JCIdent tree) { }
+
+ @Override
+ public void visitLiteral(JCLiteral tree) { }
+
+ @Override
+ public void visitParens(JCParens tree) {
+ scan(tree.expr);
+ }
+
+ @Override
+ public void visitSelect(JCTree.JCFieldAccess tree) {
+ scan(tree.selected);
+ }
+
+ @Override
+ public void visitTypeCast(JCTypeCast tree) {
+ scan(tree.clazz);
+ scan(tree.expr);
+ }
+
+ @Override
+ public void visitTypeIdent(JCPrimitiveTypeTree tree) { }
+
+ @Override
+ public void visitUnary(JCUnary tree) {
+ switch (tree.getTag()) {
+ case POS: case NEG: case COMPL: case NOT:
+ break;
+ default:
+ maybeConstantExpr = false;
+ }
+ }
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testCharset/TestCharset.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7052170
+ * @summary Run a test on -charset to make sure the charset gets generated as a
+ * part of the meta tag.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestCharset
+ * @run main TestCharset
+ */
+
+public class TestCharset extends JavadocTester {
+
+ //Test information.
+ private static final String BUG_ID = "7052170";
+
+ //Javadoc arguments.
+ private static final String[] ARGS = new String[] {
+ "-d", BUG_ID, "-charset", "UTF-8", "-sourcepath", SRC_DIR, "pkg"
+ };
+
+ private static final String[][] TEST = {
+ {BUG_ID + FS + "index.html",
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"},
+ {BUG_ID + FS + "pkg" + FS + "Foo.html",
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"}
+ };
+
+ private static final String[][] NEGATED_TEST = {
+ {BUG_ID + FS + "index.html",
+ "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">"},
+ {BUG_ID + FS + "pkg" + FS + "Foo.html",
+ "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">"}
+ };
+
+ /**
+ * The entry point of the test.
+ * @param args the array of command line arguments.
+ */
+ public static void main(String[] args) {
+ TestCharset tester = new TestCharset();
+ run(tester, ARGS, TEST, NEGATED_TEST);
+ tester.printSummary();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBugId() {
+ return BUG_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBugName() {
+ return getClass().getName();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testCharset/pkg/Foo.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+public class Foo {}
--- a/langtools/test/com/sun/javadoc/testNavagation/TestNavagation.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4131628 4664607 7025314
- * @summary Make sure the Next/Prev Class links iterate through all types.
- * Make sure the navagation is 2 columns, not 3.
- * @author jamieh
- * @library ../lib/
- * @build JavadocTester
- * @build TestNavagation
- * @run main TestNavagation
- */
-
-public class TestNavagation extends JavadocTester {
-
- //Test information.
- private static final String BUG_ID = "4131628-4664607";
-
- //Javadoc arguments.
- private static final String[] ARGS = new String[] {
- "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
- };
-
- //Input for string search tests.
- private static final String[][] TEST = {
- {BUG_ID + FS + "pkg" + FS + "A.html", "<li>Prev Class</li>"},
- {BUG_ID + FS + "pkg" + FS + "A.html",
- "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">Next Class</span></a>"},
- {BUG_ID + FS + "pkg" + FS + "C.html",
- "<a href=\"../pkg/A.html\" title=\"annotation in pkg\"><span class=\"strong\">Prev Class</span></a>"},
- {BUG_ID + FS + "pkg" + FS + "C.html",
- "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"strong\">Next Class</span></a>"},
- {BUG_ID + FS + "pkg" + FS + "E.html",
- "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">Prev Class</span></a>"},
- {BUG_ID + FS + "pkg" + FS + "E.html",
- "<a href=\"../pkg/I.html\" title=\"interface in pkg\"><span class=\"strong\">Next Class</span></a>"},
- {BUG_ID + FS + "pkg" + FS + "I.html",
- "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"strong\">Prev Class</span></a>"},
- {BUG_ID + FS + "pkg" + FS + "I.html", "<li>Next Class</li>"},
- // Test for 4664607
- {BUG_ID + FS + "pkg" + FS + "I.html",
- "<a href=\"#skip-navbar_top\" title=\"Skip navigation links\"></a><a name=\"navbar_top_firstrow\">" + NL +
- "<!-- -->" + NL + "</a>"}
- };
- private static final String[][] NEGATED_TEST = NO_TEST;
-
- /**
- * The entry point of the test.
- * @param args the array of command line arguments.
- */
- public static void main(String[] args) {
- TestNavagation tester = new TestNavagation();
- run(tester, ARGS, TEST, NEGATED_TEST);
- tester.printSummary();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getBugId() {
- return BUG_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getBugName() {
- return getClass().getName();
- }
-}
--- a/langtools/test/com/sun/javadoc/testNavagation/pkg/A.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package pkg;
-
-/**
- * Sample Annotation Type.
- */
-public @interface A {}
--- a/langtools/test/com/sun/javadoc/testNavagation/pkg/C.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package pkg;
-
-/**
- * Sample Class.
- */
-public class C {}
--- a/langtools/test/com/sun/javadoc/testNavagation/pkg/E.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package pkg;
-
-/**
- * Sample Enum.
- */
-public enum E {}
--- a/langtools/test/com/sun/javadoc/testNavagation/pkg/I.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package pkg;
-
-/**
- * Sample Interface.
- */
-public interface I {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4131628 4664607 7025314
+ * @summary Make sure the Next/Prev Class links iterate through all types.
+ * Make sure the navagation is 2 columns, not 3.
+ * @author jamieh
+ * @library ../lib/
+ * @build JavadocTester
+ * @build TestNavigation
+ * @run main TestNavigation
+ */
+
+public class TestNavigation extends JavadocTester {
+
+ //Test information.
+ private static final String BUG_ID = "4131628-4664607";
+
+ //Javadoc arguments.
+ private static final String[] ARGS = new String[] {
+ "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
+ };
+
+ //Input for string search tests.
+ private static final String[][] TEST = {
+ {BUG_ID + FS + "pkg" + FS + "A.html", "<li>Prev Class</li>"},
+ {BUG_ID + FS + "pkg" + FS + "A.html",
+ "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">Next Class</span></a>"},
+ {BUG_ID + FS + "pkg" + FS + "C.html",
+ "<a href=\"../pkg/A.html\" title=\"annotation in pkg\"><span class=\"strong\">Prev Class</span></a>"},
+ {BUG_ID + FS + "pkg" + FS + "C.html",
+ "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"strong\">Next Class</span></a>"},
+ {BUG_ID + FS + "pkg" + FS + "E.html",
+ "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">Prev Class</span></a>"},
+ {BUG_ID + FS + "pkg" + FS + "E.html",
+ "<a href=\"../pkg/I.html\" title=\"interface in pkg\"><span class=\"strong\">Next Class</span></a>"},
+ {BUG_ID + FS + "pkg" + FS + "I.html",
+ "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"strong\">Prev Class</span></a>"},
+ {BUG_ID + FS + "pkg" + FS + "I.html", "<li>Next Class</li>"},
+ // Test for 4664607
+ {BUG_ID + FS + "pkg" + FS + "I.html",
+ "<a href=\"#skip-navbar_top\" title=\"Skip navigation links\"></a><a name=\"navbar_top_firstrow\">" + NL +
+ "<!-- -->" + NL + "</a>"}
+ };
+ private static final String[][] NEGATED_TEST = NO_TEST;
+
+ /**
+ * The entry point of the test.
+ * @param args the array of command line arguments.
+ */
+ public static void main(String[] args) {
+ TestNavigation tester = new TestNavigation();
+ run(tester, ARGS, TEST, NEGATED_TEST);
+ tester.printSummary();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBugId() {
+ return BUG_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBugName() {
+ return getClass().getName();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testNavigation/pkg/A.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * Sample Annotation Type.
+ */
+public @interface A {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testNavigation/pkg/C.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * Sample Class.
+ */
+public class C {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testNavigation/pkg/E.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * Sample Enum.
+ */
+public enum E {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testNavigation/pkg/I.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+/**
+ * Sample Interface.
+ */
+public interface I {}
--- a/langtools/test/tools/doclint/html/ListTagsTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/doclint/html/ListTagsTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 8006251 8013405
+ * @bug 8006251 8013405 8022173
* @summary test list tags
* @library ..
* @build DocLintTester
@@ -15,6 +15,7 @@
* <ol> <li value="1"> abc </ol>
* <ol> <li value> bad </ol>
* <ol> <li value="a"> bad </ol>
+ * <ol type="a"> <li> bad </ol>
* <ul> <li> abc </ul>
*/
public void supportedTags() { }
--- a/langtools/test/tools/doclint/html/OtherTagsTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/doclint/html/OtherTagsTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 8006251
+ * @bug 8006251 8022173
* @summary test other tags
* @library ..
* @build DocLintTester
@@ -14,6 +14,7 @@
* <frame>
* <frameset> </frameset>
* <head> </head>
+ * <hr width="50%">
* <link>
* <meta>
* <noframes> </noframes>
--- a/langtools/test/tools/doclint/html/OtherTagsTest.out Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/doclint/html/OtherTagsTest.out Fri Sep 06 14:20:58 2013 -0700
@@ -10,19 +10,19 @@
OtherTagsTest.java:16: error: element not allowed in documentation comments: <head>
* <head> </head>
^
-OtherTagsTest.java:17: error: element not allowed in documentation comments: <link>
+OtherTagsTest.java:18: error: element not allowed in documentation comments: <link>
* <link>
^
-OtherTagsTest.java:18: error: element not allowed in documentation comments: <meta>
+OtherTagsTest.java:19: error: element not allowed in documentation comments: <meta>
* <meta>
^
-OtherTagsTest.java:19: error: element not allowed in documentation comments: <noframes>
+OtherTagsTest.java:20: error: element not allowed in documentation comments: <noframes>
* <noframes> </noframes>
^
-OtherTagsTest.java:20: error: element not allowed in documentation comments: <script>
+OtherTagsTest.java:21: error: element not allowed in documentation comments: <script>
* <script> </script>
^
-OtherTagsTest.java:21: error: element not allowed in documentation comments: <title>
+OtherTagsTest.java:22: error: element not allowed in documentation comments: <title>
* <title> </title>
^
9 errors
--- a/langtools/test/tools/doclint/html/TableTagsTest.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/doclint/html/TableTagsTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8006251
+ * @bug 8006251 8022173
* @summary test table tags
* @library ..
* @build DocLintTester
@@ -39,6 +39,7 @@
* <table summary="abc"> <thead> <tr> </thead> <tr> <td> </table>
* <table summary="abc"> <tbody> <tr> <td> </tbody> </table>
* <table summary="abc"> <tr> <td> <tfoot> <tr> </tfoot></table>
+ * <table summary="abc" width="50%"> <tr> <td> <tfoot> <tr> </tfoot></table>
*/
public void supportedTags() { }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/7118412/ShadowingTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7118412
+ * @summary Shadowing of type-variables vs. member types
+ */
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class ShadowingTest {
+
+ // We generate a method "test" that tries to call T.<something,
+ // depending on the value of MethodCall>. This controls whether
+ // "test" is static or not.
+ private enum MethodContext {
+ STATIC("static "),
+ INSTANCE("");
+
+ public final String methodcontext;
+
+ MethodContext(final String methodcontext) {
+ this.methodcontext = methodcontext;
+ }
+ }
+
+ // These control whether or not a type parameter, method type
+ // parameter, or inner class get declared (and in the case of
+ // inner classes, whether it's static or not.
+
+ private enum MethodTypeParameterDecl {
+ NO(""),
+ YES("<T extends Number> ");
+
+ public final String tyvar;
+
+ MethodTypeParameterDecl(final String tyvar) {
+ this.tyvar = tyvar;
+ }
+ }
+
+ private enum InsideDef {
+ NONE(""),
+ STATIC("static class T { public void inner() {} }\n"),
+ INSTANCE("class T { public void inner() {} }\n");
+
+ public final String instancedef;
+
+ InsideDef(final String instancedef) {
+ this.instancedef = instancedef;
+ }
+ }
+
+ private enum TypeParameterDecl {
+ NO(""),
+ YES("<T extends Collection>");
+
+ public final String tyvar;
+
+ TypeParameterDecl(final String tyvar) {
+ this.tyvar = tyvar;
+ }
+ }
+
+ // Represents what method we try to call. This is a way of
+ // checking which T we're seeing.
+ private enum MethodCall {
+ // Method type variables extend Number, so we have intValue
+ METHOD_TYPEVAR("intValue"),
+ // The inner class declaration has a method called "inner"
+ INNER_CLASS("inner"),
+ // The class type variables extend Collection, so we call iterator
+ TYPEVAR("iterator"),
+ // The outer class declaration has a method called "outer"
+ OUTER_CLASS("outer");
+
+ public final String methodcall;
+
+ MethodCall(final String methodcall) {
+ this.methodcall = methodcall;
+ }
+
+ }
+
+ public boolean succeeds(final MethodCall call,
+ final MethodTypeParameterDecl mtyvar,
+ final MethodContext ctx,
+ final InsideDef inside,
+ final TypeParameterDecl tyvar) {
+ switch(call) {
+ // We want to resolve to the method type variable
+ case METHOD_TYPEVAR: switch(mtyvar) {
+ // If the method type variable exists, then T will
+ // resolve to it, and we'll have intValue.
+ case YES: return true;
+ // Otherwise, this cannot succeed.
+ default: return false;
+ }
+ // We want to resolve to the inner class
+ case INNER_CLASS: switch(mtyvar) {
+ // The method type parameter will shadow the inner
+ // class, so there can't be one.
+ case NO: switch(ctx) {
+ // If we're not static, then either one should succeed.
+ case INSTANCE: switch(inside) {
+ case INSTANCE:
+ case STATIC:
+ return true;
+ default: return false;
+ }
+ case STATIC: switch(inside) {
+ // If we are static, and the inner class is
+ // static, then we also succeed, because we
+ // can't see the type variable.
+ case STATIC: return true;
+ case INSTANCE: switch(tyvar) {
+ // If we're calling from a non-static
+ // context, there can't be a class type
+ // variable, because that will shadow the
+ // static inner class definition.
+ case NO: return true;
+ default: return false;
+ }
+ // If the inner class isn't declared, we can't
+ // see it.
+ default: return false;
+ }
+ // Can't get here.
+ default: return false;
+ }
+ default: return false;
+ }
+ // We want to resolve to the class type parameter
+ case TYPEVAR: switch(mtyvar) {
+ // We can't have a method type parameter, as that would
+ // shadow the class type parameter
+ case NO: switch(ctx) {
+ case INSTANCE: switch(inside) {
+ // We have to be in an instance context. If
+ // we're static, we can't see the type
+ // variable.
+ case NONE: switch(tyvar) {
+ // Obviously, the type parameter has to be declared.
+ case YES: return true;
+ default: return false;
+ }
+ default: return false;
+ }
+ default: return false;
+ }
+ default: return false;
+ }
+ // We want to resolve to the outer class
+ case OUTER_CLASS: switch(mtyvar) {
+ case NO: switch(inside) {
+ case NONE: switch(tyvar) {
+ // Basically, nothing else can be declared, or
+ // else we can't see it. Even if our context
+ // is static, the compiler will complain if
+ // non-static T's exist, because they will
+ // shadow the outer class.
+ case NO: return true;
+ default: return false;
+ }
+ default: return false;
+ }
+ default: return false;
+ }
+ }
+ return false;
+ }
+
+ private static final File classesdir = new File("7118412");
+
+ private int errors = 0;
+
+ private int dirnum = 0;
+
+ private void doTest(final MethodTypeParameterDecl mtyvar,
+ final TypeParameterDecl tyvar,
+ final InsideDef insidedef, final MethodContext ctx,
+ final MethodCall call)
+ throws IOException {
+ final String content = "import java.util.Collection;\n" +
+ "class Test" + tyvar.tyvar + " {\n" +
+ " " + insidedef.instancedef +
+ " " + ctx.methodcontext + mtyvar.tyvar + "void test(T t) { t." +
+ call.methodcall + "(); }\n" +
+ "}\n" +
+ "class T { void outer() {} }\n";
+ final File dir = new File(classesdir, "" + dirnum);
+ final File Test_java = writeFile(dir, "Test.java", content);
+ dirnum++;
+ if(succeeds(call, mtyvar, ctx, insidedef, tyvar)) {
+ if(!assert_compile_succeed(Test_java))
+ System.err.println("Failed file:\n" + content);
+ }
+ else {
+ if(!assert_compile_fail(Test_java))
+ System.err.println("Failed file:\n" + content);
+ }
+ }
+
+ private void run() throws Exception {
+ classesdir.mkdir();
+ for(MethodTypeParameterDecl mtyvar : MethodTypeParameterDecl.values())
+ for(TypeParameterDecl tyvar : TypeParameterDecl.values())
+ for(InsideDef insidedef : InsideDef.values())
+ for(MethodContext ctx : MethodContext.values())
+ for(MethodCall methodcall : MethodCall.values())
+ doTest(mtyvar, tyvar, insidedef, ctx, methodcall);
+ if (errors != 0)
+ throw new Exception("ShadowingTest test failed with " +
+ errors + " errors.");
+ }
+
+ private boolean assert_compile_fail(final File file) {
+ final String filename = file.getPath();
+ final String[] args = { filename };
+ final StringWriter sw = new StringWriter();
+ final PrintWriter pw = new PrintWriter(sw);
+ final int rc = com.sun.tools.javac.Main.compile(args, pw);
+ pw.close();
+ if (rc == 0) {
+ System.err.println("Compilation of " + file.getName() +
+ " didn't fail as expected.");
+ errors++;
+ return false;
+ } else return true;
+ }
+
+ private boolean assert_compile_succeed(final File file) {
+ final String filename = file.getPath();
+ final String[] args = { filename };
+ final StringWriter sw = new StringWriter();
+ final PrintWriter pw = new PrintWriter(sw);
+ final int rc = com.sun.tools.javac.Main.compile(args, pw);
+ pw.close();
+ if (rc != 0) {
+ System.err.println("Compilation of " + file.getName() +
+ " didn't succeed as expected. Output:");
+ System.err.println(sw.toString());
+ errors++;
+ return false;
+ } else return true;
+ }
+
+ private File writeFile(final File dir,
+ final String path,
+ final String body) throws IOException {
+ final File f = new File(dir, path);
+ f.getParentFile().mkdirs();
+ final FileWriter out = new FileWriter(f);
+ out.write(body);
+ out.close();
+ return f;
+ }
+
+ public static void main(String... args) throws Exception {
+ new ShadowingTest().run();
+ }
+
+}
--- a/langtools/test/tools/javac/8015701/AnonymousParameters.java Wed Sep 04 19:58:16 2013 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8015701
- * @summary javac should generate method parameters correctly.
- * @compile -parameters AnonymousParameters.java
- * @run main AnonymousParameters
- */
-import java.lang.Class;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Parameter;
-import java.util.concurrent.Callable;
-
-public class AnonymousParameters {
-
- String[] names = {
- "this$0",
- "val$message"
- };
-
- public static void main(String... args) throws Exception {
- new AnonymousParameters().run();
- }
-
- void run() throws Exception {
- Class<?> cls = new ParameterNames().makeInner("hello").getClass();
- Constructor<?> ctor = cls.getDeclaredConstructors()[0];
- Parameter[] params = ctor.getParameters();
-
- if(params.length == 2) {
- for(int i = 0; i < 2; i++) {
- System.err.println("Testing parameter " + params[i].getName());
- if(!params[i].getName().equals(names[i]))
- error("Expected parameter name " + names[i] +
- " got " + params[i].getName());
- }
- } else
- error("Expected 2 parameters");
-
- if(0 != errors)
- throw new Exception("MethodParameters test failed with " +
- errors + " errors");
- }
-
- void error(String msg) {
- System.err.println("Error: " + msg);
- errors++;
- }
-
- int errors;
-}
-
-class ParameterNames {
-
- public Callable<String> makeInner(final String message) {
- return new Callable<String>() {
- public String call() throws Exception {
- return message;
- }
- };
- }
-
- public static void main(String... args) throws Exception {
- ParameterNames test = new ParameterNames();
- System.out.println(test.makeInner("Hello").call());
- }
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/MethodParameters/CaptureTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8015701
+ * @summary Test method parameter attribute generation with captured locals.
+ * @compile -parameters CaptureTest.java
+ * @run main CaptureTest
+ */
+import java.lang.Class;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Parameter;
+import java.lang.reflect.Modifier;
+import java.util.List;
+import java.util.ArrayList;
+
+public class CaptureTest {
+
+ private static final int SYNTHETIC = 0x1000;
+ private static final int MANDATED = 0x8000;
+
+ public static void main(String... args) throws Exception {
+ new CaptureTest().run();
+ }
+
+
+ private void run() throws Exception {
+ final Encloser pn = new Encloser();
+
+ /* Cases covered here:
+ *
+ * - Local class
+ * - Inner class
+ * - Anonymous class
+ * - Anonymous class extending a local
+ * - Anonymous class extending an inner
+ */
+ pn.makeLocal("hello").check();
+ pn.makeInner("hello").check();
+ pn.makeAnon("hello").check();
+ pn.makeAnonExtendsLocal("hello").check();
+ pn.makeAnonExtendsInner("hello").check();
+
+ if (0 != errors)
+ throw new Exception("MethodParameters test failed with " +
+ errors + " errors");
+ }
+
+ private void error(final String msg) {
+ System.err.println("Error: " + msg);
+ errors++;
+ }
+
+ int errors;
+
+ abstract class Tester {
+
+ public Tester(final int param) {}
+
+ protected abstract String[] names();
+ protected abstract int[] modifiers();
+ protected abstract Class[] types();
+
+ public void check() {
+ final Class<?> cls = this.getClass();
+ final Constructor<?> ctor = cls.getDeclaredConstructors()[0];
+ final Parameter[] params = ctor.getParameters();
+ final String[] names = names();
+ final int[] modifiers = modifiers();
+ final Class[] types = types();
+
+ System.err.println("Testing class " + cls);
+
+ if (params.length == names.length) {
+ for (int i = 0; i < names.length; i++) {
+ System.err.println("Testing parameter " + params[i].getName());
+ if (!params[i].getName().equals(names[i]))
+ error("Expected parameter name " + names[i] +
+ " got " + params[i].getName());
+ if (params[i].getModifiers() != modifiers[i])
+ error("Expected parameter modifiers " +
+ modifiers[i] + " got " +
+ params[i].getModifiers());
+ if (!params[i].getType().equals(types[i]))
+ error("Expected parameter type " + types[i] +
+ " got " + params[i].getType());
+ }
+ } else
+ error("Expected " + names.length + " parameters");
+
+ }
+
+ }
+
+ class Encloser {
+ private class InnerTester extends Tester {
+ public InnerTester(final int innerparam) {
+ super(innerparam);
+ }
+
+ protected String[] names() {
+ return new String[] {
+ "this$1",
+ "innerparam"
+ };
+ }
+
+ protected int[] modifiers() {
+ return new int[] {
+ Modifier.FINAL | SYNTHETIC,
+ Modifier.FINAL
+ };
+ }
+
+ protected Class[] types() {
+ return new Class[] {
+ Encloser.class,
+ int.class
+ };
+ }
+ }
+
+ public Tester makeInner(final String message) {
+ return new InnerTester(2);
+ }
+
+ public Tester makeLocal(final String message) {
+ class LocalTester extends Tester {
+ public LocalTester(final int localparam) {
+ super(localparam);
+ }
+
+ protected String[] names() {
+ return new String[] {
+ "this$1",
+ "localparam",
+ "val$message"
+ };
+ }
+
+ protected int[] modifiers() {
+ return new int[] {
+ Modifier.FINAL | MANDATED,
+ Modifier.FINAL,
+ Modifier.FINAL | SYNTHETIC
+ };
+ }
+
+ protected Class[] types() {
+ return new Class[] {
+ Encloser.class,
+ int.class,
+ String.class
+ };
+ }
+
+ public String message() {
+ return message;
+ }
+ }
+
+ return new LocalTester(2);
+ }
+
+ public Tester makeAnonExtendsLocal(final String message) {
+ abstract class LocalTester extends Tester {
+ public LocalTester(final int localparam) {
+ super(localparam);
+ }
+
+ protected String[] names() {
+ return new String[] {
+ "this$1",
+ "localparam",
+ "val$message"
+ };
+ }
+
+ protected int[] modifiers() {
+ return new int[] {
+ Modifier.FINAL | MANDATED,
+ Modifier.FINAL,
+ Modifier.FINAL | SYNTHETIC
+ };
+ }
+
+ protected Class[] types() {
+ return new Class[] {
+ Encloser.class,
+ int.class,
+ String.class
+ };
+ }
+
+ }
+
+ return new LocalTester(2) {
+ public String message() {
+ return message;
+ }
+ };
+ }
+
+ public Tester makeAnonExtendsInner(final String message) {
+ return new InnerTester(2) {
+ protected String[] names() {
+ return new String[] {
+ "this$1",
+ "innerparam",
+ "val$message"
+ };
+ }
+
+ protected int[] modifiers() {
+ return new int[] {
+ Modifier.FINAL | MANDATED,
+ Modifier.FINAL,
+ Modifier.FINAL | SYNTHETIC
+ };
+ }
+
+ protected Class[] types() {
+ return new Class[] {
+ Encloser.class,
+ int.class,
+ String.class
+ };
+ }
+
+ public String message() {
+ return message;
+ }
+ };
+ }
+
+ public Tester makeAnon(final String message) {
+ return new Tester(2) {
+ protected String[] names() {
+ return new String[] {
+ "this$1",
+ "param",
+ "val$message"
+ };
+ }
+
+ protected int[] modifiers() {
+ return new int[] {
+ Modifier.FINAL | MANDATED,
+ Modifier.FINAL,
+ Modifier.FINAL | SYNTHETIC
+ };
+ }
+
+ protected Class[] types() {
+ return new Class[] {
+ Encloser.class,
+ int.class,
+ String.class
+ };
+ }
+
+ public String message() {
+ return message;
+ }
+ };
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8022316/CompilerErrorGenericThrowPlusMethodRefTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+/*
+ * @test
+ * @bug 8022316
+ * @summary Generic throws, overriding and method reference
+ * @compile/fail/ref=CompilerErrorGenericThrowPlusMethodRefTest.out -XDrawDiagnostics CompilerErrorGenericThrowPlusMethodRefTest.java
+ */
+
+@SuppressWarnings("unchecked")
+public class CompilerErrorGenericThrowPlusMethodRefTest {
+ interface SAM11 {
+ public <E extends Throwable> void foo() throws E ;
+ }
+
+ interface SAM12 extends SAM11{
+ @Override
+ public void foo() throws Throwable;
+ }
+
+ public void boo() throws RuntimeException {}
+
+ static void test1() {
+ try {
+ SAM12 s2 = new CompilerErrorGenericThrowPlusMethodRefTest()::boo;
+ s2.foo();
+ } catch(Throwable ex) {}
+ }
+
+ static void test2() {
+ SAM11 s1 = null;
+ s1.<Exception>foo();
+ s1.<RuntimeException>foo();
+ }
+
+ interface SAM21 {
+ <E extends Exception> void m(E arg) throws E;
+ }
+
+ interface SAM22 {
+ <F extends Exception> void m(F arg) throws F;
+ }
+
+ interface SAM23 extends SAM21, SAM22 {}
+
+ public <E extends Exception> void bar(E e) throws E {}
+
+ static <E extends Exception> void test3(E e) {
+ try {
+ SAM23 s2 = new CompilerErrorGenericThrowPlusMethodRefTest()::bar;
+ s2.m(e);
+ } catch(Exception ex) {}
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8022316/CompilerErrorGenericThrowPlusMethodRefTest.out Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,2 @@
+CompilerErrorGenericThrowPlusMethodRefTest.java:55:26: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Exception
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8023112/SkipLazyConstantCreationForMethodRefTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+/*
+ * @test
+ * @bug 8023112
+ * @summary Mixing up the method type argument with the class type for method
+ * reference ClassType<Q>::<T>new
+ * @compile SkipLazyConstantCreationForMethodRefTest.java
+ */
+
+public class SkipLazyConstantCreationForMethodRefTest<T> {
+ SkipLazyConstantCreationForMethodRefTest(int a, boolean b) {}
+ SkipLazyConstantCreationForMethodRefTest() {}
+}
+
+class SubClass<T> extends SkipLazyConstantCreationForMethodRefTest {
+ SubClass(int a, boolean b) {}
+}
+
+interface SAM {
+ SubClass<SkipLazyConstantCreationForMethodRefTest> m(int a, boolean b);
+}
+
+interface Tester1 {
+ SAM s11 = SubClass<SkipLazyConstantCreationForMethodRefTest>::<Object>new;
+ SAM s12 = (SubClass<SkipLazyConstantCreationForMethodRefTest>::<Object>new);
+ SAM s13 = (SAM)SubClass<SkipLazyConstantCreationForMethodRefTest>::<Object>new;
+ SAM s14 = true ? s11 : s12;
+ SAM s15 = true ? s11 : (SAM)SubClass<SkipLazyConstantCreationForMethodRefTest>::<Object>new;
+ SAM s16 = true ? (SAM)SubClass<SkipLazyConstantCreationForMethodRefTest>::<Object>new : s12;
+}
+
+interface Tester2 {
+ SAM s21 = Tester1.s11;
+}
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java Fri Sep 06 14:20:58 2013 -0700
@@ -35,13 +35,16 @@
// Test count helps identify test case in event of failure.
int testcount = 0;
- // Base test case template descriptions
+ // Base test case template descriptions;true==annotations in code attribute.
enum srce {
src1("(repeating) type annotations on on field in method body",true),
src2("(repeating) type annotations on type parameters, bounds and type arguments", true),
src3("(repeating) type annotations on type parameters of class, method return value in method", true),
src4("(repeating) type annotations on field in anonymous class", false),
- src5("(repeating) type annotations on field in anonymous class", false);
+ src5("(repeating) type annotations on field in anonymous class", false),
+ src6("(repeating) type annotations on void method declaration", false),
+ src7("(repeating) type annotations in use of instanceof", true),
+ src8("(repeating) type annotations in use of instanceof in method", true);
String description;
Boolean local;
@@ -84,6 +87,12 @@
test( 0, 8, 0, 0, As, BDs, ABMix, "RUNTIME", et, ++testrun, srce.src1);
test( 2, 0, 2, 0, As, BDs, ABMix, "CLASS", et, ++testrun, srce.src5);
test( 0, 2, 0, 2, As, BDs, ABMix, "RUNTIME", et, ++testrun, srce.src5);
+ test( 0, 0, 2, 0, As, BDs, ABMix, "CLASS", et, ++testrun, srce.src6);
+ test( 0, 0, 0, 2, As, BDs, ABMix, "RUNTIME", et, ++testrun, srce.src6);
+ test( 2, 0, 0, 0, As, BDs, ABMix, "CLASS", et, ++testrun, srce.src7);
+ test( 0, 2, 0, 0, As, BDs, ABMix, "RUNTIME", et, ++testrun, srce.src7);
+ test( 4, 0, 0, 0, As, BDs, ABMix, "CLASS", et, ++testrun, srce.src8);
+ test( 0, 4, 0, 0, As, BDs, ABMix, "RUNTIME", et, ++testrun, srce.src8);
break;
case "FIELD":
test( 8, 0, 0, 0, As, BDs, ABMix, "CLASS", et, ++testrun, srce.src1);
@@ -121,18 +130,6 @@
", ABmix=" + ABmix + ", retention: " + rtn + ", anno2: " +
et2 + ", src=" + source + "\n " + source.description;
- if(
-// 8005681 - src1,2,3 - skip cases with repeated annotations on new, array, cast.
- (( source.equals(srce.src1) || source.equals(srce.src2) ||
- source.equals(srce.src3)) && (ABmix || (Arepeats && BDrepeats)))
- // 8008928 - src4,5 - this change cause crash with t-a on anon class)
- || (source.equals(srce.src4) || source.equals(srce.src5))
- ) {
- System.out.println(testDef +
- "\n 8005681-skip repeated annotations on new,array,cast");
- return;
- }
-
println(testDef);
// Create test source and File.
String sourceString = sourceString(tname, rtn, et2, Arepeats,
@@ -178,9 +175,7 @@
println("Pass");
}
- //
// Source for test cases
- //
String sourceString(String testname, String retentn, String annot2,
Boolean Arepeats, Boolean BDrepeats, Boolean ABmix,
srce src) {
@@ -359,6 +354,63 @@
hasInnerClass=true;
innerClassname="$1";
break;
+ case src6: // (repeating)annotations on void method declaration
+ /*
+ * class Test95{
+ * @A @A @B @B public void test() { };
+ * }
+ */
+ source = new String( source +
+ "// " + src.description + "\n" +
+ "class "+ testname + "{\n" +
+ " _As_ _Bs_ public void test() { }\n" +
+ "}\n").concat(sourceBase).replace("_OTHER_", annot2).replace("_As_",As).replace("_Bs_",Bs) +
+ "\n\n";
+ hasInnerClass=false;
+ break;
+ case src7: // (repeating) type annotations in use of instanceof
+ /*
+ * class Test10{
+ * String data = "test";
+ * boolean dataIsString = ( data instanceof @A @B @A @B String);
+ * }
+ */
+ source = new String( source +
+ "// " + src.description + "\n" +
+ "class "+ testname + "{\n" +
+ " String data = \"test\";\n" +
+ " boolean dataIsString = ( data instanceof _As_ _Bs_ String);\n" +
+ "}\n").concat(sourceBase).replace("_OTHER_", annot2).replace("_As_",As).replace("_Bs_",Bs) +
+ "\n\n";
+ hasInnerClass=false;
+ break;
+ case src8: // (repeating) type annotations in use of instanceof
+ /*
+ * class Test20{
+ * String data = "test";
+ * Boolean isString() {
+ * if( data instanceof @A @B @A @B String )
+ * return true;
+ * else
+ * return( data instanceof @A @B @A @B String );
+ * }
+ * }
+ */
+ source = new String( source +
+ "// " + src.description + "\n" +
+ "class "+ testname + "{\n" +
+ " String data = \"test\";\n" +
+ " Boolean isString() { \n" +
+ " if( data instanceof _As_ _Bs_ String )\n" +
+ " return true;\n" +
+ " else\n" +
+ " return( data instanceof _As_ _Bs_ String );\n" +
+ " }\n" +
+ "}\n").concat(sourceBase).replace("_OTHER_", annot2).replace("_As_",As).replace("_Bs_",Bs) +
+ "\n\n";
+ hasInnerClass=false;
+ break;
+
}
return imports + source;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/DummyProcessor.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.annotation.processing.*;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+
+import java.util.Set;
+
+/* A simple annotation processor. */
+@SupportedAnnotationTypes("*")
+public class DummyProcessor extends AbstractProcessor {
+ @Override
+ public SourceVersion getSupportedSourceVersion() {
+ return SourceVersion.latest();
+ }
+
+ @Override
+ public final boolean process(Set<? extends TypeElement> annotations,
+ RoundEnvironment roundEnv) {
+ return false;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/T8020715.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary Regression: compiling program with lambda crashed compiler
+ * @bug 8020715
+ * @compile T8020715.java
+ */
+class T8020715 {
+ // This crashed.
+ private static void makeTask1() {
+ class LocalClass {
+ private Runnable r = () -> {};
+ }
+ }
+
+ // This crashed, too.
+ private void makeTask2() {
+ class LocalClass {
+ private Runnable r = () -> {};
+ }
+ }
+
+ // This is fine.
+ private class InnerClass {
+ private Runnable r = () -> {};
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableCycleTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8023768
+ * @summary Type annotations on a type variable, where the bound of
+ * the type variable is an annotated type variable,
+ * need to be processed correctly.
+ * @author Werner Dietl
+ * @compile TypeVariableCycleTest.java
+ */
+
+import java.lang.annotation.*;
+
+class TypeVariableCycleTest<CTV> {
+ <MTV extends @TA CTV> MTV cast(CTV p) {
+ return (@TA MTV) p;
+ }
+}
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@interface TA {}
+
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java Fri Sep 06 14:20:58 2013 -0700
@@ -85,4 +85,24 @@
" } } }";
}
+ @TADescriptions({
+ @TADescription(annotation = "TA", type = CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT,
+ typeIndex = 0, offset = 4),
+ @TADescription(annotation = "TB", type = CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT,
+ typeIndex = 0, offset = 0)
+ })
+ public String generic1() {
+ return "class Test { <T> Test(int i) { new <@TA T>Test(); }" +
+ " <T> Test() { <@TB String>this(0); } }";
+ }
+
+ @TADescriptions({
+ @TADescription(annotation = "TA", type = CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT,
+ typeIndex = 0, offset = 0)
+ })
+ public String generic2() {
+ return "class Super { <T> Super(int i) { } } " +
+ "class Test extends Super { <T> Test() { <@TA String>super(0); } }";
+ }
+
}
--- a/langtools/test/tools/javac/lambda/MethodReference66.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/javac/lambda/MethodReference66.java Fri Sep 06 14:20:58 2013 -0700
@@ -24,7 +24,6 @@
/*
* @test
* @bug 8009299
- * @ignore 8013875: Incorrect vtable index being set during methodHandle creation for static
* @summary Javac crashes when compiling method reference to static interface method
* @run main/othervm -Xverify:none MethodReference66
*/
--- a/langtools/test/tools/javac/lambda/lambdaExecution/InInterface.java Wed Sep 04 19:58:16 2013 +0530
+++ b/langtools/test/tools/javac/lambda/lambdaExecution/InInterface.java Fri Sep 06 14:20:58 2013 -0700
@@ -26,7 +26,6 @@
/**
* @test
* @bug 8003639
- * @ignore 8013875: Incorrect vtable index being set during methodHandle creation for static
* @summary convert lambda testng tests to jtreg and add them
* @run testng InInterface
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/profiles/ProfileTest.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8022287
+ * @summary javac.sym.Profiles uses a static Map when it should not
+ */
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import com.sun.tools.javac.sym.Profiles;
+
+public class ProfileTest {
+ public static void main(String... args) throws Exception {
+ new ProfileTest().run();
+ }
+
+ public void run() throws Exception {
+ test("A");
+ test("B");
+
+ if (errors > 0)
+ throw new Exception(errors + " occurred");
+ }
+
+ void test(String base) throws IOException {
+ System.err.println("test " + base);
+ File profileDesc = createFiles(base);
+ checkProfile(profileDesc, base);
+ }
+
+ void checkProfile(File profileDesc, String base) throws IOException {
+ Profiles p = Profiles.read(profileDesc);
+ for (int i = 0; i < p.getProfileCount(); i++) {
+ System.err.println(p.getPackages(i));
+ for (String pkg: p.getPackages(i)) {
+ if (!pkg.endsWith(base))
+ error("unexpected package " + pkg + " for profile " + i);
+ }
+ }
+ }
+
+ File createFiles(String base) throws IOException {
+ File baseDir = new File(base);
+ baseDir.mkdirs();
+ for (int p = 1; p <= 4; p++) {
+ String pkg = "pkg" + p + base;
+ File pkgDir = new File(baseDir, pkg);
+ pkgDir.mkdirs();
+ File clssFile = new File(pkgDir, pkg + "Class.java");
+ try (PrintWriter out = new PrintWriter(new FileWriter(clssFile))) {
+ out.println("package " + pkgDir.getName() + ";");
+ out.println("class " + clssFile.getName().replace(".java", ""));
+ }
+ }
+
+ File profileDesc = new File(baseDir, "profiles" + base + ".txt");
+ try (PrintWriter out = new PrintWriter(new FileWriter(profileDesc))) {
+ for (int p = 1; p <= 4; p++) {
+ String pkg = "pkg" + p + base;
+ createPackage(baseDir, pkg, "Pkg" + p + base + "Class");
+ out.println("PROFILE_" + p + "_RTJAR_INCLUDE_PACKAGES := " + pkg);
+ out.println("PROFILE_" + p + "_RTJAR_INCLUDE_TYPES :=");
+ out.println("PROFILE_" + p + "_RTJAR_EXCLUDE_TYPES :=");
+ out.println("PROFILE_" + p + "_INCLUDE_METAINF_SERVICES := ");
+ }
+ }
+
+ return profileDesc;
+ }
+
+ void createPackage(File baseDir, String pkg, String... classNames) throws IOException {
+ File pkgDir = new File(baseDir, pkg);
+ pkgDir.mkdirs();
+ for (String className: classNames) {
+ File clssFile = new File(pkgDir, className + ".java");
+ try (PrintWriter out = new PrintWriter(new FileWriter(clssFile))) {
+ out.println("package " + pkg + ";");
+ out.println("public class " + className + " { }");
+ }
+ }
+ }
+
+ void error(String msg) {
+ System.err.println("Error: " + msg);
+ errors++;
+ }
+
+ int errors;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/tree/TypeAnnotationsPretty.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8023522
+ * @summary test Pretty print of type annotations
+ * @author wmdietl
+ */
+
+import com.sun.source.tree.ClassTree;
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.tree.JCTree;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+import java.util.LinkedList;
+
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+public class TypeAnnotationsPretty {
+ private final JavaCompiler tool;
+
+ TypeAnnotationsPretty() {
+ tool = ToolProvider.getSystemJavaCompiler();
+ }
+
+ private List<String> matches = new LinkedList<String>();
+ private List<String> mismatches = new LinkedList<String>();
+
+ public static void main(String... args) throws Exception {
+ TypeAnnotationsPretty tap = new TypeAnnotationsPretty();
+
+ tap.runField("@TA()\nObject cls = null");
+ tap.runField("@TA()\nObject cls = new @TA() Object()");
+
+ tap.runField("@TA()\nList<@TB() Object> cls = null");
+ tap.runField("@TA()\nList<@TB() Object> cls = new @TA() LinkedList<@TB() Object>()");
+
+ tap.runField("Class[] cls = null");
+ tap.runField("@TA()\nClass[] cls = null");
+ tap.runField("Class @TA() [] cls = null");
+ tap.runField("@TA()\nClass @TB() [] cls = null");
+
+ tap.runField("Class[] cls = new Class[]{Object.class}");
+ tap.runField("@TA()\nClass[] cls = new @TA() Class[]{Object.class}");
+ tap.runField("Class @TB() [] cls = new Class @TB() []{Object.class}");
+ tap.runField("@TA()\nClass @TB() [] cls = new @TA() Class @TB() []{Object.class}");
+ tap.runField("@TA()\nClass @TB() [] @TC() [] cls = new @TA() Class @TB() [10] @TC() []");
+ tap.runField("Class @TB() [] @TC() [] cls = new Class @TB() [10] @TC() []");
+ tap.runField("@TA()\nClass @TB() [] @TC() [] @TD() [] cls = new @TA() Class @TB() [10] @TC() [] @TD() []");
+
+ tap.runMethod("\n@TA()\nObject test(@TB()\nList<@TC() String> p) {\n" +
+ " return null;\n" +
+ "}");
+
+
+ if (!tap.matches.isEmpty()) {
+ for (String m : tap.matches)
+ System.out.println(m);
+ }
+ if (!tap.mismatches.isEmpty()) {
+ for (String mm : tap.mismatches)
+ System.err.println(mm + NL);
+ throw new RuntimeException("Tests failed!");
+ }
+ }
+
+ private static final String prefix =
+ "import java.lang.annotation.*;" +
+ "import java.util.*;" +
+ "public class Test {";
+
+ private static final String postfix =
+ "@Target(ElementType.TYPE_USE)" +
+ "@interface TA {}" +
+ "@Target(ElementType.TYPE_USE)" +
+ "@interface TB {}" +
+ "@Target(ElementType.TYPE_USE)" +
+ "@interface TC {}" +
+ "@Target(ElementType.TYPE_USE)" +
+ "@interface TD {}";
+
+ private static final String NL = System.getProperty("line.separator");
+
+ private void runField(String code) throws IOException {
+ String src = prefix +
+ code + "; }" +
+ postfix;
+
+ JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, null,
+ null, Arrays.asList(new MyFileObject(src)));
+
+ for (CompilationUnitTree cut : ct.parse()) {
+ JCTree.JCVariableDecl var =
+ (JCTree.JCVariableDecl) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(0);
+ checkMatch(code, var);
+ }
+ }
+
+ private void runMethod(String code) throws IOException {
+ String src = prefix +
+ code + "}" +
+ postfix;
+
+ JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, null,
+ null, Arrays.asList(new MyFileObject(src)));
+
+
+ for (CompilationUnitTree cut : ct.parse()) {
+ JCTree.JCMethodDecl meth =
+ (JCTree.JCMethodDecl) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(0);
+ checkMatch(code, meth);
+ }
+ }
+
+ void checkMatch(String code, JCTree tree) {
+ String expect = code.replace("\n", NL);
+ String found = tree.toString();
+ if (!expect.equals(found)) {
+ mismatches.add("Expected: " + expect + NL +
+ "Obtained: " + found);
+ } else {
+ matches.add("Passed: " + expect);
+ }
+ }
+}
+
+
+class MyFileObject extends SimpleJavaFileObject {
+
+ private String text;
+
+ public MyFileObject(String text) {
+ super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+ this.text = text;
+ }
+
+ @Override
+ public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+ return text;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javadoc/nonConstExprs/Test.java Fri Sep 06 14:20:58 2013 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8010310
+ * @summary Error processing sources with -private
+ */
+
+import java.io.File;
+
+public class Test {
+ public static void main(String... args) throws Exception {
+ File testSrc = new File(System.getProperty("test.src"));
+ String[] jdoc_args = {
+ "-d", "out",
+ new File(testSrc, Test.class.getSimpleName() + ".java").getPath()
+ };
+ int rc = com.sun.tools.javadoc.Main.execute(jdoc_args);
+ if (rc != 0)
+ throw new Exception("unexpected return code from javadoc: " + rc);
+ }
+
+ static int array[] = { 1, 2, 3};
+ static int method(int p) { return p; }
+ static int value = 0;
+
+ public int not_static_not_final = 1;
+ public static int static_not_final = 2;
+ public final int not_static_final = 3;
+ public static final int static_final = 4;
+
+ public static final int array_index = array[0];
+ public static final int method_call = method(0);
+ public static final int inner_class = new Test() { }.method(0);
+ public static final int new_class = new Test().method(0);
+ public static final int pre_inc = ++value;
+ public static final int pre_dec = --value;
+ public static final int post_inc = value++;
+ public static final int post_dec = value--;
+}
+
--- a/nashorn/.hgtags Wed Sep 04 19:58:16 2013 +0530
+++ b/nashorn/.hgtags Fri Sep 06 14:20:58 2013 -0700
@@ -214,3 +214,5 @@
e966ff0a3ffef8a687eaf5a14167bb595b623d02 jdk8-b102
414203de4374e1964a9918c38a95fb245010a9f1 jdk8-b103
afc100513451d22f0b8135999d6eb52f36df3d36 jdk8-b104
+f484bfb624dd06683cb33b524700a5dd4927a82b jdk8-b105
+bf70cbd2c8369fd97ffdfcbe1a80dbc2797408ee jdk8-b106
--- a/test/Makefile Wed Sep 04 19:58:16 2013 +0530
+++ b/test/Makefile Fri Sep 06 14:20:58 2013 -0700
@@ -49,61 +49,22 @@
fi
endef
-# Test target list for langtools repository
-LANGTOOLS_TEST_LIST = langtools_jtreg
-
-# Test target list for jdk repository
-JDK_ALL_TEST_LIST = \
- jdk_beans1 \
- jdk_io \
- jdk_lang \
- jdk_math \
- jdk_other \
- jdk_net \
- jdk_nio \
- jdk_security1 \
- jdk_text \
- jdk_util \
- jdk_time \
- jdk_awt \
- jdk_beans2 jdk_beans3 \
- jdk_management \
- jdk_jmx \
- jdk_security2 jdk_security3 \
- jdk_rmi \
- jdk_sound \
- jdk_swing \
- jdk_tools \
- jdk_jdi \
- jdk_jfr
-
-# Theses are meta test targets in jdk
-JDK_META_TEST_LIST = jdk_all jdk_default jdk_core
-
-# These are the current jck test targets in the jdk repository
-JDK_JCK7_LIST = jck7devtools jck7compiler jck7runtime
-
# Default test target (core)
-default: jdk_core $(LANGTOOLS_TEST_LIST)
+default: jdk_core langtools_jtreg
# All testing
-all: $(JDK_ALL_TEST_LIST) $(LANGTOOLS_TEST_LIST)
+all: jdk_all langtools_all
# Test targets
-$(LANGTOOLS_TEST_LIST):
- @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@))
+langtools_% :
+ @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@))
-$(JDK_ALL_TEST_LIST) $(JDK_META_TEST_LIST) $(JDK_JCK7_LIST):
- @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), $@)
-
-clean:
+jdk_% :
+ @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), TEST="$@" $@)
################################################################
# Phony targets (e.g. these are not filenames)
-.PHONY: all clean \
- $(JDK_ALL_TEST_LIST) $(JDK_META_TEST_LIST) $(JDK_JCK7_LIST) \
- $(LANGTOOLS_TEST_LIST)
+.PHONY: all clean
################################################################
-