# HG changeset patch # User dcubed # Date 1412964014 0 # Node ID cd50a16cf47ec1c76eb912757b44fcb0b031cba0 # Parent 3d2543e475e41089a074828b96e20613a3c9ff08# Parent b60dff56e547b0344828407bc180ace8d201fc2e Merge diff -r 3d2543e475e4 -r cd50a16cf47e .hgtags --- a/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -275,3 +275,5 @@ b2287cac7813c70ed7f679d9a46fe774bd4005f8 jdk9-b30 9d0e6639a4d71b63507dd94b1a028e963b27e798 jdk9-b31 1b1ec4291abc0ba6da7bf79b754f08dd759a4a0c jdk9-b32 +f0c5e4b732da823bdaa4184133675f384e7cd68d jdk9-b33 +9618201c5df28a460631577fad1f61e96f775c34 jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e .hgtags-top-repo --- a/.hgtags-top-repo Thu Oct 09 16:41:28 2014 +0400 +++ b/.hgtags-top-repo Fri Oct 10 18:00:14 2014 +0000 @@ -275,3 +275,5 @@ 36e9bc875325813ac9c44ac0c617a463091fa9f5 jdk9-b30 69a84c16d9c28e0e3d504b9c8766c24bafcd58f6 jdk9-b31 7e3512dae8e020d44399c0f1c579ff1fe3090ed6 jdk9-b32 +e4ba01b726e263953ae129be37c94de6ed145b1d jdk9-b33 +087b23f35631e68e950496a36fce8ccca612966a jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e common/autoconf/bootcycle-spec.gmk.in --- a/common/autoconf/bootcycle-spec.gmk.in Thu Oct 09 16:41:28 2014 +0400 +++ b/common/autoconf/bootcycle-spec.gmk.in Fri Oct 10 18:00:14 2014 +0000 @@ -48,6 +48,13 @@ # Use a different Boot JDK OLD_BOOT_JDK:=$(BOOT_JDK) BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image -BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar +BOOT_RTJAR:=$(BOOT_JDK)/jre/lib/rt.jar -SJAVAC_SERVER_JAVA:=$(subst $(OLD_BOOT_JDK),$(BOOT_JDK),$(SJAVAC_SERVER_JAVA)) +JAVA_CMD:=$(BOOT_JDK)/bin/java +JAVAC_CMD:=$(BOOT_JDK)/bin/javac +JAVAH_CMD:=$(BOOT_JDK)/bin/javah +JAR_CMD:=$(BOOT_JDK)/bin/jar +NATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii +JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner +SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD) + diff -r 3d2543e475e4 -r cd50a16cf47e common/autoconf/build-performance.m4 --- a/common/autoconf/build-performance.m4 Thu Oct 09 16:41:28 2014 +0400 +++ b/common/autoconf/build-performance.m4 Fri Oct 10 18:00:14 2014 +0000 @@ -296,7 +296,7 @@ AC_SUBST(SJAVAC_SERVER_JAVA) if test "$MEMORY_SIZE" -gt "3000"; then - ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA]) if test "$JVM_ARG_OK" = true; then JVM_64BIT=true JVM_ARG_OK=false @@ -320,7 +320,8 @@ if test "$MX_VALUE" -lt "512"; then MX_VALUE=512 fi - ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA]) + AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS) AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], [use sjavac to do fast incremental compiles @<:@disabled@:>@])], diff -r 3d2543e475e4 -r cd50a16cf47e common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Thu Oct 09 16:41:28 2014 +0400 +++ b/common/autoconf/generated-configure.sh Fri Oct 10 18:00:14 2014 +0000 @@ -633,6 +633,7 @@ USE_PRECOMPILED_HEADER SJAVAC_SERVER_DIR ENABLE_SJAVAC +SJAVAC_SERVER_JAVA_FLAGS SJAVAC_SERVER_JAVA JAVA_TOOL_FLAGS_SMALL JAVA_FLAGS_SMALL @@ -4327,7 +4328,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1410791401 +DATE_WHEN_GENERATED=1412599039 ############################################################################### # @@ -50472,7 +50473,7 @@ FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then - SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" + SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64" JVM_ARG_OK=true else $ECHO "Arg failed:" >&5 @@ -50510,7 +50511,7 @@ FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then - SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" + SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" JVM_ARG_OK=true else $ECHO "Arg failed:" >&5 @@ -50519,6 +50520,7 @@ fi + # Check whether --enable-sjavac was given. if test "${enable_sjavac+set}" = set; then : enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}" diff -r 3d2543e475e4 -r cd50a16cf47e common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Thu Oct 09 16:41:28 2014 +0400 +++ b/common/autoconf/spec.gmk.in Fri Oct 10 18:00:14 2014 +0000 @@ -256,7 +256,8 @@ BUILD_HOTSPOT=@BUILD_HOTSPOT@ -# The boot jdk to use +# The boot jdk to use. These are overridden in bootcycle-spec.gmk. Make sure to keep +# them in sync. BOOT_JDK:=@BOOT_JDK@ BOOT_RTJAR:=@BOOT_RTJAR@ BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar @@ -453,23 +454,35 @@ JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@ JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@ JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@ +SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@ -JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) -JAVA_SMALL=@FIXPATH@ @JAVA@ $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) +# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk +# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD +# versions of the variables directly. +JAVA_CMD:=@JAVA@ +JAVAC_CMD:=@JAVAC@ +JAVAH_CMD:=@JAVAH@ +JAR_CMD:=@JAR@ +NATIVE2ASCII_CMD:=@NATIVE2ASCII@ +JARSIGNER_CMD:=@JARSIGNER@ +SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@ +# These variables are meant to be used. They are defined with = instead of := to make +# it possible to override only the *_CMD variables. +JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) +JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) +JAVAC=@FIXPATH@ $(JAVAC_CMD) +JAVAH=@FIXPATH@ $(JAVAH_CMD) +JAR=@FIXPATH@ $(JAR_CMD) +NATIVE2ASCII=@FIXPATH@ $(NATIVE2ASCII_CMD) $(JAVA_TOOL_FLAGS_SMALL) +JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD) +# A specific java binary with specific options can be used to run +# the long running background sjavac servers and other long running tasks. +SJAVAC_SERVER_JAVA=@FIXPATH@ $(SJAVAC_SERVER_JAVA_CMD) $(SJAVAC_SERVER_JAVA_FLAGS) -JAVAC:=@FIXPATH@ @JAVAC@ # Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid # overriding that value by using ?=. JAVAC_FLAGS?=@JAVAC_FLAGS@ -JAVAH:=@FIXPATH@ @JAVAH@ - -JAR:=@FIXPATH@ @JAR@ - -NATIVE2ASCII:=@FIXPATH@ @NATIVE2ASCII@ $(JAVA_TOOL_FLAGS_SMALL) - -JARSIGNER:=@FIXPATH@ @JARSIGNER@ - # You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... INTERIM_LANGTOOLS_JAR := $(LANGTOOLS_OUTPUTDIR)/dist/interim_langtools.jar INTERIM_LANGTOOLS_ARGS := "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR) @@ -486,10 +499,6 @@ RC_FLAGS:=@RC_FLAGS@ endif -# A specific java binary with specific options can be used to run -# the long running background sjavac servers and other long running tasks. -SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@ - # Tools adhering to a minimal and common standard of posix compliance. AWK:=@AWK@ BASENAME:=@BASENAME@ diff -r 3d2543e475e4 -r cd50a16cf47e corba/.hgtags --- a/corba/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/corba/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -275,3 +275,5 @@ 98967ae6ae53ebf15615e07cd5a6b1ae04dfd84c jdk9-b30 c432b80aadd0cb2b2361b02add4d671957d4cec9 jdk9-b31 b5b139354630edb2d06190bf31653acbdcea63a8 jdk9-b32 +cfdac5887952c2dd73c73a1d8d9aa880d0539bbf jdk9-b33 +24a0bad5910f775bb4002d1dacf8b3af87c63cd8 jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e corba/make/CompileCorba.gmk --- a/corba/make/CompileCorba.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/corba/make/CompileCorba.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -51,13 +51,11 @@ JAR := $(INTERIM_CORBA_JAR))) ################################################################################ -# Copy idl files straight to jdk/lib. Not sure if this is the right way to do -# it, but we are moving away from the one repo at a time build. Perhaps we should -# scrap the 'jdk' prefix to bin, lib etc? -$(JDK_OUTPUTDIR)/lib/%: $(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/% +# Copy idl files straight to jdk/include. +$(JDK_OUTPUTDIR)/include/%: $(CORBA_TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/% $(install-file) -IDL_TARGET_FILES := $(JDK_OUTPUTDIR)/lib/orb.idl $(JDK_OUTPUTDIR)/lib/ir.idl +IDL_TARGET_FILES := $(JDK_OUTPUTDIR)/include/orb.idl $(JDK_OUTPUTDIR)/include/ir.idl ################################################################################ diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/.hgtags --- a/hotspot/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -435,3 +435,5 @@ 5c722dffbc0f34eb8d903dca7b261e52248fa17e jdk9-b30 9f7d155d28e519f3e4645dc21cf185c25f3176ed jdk9-b31 af46576a8d7cb4003028b8ee8bf408cfe227315b jdk9-b32 +9b3f5e4f33725f7c1d9b8e523133fe8383a54d9f jdk9-b33 +821164b0131a47ca065697c7d27d8f215e608c8d jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/make/aix/makefiles/fastdebug.make --- a/hotspot/make/aix/makefiles/fastdebug.make Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/make/aix/makefiles/fastdebug.make Fri Oct 10 18:00:14 2014 +0000 @@ -67,7 +67,6 @@ # not justified. LFLAGS_QIPA= -G_SUFFIX = _g VERSION = optimized SYSDEFS += -DASSERT -DFASTDEBUG PICFLAGS = DEFAULT diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/assembler_ppc.hpp --- a/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -268,8 +268,35 @@ ISEL_OPCODE = (31u << OPCODE_SHIFT | 15u << 1), - MTLR_OPCODE = (31u << OPCODE_SHIFT | 467u << 1 | 8 << SPR_0_4_SHIFT), - MFLR_OPCODE = (31u << OPCODE_SHIFT | 339u << 1 | 8 << SPR_0_4_SHIFT), + // Special purpose registers + MTSPR_OPCODE = (31u << OPCODE_SHIFT | 467u << 1), + MFSPR_OPCODE = (31u << OPCODE_SHIFT | 339u << 1), + + MTXER_OPCODE = (MTSPR_OPCODE | 1 << SPR_0_4_SHIFT), + MFXER_OPCODE = (MFSPR_OPCODE | 1 << SPR_0_4_SHIFT), + + MTDSCR_OPCODE = (MTSPR_OPCODE | 3 << SPR_0_4_SHIFT), + MFDSCR_OPCODE = (MFSPR_OPCODE | 3 << SPR_0_4_SHIFT), + + MTLR_OPCODE = (MTSPR_OPCODE | 8 << SPR_0_4_SHIFT), + MFLR_OPCODE = (MFSPR_OPCODE | 8 << SPR_0_4_SHIFT), + + MTCTR_OPCODE = (MTSPR_OPCODE | 9 << SPR_0_4_SHIFT), + MFCTR_OPCODE = (MFSPR_OPCODE | 9 << SPR_0_4_SHIFT), + + MTTFHAR_OPCODE = (MTSPR_OPCODE | 128 << SPR_0_4_SHIFT), + MFTFHAR_OPCODE = (MFSPR_OPCODE | 128 << SPR_0_4_SHIFT), + MTTFIAR_OPCODE = (MTSPR_OPCODE | 129 << SPR_0_4_SHIFT), + MFTFIAR_OPCODE = (MFSPR_OPCODE | 129 << SPR_0_4_SHIFT), + MTTEXASR_OPCODE = (MTSPR_OPCODE | 130 << SPR_0_4_SHIFT), + MFTEXASR_OPCODE = (MFSPR_OPCODE | 130 << SPR_0_4_SHIFT), + MTTEXASRU_OPCODE = (MTSPR_OPCODE | 131 << SPR_0_4_SHIFT), + MFTEXASRU_OPCODE = (MFSPR_OPCODE | 131 << SPR_0_4_SHIFT), + + MTVRSAVE_OPCODE = (MTSPR_OPCODE | 256 << SPR_0_4_SHIFT), + MFVRSAVE_OPCODE = (MFSPR_OPCODE | 256 << SPR_0_4_SHIFT), + + MFTB_OPCODE = (MFSPR_OPCODE | 268 << SPR_0_4_SHIFT), MTCRF_OPCODE = (31u << OPCODE_SHIFT | 144u << 1), MFCR_OPCODE = (31u << OPCODE_SHIFT | 19u << 1), @@ -291,9 +318,6 @@ // CTR-related opcodes BCCTR_OPCODE = (19u << OPCODE_SHIFT | 528u << 1), - MTCTR_OPCODE = (31u << OPCODE_SHIFT | 467u << 1 | 9 << SPR_0_4_SHIFT), - MFCTR_OPCODE = (31u << OPCODE_SHIFT | 339u << 1 | 9 << SPR_0_4_SHIFT), - LWZ_OPCODE = (32u << OPCODE_SHIFT), LWZX_OPCODE = (31u << OPCODE_SHIFT | 23u << 1), @@ -585,6 +609,37 @@ MTVSCR_OPCODE = (4u << OPCODE_SHIFT | 1604u ), MFVSCR_OPCODE = (4u << OPCODE_SHIFT | 1540u ), + // AES (introduced with Power 8) + VCIPHER_OPCODE = (4u << OPCODE_SHIFT | 1288u), + VCIPHERLAST_OPCODE = (4u << OPCODE_SHIFT | 1289u), + VNCIPHER_OPCODE = (4u << OPCODE_SHIFT | 1352u), + VNCIPHERLAST_OPCODE = (4u << OPCODE_SHIFT | 1353u), + VSBOX_OPCODE = (4u << OPCODE_SHIFT | 1480u), + + // SHA (introduced with Power 8) + VSHASIGMAD_OPCODE = (4u << OPCODE_SHIFT | 1730u), + VSHASIGMAW_OPCODE = (4u << OPCODE_SHIFT | 1666u), + + // Vector Binary Polynomial Multiplication (introduced with Power 8) + VPMSUMB_OPCODE = (4u << OPCODE_SHIFT | 1032u), + VPMSUMD_OPCODE = (4u << OPCODE_SHIFT | 1224u), + VPMSUMH_OPCODE = (4u << OPCODE_SHIFT | 1096u), + VPMSUMW_OPCODE = (4u << OPCODE_SHIFT | 1160u), + + // Vector Permute and Xor (introduced with Power 8) + VPERMXOR_OPCODE = (4u << OPCODE_SHIFT | 45u), + + // Transactional Memory instructions (introduced with Power 8) + TBEGIN_OPCODE = (31u << OPCODE_SHIFT | 654u << 1), + TEND_OPCODE = (31u << OPCODE_SHIFT | 686u << 1), + TABORT_OPCODE = (31u << OPCODE_SHIFT | 910u << 1), + TABORTWC_OPCODE = (31u << OPCODE_SHIFT | 782u << 1), + TABORTWCI_OPCODE = (31u << OPCODE_SHIFT | 846u << 1), + TABORTDC_OPCODE = (31u << OPCODE_SHIFT | 814u << 1), + TABORTDCI_OPCODE = (31u << OPCODE_SHIFT | 878u << 1), + TSR_OPCODE = (31u << OPCODE_SHIFT | 750u << 1), + TCHECK_OPCODE = (31u << OPCODE_SHIFT | 718u << 1), + // Icache and dcache related instructions DCBA_OPCODE = (31u << OPCODE_SHIFT | 758u << 1), DCBZ_OPCODE = (31u << OPCODE_SHIFT | 1014u << 1), @@ -1420,6 +1475,25 @@ inline void mcrf( ConditionRegister crd, ConditionRegister cra); inline void mtcr( Register s); + // Special purpose registers + // Exception Register + inline void mtxer(Register s1); + inline void mfxer(Register d); + // Vector Register Save Register + inline void mtvrsave(Register s1); + inline void mfvrsave(Register d); + // Timebase + inline void mftb(Register d); + // Introduced with Power 8: + // Data Stream Control Register + inline void mtdscr(Register s1); + inline void mfdscr(Register d ); + // Transactional Memory Registers + inline void mftfhar(Register d); + inline void mftfiar(Register d); + inline void mftexasr(Register d); + inline void mftexasru(Register d); + // PPC 1, section 2.4.1 Branch Instructions inline void b( address a, relocInfo::relocType rt = relocInfo::none); inline void b( Label& L); @@ -1860,6 +1934,39 @@ inline void mtvscr( VectorRegister b); inline void mfvscr( VectorRegister d); + // AES (introduced with Power 8) + inline void vcipher( VectorRegister d, VectorRegister a, VectorRegister b); + inline void vcipherlast( VectorRegister d, VectorRegister a, VectorRegister b); + inline void vncipher( VectorRegister d, VectorRegister a, VectorRegister b); + inline void vncipherlast(VectorRegister d, VectorRegister a, VectorRegister b); + inline void vsbox( VectorRegister d, VectorRegister a); + + // SHA (introduced with Power 8) + // Not yet implemented. + + // Vector Binary Polynomial Multiplication (introduced with Power 8) + inline void vpmsumb( VectorRegister d, VectorRegister a, VectorRegister b); + inline void vpmsumd( VectorRegister d, VectorRegister a, VectorRegister b); + inline void vpmsumh( VectorRegister d, VectorRegister a, VectorRegister b); + inline void vpmsumw( VectorRegister d, VectorRegister a, VectorRegister b); + + // Vector Permute and Xor (introduced with Power 8) + inline void vpermxor( VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c); + + // Transactional Memory instructions (introduced with Power 8) + inline void tbegin_(); // R=0 + inline void tbeginrot_(); // R=1 Rollback-Only Transaction + inline void tend_(); // A=0 + inline void tendall_(); // A=1 + inline void tabort_(Register a); + inline void tabortwc_(int t, Register a, Register b); + inline void tabortwci_(int t, Register a, int si); + inline void tabortdc_(int t, Register a, Register b); + inline void tabortdci_(int t, Register a, int si); + inline void tsuspend_(); // tsr with L=0 + inline void tresume_(); // tsr with L=1 + inline void tcheck(int f); + // The following encoders use r0 as second operand. These instructions // read r0 as '0'. inline void lwzx( Register d, Register s2); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp --- a/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -312,6 +312,25 @@ { emit_int32(MCRF_OPCODE | bf(crd) | bfa(cra)); } inline void Assembler::mtcr( Register s) { Assembler::mtcrf(0xff, s); } +// Special purpose registers +// Exception Register +inline void Assembler::mtxer(Register s1) { emit_int32(MTXER_OPCODE | rs(s1)); } +inline void Assembler::mfxer(Register d ) { emit_int32(MFXER_OPCODE | rt(d)); } +// Vector Register Save Register +inline void Assembler::mtvrsave(Register s1) { emit_int32(MTVRSAVE_OPCODE | rs(s1)); } +inline void Assembler::mfvrsave(Register d ) { emit_int32(MFVRSAVE_OPCODE | rt(d)); } +// Timebase +inline void Assembler::mftb(Register d ) { emit_int32(MFTB_OPCODE | rt(d)); } +// Introduced with Power 8: +// Data Stream Control Register +inline void Assembler::mtdscr(Register s1) { emit_int32(MTDSCR_OPCODE | rs(s1)); } +inline void Assembler::mfdscr(Register d ) { emit_int32(MFDSCR_OPCODE | rt(d)); } +// Transactional Memory Registers +inline void Assembler::mftfhar(Register d ) { emit_int32(MFTFHAR_OPCODE | rt(d)); } +inline void Assembler::mftfiar(Register d ) { emit_int32(MFTFIAR_OPCODE | rt(d)); } +inline void Assembler::mftexasr(Register d ) { emit_int32(MFTEXASR_OPCODE | rt(d)); } +inline void Assembler::mftexasru(Register d ) { emit_int32(MFTEXASRU_OPCODE | rt(d)); } + // SAP JVM 2006-02-13 PPC branch instruction. // PPC 1, section 2.4.1 Branch Instructions inline void Assembler::b( address a, relocInfo::relocType rt) { emit_data(BXX_OPCODE| li(disp( intptr_t(a), intptr_t(pc()))) |aa(0)|lk(0), rt); } @@ -735,6 +754,39 @@ inline void Assembler::mtvscr( VectorRegister b) { emit_int32( MTVSCR_OPCODE | vrb(b)); } inline void Assembler::mfvscr( VectorRegister d) { emit_int32( MFVSCR_OPCODE | vrt(d)); } +// AES (introduced with Power 8) +inline void Assembler::vcipher( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCIPHER_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vcipherlast( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCIPHERLAST_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vncipher( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VNCIPHER_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vncipherlast(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VNCIPHERLAST_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vsbox( VectorRegister d, VectorRegister a) { emit_int32( VSBOX_OPCODE | vrt(d) | vra(a) ); } + +// SHA (introduced with Power 8) +// Not yet implemented. + +// Vector Binary Polynomial Multiplication (introduced with Power 8) +inline void Assembler::vpmsumb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPMSUMB_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vpmsumd( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPMSUMD_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vpmsumh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPMSUMH_OPCODE | vrt(d) | vra(a) | vrb(b)); } +inline void Assembler::vpmsumw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPMSUMW_OPCODE | vrt(d) | vra(a) | vrb(b)); } + +// Vector Permute and Xor (introduced with Power 8) +inline void Assembler::vpermxor( VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VPMSUMW_OPCODE | vrt(d) | vra(a) | vrb(b) | vrc(c)); } + +// Transactional Memory instructions (introduced with Power 8) +inline void Assembler::tbegin_() { emit_int32( TBEGIN_OPCODE | rc(1)); } +inline void Assembler::tbeginrot_() { emit_int32( TBEGIN_OPCODE | /*R=1*/ 1u << (31-10) | rc(1)); } +inline void Assembler::tend_() { emit_int32( TEND_OPCODE | rc(1)); } +inline void Assembler::tendall_() { emit_int32( TEND_OPCODE | /*A=1*/ 1u << (31-6) | rc(1)); } +inline void Assembler::tabort_(Register a) { emit_int32( TABORT_OPCODE | ra(a) | rc(1)); } +inline void Assembler::tabortwc_(int t, Register a, Register b) { emit_int32( TABORTWC_OPCODE | to(t) | ra(a) | rb(b) | rc(1)); } +inline void Assembler::tabortwci_(int t, Register a, int si) { emit_int32( TABORTWCI_OPCODE | to(t) | ra(a) | sh1620(si) | rc(1)); } +inline void Assembler::tabortdc_(int t, Register a, Register b) { emit_int32( TABORTDC_OPCODE | to(t) | ra(a) | rb(b) | rc(1)); } +inline void Assembler::tabortdci_(int t, Register a, int si) { emit_int32( TABORTDCI_OPCODE | to(t) | ra(a) | sh1620(si) | rc(1)); } +inline void Assembler::tsuspend_() { emit_int32( TSR_OPCODE | rc(1)); } +inline void Assembler::tresume_() { emit_int32( TSR_OPCODE | /*L=1*/ 1u << (31-10) | rc(1)); } +inline void Assembler::tcheck(int f) { emit_int32( TCHECK_OPCODE | bf(f)); } + // ra0 version inline void Assembler::lwzx( Register d, Register s2) { emit_int32( LWZX_OPCODE | rt(d) | rb(s2));} inline void Assembler::lwz( Register d, int si16 ) { emit_int32( LWZ_OPCODE | rt(d) | d1(si16));} diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp --- a/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -37,6 +37,8 @@ // signatures accordingly. const bool CCallingConventionRequiresIntsAsLongs = true; +#define SUPPORTS_NATIVE_CX8 + // The PPC CPUs are NOT multiple-copy-atomic. #define CPU_NOT_MULTIPLE_COPY_ATOMIC diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp --- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -25,7 +25,6 @@ #include "precompiled.hpp" -#include "asm/assembler.hpp" #include "asm/macroAssembler.inline.hpp" #include "interp_masm_ppc_64.hpp" #include "interpreter/interpreterRuntime.hpp" diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp --- a/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -24,7 +24,6 @@ */ #include "precompiled.hpp" -#include "asm/assembler.hpp" #include "asm/macroAssembler.inline.hpp" #include "interpreter/bytecodeHistogram.hpp" #include "interpreter/interpreter.hpp" diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -2366,7 +2366,7 @@ #endif // INCLUDE_ALL_GCS // Values for last_Java_pc, and last_Java_sp must comply to the rules -// in frame_ppc64.hpp. +// in frame_ppc.hpp. void MacroAssembler::set_last_Java_frame(Register last_Java_sp, Register last_Java_pc) { // Always set last_Java_pc and flags first because once last_Java_sp // is visible has_last_Java_frame is true and users will look at the @@ -2493,6 +2493,7 @@ } void MacroAssembler::decode_klass_not_null(Register dst, Register src) { + assert(dst != R0, "Dst reg may not be R0, as R0 is used here."); if (src == noreg) src = dst; Register shifted_src = src; if (Universe::narrow_klass_shift() != 0 || @@ -2527,14 +2528,11 @@ void MacroAssembler::reinit_heapbase(Register d, Register tmp) { if (Universe::heap() != NULL) { - if (Universe::narrow_oop_base() == NULL) { - Assembler::xorr(R30, R30, R30); - } else { - load_const(R30, Universe::narrow_ptrs_base(), tmp); - } + load_const_optimized(R30, Universe::narrow_ptrs_base(), tmp); } else { - load_const(R30, Universe::narrow_ptrs_base_addr(), tmp); - ld(R30, 0, R30); + // Heap not yet allocated. Load indirectly. + int simm16_offset = load_const_optimized(R30, Universe::narrow_ptrs_base_addr(), tmp, true); + ld(R30, simm16_offset, R30); } } diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/ppc.ad --- a/hotspot/src/cpu/ppc/vm/ppc.ad Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/ppc.ad Fri Oct 10 18:00:14 2014 +0000 @@ -1249,6 +1249,7 @@ // Emit the trampoline stub which will be related to the branch-and-link below. CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, offsets.insts_call_instruction_offset); + if (Compile::current()->env()->failing()) { return offsets; } // Code cache may be full. __ relocate(rtype); } @@ -1410,7 +1411,7 @@ while (bang_offset <= bang_end) { // Need at least one stack bang at end of shadow zone. - // Again I had to copy code, this time from assembler_ppc64.cpp, + // Again I had to copy code, this time from assembler_ppc.cpp, // bang_stack_with_offset - see there for comments. // Stack grows down, caller passes positive offset. @@ -2000,7 +2001,7 @@ // Inline_cache contains a klass. Register ic_klass = as_Register(Matcher::inline_cache_reg_encode()); - Register receiver_klass = R0; // tmp + Register receiver_klass = R12_scratch2; // tmp assert_different_registers(ic_klass, receiver_klass, R11_scratch1, R3_ARG1); assert(R11_scratch1 == R11, "need prologue scratch register"); @@ -3484,6 +3485,7 @@ // Emit the trampoline stub which will be related to the branch-and-link below. CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, start_offset); + if (Compile::current()->env()->failing()) { return; } // Code cache may be full. __ relocate(_optimized_virtual ? relocInfo::opt_virtual_call_type : relocInfo::static_call_type); } @@ -3527,6 +3529,7 @@ // Emit the trampoline stub which will be related to the branch-and-link below. CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, start_offset); + if (ra_->C->env()->failing()) { return; } // Code cache may be full. assert(_optimized_virtual, "methodHandle call should be a virtual call"); __ relocate(relocInfo::opt_virtual_call_type); } @@ -3577,9 +3580,7 @@ const address entry_point_const = __ address_constant(entry_point, RelocationHolder::none); const int entry_point_const_toc_offset = __ offset_to_method_toc(entry_point_const); CallStubImpl::emit_trampoline_stub(_masm, entry_point_const_toc_offset, __ offset()); - - if (ra_->C->env()->failing()) - return; + if (ra_->C->env()->failing()) { return; } // Code cache may be full. // Build relocation at call site with ic position as data. assert((_load_ic_hi_node != NULL && _load_ic_node == NULL) || @@ -5638,19 +5639,6 @@ ins_pipe(pipe_class_memory); %} -//// Load compressed klass and decode it if narrow_klass_shift == 0. -//// TODO: will narrow_klass_shift ever be 0? -//instruct decodeNKlass2Klass(iRegPdst dst, memory mem) %{ -// match(Set dst (DecodeNKlass (LoadNKlass mem))); -// predicate(false /* TODO: PPC port Universe::narrow_klass_shift() == 0*); -// ins_cost(MEMORY_REF_COST); -// -// format %{ "LWZ $dst, $mem \t// DecodeNKlass (unscaled)" %} -// size(4); -// ins_encode( enc_lwz(dst, mem) ); -// ins_pipe(pipe_class_memory); -//%} - // Load Klass Pointer instruct loadKlass(iRegPdst dst, memoryAlg4 mem) %{ match(Set dst (LoadKlass mem)); @@ -6070,11 +6058,15 @@ %} %} -instruct loadConNKlass_hi(iRegNdst dst, immNKlass src) %{ +// We have seen a safepoint between the hi and lo parts, and this node was handled +// as an oop. Therefore this needs a match rule so that build_oop_map knows this is +// not a narrow oop. +instruct loadConNKlass_hi(iRegNdst dst, immNKlass_NM src) %{ + match(Set dst src); effect(DEF dst, USE src); ins_cost(DEFAULT_COST); - format %{ "LIS $dst, $src \t// narrow oop hi" %} + format %{ "LIS $dst, $src \t// narrow klass hi" %} size(4); ins_encode %{ // TODO: PPC port $archOpcode(ppc64Opcode_addis); @@ -6084,6 +6076,21 @@ ins_pipe(pipe_class_default); %} +// As loadConNKlass_hi this must be recognized as narrow klass, not oop! +instruct loadConNKlass_mask(iRegNdst dst, immNKlass_NM src1, iRegNsrc src2) %{ + match(Set dst src1); + effect(TEMP src2); + ins_cost(DEFAULT_COST); + + format %{ "MASK $dst, $src2, 0xFFFFFFFF" %} // mask + size(4); + ins_encode %{ + // TODO: PPC port $archOpcode(ppc64Opcode_rldicl); + __ clrldi($dst$$Register, $src2$$Register, 0x20); + %} + ins_pipe(pipe_class_default); +%} + // This needs a match rule so that build_oop_map knows this is // not a narrow oop. instruct loadConNKlass_lo(iRegNdst dst, immNKlass_NM src1, iRegNsrc src2) %{ @@ -6091,10 +6098,10 @@ effect(TEMP src2); ins_cost(DEFAULT_COST); - format %{ "ADDI $dst, $src1, $src2 \t// narrow oop lo" %} - size(4); - ins_encode %{ - // TODO: PPC port $archOpcode(ppc64Opcode_addi); + format %{ "ORI $dst, $src1, $src2 \t// narrow klass lo" %} + size(4); + ins_encode %{ + // TODO: PPC port $archOpcode(ppc64Opcode_ori); intptr_t Csrc = Klass::encode_klass((Klass *)$src1$$constant); assert(__ oop_recorder() != NULL, "this assembler needs an OopRecorder"); int klass_index = __ oop_recorder()->find_index((Klass *)$src1$$constant); @@ -6125,10 +6132,11 @@ MachNode *m2 = m1; if (!Assembler::is_uimm((jlong)Klass::encode_klass((Klass *)op_src->constant()), 31)) { // Value might be 1-extended. Mask out these bits. - m2 = new clearMs32bNode(); + m2 = new loadConNKlass_maskNode(); m2->add_req(NULL, m1); m2->_opnds[0] = op_dst; - m2->_opnds[1] = op_dst; + m2->_opnds[1] = op_src; + m2->_opnds[2] = op_dst; ra_->set_pair(m2->_idx, ra_->get_reg_second(this), ra_->get_reg_first(this)); nodes->push(m2); } @@ -6973,7 +6981,7 @@ size(4); ins_encode %{ // TODO: PPC port $archOpcode(ppc64Opcode_rldicl); - __ rldicl($dst$$Register, $src$$Register, 64-Universe::narrow_oop_shift(), 32); + __ rldicl($dst$$Register, $src$$Register, 64-Universe::narrow_klass_shift(), 32); %} ins_pipe(pipe_class_default); %} diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp --- a/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -24,7 +24,6 @@ */ #include "precompiled.hpp" -#include "asm/assembler.hpp" #include "asm/macroAssembler.inline.hpp" #include "interpreter/interpreter.hpp" #include "nativeInst_ppc.hpp" @@ -39,9 +38,6 @@ #include "runtime/stubCodeGenerator.hpp" #include "runtime/stubRoutines.hpp" #include "utilities/top.hpp" -#ifdef COMPILER2 -#include "opto/runtime.hpp" -#endif #include "runtime/thread.inline.hpp" #define __ _masm-> @@ -216,7 +212,7 @@ { BLOCK_COMMENT("Call frame manager or native entry."); // Call frame manager or native entry. - Register r_new_arg_entry = R14; // PPC_state; + Register r_new_arg_entry = R14; assert_different_registers(r_new_arg_entry, r_top_of_arguments_addr, r_arg_method, r_arg_thread); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp --- a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -353,7 +353,6 @@ __ sldi(Rscratch1, Rscratch1, LogBytesPerWord); __ cmpdi(CCR0, Rscratch2, JVM_CONSTANT_Integer); __ bne(CCR0, notInt); - __ isync(); // Order load of constant wrt. tags. __ lwax(R17_tos, Rcpool, Rscratch1); __ push(itos); __ b(exit); @@ -365,7 +364,6 @@ __ cmpdi(CCR0, Rscratch2, JVM_CONSTANT_Float); __ asm_assert_eq("unexpected type", 0x8765); #endif - __ isync(); // Order load of constant wrt. tags. __ lfsx(F15_ftos, Rcpool, Rscratch1); __ push(ftos); @@ -424,13 +422,11 @@ // Check out Conversions.java for an example. // Also ConstantPool::header_size() is 20, which makes it very difficult // to double-align double on the constant pool. SG, 11/7/97 - __ isync(); // Order load of constant wrt. tags. __ lfdx(F15_ftos, Rcpool, Rindex); __ push(dtos); __ b(Lexit); __ bind(Llong); - __ isync(); // Order load of constant wrt. tags. __ ldx(R17_tos, Rcpool, Rindex); __ push(ltos); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/os_cpu/linux_ppc/vm/prefetch_linux_ppc.inline.hpp --- a/hotspot/src/os_cpu/linux_ppc/vm/prefetch_linux_ppc.inline.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/os_cpu/linux_ppc/vm/prefetch_linux_ppc.inline.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -47,4 +47,4 @@ ); } -#endif // OS_CPU_LINUX_PPC_VM_PREFETCH_LINUX_OJDKPPC_HPP +#endif // OS_CPU_LINUX_PPC_VM_PREFETCH_LINUX_PPC_INLINE_HPP diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/c1/c1_LIRGenerator.cpp --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -2069,14 +2069,14 @@ LIR_Opr base_op = base.result(); LIR_Opr index_op = idx.result(); #ifndef _LP64 - if (x->base()->type()->tag() == longTag) { + if (base_op->type() == T_LONG) { base_op = new_register(T_INT); __ convert(Bytecodes::_l2i, base.result(), base_op); } if (x->has_index()) { - if (x->index()->type()->tag() == longTag) { + if (index_op->type() == T_LONG) { LIR_Opr long_index_op = index_op; - if (x->index()->type()->is_constant()) { + if (index_op->is_constant()) { long_index_op = new_register(T_LONG); __ move(index_op, long_index_op); } @@ -2091,14 +2091,14 @@ assert(!x->has_index() || index_op->type() == T_INT, "index should be an int"); #else if (x->has_index()) { - if (x->index()->type()->tag() == intTag) { - if (!x->index()->type()->is_constant()) { + if (index_op->type() == T_INT) { + if (!index_op->is_constant()) { index_op = new_register(T_LONG); __ convert(Bytecodes::_i2l, idx.result(), index_op); } } else { - assert(x->index()->type()->tag() == longTag, "must be"); - if (x->index()->type()->is_constant()) { + assert(index_op->type() == T_LONG, "must be"); + if (index_op->is_constant()) { index_op = new_register(T_LONG); __ move(idx.result(), index_op); } @@ -2179,12 +2179,12 @@ LIR_Opr index_op = idx.result(); #ifndef _LP64 - if (x->base()->type()->tag() == longTag) { + if (base_op->type() == T_LONG) { base_op = new_register(T_INT); __ convert(Bytecodes::_l2i, base.result(), base_op); } if (x->has_index()) { - if (x->index()->type()->tag() == longTag) { + if (index_op->type() == T_LONG) { index_op = new_register(T_INT); __ convert(Bytecodes::_l2i, idx.result(), index_op); } @@ -2194,7 +2194,7 @@ assert(!x->has_index() || (index_op->type() == T_INT && !index_op->is_constant()), "index should be an non-constant int"); #else if (x->has_index()) { - if (x->index()->type()->tag() == intTag) { + if (index_op->type() == T_INT) { index_op = new_register(T_LONG); __ convert(Bytecodes::_i2l, idx.result(), index_op); } diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/code/codeCache.cpp --- a/hotspot/src/share/vm/code/codeCache.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/code/codeCache.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -254,8 +254,7 @@ if (!SegmentedCodeCache) { // No segmentation: use a single code heap return (code_blob_type == CodeBlobType::All); - } else if ((Arguments::mode() == Arguments::_int) || - (TieredStopAtLevel == CompLevel_none)) { + } else if (Arguments::mode() == Arguments::_int) { // Interpreter only: we don't need any method code heaps return (code_blob_type == CodeBlobType::NonNMethod); } else if (TieredCompilation && (TieredStopAtLevel > CompLevel_simple)) { diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -1683,6 +1683,8 @@ int _failures; bool _verbose; + HeapRegionClaimer _hrclaimer; + public: G1ParVerifyFinalCountTask(G1CollectedHeap* g1h, BitMap* region_bm, BitMap* card_bm, @@ -1692,19 +1694,8 @@ _actual_region_bm(region_bm), _actual_card_bm(card_bm), _expected_region_bm(expected_region_bm), _expected_card_bm(expected_card_bm), _failures(0), _verbose(false), - _n_workers(0) { + _n_workers(_g1h->workers()->active_workers()), _hrclaimer(_n_workers) { assert(VerifyDuringGC, "don't call this otherwise"); - - // Use the value already set as the number of active threads - // in the call to run_task(). - if (G1CollectedHeap::use_parallel_gc_threads()) { - assert( _g1h->workers()->active_workers() > 0, - "Should have been previously set"); - _n_workers = _g1h->workers()->active_workers(); - } else { - _n_workers = 1; - } - assert(_expected_card_bm->size() == _actual_card_bm->size(), "sanity"); assert(_expected_region_bm->size() == _actual_region_bm->size(), "sanity"); @@ -1721,10 +1712,7 @@ _verbose); if (G1CollectedHeap::use_parallel_gc_threads()) { - _g1h->heap_region_par_iterate_chunked(&verify_cl, - worker_id, - _n_workers, - HeapRegion::VerifyCountClaimValue); + _g1h->heap_region_par_iterate(&verify_cl, worker_id, &_hrclaimer); } else { _g1h->heap_region_iterate(&verify_cl); } @@ -1813,22 +1801,14 @@ BitMap* _actual_card_bm; uint _n_workers; + HeapRegionClaimer _hrclaimer; public: G1ParFinalCountTask(G1CollectedHeap* g1h, BitMap* region_bm, BitMap* card_bm) : AbstractGangTask("G1 final counting"), _g1h(g1h), _cm(_g1h->concurrent_mark()), _actual_region_bm(region_bm), _actual_card_bm(card_bm), - _n_workers(0) { - // Use the value already set as the number of active threads - // in the call to run_task(). - if (G1CollectedHeap::use_parallel_gc_threads()) { - assert( _g1h->workers()->active_workers() > 0, - "Should have been previously set"); - _n_workers = _g1h->workers()->active_workers(); - } else { - _n_workers = 1; - } + _n_workers(_g1h->workers()->active_workers()), _hrclaimer(_n_workers) { } void work(uint worker_id) { @@ -1839,10 +1819,7 @@ _actual_card_bm); if (G1CollectedHeap::use_parallel_gc_threads()) { - _g1h->heap_region_par_iterate_chunked(&final_update_cl, - worker_id, - _n_workers, - HeapRegion::FinalCountClaimValue); + _g1h->heap_region_par_iterate(&final_update_cl, worker_id, &_hrclaimer); } else { _g1h->heap_region_iterate(&final_update_cl); } @@ -1929,12 +1906,12 @@ size_t _max_live_bytes; size_t _freed_bytes; FreeRegionList* _cleanup_list; + HeapRegionClaimer _hrclaimer; public: - G1ParNoteEndTask(G1CollectedHeap* g1h, - FreeRegionList* cleanup_list) : - AbstractGangTask("G1 note end"), _g1h(g1h), - _max_live_bytes(0), _freed_bytes(0), _cleanup_list(cleanup_list) { } + G1ParNoteEndTask(G1CollectedHeap* g1h, FreeRegionList* cleanup_list, uint n_workers) : + AbstractGangTask("G1 note end"), _g1h(g1h), _max_live_bytes(0), _freed_bytes(0), _cleanup_list(cleanup_list), _hrclaimer(n_workers) { + } void work(uint worker_id) { double start = os::elapsedTime(); @@ -1943,9 +1920,7 @@ G1NoteEndOfConcMarkClosure g1_note_end(_g1h, &local_cleanup_list, &hrrs_cleanup_task); if (G1CollectedHeap::use_parallel_gc_threads()) { - _g1h->heap_region_par_iterate_chunked(&g1_note_end, worker_id, - _g1h->workers()->active_workers(), - HeapRegion::NoteEndClaimValue); + _g1h->heap_region_par_iterate(&g1_note_end, worker_id, &_hrclaimer); } else { _g1h->heap_region_iterate(&g1_note_end); } @@ -1991,16 +1966,16 @@ G1RemSet* _g1rs; BitMap* _region_bm; BitMap* _card_bm; + HeapRegionClaimer _hrclaimer; + public: - G1ParScrubRemSetTask(G1CollectedHeap* g1h, - BitMap* region_bm, BitMap* card_bm) : - AbstractGangTask("G1 ScrubRS"), _g1rs(g1h->g1_rem_set()), - _region_bm(region_bm), _card_bm(card_bm) { } + G1ParScrubRemSetTask(G1CollectedHeap* g1h, BitMap* region_bm, BitMap* card_bm, uint n_workers) : + AbstractGangTask("G1 ScrubRS"), _g1rs(g1h->g1_rem_set()), _region_bm(region_bm), _card_bm(card_bm), _hrclaimer(n_workers) { + } void work(uint worker_id) { if (G1CollectedHeap::use_parallel_gc_threads()) { - _g1rs->scrub_par(_region_bm, _card_bm, worker_id, - HeapRegion::ScrubRemSetClaimValue); + _g1rs->scrub_par(_region_bm, _card_bm, worker_id, &_hrclaimer); } else { _g1rs->scrub(_region_bm, _card_bm); } @@ -2043,9 +2018,6 @@ G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm); if (G1CollectedHeap::use_parallel_gc_threads()) { - assert(g1h->check_heap_region_claim_values(HeapRegion::InitialClaimValue), - "sanity check"); - g1h->set_par_threads(); n_workers = g1h->n_par_threads(); assert(g1h->n_par_threads() == n_workers, @@ -2053,9 +2025,6 @@ g1h->workers()->run_task(&g1_par_count_task); // Done with the parallel phase so reset to 0. g1h->set_par_threads(0); - - assert(g1h->check_heap_region_claim_values(HeapRegion::FinalCountClaimValue), - "sanity check"); } else { n_workers = 1; g1_par_count_task.work(0); @@ -2080,9 +2049,6 @@ g1h->workers()->run_task(&g1_par_verify_task); // Done with the parallel phase so reset to 0. g1h->set_par_threads(0); - - assert(g1h->check_heap_region_claim_values(HeapRegion::VerifyCountClaimValue), - "sanity check"); } else { g1_par_verify_task.work(0); } @@ -2108,14 +2074,11 @@ g1h->reset_gc_time_stamp(); // Note end of marking in all heap regions. - G1ParNoteEndTask g1_par_note_end_task(g1h, &_cleanup_list); + G1ParNoteEndTask g1_par_note_end_task(g1h, &_cleanup_list, n_workers); if (G1CollectedHeap::use_parallel_gc_threads()) { g1h->set_par_threads((int)n_workers); g1h->workers()->run_task(&g1_par_note_end_task); g1h->set_par_threads(0); - - assert(g1h->check_heap_region_claim_values(HeapRegion::NoteEndClaimValue), - "sanity check"); } else { g1_par_note_end_task.work(0); } @@ -2132,15 +2095,11 @@ // regions. if (G1ScrubRemSets) { double rs_scrub_start = os::elapsedTime(); - G1ParScrubRemSetTask g1_par_scrub_rs_task(g1h, &_region_bm, &_card_bm); + G1ParScrubRemSetTask g1_par_scrub_rs_task(g1h, &_region_bm, &_card_bm, n_workers); if (G1CollectedHeap::use_parallel_gc_threads()) { g1h->set_par_threads((int)n_workers); g1h->workers()->run_task(&g1_par_scrub_rs_task); g1h->set_par_threads(0); - - assert(g1h->check_heap_region_claim_values( - HeapRegion::ScrubRemSetClaimValue), - "sanity check"); } else { g1_par_scrub_rs_task.work(0); } @@ -3288,6 +3247,7 @@ BitMap* _cm_card_bm; uint _max_worker_id; int _active_workers; + HeapRegionClaimer _hrclaimer; public: G1AggregateCountDataTask(G1CollectedHeap* g1h, @@ -3295,18 +3255,18 @@ BitMap* cm_card_bm, uint max_worker_id, int n_workers) : - AbstractGangTask("Count Aggregation"), - _g1h(g1h), _cm(cm), _cm_card_bm(cm_card_bm), - _max_worker_id(max_worker_id), - _active_workers(n_workers) { } + AbstractGangTask("Count Aggregation"), + _g1h(g1h), _cm(cm), _cm_card_bm(cm_card_bm), + _max_worker_id(max_worker_id), + _active_workers(n_workers), + _hrclaimer(_active_workers) { + } void work(uint worker_id) { AggregateCountDataHRClosure cl(_g1h, _cm_card_bm, _max_worker_id); if (G1CollectedHeap::use_parallel_gc_threads()) { - _g1h->heap_region_par_iterate_chunked(&cl, worker_id, - _active_workers, - HeapRegion::AggregateCountClaimValue); + _g1h->heap_region_par_iterate(&cl, worker_id, &_hrclaimer); } else { _g1h->heap_region_iterate(&cl); } @@ -3323,15 +3283,9 @@ _max_worker_id, n_workers); if (G1CollectedHeap::use_parallel_gc_threads()) { - assert(_g1h->check_heap_region_claim_values(HeapRegion::InitialClaimValue), - "sanity check"); _g1h->set_par_threads(n_workers); _g1h->workers()->run_task(&g1_par_agg_task); _g1h->set_par_threads(0); - - assert(_g1h->check_heap_region_claim_values(HeapRegion::AggregateCountClaimValue), - "sanity check"); - _g1h->reset_heap_region_claim_values(); } else { g1_par_agg_task.work(0); } diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -90,8 +90,8 @@ // Notes on implementation of parallelism in different tasks. // -// G1ParVerifyTask uses heap_region_par_iterate_chunked() for parallelism. -// The number of GC workers is passed to heap_region_par_iterate_chunked(). +// G1ParVerifyTask uses heap_region_par_iterate() for parallelism. +// The number of GC workers is passed to heap_region_par_iterate(). // It does use run_task() which sets _n_workers in the task. // G1ParTask executes g1_process_roots() -> // SharedHeap::process_roots() which calls eventually to @@ -1215,17 +1215,15 @@ class ParRebuildRSTask: public AbstractGangTask { G1CollectedHeap* _g1; + HeapRegionClaimer _hrclaimer; + public: - ParRebuildRSTask(G1CollectedHeap* g1) - : AbstractGangTask("ParRebuildRSTask"), - _g1(g1) - { } + ParRebuildRSTask(G1CollectedHeap* g1) : + AbstractGangTask("ParRebuildRSTask"), _g1(g1), _hrclaimer(g1->workers()->active_workers()) {} void work(uint worker_id) { RebuildRSOutOfRegionClosure rebuild_rs(_g1, worker_id); - _g1->heap_region_par_iterate_chunked(&rebuild_rs, worker_id, - _g1->workers()->active_workers(), - HeapRegion::RebuildRSClaimValue); + _g1->heap_region_par_iterate(&rebuild_rs, worker_id, &_hrclaimer); } }; @@ -1455,8 +1453,6 @@ set_par_threads(n_workers); ParRebuildRSTask rebuild_rs_task(this); - assert(check_heap_region_claim_values( - HeapRegion::InitialClaimValue), "sanity check"); assert(UseDynamicNumberOfGCThreads || workers()->active_workers() == workers()->total_workers(), "Unless dynamic should use total workers"); @@ -1466,9 +1462,6 @@ set_par_threads(workers()->active_workers()); workers()->run_task(&rebuild_rs_task); set_par_threads(0); - assert(check_heap_region_claim_values( - HeapRegion::RebuildRSClaimValue), "sanity check"); - reset_heap_region_claim_values(); } else { RebuildRSOutOfRegionClosure rebuild_rs(this); heap_region_iterate(&rebuild_rs); @@ -2343,6 +2336,7 @@ case GCCause::_gc_locker: return GCLockerInvokesConcurrent; case GCCause::_java_lang_system_gc: return ExplicitGCInvokesConcurrent; case GCCause::_g1_humongous_allocation: return true; + case GCCause::_update_allocation_context_stats_inc: return true; default: return false; } } @@ -2633,110 +2627,11 @@ } void -G1CollectedHeap::heap_region_par_iterate_chunked(HeapRegionClosure* cl, - uint worker_id, - uint num_workers, - jint claim_value) const { - _hrm.par_iterate(cl, worker_id, num_workers, claim_value); -} - -class ResetClaimValuesClosure: public HeapRegionClosure { -public: - bool doHeapRegion(HeapRegion* r) { - r->set_claim_value(HeapRegion::InitialClaimValue); - return false; - } -}; - -void G1CollectedHeap::reset_heap_region_claim_values() { - ResetClaimValuesClosure blk; - heap_region_iterate(&blk); -} - -void G1CollectedHeap::reset_cset_heap_region_claim_values() { - ResetClaimValuesClosure blk; - collection_set_iterate(&blk); -} - -#ifdef ASSERT -// This checks whether all regions in the heap have the correct claim -// value. I also piggy-backed on this a check to ensure that the -// humongous_start_region() information on "continues humongous" -// regions is correct. - -class CheckClaimValuesClosure : public HeapRegionClosure { -private: - jint _claim_value; - uint _failures; - HeapRegion* _sh_region; - -public: - CheckClaimValuesClosure(jint claim_value) : - _claim_value(claim_value), _failures(0), _sh_region(NULL) { } - bool doHeapRegion(HeapRegion* r) { - if (r->claim_value() != _claim_value) { - gclog_or_tty->print_cr("Region " HR_FORMAT ", " - "claim value = %d, should be %d", - HR_FORMAT_PARAMS(r), - r->claim_value(), _claim_value); - ++_failures; - } - if (!r->is_humongous()) { - _sh_region = NULL; - } else if (r->is_starts_humongous()) { - _sh_region = r; - } else if (r->is_continues_humongous()) { - if (r->humongous_start_region() != _sh_region) { - gclog_or_tty->print_cr("Region " HR_FORMAT ", " - "HS = "PTR_FORMAT", should be "PTR_FORMAT, - HR_FORMAT_PARAMS(r), - r->humongous_start_region(), - _sh_region); - ++_failures; - } - } - return false; - } - uint failures() { return _failures; } -}; - -bool G1CollectedHeap::check_heap_region_claim_values(jint claim_value) { - CheckClaimValuesClosure cl(claim_value); - heap_region_iterate(&cl); - return cl.failures() == 0; -} - -class CheckClaimValuesInCSetHRClosure: public HeapRegionClosure { -private: - jint _claim_value; - uint _failures; - -public: - CheckClaimValuesInCSetHRClosure(jint claim_value) : - _claim_value(claim_value), _failures(0) { } - - uint failures() { return _failures; } - - bool doHeapRegion(HeapRegion* hr) { - assert(hr->in_collection_set(), "how?"); - assert(!hr->is_humongous(), "H-region in CSet"); - if (hr->claim_value() != _claim_value) { - gclog_or_tty->print_cr("CSet Region " HR_FORMAT ", " - "claim value = %d, should be %d", - HR_FORMAT_PARAMS(hr), - hr->claim_value(), _claim_value); - _failures += 1; - } - return false; - } -}; - -bool G1CollectedHeap::check_cset_heap_region_claim_values(jint claim_value) { - CheckClaimValuesInCSetHRClosure cl(claim_value); - collection_set_iterate(&cl); - return cl.failures() == 0; -} -#endif // ASSERT +G1CollectedHeap::heap_region_par_iterate(HeapRegionClosure* cl, + uint worker_id, + HeapRegionClaimer *hrclaimer) const { + _hrm.par_iterate(cl, worker_id, hrclaimer); +} // Clear the cached CSet starting regions and (more importantly) // the time stamps. Called when we reset the GC time stamp. @@ -3251,19 +3146,21 @@ class G1ParVerifyTask: public AbstractGangTask { private: - G1CollectedHeap* _g1h; - VerifyOption _vo; - bool _failures; + G1CollectedHeap* _g1h; + VerifyOption _vo; + bool _failures; + HeapRegionClaimer _hrclaimer; public: // _vo == UsePrevMarking -> use "prev" marking information, // _vo == UseNextMarking -> use "next" marking information, // _vo == UseMarkWord -> use mark word from object header. G1ParVerifyTask(G1CollectedHeap* g1h, VerifyOption vo) : - AbstractGangTask("Parallel verify task"), - _g1h(g1h), - _vo(vo), - _failures(false) { } + AbstractGangTask("Parallel verify task"), + _g1h(g1h), + _vo(vo), + _failures(false), + _hrclaimer(g1h->workers()->active_workers()) {} bool failures() { return _failures; @@ -3272,9 +3169,7 @@ void work(uint worker_id) { HandleMark hm; VerifyRegionClosure blk(true, _vo); - _g1h->heap_region_par_iterate_chunked(&blk, worker_id, - _g1h->workers()->active_workers(), - HeapRegion::ParVerifyClaimValue); + _g1h->heap_region_par_iterate(&blk, worker_id, &_hrclaimer); if (blk.failures()) { _failures = true; } @@ -3316,8 +3211,6 @@ if (!silent) { gclog_or_tty->print("HeapRegions "); } if (GCParallelVerificationEnabled && ParallelGCThreads > 1) { - assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue), - "sanity check"); G1ParVerifyTask task(this, vo); assert(UseDynamicNumberOfGCThreads || @@ -3331,15 +3224,6 @@ failures = true; } - // Checks that the expected amount of parallel work was done. - // The implication is that n_workers is > 0. - assert(check_heap_region_claim_values(HeapRegion::ParVerifyClaimValue), - "sanity check"); - - reset_heap_region_claim_values(); - - assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue), - "sanity check"); } else { VerifyRegionClosure blk(false, vo); heap_region_iterate(&blk); @@ -3926,8 +3810,6 @@ } assert(check_young_list_well_formed(), "young list should be well formed"); - assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue), - "sanity check"); // Don't dynamically change the number of GC threads this early. A value of // 0 is used to indicate serial work. When parallel work is done, @@ -4288,26 +4170,12 @@ } void G1CollectedHeap::remove_self_forwarding_pointers() { - assert(check_cset_heap_region_claim_values(HeapRegion::InitialClaimValue), "sanity"); - double remove_self_forwards_start = os::elapsedTime(); + set_par_threads(); G1ParRemoveSelfForwardPtrsTask rsfp_task(this); - - if (G1CollectedHeap::use_parallel_gc_threads()) { - set_par_threads(); - workers()->run_task(&rsfp_task); - set_par_threads(0); - } else { - rsfp_task.work(0); - } - - assert(check_cset_heap_region_claim_values(HeapRegion::ParEvacFailureClaimValue), "sanity"); - - // Reset the claim values in the regions in the collection set. - reset_cset_heap_region_claim_values(); - - assert(check_cset_heap_region_claim_values(HeapRegion::InitialClaimValue), "sanity"); + workers()->run_task(&rsfp_task); + set_par_threads(0); // Now restore saved marks, if any. assert(_objs_with_preserved_marks.size() == @@ -5948,11 +5816,6 @@ purge_code_root_memory(); - if (g1_policy()->during_initial_mark_pause()) { - // Reset the claim values set during marking the strong code roots - reset_heap_region_claim_values(); - } - finalize_for_evac_failure(); if (evacuation_failed()) { diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -211,6 +211,7 @@ friend class G1FreeHumongousRegionClosure; // Other related classes. friend class G1MarkSweep; + friend class HeapRegionClaimer; private: // The one and only G1CollectedHeap, so static functions can find it. @@ -1377,38 +1378,15 @@ inline HeapWord* bottom_addr_for_region(uint index) const; - // Divide the heap region sequence into "chunks" of some size (the number - // of regions divided by the number of parallel threads times some - // overpartition factor, currently 4). Assumes that this will be called - // in parallel by ParallelGCThreads worker threads with distinct worker - // ids in the range [0..max(ParallelGCThreads-1, 1)], that all parallel - // calls will use the same "claim_value", and that that claim value is - // different from the claim_value of any heap region before the start of - // the iteration. Applies "blk->doHeapRegion" to each of the regions, by - // attempting to claim the first region in each chunk, and, if - // successful, applying the closure to each region in the chunk (and - // setting the claim value of the second and subsequent regions of the - // chunk.) For now requires that "doHeapRegion" always returns "false", - // i.e., that a closure never attempt to abort a traversal. - void heap_region_par_iterate_chunked(HeapRegionClosure* cl, - uint worker_id, - uint num_workers, - jint claim_value) const; - - // It resets all the region claim values to the default. - void reset_heap_region_claim_values(); - - // Resets the claim values of regions in the current - // collection set to the default. - void reset_cset_heap_region_claim_values(); - -#ifdef ASSERT - bool check_heap_region_claim_values(jint claim_value); - - // Same as the routine above but only checks regions in the - // current collection set. - bool check_cset_heap_region_claim_values(jint claim_value); -#endif // ASSERT + // Iterate over the heap regions in parallel. Assumes that this will be called + // in parallel by ParallelGCThreads worker threads with distinct worker ids + // in the range [0..max(ParallelGCThreads-1, 1)]. Applies "blk->doHeapRegion" + // to each of the regions, by attempting to claim the region using the + // HeapRegionClaimer and, if successful, applying the closure to the claimed + // region. + void heap_region_par_iterate(HeapRegionClosure* cl, + uint worker_id, + HeapRegionClaimer* hrclaimer) const; // Clear the cached cset start regions and (more importantly) // the time stamps. Called when we reset the GC time stamp. diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -1598,19 +1598,17 @@ CollectionSetChooser* _hrSorted; uint _chunk_size; G1CollectedHeap* _g1; + HeapRegionClaimer _hrclaimer; + public: - ParKnownGarbageTask(CollectionSetChooser* hrSorted, uint chunk_size) : - AbstractGangTask("ParKnownGarbageTask"), - _hrSorted(hrSorted), _chunk_size(chunk_size), - _g1(G1CollectedHeap::heap()) { } + ParKnownGarbageTask(CollectionSetChooser* hrSorted, uint chunk_size, uint n_workers) : + AbstractGangTask("ParKnownGarbageTask"), + _hrSorted(hrSorted), _chunk_size(chunk_size), + _g1(G1CollectedHeap::heap()), _hrclaimer(n_workers) {} void work(uint worker_id) { ParKnownGarbageHRClosure parKnownGarbageCl(_hrSorted, _chunk_size); - - // Back to zero for the claim value. - _g1->heap_region_par_iterate_chunked(&parKnownGarbageCl, worker_id, - _g1->workers()->active_workers(), - HeapRegion::InitialClaimValue); + _g1->heap_region_par_iterate(&parKnownGarbageCl, worker_id, &_hrclaimer); } }; @@ -1641,12 +1639,8 @@ } _collectionSetChooser->prepare_for_par_region_addition(_g1->num_regions(), WorkUnit); - ParKnownGarbageTask parKnownGarbageTask(_collectionSetChooser, - (int) WorkUnit); + ParKnownGarbageTask parKnownGarbageTask(_collectionSetChooser, WorkUnit, (uint) no_of_gc_threads); _g1->workers()->run_task(&parKnownGarbageTask); - - assert(_g1->check_heap_region_claim_values(HeapRegion::InitialClaimValue), - "sanity check"); } else { KnownGarbageClosure knownGarbagecl(_collectionSetChooser); _g1->heap_region_iterate(&knownGarbagecl); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -177,16 +177,18 @@ G1CollectedHeap* _g1h; ConcurrentMark* _cm; uint _worker_id; + HeapRegionClaimer* _hrclaimer; DirtyCardQueue _dcq; UpdateRSetDeferred _update_rset_cl; public: RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h, - uint worker_id) : - _g1h(g1h), _dcq(&g1h->dirty_card_queue_set()), _update_rset_cl(g1h, &_dcq), - _worker_id(worker_id), _cm(_g1h->concurrent_mark()) { - } + uint worker_id, + HeapRegionClaimer* hrclaimer) : + _g1h(g1h), _dcq(&g1h->dirty_card_queue_set()), _update_rset_cl(g1h, &_dcq), + _worker_id(worker_id), _cm(_g1h->concurrent_mark()), _hrclaimer(hrclaimer) { + } bool doHeapRegion(HeapRegion *hr) { bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause(); @@ -195,7 +197,7 @@ assert(!hr->is_humongous(), "sanity"); assert(hr->in_collection_set(), "bad CS"); - if (hr->claimHeapRegion(HeapRegion::ParEvacFailureClaimValue)) { + if (_hrclaimer->claim_region(hr->hrm_index())) { if (hr->evacuation_failed()) { RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, &_update_rset_cl, during_initial_mark, @@ -233,14 +235,15 @@ class G1ParRemoveSelfForwardPtrsTask: public AbstractGangTask { protected: G1CollectedHeap* _g1h; + HeapRegionClaimer _hrclaimer; public: G1ParRemoveSelfForwardPtrsTask(G1CollectedHeap* g1h) : - AbstractGangTask("G1 Remove Self-forwarding Pointers"), - _g1h(g1h) { } + AbstractGangTask("G1 Remove Self-forwarding Pointers"), _g1h(g1h), + _hrclaimer(g1h->workers()->active_workers()) {} void work(uint worker_id) { - RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, worker_id); + RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, worker_id, &_hrclaimer); HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id); _g1h->collection_set_iterate_from(hr, &rsfp_cl); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -425,13 +425,9 @@ _g1->heap_region_iterate(&scrub_cl); } -void G1RemSet::scrub_par(BitMap* region_bm, BitMap* card_bm, - uint worker_num, int claim_val) { +void G1RemSet::scrub_par(BitMap* region_bm, BitMap* card_bm, uint worker_num, HeapRegionClaimer *hrclaimer) { ScrubRSClosure scrub_cl(region_bm, card_bm); - _g1->heap_region_par_iterate_chunked(&scrub_cl, - worker_num, - n_workers(), - claim_val); + _g1->heap_region_par_iterate(&scrub_cl, worker_num, hrclaimer); } G1TriggerClosure::G1TriggerClosure() : diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -128,10 +128,10 @@ void scrub(BitMap* region_bm, BitMap* card_bm); // Like the above, but assumes is called in parallel: "worker_num" is the - // parallel thread id of the current thread, and "claim_val" is the - // value that should be used to claim heap regions. + // parallel thread id of the current thread, and "hrclaimer" is the shared + // HeapRegionClaimer that should be used to claim heap regions. void scrub_par(BitMap* region_bm, BitMap* card_bm, - uint worker_num, int claim_val); + uint worker_num, HeapRegionClaimer* hrclaimer); // Refine the card corresponding to "card_ptr". // If check_for_refs_into_cset is true, a true result is returned diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -217,7 +217,6 @@ } else { hrrs->clear(); } - _claimed = InitialClaimValue; } zero_marked_bytes(); @@ -294,17 +293,6 @@ _humongous_start_region = NULL; } -bool HeapRegion::claimHeapRegion(jint claimValue) { - jint current = _claimed; - if (current != claimValue) { - jint res = Atomic::cmpxchg(claimValue, &_claimed, current); - if (res == current) { - return true; - } - } - return false; -} - HeapRegion::HeapRegion(uint hrm_index, G1BlockOffsetSharedArray* sharedOffsetArray, MemRegion mr) : @@ -314,7 +302,7 @@ _humongous_start_region(NULL), _in_collection_set(false), _next_in_special_set(NULL), - _claimed(InitialClaimValue), _evacuation_failed(false), + _evacuation_failed(false), _prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0), _next_young_region(NULL), _next_dirty_cards_region(NULL), _next(NULL), _prev(NULL), diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -254,9 +254,6 @@ HeapRegionSetBase* _containing_set; #endif // ASSERT - // For parallel heapRegion traversal. - jint _claimed; - // We use concurrent marking to determine the amount of live data // in each heap region. size_t _prev_marked_bytes; // Bytes known to be live via last completed marking. @@ -336,19 +333,6 @@ // up once during initialization time. static void setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size); - enum ClaimValues { - InitialClaimValue = 0, - FinalCountClaimValue = 1, - NoteEndClaimValue = 2, - ScrubRemSetClaimValue = 3, - ParVerifyClaimValue = 4, - RebuildRSClaimValue = 5, - ParEvacFailureClaimValue = 6, - AggregateCountClaimValue = 7, - VerifyCountClaimValue = 8, - ParMarkRootClaimValue = 9 - }; - // All allocated blocks are occupied by objects in a HeapRegion bool block_is_obj(const HeapWord* p) const; @@ -691,12 +675,6 @@ return (HeapWord *) obj >= next_top_at_mark_start(); } - // For parallel heapRegion traversal. - bool claimHeapRegion(int claimValue); - jint claim_value() { return _claimed; } - // Use this carefully: only when you're sure no one is claiming... - void set_claim_value(int claimValue) { _claimed = claimValue; } - // Returns the "evacuation_failed" property of the region. bool evacuation_failed() { return _evacuation_failed; } diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -260,20 +260,17 @@ return num_regions; } -uint HeapRegionManager::start_region_for_worker(uint worker_i, uint num_workers, uint num_regions) const { - return num_regions * worker_i / num_workers; -} - -void HeapRegionManager::par_iterate(HeapRegionClosure* blk, uint worker_id, uint num_workers, jint claim_value) const { - const uint start_index = start_region_for_worker(worker_id, num_workers, _allocated_heapregions_length); +void HeapRegionManager::par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer) const { + const uint start_index = hrclaimer->start_region_for_worker(worker_id); // Every worker will actually look at all regions, skipping over regions that // are currently not committed. // This also (potentially) iterates over regions newly allocated during GC. This // is no problem except for some extra work. - for (uint count = 0; count < _allocated_heapregions_length; count++) { - const uint index = (start_index + count) % _allocated_heapregions_length; - assert(0 <= index && index < _allocated_heapregions_length, "sanity"); + const uint n_regions = hrclaimer->n_regions(); + for (uint count = 0; count < n_regions; count++) { + const uint index = (start_index + count) % n_regions; + assert(0 <= index && index < n_regions, "sanity"); // Skip over unavailable regions if (!is_available(index)) { continue; @@ -282,11 +279,11 @@ // We'll ignore "continues humongous" regions (we'll process them // when we come across their corresponding "start humongous" // region) and regions already claimed. - if (r->claim_value() == claim_value || r->is_continues_humongous()) { + if (hrclaimer->is_region_claimed(index) || r->is_continues_humongous()) { continue; } // OK, try to claim it - if (!r->claimHeapRegion(claim_value)) { + if (!hrclaimer->claim_region(index)) { continue; } // Success! @@ -306,13 +303,11 @@ assert(chr->humongous_start_region() == r, err_msg("Must work on humongous continuation of the original start region " PTR_FORMAT ", but is " PTR_FORMAT, p2i(r), p2i(chr))); - assert(chr->claim_value() != claim_value, + assert(!hrclaimer->is_region_claimed(ch_index), "Must not have been claimed yet because claiming of humongous continuation first claims the start region"); - bool claim_result = chr->claimHeapRegion(claim_value); - // We should always be able to claim it; no one else should - // be trying to claim this region. - guarantee(claim_result, "We should always be able to claim the is_continues_humongous part of the humongous object"); + // There's no need to actually claim the continues humongous region, but we can do it in an assert as an extra precaution. + assert(hrclaimer->claim_region(ch_index), "We should always be able to claim the continuesHumongous part of the humongous object"); bool res2 = blk->doHeapRegion(chr); if (res2) { @@ -445,3 +440,31 @@ } #endif // PRODUCT +HeapRegionClaimer::HeapRegionClaimer(uint n_workers) : + _n_workers(n_workers), _n_regions(G1CollectedHeap::heap()->_hrm._allocated_heapregions_length), _claims(NULL) { + assert(n_workers > 0, "Need at least one worker."); + _claims = NEW_C_HEAP_ARRAY(uint, _n_regions, mtGC); + memset(_claims, Unclaimed, sizeof(*_claims) * _n_regions); +} + +HeapRegionClaimer::~HeapRegionClaimer() { + if (_claims != NULL) { + FREE_C_HEAP_ARRAY(uint, _claims, mtGC); + } +} + +uint HeapRegionClaimer::start_region_for_worker(uint worker_id) const { + assert(worker_id < _n_workers, "Invalid worker_id."); + return _n_regions * worker_id / _n_workers; +} + +bool HeapRegionClaimer::is_region_claimed(uint region_index) const { + assert(region_index < _n_regions, "Invalid index."); + return _claims[region_index] == Claimed; +} + +bool HeapRegionClaimer::claim_region(uint region_index) { + assert(region_index < _n_regions, "Invalid index."); + uint old_val = Atomic::cmpxchg(Claimed, &_claims[region_index], Unclaimed); + return old_val == Unclaimed; +} diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -31,6 +31,7 @@ class HeapRegion; class HeapRegionClosure; +class HeapRegionClaimer; class FreeRegionList; class G1HeapRegionTable : public G1BiasedMappedArray { @@ -66,6 +67,7 @@ class HeapRegionManager: public CHeapObj { friend class VMStructs; + friend class HeapRegionClaimer; G1HeapRegionTable _regions; @@ -99,9 +101,6 @@ // Notify other data structures about change in the heap layout. void update_committed_space(HeapWord* old_end, HeapWord* new_end); - // Calculate the starting region for each worker during parallel iteration so - // that they do not all start from the same region. - uint start_region_for_worker(uint worker_i, uint num_workers, uint num_regions) const; // Find a contiguous set of empty or uncommitted regions of length num and return // the index of the first region or G1_NO_HRM_INDEX if the search was unsuccessful. @@ -223,7 +222,7 @@ // terminating the iteration early if doHeapRegion() returns true. void iterate(HeapRegionClosure* blk) const; - void par_iterate(HeapRegionClosure* blk, uint worker_id, uint no_of_par_workers, jint claim_value) const; + void par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer) const; // Uncommit up to num_regions_to_remove regions that are completely free. // Return the actual number of uncommitted regions. @@ -235,5 +234,33 @@ void verify_optional() PRODUCT_RETURN; }; +// The HeapRegionClaimer is used during parallel iteration over heap regions, +// allowing workers to claim heap regions, gaining exclusive rights to these regions. +class HeapRegionClaimer : public StackObj { + uint _n_workers; + uint _n_regions; + uint* _claims; + + static const uint Unclaimed = 0; + static const uint Claimed = 1; + + public: + HeapRegionClaimer(uint n_workers); + ~HeapRegionClaimer(); + + inline uint n_regions() const { + return _n_regions; + } + + // Calculate the starting region for given worker so + // that they do not all start from the same region. + uint start_region_for_worker(uint worker_id) const; + + // Check if region has been claimed with this HRClaimer. + bool is_region_claimed(uint region_index) const; + + // Claim the given region, returns true if successfully claimed. + bool claim_region(uint region_index); +}; #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONMANAGER_HPP diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -95,8 +95,9 @@ assert(!_should_initiate_conc_mark || ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent) || - _gc_cause == GCCause::_g1_humongous_allocation), - "only a GC locker, a System.gc() or a hum allocation induced GC should start a cycle"); + _gc_cause == GCCause::_g1_humongous_allocation || + _gc_cause == GCCause::_update_allocation_context_stats_inc), + "only a GC locker, a System.gc(), stats update or a hum allocation induced GC should start a cycle"); if (_word_size > 0) { // An allocation has been requested. So, try to do that first. diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_interface/gcCause.cpp --- a/hotspot/src/share/vm/gc_interface/gcCause.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_interface/gcCause.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -54,7 +54,8 @@ case _wb_young_gc: return "WhiteBox Initiated Young GC"; - case _update_allocation_context_stats: + case _update_allocation_context_stats_inc: + case _update_allocation_context_stats_full: return "Update Allocation Context Stats"; case _no_gc: diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/gc_interface/gcCause.hpp --- a/hotspot/src/share/vm/gc_interface/gcCause.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/gc_interface/gcCause.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -47,7 +47,8 @@ _heap_inspection, _heap_dump, _wb_young_gc, - _update_allocation_context_stats, + _update_allocation_context_stats_inc, + _update_allocation_context_stats_full, /* implementation independent, but reserved for GC use */ _no_gc, diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/opto/compile.cpp --- a/hotspot/src/share/vm/opto/compile.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/opto/compile.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -1153,12 +1153,18 @@ assert(s == start(), ""); } +/** + * Return the 'StartNode'. We must not have a pending failure, since the ideal graph + * can be in an inconsistent state, i.e., we can get segmentation faults when traversing + * the ideal graph. + */ StartNode* Compile::start() const { - assert(!failing(), ""); + assert (!failing(), err_msg_res("Must not have pending failure. Reason is: %s", failure_reason())); for (DUIterator_Fast imax, i = root()->fast_outs(imax); i < imax; i++) { Node* start = root()->fast_out(i); - if( start->is_Start() ) + if (start->is_Start()) { return start->as_Start(); + } } fatal("Did not find Start node!"); return NULL; diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/opto/compile.hpp --- a/hotspot/src/share/vm/opto/compile.hpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/opto/compile.hpp Fri Oct 10 18:00:14 2014 +0000 @@ -707,12 +707,15 @@ void sort_expensive_nodes(); // Compilation environment. - Arena* comp_arena() { return &_comp_arena; } - ciEnv* env() const { return _env; } - CompileLog* log() const { return _log; } - bool failing() const { return _env->failing() || _failure_reason != NULL; } - const char* failure_reason() { return _failure_reason; } - bool failure_reason_is(const char* r) { return (r==_failure_reason) || (r!=NULL && _failure_reason!=NULL && strcmp(r, _failure_reason)==0); } + Arena* comp_arena() { return &_comp_arena; } + ciEnv* env() const { return _env; } + CompileLog* log() const { return _log; } + bool failing() const { return _env->failing() || _failure_reason != NULL; } + const char* failure_reason() const { return (_env->failing()) ? _env->failure_reason() : _failure_reason; } + + bool failure_reason_is(const char* r) const { + return (r == _failure_reason) || (r != NULL && _failure_reason != NULL && strcmp(r, _failure_reason) == 0); + } void record_failure(const char* reason); void record_method_not_compilable(const char* reason, bool all_tiers = false) { diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/opto/doCall.cpp --- a/hotspot/src/share/vm/opto/doCall.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/opto/doCall.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -802,10 +802,16 @@ // each arm of the Phi. If I know something clever about the exceptions // I'm loading the class from, I can replace the LoadKlass with the // klass constant for the exception oop. - if( ex_node->is_Phi() ) { - ex_klass_node = new PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT ); - for( uint i = 1; i < ex_node->req(); i++ ) { - Node* p = basic_plus_adr( ex_node->in(i), ex_node->in(i), oopDesc::klass_offset_in_bytes() ); + if (ex_node->is_Phi()) { + ex_klass_node = new PhiNode(ex_node->in(0), TypeKlassPtr::OBJECT); + for (uint i = 1; i < ex_node->req(); i++) { + Node* ex_in = ex_node->in(i); + if (ex_in == top() || ex_in == NULL) { + // This path was not taken. + ex_klass_node->init_req(i, top()); + continue; + } + Node* p = basic_plus_adr(ex_in, ex_in, oopDesc::klass_offset_in_bytes()); Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); ex_klass_node->init_req( i, k ); } diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/src/share/vm/runtime/sweeper.cpp --- a/hotspot/src/share/vm/runtime/sweeper.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/src/share/vm/runtime/sweeper.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -540,17 +540,25 @@ // If there are no current activations of this method on the // stack we can safely convert it to a zombie method if (nm->can_not_entrant_be_converted()) { - if (PrintMethodFlushing && Verbose) { - tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm); - } // Clear ICStubs to prevent back patching stubs of zombie or unloaded // nmethods during the next safepoint (see ICStub::finalize). - MutexLocker cl(CompiledIC_lock); - nm->clear_ic_stubs(); - // Code cache state change is tracked in make_zombie() - nm->make_zombie(); - _zombified_count++; - SWEEP(nm); + { + MutexLocker cl(CompiledIC_lock); + nm->clear_ic_stubs(); + } + // Acquiring the CompiledIC_lock may block for a safepoint and set the + // nmethod to zombie (see 'CodeCache::make_marked_nmethods_zombies'). + // Check if nmethod is still non-entrant at this point. + if (nm->is_not_entrant()) { + if (PrintMethodFlushing && Verbose) { + tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm); + } + // Code cache state change is tracked in make_zombie() + nm->make_zombie(); + _zombified_count++; + SWEEP(nm); + } + assert(nm->is_zombie(), "nmethod must be zombie"); } else { // Still alive, clean up its inline caches MutexLocker cl(CompiledIC_lock); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/test/TEST.groups --- a/hotspot/test/TEST.groups Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/test/TEST.groups Fri Oct 10 18:00:14 2014 +0000 @@ -447,7 +447,7 @@ compiler/codegen/ \ compiler/cpuflags/RestoreMXCSR.java \ compiler/EscapeAnalysis/ \ - compiler/exceptions/TestRecursiveReplacedException.java \ + compiler/exceptions/ \ compiler/floatingpoint/ModNaN.java \ compiler/gcbarriers/G1CrashTest.java \ compiler/inlining/ \ diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java --- a/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java Thu Oct 09 16:41:28 2014 +0400 +++ b/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java Fri Oct 10 18:00:14 2014 +0000 @@ -38,22 +38,26 @@ private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled) throws Exception { OutputAnalyzer out = new OutputAnalyzer(pb.start()); + out.shouldHaveExitValue(0); if (enabled) { try { // Non-nmethod code heap should be always available with the segmented code cache out.shouldContain(NON_METHOD); } catch (RuntimeException e) { - // TieredCompilation is disabled in a client VM - out.shouldContain("TieredCompilation is disabled in this release."); + // Check if TieredCompilation is disabled (in a client VM) + if(!out.getOutput().contains("TieredCompilation is disabled in this release.")) { + // Code cache is not segmented + throw new RuntimeException("No code cache segmentation."); + } } } else { out.shouldNotContain(NON_METHOD); } - out.shouldHaveExitValue(0); } private static void verifyCodeHeapNotExists(ProcessBuilder pb, String... heapNames) throws Exception { OutputAnalyzer out = new OutputAnalyzer(pb.start()); + out.shouldHaveExitValue(0); for (String name : heapNames) { out.shouldNotContain(name); } @@ -86,6 +90,10 @@ "-XX:ReservedCodeCacheSize=240m", "-XX:+PrintCodeCache", "-version"); verifySegmentedCodeCache(pb, true); + pb = ProcessTools.createJavaProcessBuilder("-XX:+TieredCompilation", + "-XX:ReservedCodeCacheSize=400m", + "-XX:+PrintCodeCache", "-version"); + verifySegmentedCodeCache(pb, true); // Always enabled if SegmentedCodeCache is set pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", @@ -100,12 +108,13 @@ "-Xint", "-XX:+PrintCodeCache", "-version"); verifyCodeHeapNotExists(pb, PROFILED, NON_PROFILED); + + // If we stop compilation at CompLevel_none or CompLevel_simple we + // don't need a profiled code heap. pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:TieredStopAtLevel=0", "-XX:+PrintCodeCache", "-version"); - verifyCodeHeapNotExists(pb, PROFILED, NON_PROFILED); - - // If we stop compilation at CompLevel_simple + verifyCodeHeapNotExists(pb, PROFILED); pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:TieredStopAtLevel=1", "-XX:+PrintCodeCache", "-version"); diff -r 3d2543e475e4 -r cd50a16cf47e hotspot/test/compiler/exceptions/CatchInlineExceptions.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/compiler/exceptions/CatchInlineExceptions.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 8059299 + * @summary assert(adr_type != NULL) failed: expecting TypeKlassPtr + * @run main/othervm -Xbatch CatchInlineExceptions + */ + +class Exception1 extends Exception {}; +class Exception2 extends Exception {}; + +public class CatchInlineExceptions { + private static int counter0; + private static int counter1; + private static int counter2; + private static int counter; + + static void foo(int i) throws Exception { + if ((i & 1023) == 2) { + counter0++; + throw new Exception2(); + } + } + + static void test(int i) throws Exception { + try { + foo(i); + } + catch (Exception e) { + if (e instanceof Exception1) { + counter1++; + } else if (e instanceof Exception2) { + counter2++; + } + counter++; + throw e; + } + } + + public static void main(String[] args) throws Throwable { + for (int i = 0; i < 15000; i++) { + try { + test(i); + } catch (Exception e) { + // expected + } + } + if (counter1 != 0) { + throw new RuntimeException("Failed: counter1(" + counter1 + ") != 0"); + } + if (counter2 != counter) { + throw new RuntimeException("Failed: counter2(" + counter2 + ") != counter0(" + counter0 + ")"); + } + if (counter2 != counter) { + throw new RuntimeException("Failed: counter2(" + counter2 + ") != counter(" + counter + ")"); + } + System.out.println("TEST PASSED"); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e jaxp/.hgtags --- a/jaxp/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/jaxp/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -275,3 +275,5 @@ d181d4002214e4914d5525bd5ee13369311c765c jdk9-b30 292317ebc7dbaca6b3965f0bc7b38a2cee733b7a jdk9-b31 b940ca3d2c7e8a279ca850706b89c2ad3a841e82 jdk9-b32 +46b360454dadbb329d42c59bb8192daeb9d59875 jdk9-b33 +6b343b9b7a7008f5f699a2d99881163cab7a2986 jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e jaxws/.hgtags --- a/jaxws/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/jaxws/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -278,3 +278,5 @@ e58d3ea638c3824f01547596b2a98aa5f77c4a5c jdk9-b30 7af228ae847f3c02aaafb7b01cdbb3bdc2e89e77 jdk9-b31 838a2f693e51b869e7bc26a20afffdde1300394e jdk9-b32 +77a45995dd3b6e57805475ae3111ac6f7db7749e jdk9-b33 +28ea43d925f1e5250976097a2977dd3e66e11f0b jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e jdk/.hgtags --- a/jdk/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -275,3 +275,5 @@ 8d24fb4493f13d380a2adf62d444e1e5a4451f37 jdk9-b30 71e99dae28f9791287b88d46e16a266b564f22be jdk9-b31 8bdf7083b5bd02aa330ba622895e586dd3378d37 jdk9-b32 +60fe681c30bc3821545a2506d4d3c2e04073f67c jdk9-b33 +21568031434d7a9dbb0cc6516cc3183d349c2253 jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/CreateJars.gmk --- a/jdk/make/CreateJars.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/make/CreateJars.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -709,7 +709,18 @@ # $(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \ SRC := $(JDK_OUTPUTDIR), \ - INCLUDES := modules/java.base/javax/net \ + INCLUDES := \ + modules/java.base/javax/crypto \ + modules/java.base/javax/crypto/spec \ + modules/java.base/sun/security/internal/interfaces \ + modules/java.base/sun/security/internal/spec \ + modules/java.base/com/sun/crypto/provider \ + modules/jdk.crypto.ec/sun/security/ec \ + modules/jdk.crypto.mscapi/sun/security/mscapi \ + modules/jdk.crypto.pkcs11/sun/security/pkcs11 \ + modules/jdk.crypto.pkcs11/sun/security/pkcs11/wrapper \ + modules/jdk.crypto.ucrypto/com/oracle/security/ucrypto \ + modules/java.base/javax/net \ modules/java.base/javax/security/cert \ modules/java.base/com/sun/net/ssl \ modules/java.base/com/sun/security/cert \ diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/CreatePolicyJars.gmk --- a/jdk/make/CreatePolicyJars.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/make/CreatePolicyJars.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -41,52 +41,73 @@ US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \ $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar + ifndef OPENJDK + # + # In past releases, Oracle JDK has had a separately downloadable set of + # policy files which has been a nightmare for deployment. + # + # Now if we're closed and limited (default for Oracle JDK), create + # an "unlimited_policy" directory that contains the unlimited policy + # files. It will be up to the user/deployer to make an informed choice + # as to whether they are legally entitled to use the unlimited policy + # file in their environment. Users/deployers simply need to overwrite + # the files. Consult README.txt (below) for more info. + # + UNLIMITED_POLICY_DIR := $(JDK_OUTPUTDIR)/lib/security/unlimited_policy + endif + # # TODO fix so that SetupArchive does not write files into SRCS # then we don't need this extra copying # # NOTE: We currently do not place restrictions on our limited export # policy. This was not a typo. This means we are shipping the same file - # for both limimted and unlimited US_export_policy.jar. + # for both limited and unlimited US_export_policy.jar. Only the local + # policy file currently has restrictions. # - US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited + US_EXPORT_POLICY_JAR_SRC_DIR := \ + $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited US_EXPORT_POLICY_JAR_TMP := \ $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp $(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/% $(install-file) - US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy + US_EXPORT_POLICY_JAR_DEPS := \ + $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy - $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \ + $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, \ + $(US_EXPORT_POLICY_JAR_DEPS), \ SRCS := $(US_EXPORT_POLICY_JAR_TMP), \ SUFFIXES := .policy, \ JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \ EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ SKIP_METAINF := true)) - $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) - $(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@) - $(install-file) + $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): \ + $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) + $(ECHO) $(LOG_INFO) \ + Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@) + $(install-file) TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \ $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) endif -ifndef OPENJDK - ifeq ($(UNLIMITED_CRYPTO), true) - $(error No prebuilt unlimited crypto jars available) - endif - $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar - $(ECHO) $(LOG_INFO) Copying prebuilt $(@F) +ifeq ($(UNLIMITED_CRYPTO), true) + $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) $(install-file) else - ifeq ($(UNLIMITED_CRYPTO), true) - $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) + $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) $(install-file) - else - $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) - $(install-file) +endif + +ifndef OPENJDK + ifneq ($(UNLIMITED_CRYPTO), true) + $(UNLIMITED_POLICY_DIR)/US_export_policy.jar: \ + $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) + $(install-file) + TARGETS += $(UNLIMITED_POLICY_DIR)/US_export_policy.jar endif endif @@ -112,11 +133,13 @@ LOCAL_POLICY_JAR_UNLIMITED_TMP := \ $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp - $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/% - $(install-file) + $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: \ + $(JDK_TOPDIR)/make/data/cryptopolicy/limited/% + $(install-file) - $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/% - $(install-file) + $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: \ + $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/% + $(install-file) $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \ $(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \ @@ -135,28 +158,34 @@ EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ SKIP_METAINF := true)) - TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) + TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) \ + $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) ifndef OPENJDK - $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \ - $(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt + ifneq ($(UNLIMITED_CRYPTO), true) + $(UNLIMITED_POLICY_DIR)/README.txt: \ + $(JDK_TOPDIR)/make/closed/data/cryptopolicy/README.txt $(install-file) - TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt + TARGETS += $(UNLIMITED_POLICY_DIR)/README.txt + endif endif endif -ifndef OPENJDK - $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar - $(ECHO) $(LOG_INFO) Copying prebuilt $(@F) +ifeq ($(UNLIMITED_CRYPTO), true) + $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) + $(install-file) +else + $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(install-file) -else - ifeq ($(UNLIMITED_CRYPTO), true) - $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) - $(install-file) - else - $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) - $(install-file) +endif + +ifndef OPENJDK + ifneq ($(UNLIMITED_CRYPTO), true) + $(UNLIMITED_POLICY_DIR)/local_policy.jar: \ + $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) + $(install-file) + TARGETS += $(UNLIMITED_POLICY_DIR)/local_policy.jar endif endif diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/CreateSecurityJars.gmk --- a/jdk/make/CreateSecurityJars.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/make/CreateSecurityJars.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,13 @@ include MakeBase.gmk include JavaCompilation.gmk -# The jars created in this file are required for the exploded jdk image to function and -# cannot wait to be built in the images target. - ########################################################################################## # Create manifest for security jars # # Include these extra attributes for now, should probably take out. # MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf -JCE_MANIFEST := $(JDK_OUTPUTDIR)/lib/_the.security.manifest.mf +JCE_MANIFEST := $(JDK_OUTPUTDIR)/jce/unsigned/_the.security.manifest.mf $(JCE_MANIFEST): $(MAINMANIFEST) $(MKDIR) -p $(@D) @@ -48,18 +45,15 @@ $(MAINMANIFEST) >> $@.tmp $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp + $(ECHO) "Release-Version: $(RELEASE)" >> $@.tmp $(MV) $@.tmp $@ ########################################################################################## -# For security and crypto jars, always build the jar, but for closed, install the prebuilt -# signed version instead of the newly built jar. Unsigned jars are treated as intermediate -# targets and explicitly added to the TARGETS list. For open, signing is not needed. See -# SignJars.gmk for more information. +# For crypto jars, always build the jar. # -# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO -# variable is set to no if these jars can't be built to skip that step of the build. -# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no -# other way to get the jars than to build them. +# The source for the crypto jars is not available for all licensees. +# The BUILD_CRYPTO variable is set to no if these jars can't be built +# to skip that step of the build. SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar @@ -74,15 +68,8 @@ $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST) -ifndef OPENJDK - SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar - $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC) - @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) +$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED) $(install-file) -else - $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED) - $(install-file) -endif TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST) @@ -101,22 +88,16 @@ $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST) -ifndef OPENJDK - SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar - $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC) - @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) +$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED) $(install-file) -else - $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED) - $(install-file) -endif TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST) ########################################################################################## SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar -SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar +SUNJCE_PROVIDER_JAR_UNSIGNED := \ + $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar ifneq ($(BUILD_CRYPTO), no) $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \ @@ -132,15 +113,8 @@ TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED) endif -ifndef OPENJDK - SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar - $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC) - @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) +$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED) $(install-file) -else - $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED) - $(install-file) -endif TARGETS += $(SUNJCE_PROVIDER_JAR_DST) @@ -163,15 +137,8 @@ TARGETS += $(JCE_JAR_UNSIGNED) endif -ifndef OPENJDK - JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar - $(JCE_JAR_DST): $(JCE_JAR_SRC) - @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) +$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED) $(install-file) -else - $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED) - $(install-file) -endif TARGETS += $(JCE_JAR_DST) @@ -192,15 +159,8 @@ $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST) - ifndef OPENJDK - SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar - $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC) - @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) + $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED) $(install-file) - else - $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED) - $(install-file) - endif TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST) @@ -213,7 +173,6 @@ UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar - UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \ SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \ @@ -225,8 +184,7 @@ $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST) - $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC) - @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) + $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_UNSIGNED) $(install-file) TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST) diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/Images.gmk --- a/jdk/make/Images.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/make/Images.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -203,8 +203,6 @@ jconsole.jar \ sa-jdi.jar \ dt.jar \ - orb.idl \ - ir.idl \ ct.sym ifeq ($(OPENJDK_TARGET_OS), windows) diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/SignJars.gmk --- a/jdk/make/SignJars.gmk Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +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. 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. -# - -include $(SPEC) -include MakeBase.gmk - -# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle JDK -# builds respectively.) -# -# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE -# jar files do not require signing, but those for JDK do. If an unsigned -# jar file is installed into JDK, things will break when the crypto -# routines are called. -# -# All jars are created in CreateJars.gmk. This Makefile does the signing -# of the jars for JDK. -# -# For JDK, the binaries use pre-built/pre-signed binary files stored in -# the closed workspace that are not shipped in the OpenJDK workspaces. -# We still build the JDK files to verify the files compile, and in -# preparation for possible signing. Developers working on JCE in JDK -# must sign the JCE files before testing. The JCE signing key is kept -# separate from the JDK workspace to prevent its disclosure. -# -# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually -# be built, signed, and then the resulting jar files MUST BE CHECKED -# INTO THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT -# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be -# reflected in the shipped binaries. -# -# Please consult with Release Engineering, which is responsible for -# creating the final JCE builds suitable for checkin. -# - -# Default target -all: - -ifndef OPENJDK - -README-MAKEFILE_WARNING := \ - "\nPlease read jdk/make/SignJars.gmk for further build instructions.\n" - -# -# Location for JCE codesigning key. -# -SIGNING_KEY_DIR := /security/ws/JCE-signing/src -SIGNING_KEYSTORE := $(SIGNING_KEY_DIR)/KeyStore.jks -SIGNING_PASSPHRASE := $(SIGNING_KEY_DIR)/passphrase.txt -SIGNING_ALIAS := oracle_jce_rsa - -# -# Defines for signing the various jar files. -# -check-keystore: - @if [ ! -f $(SIGNING_KEYSTORE) -o ! -f $(SIGNING_PASSPHRASE) ]; then \ - $(PRINTF) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..."; \ - $(PRINTF) $(README-MAKEFILE_WARNING); \ - exit 2; \ - fi - -$(JDK_OUTPUTDIR)/jce/signed/%: $(JDK_OUTPUTDIR)/jce/unsigned/% - $(call install-file) - $(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \ - $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE) - @$(PRINTF) "\nJar codesigning finished.\n" - -JAR_LIST := \ - jce.jar \ - policy/limited/local_policy.jar \ - policy/limited/US_export_policy.jar \ - policy/unlimited/local_policy.jar \ - policy/unlimited/US_export_policy.jar \ - sunec.jar \ - sunjce_provider.jar \ - sunpkcs11.jar \ - sunmscapi.jar \ - ucrypto.jar \ - # - -UNSIGNED_JARS := $(wildcard $(addprefix $(JDK_OUTPUTDIR)/jce/unsigned/, $(JAR_LIST))) - -ifeq ($(UNSIGNED_JARS), ) - $(error No jars found in $(JDK_OUTPUTDIR)/jce/unsigned/) -endif - -SIGNED_JARS := $(patsubst $(JDK_OUTPUTDIR)/jce/unsigned/%,$(JDK_OUTPUTDIR)/jce/signed/%, \ - $(UNSIGNED_JARS)) - -$(SIGNED_JARS): check-keystore - -$(JDK_OUTPUTDIR)/jce/signed/policy/unlimited/README.txt: \ - $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt - $(install-file) - -all: $(SIGNED_JARS) $(JDK_OUTPUTDIR)/jce/signed/policy/unlimited/README.txt - @$(PRINTF) "\n*** The jar files built by the 'sign-jars' target are developer ***" - @$(PRINTF) "\n*** builds only and *MUST NOT* be checked into the closed workspace. ***" - @$(PRINTF) "\n*** ***" - @$(PRINTF) "\n*** Please consult with Release Engineering: they will generate ***" - @$(PRINTF) "\n*** the proper binaries for the closed workspace. ***" - @$(PRINTF) "\n" - @$(PRINTF) $(README-MAKEFILE_WARNING) - -endif # !OPENJDK diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/lib/Lib-java.management.gmk --- a/jdk/make/lib/Lib-java.management.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/make/lib/Lib-java.management.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -25,9 +25,12 @@ include LibCommon.gmk +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, jdk, lib/Lib-java.management.gmk)) + ################################################################################ -BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/java.management/share/native/libmanagement \ +BUILD_LIBMANAGEMENT_SRC += $(JDK_TOPDIR)/src/java.management/share/native/libmanagement \ $(JDK_TOPDIR)/src/java.management/$(OPENJDK_TARGET_OS_API_DIR)/native/libmanagement BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \ $(addprefix -I,$(BUILD_LIBMANAGEMENT_SRC)) \ @@ -56,6 +59,9 @@ endif endif +# Make it possible to override this variable +LIBMANAGEMENT_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers + $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \ LIBRARY := management, \ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ @@ -64,7 +70,7 @@ LANG := C, \ OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \ CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \ - MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \ + MAPFILE := $(LIBMANAGEMENT_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_solaris := -lkstat, \ diff -r 3d2543e475e4 -r cd50a16cf47e jdk/make/profile-includes.txt --- a/jdk/make/profile-includes.txt Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/make/profile-includes.txt Fri Oct 10 18:00:14 2014 +0000 @@ -79,6 +79,13 @@ security/trusted.libraries \ tzdb.dat +ifndef OPENJDK +PROFILE_1_JRE_LIB_FILES += \ + security/unlimited_policy/README.txt \ + security/unlimited_policy/US_export_policy.jar \ + security/unlimited_policy/local_policy.jar +endif + PROFILE_1_JRE_OTHER_FILES := \ COPYRIGHT \ LICENSE \ @@ -99,6 +106,11 @@ security/US_export_policy.jar \ security/local_policy.jar +ifndef OPENJDK +PROFILE_1_JRE_JAR_FILES += \ + security/unlimited_policy/US_export_policy.jar \ + security/unlimited_policy/local_policy.jar +endif PROFILE_2_JRE_BIN_FILES := \ rmid$(EXE_SUFFIX) \ diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/net/URI.java --- a/jdk/src/java.base/share/classes/java/net/URI.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/net/URI.java Fri Oct 10 18:00:14 2014 +0000 @@ -397,7 +397,7 @@ * in all cases, *
  *     new URI(u.getScheme(),
- *             u.getUserInfo(), u.getAuthority(),
+ *             u.getAuthority(),
  *             u.getPath(), u.getQuery(),
  *             u.getFragment())
  *     .equals(u)
diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template --- a/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template Fri Oct 10 18:00:14 2014 +0000 @@ -384,7 +384,7 @@ * and vice versa. The new buffer's capacity and limit will be * array.length, its position will be zero, and its mark will be * undefined. Its {@link #array backing array} will be the - * given array, and its {@link #arrayOffset array offset>} will + * given array, and its {@link #arrayOffset array offset} will * be zero.

* * @param array diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/nio/file/FileStore.java --- a/jdk/src/java.base/share/classes/java/nio/file/FileStore.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/nio/file/FileStore.java Fri Oct 10 18:00:14 2014 +0000 @@ -208,7 +208,7 @@ * @param attribute * the attribute to read - * @return the attribute value; {@code null} may be a valid valid for some + * @return the attribute value; {@code null} may be a valid for some * attributes * * @throws UnsupportedOperationException diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/nio/file/Files.java --- a/jdk/src/java.base/share/classes/java/nio/file/Files.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java Fri Oct 10 18:00:14 2014 +0000 @@ -1480,7 +1480,7 @@ *
  • It is transitive: for three {@code Paths} * {@code f}, {@code g}, and {@code h}, if {@code isSameFile(f,g)} returns * {@code true} and {@code isSameFile(g,h)} returns {@code true}, then - * {@code isSameFile(f,h)} will return return {@code true}. + * {@code isSameFile(f,h)} will return {@code true}. * * * @param path @@ -2818,7 +2818,7 @@ /** * Opens or creates a file for writing, returning a {@code BufferedWriter} * that may be used to write text to the file in an efficient manner. - * The {@code options} parameter specifies how the the file is created or + * The {@code options} parameter specifies how the file is created or * opened. If no options are present then this method works as if the {@link * StandardOpenOption#CREATE CREATE}, {@link * StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING}, and {@link @@ -3307,7 +3307,7 @@ * line.separator}. Characters are encoded into bytes using the specified * charset. * - *

    The {@code options} parameter specifies how the the file is created + *

    The {@code options} parameter specifies how the file is created * or opened. If no options are present then this method works as if the * {@link StandardOpenOption#CREATE CREATE}, {@link * StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING}, and {@link diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java --- a/jdk/src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java Fri Oct 10 18:00:14 2014 +0000 @@ -115,7 +115,7 @@ * channel. * * @param path - * the path of the file to open open or create + * the path of the file to open or create * @param options * options specifying how the file is opened * @param attrs diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/nio/file/TempFileHelper.java --- a/jdk/src/java.base/share/classes/java/nio/file/TempFileHelper.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/nio/file/TempFileHelper.java Fri Oct 10 18:00:14 2014 +0000 @@ -74,7 +74,7 @@ } /** - * Creates a file or directory in in the given given directory (or in the + * Creates a file or directory in the given directory (or in the * temporary directory if dir is {@code null}). */ private static Path create(Path dir, @@ -149,7 +149,7 @@ } /** - * Creates a temporary file in the given directory, or in in the + * Creates a temporary file in the given directory, or in the * temporary directory if dir is {@code null}. */ static Path createTempFile(Path dir, @@ -162,7 +162,7 @@ } /** - * Creates a temporary directory in the given directory, or in in the + * Creates a temporary directory in the given directory, or in the * temporary directory if dir is {@code null}. */ static Path createTempDirectory(Path dir, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java Fri Oct 10 18:00:14 2014 +0000 @@ -51,7 +51,7 @@ *

    An attribute view provides a read-only or updatable view of the non-opaque * values, or metadata, associated with objects in a file system. * The {@link java.nio.file.attribute.FileAttributeView} interface is - * extended by several other interfaces that that views to specific sets of file + * extended by several other interfaces that views to specific sets of file * attributes. {@code FileAttributeViews} are selected by invoking the {@link * java.nio.file.Files#getFileAttributeView} method with a * type-token to identify the required view. Views can also be identified diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/Key.java --- a/jdk/src/java.base/share/classes/java/security/Key.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/Key.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ * * * For more information, see - * RFC 3280: + * RFC 5280: * Internet X.509 Public Key Infrastructure Certificate and CRL Profile. * *

  • A Format diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/CRLReason.java --- a/jdk/src/java.base/share/classes/java/security/cert/CRLReason.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/CRLReason.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** * The CRLReason enumeration specifies the reason that a certificate - * is revoked, as defined in - * RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL + * is revoked, as defined in + * RFC 5280: Internet X.509 Public Key Infrastructure Certificate and CRL * Profile. * * @author Sean Mullan diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/PKIXReason.java --- a/jdk/src/java.base/share/classes/java/security/cert/PKIXReason.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/PKIXReason.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ /** * The {@code PKIXReason} enumerates the potential PKIX-specific reasons * that an X.509 certification path may be invalid according to the PKIX - * (RFC 3280) standard. These reasons are in addition to those of the + * (RFC 5280) standard. These reasons are in addition to those of the * {@code CertPathValidatorException.BasicReason} enumeration. * * @since 1.7 diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/TrustAnchor.java --- a/jdk/src/java.base/share/classes/java/security/cert/TrustAnchor.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/TrustAnchor.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,7 +78,7 @@ * The name constraints are specified as a byte array. This byte array * should contain the DER encoded form of the name constraints, as they * would appear in the NameConstraints structure defined in - * RFC 3280 + * RFC 5280 * and X.509. The ASN.1 definition of this structure appears below. * *
    {@code
    @@ -140,7 +140,7 @@
          * 

    * The name constraints are specified as a byte array. This byte array * contains the DER encoded form of the name constraints, as they - * would appear in the NameConstraints structure defined in RFC 3280 + * would appear in the NameConstraints structure defined in RFC 5280 * and X.509. The ASN.1 notation for this structure is supplied in the * documentation for * {@link #TrustAnchor(X509Certificate, byte[]) @@ -179,7 +179,7 @@ *

    * The name constraints are specified as a byte array. This byte array * contains the DER encoded form of the name constraints, as they - * would appear in the NameConstraints structure defined in RFC 3280 + * would appear in the NameConstraints structure defined in RFC 5280 * and X.509. The ASN.1 notation for this structure is supplied in the * documentation for * {@link #TrustAnchor(X509Certificate, byte[]) @@ -294,7 +294,7 @@ *

    * The name constraints are returned as a byte array. This byte array * contains the DER encoded form of the name constraints, as they - * would appear in the NameConstraints structure defined in RFC 3280 + * would appear in the NameConstraints structure defined in RFC 5280 * and X.509. The ASN.1 notation for this structure is supplied in the * documentation for * {@link #TrustAnchor(X509Certificate, byte[]) diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/X509CRL.java --- a/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,7 +69,7 @@ *

    *

    * More information can be found in - * RFC 3280: Internet X.509 + * RFC 5280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. *

    * The ASN.1 definition of {@code tbsCertList} is: diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java --- a/jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,7 @@ * {@link CertStore#getCRLs CertStore.getCRLs} or some similar * method. *

    - * Please refer to RFC 3280: + * Please refer to RFC 5280: * Internet X.509 Public Key Infrastructure Certificate and CRL Profile * for definitions of the X.509 CRL fields and extensions mentioned below. *

    diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java --- a/jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ * number. Other unique combinations include the issuer, subject, * subjectKeyIdentifier and/or the subjectPublicKey criteria. *

    - * Please refer to RFC 3280: + * Please refer to RFC 5280: * Internet X.509 Public Key Infrastructure Certificate and CRL Profile for * definitions of the X.509 certificate extensions mentioned below. *

    @@ -728,7 +728,7 @@ * The name is provided in string format. * RFC 822, DNS, and URI * names use the well-established string formats for those types (subject to - * the restrictions included in RFC 3280). IPv4 address names are + * the restrictions included in RFC 5280). IPv4 address names are * supplied using dotted quad notation. OID address names are represented * as a series of nonnegative integers separated by periods. And * directory names (distinguished names) are supplied in RFC 2253 format. @@ -746,7 +746,7 @@ * String form of some distinguished names. * * @param type the name type (0-8, as specified in - * RFC 3280, section 4.2.1.7) + * RFC 5280, section 4.2.1.6) * @param name the name in string form (not {@code null}) * @throws IOException if a parsing error occurs */ @@ -770,7 +770,7 @@ *

    * The name is provided as a byte array. This byte array should contain * the DER encoded name, as it would appear in the GeneralName structure - * defined in RFC 3280 and X.509. The encoded byte array should only contain + * defined in RFC 5280 and X.509. The encoded byte array should only contain * the encoded value of the name, and should not include the tag associated * with the name in the GeneralName structure. The ASN.1 definition of this * structure appears below. @@ -806,7 +806,7 @@ * must contain the specified subjectAlternativeName. * * @param type the name type (0-8, as specified in - * RFC 3280, section 4.2.1.7) + * RFC 5280, section 4.2.1.6) * @param name the name in string or byte array form * @throws IOException if a parsing error occurs */ @@ -995,7 +995,7 @@ *

    * The name constraints are specified as a byte array. This byte array * should contain the DER encoded form of the name constraints, as they - * would appear in the NameConstraints structure defined in RFC 3280 + * would appear in the NameConstraints structure defined in RFC 5280 * and X.509. The ASN.1 definition of this structure appears below. * *

    {@code
    @@ -1197,7 +1197,7 @@
          * 

    * The name is provided in string format. RFC 822, DNS, and URI names * use the well-established string formats for those types (subject to - * the restrictions included in RFC 3280). IPv4 address names are + * the restrictions included in RFC 5280). IPv4 address names are * supplied using dotted quad notation. OID address names are represented * as a series of nonnegative integers separated by periods. And * directory names (distinguished names) are supplied in RFC 2253 format. @@ -1214,7 +1214,7 @@ * String form of some distinguished names. * * @param type the name type (0-8, as specified in - * RFC 3280, section 4.2.1.7) + * RFC 5280, section 4.2.1.6) * @param name the name in string form * @throws IOException if a parsing error occurs */ @@ -1234,7 +1234,7 @@ *

    * The name is provided as a byte array. This byte array should contain * the DER encoded name, as it would appear in the GeneralName structure - * defined in RFC 3280 and X.509. The ASN.1 definition of this structure + * defined in RFC 5280 and X.509. The ASN.1 definition of this structure * appears in the documentation for * {@link #addSubjectAlternativeName(int type, byte [] name) * addSubjectAlternativeName(int type, byte [] name)}. @@ -1243,7 +1243,7 @@ * subsequent modifications. * * @param type the name type (0-8, as specified in - * RFC 3280, section 4.2.1.7) + * RFC 5280, section 4.2.1.6) * @param name a byte array containing the name in ASN.1 DER encoded form * @throws IOException if a parsing error occurs */ @@ -1258,7 +1258,7 @@ * the specified pathToName. * * @param type the name type (0-8, as specified in - * RFC 3280, section 4.2.1.7) + * RFC 5280, section 4.2.1.6) * @param name the name in string or byte array form * @throws IOException if an encoding error occurs (incorrect form for DN) */ @@ -1715,7 +1715,7 @@ *

    * The name constraints are returned as a byte array. This byte array * contains the DER encoded form of the name constraints, as they - * would appear in the NameConstraints structure defined in RFC 3280 + * would appear in the NameConstraints structure defined in RFC 5280 * and X.509. The ASN.1 notation for this structure is supplied in the * documentation for * {@link #setNameConstraints(byte [] bytes) setNameConstraints(byte [] bytes)}. diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java --- a/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ * CA such as a "root" CA. *

    * More information can be found in - * RFC 3280: Internet X.509 + * RFC 5280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. *

    * The ASN.1 definition of {@code tbsCertificate} is: @@ -408,7 +408,7 @@ * Gets the {@code issuerUniqueID} value from the certificate. * The issuer unique identifier is present in the certificate * to handle the possibility of reuse of issuer names over time. - * RFC 3280 recommends that names not be reused and that + * RFC 5280 recommends that names not be reused and that * conforming certificates not make use of unique identifiers. * Applications conforming to that profile should be capable of * parsing unique identifiers and making comparisons. @@ -459,7 +459,7 @@ * encipherOnly (7), * decipherOnly (8) } *

    - * RFC 3280 recommends that when used, this be marked + * RFC 5280 recommends that when used, this be marked * as a critical extension. * * @return the KeyUsage extension of this certificate, represented as @@ -572,7 +572,7 @@ * RFC 822, DNS, and URI * names are returned as {@code String}s, * using the well-established string formats for those types (subject to - * the restrictions included in RFC 3280). IPv4 address names are + * the restrictions included in RFC 5280). IPv4 address names are * returned using dotted quad notation. IPv6 address names are returned * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values * representing the eight 16-bit pieces of the address. OID names are diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/java/util/jar/Pack200.java --- a/jdk/src/java.base/share/classes/java/util/jar/Pack200.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/java/util/jar/Pack200.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -93,8 +93,7 @@ * The deployment applications can use "Accept-Encoding=pack200-gzip". This * indicates to the server that the client application desires a version of * the file encoded with Pack200 and further compressed with gzip. Please - * refer to Java Deployment Guide for more details and - * techniques. + * refer to the Java Deployment Guide for techniques and details. *

    * Unless otherwise noted, passing a null argument to a constructor or * method in this class will cause a {@link NullPointerException} to be thrown. diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/crypto/Cipher.java --- a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java Fri Oct 10 18:00:14 2014 +0000 @@ -263,9 +263,9 @@ Provider provider, String transformation) { // See bug 4341369 & 4334690 for more info. - // If the caller is trusted, then okey. + // If the caller is trusted, then okay. // Otherwise throw a NullPointerException. - if (!JceSecurityManager.INSTANCE.isCallerTrusted()) { + if (!JceSecurityManager.INSTANCE.isCallerTrusted(provider)) { throw new NullPointerException(); } this.spi = cipherSpi; diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/crypto/JarVerifier.java --- a/jdk/src/java.base/share/classes/javax/crypto/JarVerifier.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2007, 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. 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 javax.crypto; - -import java.io.*; -import java.net.*; -import java.security.*; -import java.util.jar.*; - -/** - * This class verifies JAR files (and any supporting JAR files), and - * determines whether they may be used in this implementation. - * - * The JCE in OpenJDK has an open cryptographic interface, meaning it - * does not restrict which providers can be used. Compliance with - * United States export controls and with local law governing the - * import/export of products incorporating the JCE in the OpenJDK is - * the responsibility of the licensee. - * - * @since 1.7 - */ -final class JarVerifier { - - // The URL for the JAR file we want to verify. - private URL jarURL; - private boolean savePerms; - private CryptoPermissions appPerms = null; - - /** - * Creates a JarVerifier object to verify the given URL. - * - * @param jarURL the JAR file to be verified. - * @param savePerms if true, save the permissions allowed by the - * exemption mechanism - */ - JarVerifier(URL jarURL, boolean savePerms) { - this.jarURL = jarURL; - this.savePerms = savePerms; - } - - /** - * Verify the JAR file is signed by an entity which has a certificate - * issued by a trusted CA. - * - * In OpenJDK, we just need to examine the "cryptoperms" file to see - * if any permissions were bundled together with this jar file. - */ - void verify() throws JarException, IOException { - - // Short-circuit. If we weren't asked to save any, we're done. - if (!savePerms) { - return; - } - - // If the protocol of jarURL isn't "jar", we should - // construct a JAR URL so we can open a JarURLConnection - // for verifying this provider. - final URL url = jarURL.getProtocol().equalsIgnoreCase("jar")? - jarURL : new URL("jar:" + jarURL.toString() + "!/"); - - JarFile jf = null; - try { - - // Get a link to the Jarfile to search. - try { - jf = AccessController.doPrivileged( - new PrivilegedExceptionAction() { - public JarFile run() throws Exception { - JarURLConnection conn = - (JarURLConnection) url.openConnection(); - // You could do some caching here as - // an optimization. - conn.setUseCaches(false); - return conn.getJarFile(); - } - }); - } catch (java.security.PrivilegedActionException pae) { - throw new SecurityException("Cannot load " + url.toString(), pae); - } - - if (jf != null) { - JarEntry je = jf.getJarEntry("cryptoPerms"); - if (je == null) { - throw new JarException( - "Can not find cryptoPerms"); - } - try { - appPerms = new CryptoPermissions(); - appPerms.load(jf.getInputStream(je)); - } catch (Exception ex) { - JarException jex = - new JarException("Cannot load/parse" + - jarURL.toString()); - jex.initCause(ex); - throw jex; - } - } - } finally { - // Only call close() when caching is not enabled. - // Otherwise, exceptions will be thrown for all - // subsequent accesses of this cached jar. - if (jf != null) { - jf.close(); - } - } - } - - /** - * Verify that the provided certs include the - * framework signing certificate. - * - * @param certs the list of certs to be checked. - * @throws Exception if the list of certs did not contain - * the framework signing certificate - */ - static void verifyPolicySigned(java.security.cert.Certificate[] certs) - throws Exception { - } - - /** - * Returns the permissions which are bundled with the JAR file, - * aka the "cryptoperms" file. - * - * NOTE: if this JarVerifier instance is constructed with "savePerms" - * equal to false, then this method would always return null. - */ - CryptoPermissions getPermissions() { - return appPerms; - } -} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java --- a/jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java Fri Oct 10 18:00:14 2014 +0000 @@ -76,12 +76,14 @@ static { try { AccessController.doPrivileged( - new PrivilegedExceptionAction() { - public Object run() throws Exception { + new PrivilegedExceptionAction () { + @Override + public Void run() throws Exception { setupJurisdictionPolicies(); return null; } - }); + } + ); isRestricted = defaultPolicy.implies( CryptoAllPermission.INSTANCE) ? false : true; @@ -143,9 +145,9 @@ * @throws Exception on error */ static CryptoPermissions verifyExemptJar(URL codeBase) throws Exception { - JarVerifier jv = new JarVerifier(codeBase, true); - jv.verify(); - return jv.getPermissions(); + ProviderVerifier pv = new ProviderVerifier(codeBase, true); + pv.verify(); + return pv.getPermissions(); } /** @@ -153,11 +155,11 @@ * * @throws Exception on error */ - static void verifyProviderJar(URL codeBase) throws Exception { + static void verifyProvider(URL codeBase, Provider p) throws Exception { // Verify the provider JAR file and all // supporting JAR files if there are any. - JarVerifier jv = new JarVerifier(codeBase, false); - jv.verify(); + ProviderVerifier pv = new ProviderVerifier(codeBase, p, false); + pv.verify(); } private final static Object PROVIDER_VERIFIED = Boolean.TRUE; @@ -183,7 +185,7 @@ try { verifyingProviders.put(p, Boolean.FALSE); URL providerURL = getCodeBase(p.getClass()); - verifyProviderJar(providerURL); + verifyProvider(providerURL, p); // Verified ok, cache result verificationResults.put(p, PROVIDER_VERIFIED); return null; @@ -222,18 +224,20 @@ synchronized (codeBaseCacheRef) { URL url = codeBaseCacheRef.get(clazz); if (url == null) { - url = AccessController.doPrivileged(new PrivilegedAction() { - public URL run() { - ProtectionDomain pd = clazz.getProtectionDomain(); - if (pd != null) { - CodeSource cs = pd.getCodeSource(); - if (cs != null) { - return cs.getLocation(); + url = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public URL run() { + ProtectionDomain pd = clazz.getProtectionDomain(); + if (pd != null) { + CodeSource cs = pd.getCodeSource(); + if (cs != null) { + return cs.getLocation(); + } } + return NULL_URL; } - return NULL_URL; - } - }); + }); codeBaseCacheRef.put(clazz, url); } return (url == NULL_URL) ? null : url; @@ -315,7 +319,7 @@ // Enforce the signer restraint, i.e. signer of JCE framework // jar should also be the signer of the two jurisdiction policy // jar files. - JarVerifier.verifyPolicySigned(je.getCertificates()); + ProviderVerifier.verifyPolicySigned(je.getCertificates()); } // Close and nullify the JarFile reference to help GC. jf.close(); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java --- a/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -228,7 +228,7 @@ } // See bug 4341369 & 4334690 for more info. - boolean isCallerTrusted() { + boolean isCallerTrusted(Provider provider) { // Get the caller and its codebase. Class[] context = getClassContext(); URL callerCodeBase = null; @@ -249,7 +249,7 @@ } // Check whether the caller is a trusted provider. try { - JceSecurity.verifyProviderJar(callerCodeBase); + JceSecurity.verifyProvider(callerCodeBase, provider); } catch (Exception e2) { return false; } diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java --- a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java Fri Oct 10 18:00:14 2014 +0000 @@ -320,7 +320,7 @@ /** * Update the active spi of this class and return the next - * implementation for failover. If no more implemenations are + * implementation for failover. If no more implementations are * available, this method returns null. However, the active spi of * this class is never set to null. */ diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/crypto/ProviderVerifier.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/java.base/share/classes/javax/crypto/ProviderVerifier.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.crypto; + +import java.io.*; +import java.net.*; +import java.security.*; +import java.util.jar.*; + +/** + * This class verifies Provider/Policy resources found at a URL + * (currently only JAR files and any supporting JAR files), and + * determines whether they may be used in this implementation. + * + * The JCE in OpenJDK has an open cryptographic interface, meaning it + * does not restrict which providers can be used. Compliance with + * United States export controls and with local law governing the + * import/export of products incorporating the JCE in the OpenJDK is + * the responsibility of the licensee. + * + * @since 1.7 + */ +final class ProviderVerifier { + + // The URL for the JAR file we want to verify. + private URL jarURL; + private Provider provider; + private boolean savePerms; + private CryptoPermissions appPerms = null; + + /** + * Creates a ProviderVerifier object to verify the given URL. + * + * @param jarURL the JAR file to be verified. + * @param savePerms if true, save the permissions allowed by the + * exemption mechanism + */ + ProviderVerifier(URL jarURL, boolean savePerms) { + this(jarURL, null, savePerms); + } + + /** + * Creates a ProviderVerifier object to verify the given URL. + * + * @param jarURL the JAR file to be verified + * @param provider the corresponding provider. + * @param savePerms if true, save the permissions allowed by the + * exemption mechanism + */ + ProviderVerifier(URL jarURL, Provider provider, boolean savePerms) { + this.jarURL = jarURL; + this.provider = provider; + this.savePerms = savePerms; + } + + /** + * Verify the JAR file is signed by an entity which has a certificate + * issued by a trusted CA. + * + * In OpenJDK, we just need to examine the "cryptoperms" file to see + * if any permissions were bundled together with this jar file. + */ + void verify() throws IOException { + + // Short-circuit. If we weren't asked to save any, we're done. + if (!savePerms) { + return; + } + + // If the protocol of jarURL isn't "jar", we should + // construct a JAR URL so we can open a JarURLConnection + // for verifying this provider. + final URL url = jarURL.getProtocol().equalsIgnoreCase("jar")? + jarURL : new URL("jar:" + jarURL.toString() + "!/"); + + JarFile jf = null; + try { + + // Get a link to the Jarfile to search. + try { + jf = AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public JarFile run() throws Exception { + JarURLConnection conn = + (JarURLConnection) url.openConnection(); + // You could do some caching here as + // an optimization. + conn.setUseCaches(false); + return conn.getJarFile(); + } + }); + } catch (java.security.PrivilegedActionException pae) { + throw new SecurityException("Cannot load " + url.toString(), + pae.getCause()); + } + + if (jf != null) { + JarEntry je = jf.getJarEntry("cryptoPerms"); + if (je == null) { + throw new JarException( + "Can not find cryptoPerms"); + } + try { + appPerms = new CryptoPermissions(); + appPerms.load(jf.getInputStream(je)); + } catch (Exception ex) { + JarException jex = + new JarException("Cannot load/parse" + + jarURL.toString()); + jex.initCause(ex); + throw jex; + } + } + } finally { + // Only call close() when caching is not enabled. + // Otherwise, exceptions will be thrown for all + // subsequent accesses of this cached jar. + if (jf != null) { + jf.close(); + } + } + } + + /** + * Verify that the provided certs include the + * framework signing certificate. + * + * @param certs the list of certs to be checked. + * @throws Exception if the list of certs did not contain + * the framework signing certificate + */ + static void verifyPolicySigned(java.security.cert.Certificate[] certs) + throws Exception { + } + + /** + * Returns the permissions which are bundled with the JAR file, + * aka the "cryptoperms" file. + * + * NOTE: if this ProviderVerifier instance is constructed with "savePerms" + * equal to false, then this method would always return null. + */ + CryptoPermissions getPermissions() { + return appPerms; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java --- a/jdk/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,13 +41,13 @@ * of the distinguished name, or by using the ASN.1 DER encoded byte * representation of the distinguished name. The current specification * for the string representation of a distinguished name is defined in - * RFC 2253: Lightweight + * RFC 2253: Lightweight * Directory Access Protocol (v3): UTF-8 String Representation of * Distinguished Names. This class, however, accepts string formats from - * both RFC 2253 and RFC 1779: + * both RFC 2253 and RFC 1779: * A String Representation of Distinguished Names, and also recognizes * attribute type keywords whose OIDs (Object Identifiers) are defined in - * RFC 3280: Internet X.509 + * RFC 5280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. * *

    The string representation for this {@code X500Principal} @@ -108,7 +108,7 @@ * (and listed in {@link #getName(String format) getName(String format)}), * as well as the T, DNQ or DNQUALIFIER, SURNAME, GIVENNAME, INITIALS, * GENERATION, EMAILADDRESS, and SERIALNUMBER keywords whose Object - * Identifiers (OIDs) are defined in RFC 3280 and its successor. + * Identifiers (OIDs) are defined in RFC 5280. * Any other attribute type must be specified as an OID. * *

    This implementation enforces a more restrictive OID syntax than @@ -456,7 +456,7 @@ * (obtained via the {@code getName(X500Principal.CANONICAL)} method) * of this object and o are equal. * - *

    This implementation is compliant with the requirements of RFC 3280. + *

    This implementation is compliant with the requirements of RFC 5280. * * @param o Object to be compared for equality with this * {@code X500Principal} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/javax/security/auth/x500/package-info.java --- a/jdk/src/java.base/share/classes/javax/security/auth/x500/package-info.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/javax/security/auth/x500/package-info.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,15 +31,15 @@ *

    Package Specification

    * * diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/provider/SunEntries.java --- a/jdk/src/java.base/share/classes/sun/security/provider/SunEntries.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/provider/SunEntries.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,7 +64,7 @@ * and CRLs. Aliases for X.509 are X509. * * - PKIX is the certification path validation algorithm described - * in RFC 3280. The ValidationAlgorithm attribute notes the + * in RFC 5280. The ValidationAlgorithm attribute notes the * specification that this provider implements. * * - LDAP is the CertStore type for LDAP repositories. The @@ -250,7 +250,7 @@ map.put("CertPathBuilder.PKIX", "sun.security.provider.certpath.SunCertPathBuilder"); map.put("CertPathBuilder.PKIX ValidationAlgorithm", - "RFC3280"); + "RFC5280"); /* * CertPathValidator @@ -258,7 +258,7 @@ map.put("CertPathValidator.PKIX", "sun.security.provider.certpath.PKIXCertPathValidator"); map.put("CertPathValidator.PKIX ValidationAlgorithm", - "RFC3280"); + "RFC5280"); /* * CertStores diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java Fri Oct 10 18:00:14 2014 +0000 @@ -434,7 +434,7 @@ } if (indirectCRL) { if (pointCrlIssuers.size() != 1) { - // RFC 3280: there must be only 1 CRL issuer + // RFC 5280: there must be only 1 CRL issuer // name when relativeName is present if (debug != null) { debug.println("must only be one CRL " + diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/provider/certpath/PolicyChecker.java --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PolicyChecker.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PolicyChecker.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -578,7 +578,7 @@ } /** - * Rewrite leaf nodes at the end of validation as described in RFC 3280 + * Rewrite leaf nodes at the end of validation as described in RFC 5280 * section 6.1.5: Step (g)(iii). Leaf nodes with anyPolicy are replaced * by nodes explicitly representing initial policies not already * represented by leaf nodes. diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/provider/certpath/PolicyNodeImpl.java --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PolicyNodeImpl.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PolicyNodeImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,7 @@ private PolicyNodeImpl mParent; private HashSet mChildren; - // the 4 fields specified by RFC 3280 + // the 4 fields specified by RFC 5280 private String mValidPolicy; private HashSet mQualifierSet; private boolean mCriticalityIndicator; diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java Fri Oct 10 18:00:14 2014 +0000 @@ -472,9 +472,9 @@ " ---checking revocation status ..."); } - // reject circular dependencies - RFC 3280 is not explicit on how - // to handle this, so we feel it is safest to reject them until - // the issue is resolved in the PKIX WG. + // Reject circular dependencies - RFC 5280 is not explicit on how + // to handle this, but does suggest that they can be a security + // risk and can create unresolvable dependencies if (stackedCerts != null && stackedCerts.contains(cert)) { if (debug != null) { debug.println("RevocationChecker.checkCRLs()" + @@ -628,7 +628,7 @@ /* * Abort CRL validation and throw exception if there are any * unrecognized critical CRL entry extensions (see section - * 5.3 of RFC 3280). + * 5.3 of RFC 5280). */ Set unresCritExts = entry.getCriticalExtensionOIDs(); if (unresCritExts != null && !unresCritExts.isEmpty()) { @@ -880,9 +880,9 @@ " ---checking " + msg + "..."); } - // reject circular dependencies - RFC 3280 is not explicit on how - // to handle this, so we feel it is safest to reject them until - // the issue is resolved in the PKIX WG. + // Reject circular dependencies - RFC 5280 is not explicit on how + // to handle this, but does suggest that they can be a security + // risk and can create unresolvable dependencies if ((stackedCerts != null) && stackedCerts.contains(cert)) { if (debug != null) { debug.println( diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ *

    If successful, it returns a certification path which has successfully * satisfied all the constraints and requirements specified in the * PKIXBuilderParameters object and has been validated according to the PKIX - * path validation algorithm defined in RFC 3280. + * path validation algorithm defined in RFC 5280. * *

    This implementation uses a depth-first search approach to finding * certification paths. If it comes to a point in which it cannot find diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java Fri Oct 10 18:00:14 2014 +0000 @@ -337,7 +337,7 @@ {"New.prompt.", "New {0}: "}, {"Passwords.must.differ", "Passwords must differ"}, {"Re.enter.new.prompt.", "Re-enter new {0}: "}, - {"Re.enter.passpword.", "Re-enter password: "}, + {"Re.enter.password.", "Re-enter password: "}, {"Re.enter.new.password.", "Re-enter new password: "}, {"They.don.t.match.Try.again", "They don't match. Try again"}, {"Enter.prompt.alias.name.", "Enter {0} alias name: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "Neues {0}: "}, {"Passwords.must.differ", "Kennw\u00F6rter m\u00FCssen sich unterscheiden"}, {"Re.enter.new.prompt.", "Neues {0} erneut eingeben: "}, - {"Re.enter.passpword.", "Geben Sie das Kennwort erneut ein: "}, + {"Re.enter.password.", "Geben Sie das Kennwort erneut ein: "}, {"Re.enter.new.password.", "Neues Kennwort erneut eingeben: "}, {"They.don.t.match.Try.again", "Keine \u00DCbereinstimmung. Wiederholen Sie den Vorgang"}, {"Enter.prompt.alias.name.", "{0}-Aliasnamen eingeben: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "Nuevo {0}: "}, {"Passwords.must.differ", "Las contrase\u00F1as deben ser distintas"}, {"Re.enter.new.prompt.", "Vuelva a escribir el nuevo {0}: "}, - {"Re.enter.passpword.", "Vuelva a introducir la contrase\u00F1a: "}, + {"Re.enter.password.", "Vuelva a introducir la contrase\u00F1a: "}, {"Re.enter.new.password.", "Volver a escribir la contrase\u00F1a nueva: "}, {"They.don.t.match.Try.again", "No coinciden. Int\u00E9ntelo de nuevo"}, {"Enter.prompt.alias.name.", "Escriba el nombre de alias de {0}: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "Nouveau {0} : "}, {"Passwords.must.differ", "Les mots de passe doivent diff\u00E9rer"}, {"Re.enter.new.prompt.", "Indiquez encore le nouveau {0} : "}, - {"Re.enter.passpword.", "R\u00E9p\u00E9tez le mot de passe : "}, + {"Re.enter.password.", "R\u00E9p\u00E9tez le mot de passe : "}, {"Re.enter.new.password.", "Ressaisissez le nouveau mot de passe : "}, {"They.don.t.match.Try.again", "Ils sont diff\u00E9rents. R\u00E9essayez."}, {"Enter.prompt.alias.name.", "Indiquez le nom d''alias {0} : "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "Nuova {0}: "}, {"Passwords.must.differ", "Le password non devono coincidere"}, {"Re.enter.new.prompt.", "Reimmettere un nuovo valore per {0}: "}, - {"Re.enter.passpword.", "Reimmettere la password: "}, + {"Re.enter.password.", "Reimmettere la password: "}, {"Re.enter.new.password.", "Immettere nuovamente la nuova password: "}, {"They.don.t.match.Try.again", "Non corrispondono. Riprovare."}, {"Enter.prompt.alias.name.", "Immettere nome alias {0}: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "\u65B0\u898F{0}: "}, {"Passwords.must.differ", "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F\u7570\u306A\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"}, {"Re.enter.new.prompt.", "\u65B0\u898F{0}\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, - {"Re.enter.passpword.", "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, + {"Re.enter.password.", "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {"Re.enter.new.password.", "\u65B0\u898F\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {"They.don.t.match.Try.again", "\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"}, {"Enter.prompt.alias.name.", "{0}\u306E\u5225\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "\uC0C8 {0}: "}, {"Passwords.must.differ", "\uBE44\uBC00\uBC88\uD638\uB294 \uB2EC\uB77C\uC57C \uD569\uB2C8\uB2E4."}, {"Re.enter.new.prompt.", "\uC0C8 {0} \uB2E4\uC2DC \uC785\uB825: "}, - {"Re.enter.passpword.", "\uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "}, + {"Re.enter.password.", "\uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "}, {"Re.enter.new.password.", "\uC0C8 \uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "}, {"They.don.t.match.Try.again", "\uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC2ED\uC2DC\uC624."}, {"Enter.prompt.alias.name.", "{0} \uBCC4\uCE6D \uC774\uB984 \uC785\uB825: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "Nova {0}: "}, {"Passwords.must.differ", "As senhas devem ser diferentes"}, {"Re.enter.new.prompt.", "Informe novamente a nova {0}: "}, - {"Re.enter.passpword.", "Redigite a senha: "}, + {"Re.enter.password.", "Redigite a senha: "}, {"Re.enter.new.password.", "Informe novamente a nova senha: "}, {"They.don.t.match.Try.again", "Elas n\u00E3o correspondem. Tente novamente"}, {"Enter.prompt.alias.name.", "Informe o nome do alias {0}: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "Nytt {0}: "}, {"Passwords.must.differ", "L\u00F6senorden m\u00E5ste vara olika"}, {"Re.enter.new.prompt.", "Ange nytt {0} igen: "}, - {"Re.enter.passpword.", "Ange l\u00F6senord igen: "}, + {"Re.enter.password.", "Ange l\u00F6senord igen: "}, {"Re.enter.new.password.", "Ange det nya l\u00F6senordet igen: "}, {"They.don.t.match.Try.again", "De matchar inte. F\u00F6rs\u00F6k igen"}, {"Enter.prompt.alias.name.", "Ange aliasnamn f\u00F6r {0}: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "\u65B0{0}: "}, {"Passwords.must.differ", "\u53E3\u4EE4\u4E0D\u80FD\u76F8\u540C"}, {"Re.enter.new.prompt.", "\u91CD\u65B0\u8F93\u5165\u65B0{0}: "}, - {"Re.enter.passpword.", "\u518D\u6B21\u8F93\u5165\u53E3\u4EE4: "}, + {"Re.enter.password.", "\u518D\u6B21\u8F93\u5165\u53E3\u4EE4: "}, {"Re.enter.new.password.", "\u518D\u6B21\u8F93\u5165\u65B0\u53E3\u4EE4: "}, {"They.don.t.match.Try.again", "\u5B83\u4EEC\u4E0D\u5339\u914D\u3002\u8BF7\u91CD\u8BD5"}, {"Enter.prompt.alias.name.", "\u8F93\u5165{0}\u522B\u540D: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,7 @@ {"New.prompt.", "\u65B0 {0}: "}, {"Passwords.must.differ", "\u5FC5\u9808\u662F\u4E0D\u540C\u7684\u5BC6\u78BC"}, {"Re.enter.new.prompt.", "\u91CD\u65B0\u8F38\u5165\u65B0 {0}: "}, - {"Re.enter.passpword.", "\u91CD\u65B0\u8F38\u5165\u5BC6\u78BC:"}, + {"Re.enter.password.", "\u91CD\u65B0\u8F38\u5165\u5BC6\u78BC:"}, {"Re.enter.new.password.", "\u91CD\u65B0\u8F38\u5165\u65B0\u5BC6\u78BC: "}, {"They.don.t.match.Try.again", "\u5B83\u5011\u4E0D\u76F8\u7B26\u3002\u8ACB\u91CD\u8A66"}, {"Enter.prompt.alias.name.", "\u8F38\u5165 {0} \u5225\u540D\u540D\u7A31: "}, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java --- a/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -285,7 +285,7 @@ * YYMMDDhhmmss-hhmm * UTC Time is broken in storing only two digits of year. * If YY < 50, we assume 20YY; - * if YY >= 50, we assume 19YY, as per RFC 3280. + * if YY >= 50, we assume 19YY, as per RFC 5280. * * Generalized time has a four-digit year and allows any * precision specified in ISO 8601. However, for our purposes, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/util/DerOutputStream.java --- a/jdk/src/java.base/share/classes/sun/security/util/DerOutputStream.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/util/DerOutputStream.java Fri Oct 10 18:00:14 2014 +0000 @@ -461,7 +461,7 @@ * Marshals a DER UTC time/date value. * *

    YYMMDDhhmmss{Z|+hhmm|-hhmm} ... emits only using Zulu time - * and with seconds (even if seconds=0) as per RFC 3280. + * and with seconds (even if seconds=0) as per RFC 5280. */ public void putUTCTime(Date d) throws IOException { putTime(d, DerValue.tag_UtcTime); @@ -471,7 +471,7 @@ * Marshals a DER Generalized Time/date value. * *

    YYYYMMDDhhmmss{Z|+hhmm|-hhmm} ... emits only using Zulu time - * and with seconds (even if seconds=0) as per RFC 3280. + * and with seconds (even if seconds=0) as per RFC 5280. */ public void putGeneralizedTime(Date d) throws IOException { putTime(d, DerValue.tag_GeneralizedTime); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/util/DerValue.java --- a/jdk/src/java.base/share/classes/sun/security/util/DerValue.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/util/DerValue.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,8 @@ * (such as PKCS #10 certificate requests, and some kinds of PKCS #7 data). * * A note with respect to T61/Teletex strings: From RFC 1617, section 4.1.3 - * and RFC 3280, section 4.1.2.4., we assume that this kind of string will - * contain ISO-8859-1 characters only. + * and RFC 5280, section 8, we assume that this kind of string will contain + * ISO-8859-1 characters only. * * * @author David Brownell diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ * certificate that identifies the specific OCSP Responder to use when * performing on-line validation of that certificate. *

    - * This extension is defined in + * This extension is defined in * Internet X.509 PKI Certificate and Certificate Revocation List * (CRL) Profile. The profile permits * the extension to be included in end-entity or CA certificates, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/CertificateIssuerExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/CertificateIssuerExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/CertificateIssuerExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ *

    * If used by conforming CRL issuers, this extension is always * critical. If an implementation ignored this extension it could not - * correctly attribute CRL entries to certificates. PKIX (RFC 3280) + * correctly attribute CRL entries to certificates. PKIX (RFC 5280) * RECOMMENDS that implementations recognize this extension. *

    * The ASN.1 definition for this is: diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ * *

    * The extension is defined in Section 5.2.4 of - * Internet X.509 PKI Certific + * Internet X.509 PKI Certific ate and Certificate Revocation List (CRL) Profile. * *

    diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/ExtendedKeyUsageExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/ExtendedKeyUsageExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/ExtendedKeyUsageExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,7 +94,7 @@ public static final String NAME = "ExtendedKeyUsage"; public static final String USAGES = "usages"; - // OID defined in RFC 3280 Sections 4.2.1.13 + // OID defined in RFC 5280 Sections 4.2.1.12 // more from http://www.alvestrand.no/objectid/1.3.6.1.5.5.7.3.html private static final Map map = new HashMap (); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ * *

    * The extension is defined in Section 5.2.6 of - * Internet X.509 PKI Certific + * Internet X.509 PKI Certific ate and Certificate Revocation List (CRL) Profile. * *

    diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/InvalidityDateExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/InvalidityDateExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/InvalidityDateExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import sun.security.util.*; /** - * From RFC 3280: + * From RFC 5280: *

    * The invalidity date is a non-critical CRL entry extension that * provides the date on which it is known or suspected that the private diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,7 +46,7 @@ * *

    * The extension is defined in Section 5.2.5 of - * Internet X.509 PKI Certific + * Internet X.509 PKI Certific ate and Certificate Revocation List (CRL) Profile. * *

    diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/RDN.java --- a/jdk/src/java.base/share/classes/sun/security/x509/RDN.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/RDN.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -341,7 +341,7 @@ /* * Returns a printable form of this RDN, using RFC 1779 style catenation * of attribute/value assertions, and emitting attribute type keywords - * from RFCs 1779, 2253, and 3280. + * from RFCs 1779, 2253, and 5280. */ public String toString() { if (assertion.length == 1) { diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/README --- a/jdk/src/java.base/share/classes/sun/security/x509/README Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/README Fri Oct 10 18:00:14 2014 +0000 @@ -34,7 +34,7 @@ Protocol (LDAP) that many organizations are expecting will help address online certificate distribution over the Internet. - RFC 3280, which describes the Internet X.509 Public Key + RFC 5280, which describes the Internet X.509 Public Key Infrastructure Certificate and CRL Profile. RSA DSI has a bunch of "Public Key Cryptography Standards" (PKCS) which diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java --- a/jdk/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,7 +47,7 @@ * included in end entity or CA certificates. Conforming CAs MUST mark * this extension as non-critical. *

    - * This extension is defined in + * This extension is defined in * Internet X.509 PKI Certificate and Certificate Revocation List * (CRL) Profile. The profile permits * the extension to be included in end-entity or CA certificates, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/URIName.java --- a/jdk/src/java.base/share/classes/sun/security/x509/URIName.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/URIName.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,15 +35,15 @@ * This class implements the URIName as required by the GeneralNames * ASN.1 object. *

    - * [RFC3280] When the subjectAltName extension contains a URI, the name MUST be + * [RFC5280] When the subjectAltName extension contains a URI, the name MUST be * stored in the uniformResourceIdentifier (an IA5String). The name MUST * be a non-relative URL, and MUST follow the URL syntax and encoding - * rules specified in [RFC 1738]. The name must include both a scheme + * rules specified in [RFC 3986]. The name must include both a scheme * (e.g., "http" or "ftp") and a scheme-specific-part. The scheme- * specific-part must include a fully qualified domain name or IP * address as the host. *

    - * As specified in [RFC 1738], the scheme name is not case-sensitive + * As specified in [RFC 3986], the scheme name is not case-sensitive * (e.g., "http" is equivalent to "HTTP"). The host part is also not * case-sensitive, but other components of the scheme-specific-part may * be case-sensitive. When comparing URIs, conforming implementations @@ -113,7 +113,7 @@ } host = uri.getHost(); - // RFC 3280 says that the host should be non-null, but we allow it to + // RFC 5280 says that the host should be non-null, but we allow it to // be null because some widely deployed certificates contain CDP // extensions with URIs that have no hostname (see bugs 4802236 and // 5107944). @@ -148,7 +148,7 @@ /** * Create the URIName object with the specified name constraint. URI * name constraints syntax is different than SubjectAltNames, etc. See - * 4.2.1.11 of RFC 3280. + * 4.2.1.10 of RFC 5280. * * @param value the URI name constraint * @throws IOException if name is not a proper URI name constraint @@ -300,7 +300,7 @@ * These results are used in checking NameConstraints during * certification path verification. *

    - * RFC3280: For URIs, the constraint applies to the host part of the name. + * RFC5280: For URIs, the constraint applies to the host part of the name. * The constraint may specify a host or a domain. Examples would be * "foo.bar.com"; and ".xyz.com". When the the constraint begins with * a period, it may be expanded with one or more subdomains. That is, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/X500Name.java --- a/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -605,7 +605,7 @@ * Returns a string form of the X.500 distinguished name. * The format of the string is from RFC 1779. The returned string * may contain non-standardised keywords for more readability - * (keywords from RFCs 1779, 2253, and 3280). + * (keywords from RFCs 1779, 2253, and 5280). */ public String toString() { if (dn == null) { @@ -866,7 +866,7 @@ * O="Sue, Grabbit and Runn" or * O=Sue\, Grabbit and Runn * - * This method can parse RFC 1779, 2253 or 4514 DNs and non-standard 3280 + * This method can parse RFC 1779, 2253 or 4514 DNs and non-standard 5280 * keywords. Additional keywords can be specified in the keyword/OID map. */ private void parseDN(String input, Map keywordMap) @@ -1122,7 +1122,7 @@ /* * Selected OIDs from X.520 - * Includes all those specified in RFC 3280 as MUST or SHOULD + * Includes all those specified in RFC 5280 as MUST or SHOULD * be recognized */ private static final int commonName_data[] = { 2, 5, 4, 3 }; @@ -1220,7 +1220,7 @@ ipAddress_oid = intern(ObjectIdentifier.newInternal(ipAddress_data)); /* - * Domain component OID from RFC 1274, RFC 2247, RFC 3280 + * Domain component OID from RFC 1274, RFC 2247, RFC 5280 */ /* diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java --- a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ * signature BIT STRING } * * More information can be found in - * RFC 3280: Internet X.509 + * RFC 5280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. *

    * The ASN.1 definition of tbsCertList is: diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/security/x509/X509CertInfo.java --- a/jdk/src/java.base/share/classes/sun/security/x509/X509CertInfo.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CertInfo.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -708,7 +708,7 @@ } /* - * Verify if X.509 V3 Certificate is compliant with RFC 3280. + * Verify if X.509 V3 Certificate is compliant with RFC 5280. */ private void verifyCert(X500Name subject, CertificateExtensions extensions) diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/text/resources/FormatData.java --- a/jdk/src/java.base/share/classes/sun/text/resources/FormatData.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/text/resources/FormatData.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -154,18 +154,18 @@ }, { "MonthNarrows", new String[] { - "J", - "F", - "M", - "A", - "M", - "J", - "J", - "A", - "S", - "O", - "N", - "D", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", "", } }, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/classes/sun/text/resources/en/FormatData_en.java --- a/jdk/src/java.base/share/classes/sun/text/resources/en/FormatData_en.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/classes/sun/text/resources/en/FormatData_en.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,6 +53,23 @@ // define this method as follows: // return new Object[][] { }; return new Object[][] { + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "NumberPatterns", new String[] { "#,##0.###;-#,##0.###", // decimal pattern diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.base/share/conf/security/java.security --- a/jdk/src/java.base/share/conf/security/java.security Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.base/share/conf/security/java.security Fri Oct 10 18:00:14 2014 +0000 @@ -345,7 +345,7 @@ # By default, the location of the OCSP responder is determined implicitly # from the certificate being validated. This property explicitly specifies # the location of the OCSP responder. The property is used when the -# Authority Information Access extension (defined in RFC 3280) is absent +# Authority Information Access extension (defined in RFC 5280) is absent # from the certificate or when it requires overriding. # # Example, diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java --- a/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java Fri Oct 10 18:00:14 2014 +0000 @@ -260,6 +260,11 @@ public FileHandler() throws IOException, SecurityException { checkPermission(); configure(); + // pattern will have been set by configure. check that it's not + // empty. + if (pattern.isEmpty()) { + throw new NullPointerException(); + } openFiles(); } @@ -402,6 +407,14 @@ openFiles(); } + private boolean isParentWritable(Path path) { + Path parent = path.getParent(); + if (parent == null) { + parent = path.toAbsolutePath().getParent(); + } + return parent != null && Files.isWritable(parent); + } + /** * Open the set of output files, based on the configured * instance variables. @@ -416,6 +429,10 @@ limit = 0; } + // All constructors check that pattern is neither null nor empty. + assert pattern != null : "pattern should not be null"; + assert !pattern.isEmpty() : "pattern should not be empty"; + // We register our own ErrorManager during initialization // so we can record exceptions. InitializationErrorManager em = new InitializationErrorManager(); @@ -458,7 +475,7 @@ // Note that this is a situation that may happen, // but not too frequently. if (Files.isRegularFile(lockFilePath, LinkOption.NOFOLLOW_LINKS) - && Files.isWritable(lockFilePath.getParent())) { + && isParentWritable(lockFilePath)) { try { channel = FileChannel.open(lockFilePath, WRITE, APPEND); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.logging/share/classes/java/util/logging/LogManager.java --- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -169,6 +169,9 @@ // True if JVM death is imminent and the exit hook has been called. private boolean deathImminent; + private final Map listeners = + Collections.synchronizedMap(new IdentityHashMap<>()); + static { manager = AccessController.doPrivileged(new PrivilegedAction() { @Override @@ -1168,7 +1171,8 @@ * Any log level definitions in the new configuration file will be * applied using Logger.setLevel(), if the target Logger exists. *

    - * A PropertyChangeEvent will be fired after the properties are read. + * Any {@linkplain #addConfigurationListener registered configuration + * listener} will be invoked after the properties are read. * * @exception SecurityException if a security manager exists and if * the caller does not have LoggingPermission("control"). @@ -1302,7 +1306,8 @@ /** * Reinitialize the logging properties and reread the logging configuration * from the given stream, which should be in java.util.Properties format. - * A PropertyChangeEvent will be fired after the properties are read. + * Any {@linkplain #addConfigurationListener registered configuration + * listener} will be invoked after the properties are read. *

    * Any log level definitions in the new configuration file will be * applied using Logger.setLevel(), if the target Logger exists. @@ -1335,10 +1340,14 @@ // Set levels on any pre-existing loggers, based on the new properties. setLevelsOnExistingLoggers(); - // Note that we need to reinitialize global handles when - // they are first referenced. - synchronized (this) { - initializedGlobalHandlers = false; + try { + invokeConfigurationListeners(); + } finally { + // Note that we need to reinitialize global handles when + // they are first referenced. + synchronized (this) { + initializedGlobalHandlers = false; + } } } @@ -1620,4 +1629,95 @@ } return loggingMXBean; } + + /** + * Adds a configuration listener to be invoked each time the logging + * configuration is read. + * If the listener is already registered the method does nothing. + *

    + * The listener is invoked with privileges that are restricted by the + * calling context of this method. + * The order in which the listeners are invoked is unspecified. + *

    + * It is recommended that listeners do not throw errors or exceptions. + * + * If a listener terminates with an uncaught error or exception then + * the first exception will be propagated to the caller of + * {@link #readConfiguration()} (or {@link #readConfiguration(java.io.InputStream)}) + * after all listeners have been invoked. + * + * @implNote If more than one listener terminates with an uncaught error or + * exception, an implementation may record the additional errors or + * exceptions as {@linkplain Throwable#addSuppressed(java.lang.Throwable) + * suppressed exceptions}. + * + * @param listener A configuration listener that will be invoked after the + * configuration changed. + * @return This LogManager. + * @throws SecurityException if a security manager exists and if the + * caller does not have LoggingPermission("control"). + * @throws NullPointerException if the listener is null. + * + * @since 1.9 + */ + public LogManager addConfigurationListener(Runnable listener) { + final Runnable r = Objects.requireNonNull(listener); + checkPermission(); + final SecurityManager sm = System.getSecurityManager(); + final AccessControlContext acc = + sm == null ? null : AccessController.getContext(); + final PrivilegedAction pa = + acc == null ? null : () -> { r.run() ; return null; }; + final Runnable pr = + acc == null ? r : () -> AccessController.doPrivileged(pa, acc); + // Will do nothing if already registered. + listeners.putIfAbsent(r, pr); + return this; + } + + /** + * Removes a previously registered configuration listener. + * + * Returns silently if the listener is not found. + * + * @param listener the configuration listener to remove. + * @throws NullPointerException if the listener is null. + * @throws SecurityException if a security manager exists and if the + * caller does not have LoggingPermission("control"). + * + * @since 1.9 + */ + public void removeConfigurationListener(Runnable listener) { + final Runnable key = Objects.requireNonNull(listener); + checkPermission(); + listeners.remove(key); + } + + private void invokeConfigurationListeners() { + Throwable t = null; + + // We're using an IdentityHashMap because we want to compare + // keys using identity (==). + // We don't want to loop within a block synchronized on 'listeners' + // to avoid invoking listeners from yet another synchronized block. + // So we're taking a snapshot of the values list to avoid the risk of + // ConcurrentModificationException while looping. + // + for (Runnable c : listeners.values().toArray(new Runnable[0])) { + try { + c.run(); + } catch (ThreadDeath death) { + throw death; + } catch (Error | RuntimeException x) { + if (t == null) t = x; + else t.addSuppressed(x); + } + } + // Listeners are not supposed to throw exceptions, but if that + // happens, we will rethrow the first error or exception that is raised + // after all listeners have been invoked. + if (t instanceof Error) throw (Error)t; + if (t instanceof RuntimeException) throw (RuntimeException)t; + } + } diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.logging/share/classes/java/util/logging/Logger.java --- a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java Fri Oct 10 18:00:14 2014 +0000 @@ -1376,8 +1376,12 @@ return; } if (!isLoggable(Level.FINER)) return; - for (int i = 0; i < params.length; i++) { - msg = msg + " {" + i + "}"; + if (params.length > 0) { + final StringBuilder b = new StringBuilder(msg); + for (int i = 0; i < params.length; i++) { + b.append(' ').append('{').append(i).append('}'); + } + msg = b.toString(); } logp(Level.FINER, sourceClass, sourceMethod, msg, params); } diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java --- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java Fri Oct 10 18:00:14 2014 +0000 @@ -56,7 +56,7 @@ * organization. The SQL/XML definition is available at the following URI: *

    * The schema definition describes the internal data of a {@code RowSet} object diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java --- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java Fri Oct 10 18:00:14 2014 +0000 @@ -699,15 +699,15 @@ //create a SignatureAlgorithms from the SignatureMethod inside //SignedInfo. This is used to validate the signature. SignatureAlgorithm sa = si.getSignatureAlgorithm(); - if (log.isLoggable(java.util.logging.Level.FINE)) { - log.log(java.util.logging.Level.FINE, "signatureMethodURI = " + sa.getAlgorithmURI()); - log.log(java.util.logging.Level.FINE, "jceSigAlgorithm = " + sa.getJCEAlgorithmString()); - log.log(java.util.logging.Level.FINE, "jceSigProvider = " + sa.getJCEProviderName()); - log.log(java.util.logging.Level.FINE, "PublicKey = " + pk); - } byte sigBytes[] = null; try { sa.initVerify(pk); + if (log.isLoggable(java.util.logging.Level.FINE)) { + log.log(java.util.logging.Level.FINE, "signatureMethodURI = " + sa.getAlgorithmURI()); + log.log(java.util.logging.Level.FINE, "jceSigAlgorithm = " + sa.getJCEAlgorithmString()); + log.log(java.util.logging.Level.FINE, "jceSigProvider = " + sa.getJCEProviderName()); + log.log(java.util.logging.Level.FINE, "PublicKey = " + pk); + } // Get the canonicalized (normalized) SignedInfo SignerOutputStream so = new SignerOutputStream(sa); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c --- a/jdk/src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c Fri Oct 10 18:00:14 2014 +0000 @@ -92,6 +92,10 @@ * Code copied to target process */ #pragma check_stack (off) +/* Switch off all runtime checks (checks caused by /RTC). They cause the + * generated code to contain relative jumps to check functions which make + * the code position dependent. */ +#pragma runtime_checks ("scu", off) DWORD WINAPI jvm_attach_thread_func(DataBlock *pData) { HINSTANCE h; @@ -122,7 +126,7 @@ void jvm_attach_thread_func_end (void) { } #pragma check_stack - +#pragma runtime_checks ("scu", restore) /* * Class: sun_tools_attach_VirtualMachineImpl diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp --- a/jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp Fri Oct 10 18:00:14 2014 +0000 @@ -211,6 +211,7 @@ digest_item.len = jDigestLength; ECPrivateKey privKey; + privKey.privateValue.data = NULL; // Initialize the ECParams struct ECParams *ecparams = NULL; @@ -387,9 +388,14 @@ { jbyteArray jSecret = NULL; ECParams *ecparams = NULL; + SECItem privateValue_item; + privateValue_item.data = NULL; + SECItem publicValue_item; + publicValue_item.data = NULL; + SECKEYECParams params_item; + params_item.data = NULL; // Extract private key value - SECItem privateValue_item; privateValue_item.len = env->GetArrayLength(privateKey); privateValue_item.data = (unsigned char *) env->GetByteArrayElements(privateKey, 0); @@ -398,7 +404,6 @@ } // Extract public key value - SECItem publicValue_item; publicValue_item.len = env->GetArrayLength(publicKey); publicValue_item.data = (unsigned char *) env->GetByteArrayElements(publicKey, 0); @@ -407,7 +412,6 @@ } // Initialize the ECParams struct - SECKEYECParams params_item; params_item.len = env->GetArrayLength(encodedParams); params_item.data = (unsigned char *) env->GetByteArrayElements(encodedParams, 0); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSigner.java --- a/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSigner.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSigner.java Fri Oct 10 18:00:14 2014 +0000 @@ -37,6 +37,7 @@ * @author Vincent Ryan */ +@jdk.Exported public abstract class ContentSigner { /** diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package-info.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/** + * This package comprises the interfaces and classes used to define the + * signing mechanism used by the jarsigner tool. + *

    + * Clients may override the default signing mechanism of the jarsigner + * tool by supplying an alternative implementation of + * {@link com.sun.jarsigner.ContentSigner}. + */ + +@jdk.Exported +package com.sun.jarsigner; diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package.html --- a/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package.html Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ - - - - Jarsigner Signing Mechanism Package - - -This package comprises the interfaces and classes used to define the -signing mechanism used by the jarsigner tool. -

    -Clients may override the default signing mechanism of the jarsigner -tool by supplying an alternative implementation of -{@link com.sun.jarsigner.ContentSigner}. - - diff -r 3d2543e475e4 -r cd50a16cf47e jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java --- a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -140,7 +140,7 @@ /** * Examine the certificate for a Subject Information Access extension - * (RFC 3280). + * (RFC 5280). * The extension's accessMethod field should contain the object * identifier defined for timestamping: 1.3.6.1.5.5.7.48.3 and its * accessLocation field should contain an HTTP or HTTPS URL. diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/TEST.groups --- a/jdk/test/TEST.groups Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/TEST.groups Fri Oct 10 18:00:14 2014 +0000 @@ -365,7 +365,6 @@ java/util/zip/3GBZipFiles.sh \ jdk/lambda/FDTest.java \ jdk/lambda/separate/Compiler.java \ - sun/management/jdp/JdpTest.sh \ sun/management/jmxremote/bootstrap/JvmstatCountersTest.java \ sun/management/jmxremote/bootstrap/LocalManagementTest.java \ sun/management/jmxremote/bootstrap/CustomLauncherTest.java \ diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/com/sun/jdi/RunToExit.java --- a/jdk/test/com/sun/jdi/RunToExit.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/com/sun/jdi/RunToExit.java Fri Oct 10 18:00:14 2014 +0000 @@ -184,7 +184,8 @@ if (exitCode == 0 && error_seen == 0) { System.out.println("Test passed - server debuggee cleanly terminated"); } else { - throw new RuntimeException("Test failed - server debuggee generated an error when it terminated"); + throw new RuntimeException("Test failed - server debuggee generated an error when it terminated, " + + "exit code was " + exitCode + ", " + error_seen + " error(s) seen in debugee output."); } } } diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/lang/invoke/LFCaching/TestMethods.java --- a/jdk/test/java/lang/invoke/LFCaching/TestMethods.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/java/lang/invoke/LFCaching/TestMethods.java Fri Oct 10 18:00:14 2014 +0000 @@ -44,7 +44,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -83,7 +83,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -91,7 +91,7 @@ int dropArgsPos = Helper.RNG.nextInt(realArity + 1); data.put("dropArgsPos", dropArgsPos); MethodType mtDropArgs = TestMethods.randomMethodTypeGenerator( - Helper.RNG.nextInt(Helper.MAX_ARITY - realArity)); + Helper.RNG.nextInt(super.maxArity - realArity)); data.put("mtDropArgs", mtDropArgs); return data; } @@ -106,20 +106,20 @@ int mtTgtSlotsCount = TestMethods.argSlotsCount(mtTarget); int mtDASlotsCount = TestMethods.argSlotsCount(mtDropArgs); List> fakeParList; - if (mtTgtSlotsCount + mtDASlotsCount > Helper.MAX_ARITY - 1) { + if (mtTgtSlotsCount + mtDASlotsCount > super.maxArity - 1) { fakeParList = TestMethods.reduceArgListToSlotsCount(mtDropArgs.parameterList(), - Helper.MAX_ARITY - mtTgtSlotsCount - 1); + super.maxArity - mtTgtSlotsCount - 1); } else { fakeParList = mtDropArgs.parameterList(); } return MethodHandles.dropArguments(target, dropArgsPos, fakeParList); } }, - EXPLICIT_CAST_ARGUMENTS("explicitCastArguments") { + EXPLICIT_CAST_ARGUMENTS("explicitCastArguments", Helper.MAX_ARITY / 2) { @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY / 2); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -146,11 +146,11 @@ return MethodHandles.explicitCastArguments(target, mtExcplCastArgs); } }, - FILTER_ARGUMENTS("filterArguments") { + FILTER_ARGUMENTS("filterArguments", Helper.MAX_ARITY / 2) { @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY / 2); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -184,7 +184,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -211,7 +211,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -236,18 +236,18 @@ return MethodHandles.insertArguments(target, insertArgsPos, insertList); } }, - PERMUTE_ARGUMENTS("permuteArguments") { + PERMUTE_ARGUMENTS("permuteArguments", Helper.MAX_ARITY / 2) { @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY / 2); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); // Arity after reducing because of long and double take 2 slots. int realArity = mtTarget.parameterCount(); int[] permuteArgsReorderArray = new int[realArity]; - int mtParmuteArgsNum = Helper.RNG.nextInt(Helper.MAX_ARITY); - mtParmuteArgsNum = mtParmuteArgsNum == 0 ? 1 : mtParmuteArgsNum; - MethodType mtPermuteArgs = TestMethods.randomMethodTypeGenerator(mtParmuteArgsNum); + int mtPermuteArgsNum = Helper.RNG.nextInt(Helper.MAX_ARITY); + mtPermuteArgsNum = mtPermuteArgsNum == 0 ? 1 : mtPermuteArgsNum; + MethodType mtPermuteArgs = TestMethods.randomMethodTypeGenerator(mtPermuteArgsNum); mtTarget = mtTarget.changeReturnType(mtPermuteArgs.returnType()); for (int i = 0; i < realArity; i++) { int mtPermuteArgsParNum = Helper.RNG.nextInt(mtPermuteArgs.parameterCount()); @@ -275,7 +275,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -293,7 +293,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -329,7 +329,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -359,11 +359,11 @@ return MethodHandles.catchException(target, Exception.class, handler); } }, - INVOKER("invoker") { + INVOKER("invoker", Helper.MAX_ARITY - 1) { @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -375,11 +375,11 @@ return MethodHandles.invoker(mtTarget); } }, - EXACT_INVOKER("exactInvoker") { + EXACT_INVOKER("exactInvoker", Helper.MAX_ARITY - 1) { @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -391,11 +391,11 @@ return MethodHandles.exactInvoker(mtTarget); } }, - SPREAD_INVOKER("spreadInvoker") { + SPREAD_INVOKER("spreadInvoker", Helper.MAX_ARITY - 1) { @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); // Arity after reducing because of long and double take 2 slots. @@ -416,7 +416,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -436,7 +436,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -456,7 +456,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -481,7 +481,7 @@ @Override public Map getTestCaseData() { Map data = new HashMap<>(); - int desiredArity = Helper.RNG.nextInt(Helper.MAX_ARITY); + int desiredArity = Helper.RNG.nextInt(super.maxArity); MethodType mtTarget = TestMethods.randomMethodTypeGenerator(desiredArity); data.put("mtTarget", mtTarget); return data; @@ -503,8 +503,15 @@ */ public final String name; + private final int maxArity; + + private TestMethods(String name, int maxArity) { + this.name = name; + this.maxArity = maxArity; + } + private TestMethods(String name) { - this.name = name; + this(name, Helper.MAX_ARITY); } protected MethodHandle getMH(Map data, TestMethods.Kind kind) throws NoSuchMethodException, IllegalAccessException { diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/lang/management/MemoryMXBean/MemoryTest.java --- a/jdk/test/java/lang/management/MemoryMXBean/MemoryTest.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/java/lang/management/MemoryMXBean/MemoryTest.java Fri Oct 10 18:00:14 2014 +0000 @@ -59,13 +59,13 @@ // (or equivalent for other collectors) // Number of GC memory managers = 2 - // Hotspot VM 1.8+ after perm gen removal is expected to have two or - // three non-heap memory pools: - // - Code cache + // Hotspot VM 1.8+ after perm gen removal is expected to have between two + // or five non-heap memory pools: + // - Code cache (between one and three depending on the -XX:SegmentedCodeCache option) // - Metaspace // - Compressed Class Space (if compressed class pointers are used) private static int[] expectedMinNumPools = {3, 2}; - private static int[] expectedMaxNumPools = {3, 3}; + private static int[] expectedMaxNumPools = {3, 5}; private static int expectedNumGCMgrs = 2; private static int expectedNumMgrs = expectedNumGCMgrs + 2; private static String[] types = { "heap", "non-heap" }; diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/net/InetAddress/IPv4Formats.java --- a/jdk/test/java/net/InetAddress/IPv4Formats.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/java/net/InetAddress/IPv4Formats.java Fri Oct 10 18:00:14 2014 +0000 @@ -36,7 +36,7 @@ {"126.1", "126.0.0.1"}, {"128.50.65534", "128.50.255.254"}, {"192.168.1.2", "192.168.1.2"}, - {"hello.foo.bar", null}, + {"invalidhost.invalid", null}, {"1024.1.2.3", null}, {"128.14.66000", null } }; diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/util/logging/FileHandlerPath.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/logging/FileHandlerPath.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FilePermission; +import java.io.IOException; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Paths; +import static java.nio.file.StandardOpenOption.CREATE_NEW; +import static java.nio.file.StandardOpenOption.WRITE; +import java.security.CodeSource; +import java.security.Permission; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.Policy; +import java.security.ProtectionDomain; +import java.util.Arrays; +import java.util.Collections; +import java.util.Enumeration; +import java.util.List; +import java.util.Properties; +import java.util.PropertyPermission; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.FileHandler; +import java.util.logging.LogManager; +import java.util.logging.LoggingPermission; + +/** + * @test + * @bug 8059269 + * @summary tests that using a simple (non composite) pattern does not lead + * to NPE when the lock file already exists. + * @run main/othervm FileHandlerPath UNSECURE + * @run main/othervm FileHandlerPath SECURE + * @author danielfuchs + */ +public class FileHandlerPath { + + /** + * We will test the simple pattern in two configurations. + * UNSECURE: No security manager. + * SECURE: With the security manager present - and the required + * permissions granted. + */ + public static enum TestCase { + UNSECURE, SECURE; + public void run(Properties propertyFile) throws Exception { + System.out.println("Running test case: " + name()); + Configure.setUp(this, propertyFile); + test(this.name() + " " + propertyFile.getProperty("test.name"), propertyFile); + } + } + + + // Use a random name provided by UUID to avoid collision with other tests + final static String logFile = FileHandlerPath.class.getSimpleName() + "_" + + UUID.randomUUID().toString() + ".log"; + final static String tmpLogFile; + final static String userDir = System.getProperty("user.dir"); + final static String tmpDir = System.getProperty("java.io.tmpdir"); + private static final List properties; + static { + tmpLogFile = new File(tmpDir, logFile).toString(); + Properties props1 = new Properties(); + Properties props2 = new Properties(); + props1.setProperty("test.name", "relative file"); + props1.setProperty("test.file.name", logFile); + props1.setProperty(FileHandler.class.getName() + ".pattern", logFile); + props1.setProperty(FileHandler.class.getName() + ".count", "1"); + props2.setProperty("test.name", "absoluste file"); + props2.setProperty("test.file.name", tmpLogFile); + props2.setProperty(FileHandler.class.getName() + ".pattern", "%t/" + logFile); + props2.setProperty(FileHandler.class.getName() + ".count", "1"); + properties = Collections.unmodifiableList(Arrays.asList( + props1, + props2)); + } + + public static void main(String... args) throws Exception { + + if (args == null || args.length == 0) { + args = new String[] { + TestCase.UNSECURE.name(), + TestCase.SECURE.name(), + }; + } + + // Sanity checks + + if (!Files.isWritable(Paths.get(userDir))) { + throw new RuntimeException(userDir + + ": user.dir is not writable - can't run test."); + } + if (!Files.isWritable(Paths.get(tmpDir))) { + throw new RuntimeException(tmpDir + + ": java.io.tmpdir is not writable - can't run test."); + } + + File[] files = { + new File(logFile), + new File(tmpLogFile), + new File(logFile+".1"), + new File(tmpLogFile+".1"), + new File(logFile+".lck"), + new File(tmpLogFile+".lck"), + new File(logFile+".1.lck"), + new File(tmpLogFile+".1.lck") + }; + + for (File log : files) { + if (log.exists()) { + throw new Exception(log +": file already exists - can't run test."); + } + } + + // Now start the real test + + try { + for (String testName : args) { + for (Properties propertyFile : properties) { + TestCase test = TestCase.valueOf(testName); + test.run(propertyFile); + } + } + } finally { + // Cleanup... + Configure.doPrivileged(() -> { + for(File log : files) { + try { + final boolean isLockFile = log.getName().endsWith(".lck"); + // lock file should already be deleted, except if the + // test failed in exception. + // log file should all be present, except if the test + // failed in exception. + if (log.exists()) { + if (!isLockFile) { + System.out.println("deleting "+log.toString()); + } else { + System.err.println("deleting lock file "+log.toString()); + } + log.delete(); + } else { + if (!isLockFile) { + System.err.println(log.toString() + ": not found."); + } + } + } catch (Throwable t) { + // should not happen + t.printStackTrace(); + } + } + }); + } + } + + static class Configure { + static Policy policy = null; + static final AtomicBoolean allowAll = new AtomicBoolean(false); + static void setUp(TestCase test, Properties propertyFile) { + switch (test) { + case SECURE: + if (policy == null && System.getSecurityManager() != null) { + throw new IllegalStateException("SecurityManager already set"); + } else if (policy == null) { + policy = new SimplePolicy(TestCase.SECURE, allowAll); + Policy.setPolicy(policy); + System.setSecurityManager(new SecurityManager()); + } + if (System.getSecurityManager() == null) { + throw new IllegalStateException("No SecurityManager."); + } + if (policy == null) { + throw new IllegalStateException("policy not configured"); + } + break; + case UNSECURE: + if (System.getSecurityManager() != null) { + throw new IllegalStateException("SecurityManager already set"); + } + break; + default: + new InternalError("No such testcase: " + test); + } + doPrivileged(() -> { + try { + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + propertyFile.store(bytes, propertyFile.getProperty("test.name")); + ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray()); + LogManager.getLogManager().readConfiguration(bais); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + }); + } + static void doPrivileged(Runnable run) { + allowAll.set(true); + try { + run.run(); + } finally { + allowAll.set(false); + } + } + } + + public static void test(String name, Properties props) throws Exception { + System.out.println("Testing: " + name); + String file = props.getProperty("test.file.name"); + // create the lock files first - in order to take the path that + // used to trigger the NPE + Files.createFile(Paths.get(file + ".lck")); + Files.createFile(Paths.get(file + ".1.lck")); + final FileHandler f1 = new FileHandler(); + final FileHandler f2 = new FileHandler(); + f1.close(); + f2.close(); + System.out.println("Success for " + name); + } + + + final static class PermissionsBuilder { + final Permissions perms; + public PermissionsBuilder() { + this(new Permissions()); + } + public PermissionsBuilder(Permissions perms) { + this.perms = perms; + } + public PermissionsBuilder add(Permission p) { + perms.add(p); + return this; + } + public PermissionsBuilder addAll(PermissionCollection col) { + if (col != null) { + for (Enumeration e = col.elements(); e.hasMoreElements(); ) { + perms.add(e.nextElement()); + } + } + return this; + } + public Permissions toPermissions() { + final PermissionsBuilder builder = new PermissionsBuilder(); + builder.addAll(perms); + return builder.perms; + } + } + + public static class SimplePolicy extends Policy { + + final Permissions permissions; + final Permissions allPermissions; + final AtomicBoolean allowAll; + public SimplePolicy(TestCase test, AtomicBoolean allowAll) { + this.allowAll = allowAll; + permissions = new Permissions(); + permissions.add(new LoggingPermission("control", null)); // needed by new FileHandler() + permissions.add(new FilePermission("<>", "read")); // needed by new FileHandler() + permissions.add(new FilePermission(logFile, "write,delete")); // needed by new FileHandler() + permissions.add(new FilePermission(logFile+".lck", "write,delete")); // needed by FileHandler.close() + permissions.add(new FilePermission(logFile+".1", "write,delete")); // needed by new FileHandler() + permissions.add(new FilePermission(logFile+".1.lck", "write,delete")); // needed by FileHandler.close() + permissions.add(new FilePermission(tmpLogFile, "write,delete")); // needed by new FileHandler() + permissions.add(new FilePermission(tmpLogFile+".lck", "write,delete")); // needed by FileHandler.close() + permissions.add(new FilePermission(tmpLogFile+".1", "write,delete")); // needed by new FileHandler() + permissions.add(new FilePermission(tmpLogFile+".1.lck", "write,delete")); // needed by FileHandler.close() + permissions.add(new FilePermission(userDir, "write")); // needed by new FileHandler() + permissions.add(new FilePermission(tmpDir, "write")); // needed by new FileHandler() + permissions.add(new PropertyPermission("user.dir", "read")); + permissions.add(new PropertyPermission("java.io.tmpdir", "read")); + allPermissions = new Permissions(); + allPermissions.add(new java.security.AllPermission()); + } + + @Override + public boolean implies(ProtectionDomain domain, Permission permission) { + if (allowAll.get()) return allPermissions.implies(permission); + return permissions.implies(permission); + } + + @Override + public PermissionCollection getPermissions(CodeSource codesource) { + return new PermissionsBuilder().addAll(allowAll.get() + ? allPermissions : permissions).toPermissions(); + } + + @Override + public PermissionCollection getPermissions(ProtectionDomain domain) { + return new PermissionsBuilder().addAll(allowAll.get() + ? allPermissions : permissions).toPermissions(); + } + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/util/logging/FileHandlerPatternExceptions.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/logging/FileHandlerPatternExceptions.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.security.AccessControlException; +import java.security.CodeSource; +import java.security.Permission; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.Policy; +import java.security.ProtectionDomain; +import java.util.Arrays; +import java.util.Collections; +import java.util.Enumeration; +import java.util.List; +import java.util.Properties; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.FileHandler; +import java.util.logging.LogManager; + +/** + * @test + * @bug 8025690 + * @summary tests that an empty or null pattern always result in an exception. + * @run main/othervm FileHandlerPatternExceptions UNSECURE + * @run main/othervm FileHandlerPatternExceptions SECURE + * @author danielfuchs + */ +public class FileHandlerPatternExceptions { + + /** + * We will test null/empty pattern in two configurations. + * UNSECURE: No security manager. + * SECURE: With the security manager present - and the required + * permissions granted. + */ + public static enum TestCase { + UNSECURE, SECURE; + public void run(Properties propertyFile) throws Exception { + System.out.println("Running test case: " + name()); + Configure.setUp(this, propertyFile); + test(this.name() + " " + propertyFile.getProperty("test.name")); + } + } + + + private static final String PREFIX = + "FileHandler-" + UUID.randomUUID() + ".log"; + private static final String userDir = System.getProperty("user.dir", "."); + private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir)); + + private static final List properties; + static { + Properties props1 = new Properties(); + Properties props2 = new Properties(); + props1.setProperty("test.name", "with count=1"); + props1.setProperty(FileHandler.class.getName() + ".pattern", ""); + props1.setProperty(FileHandler.class.getName() + ".count", "1"); + props2.setProperty("test.name", "with count=2"); + props2.setProperty(FileHandler.class.getName() + ".pattern", ""); + props2.setProperty(FileHandler.class.getName() + ".count", "2"); + properties = Collections.unmodifiableList(Arrays.asList( + props1, + props2)); + } + + public static void main(String... args) throws Exception { + + + if (args == null || args.length == 0) { + args = new String[] { + TestCase.UNSECURE.name(), + TestCase.SECURE.name(), + }; + } + + try { + for (String testName : args) { + for (Properties propertyFile : properties) { + TestCase test = TestCase.valueOf(testName); + test.run(propertyFile); + } + } + } finally { + if (userDirWritable) { + Configure.doPrivileged(() -> { + // cleanup - delete files that have been created + try { + Files.list(Paths.get(userDir)) + .filter((f) -> f.toString().contains(PREFIX)) + .forEach((f) -> { + try { + System.out.println("deleting " + f); + Files.delete(f); + } catch(Throwable t) { + System.err.println("Failed to delete " + f + ": " + t); + } + }); + } catch(Throwable t) { + System.err.println("Cleanup failed to list files: " + t); + t.printStackTrace(); + } + }); + } + } + } + + static class Configure { + static Policy policy = null; + static final AtomicBoolean allowAll = new AtomicBoolean(false); + static void setUp(TestCase test, Properties propertyFile) { + switch (test) { + case SECURE: + if (policy == null && System.getSecurityManager() != null) { + throw new IllegalStateException("SecurityManager already set"); + } else if (policy == null) { + policy = new SimplePolicy(TestCase.SECURE, allowAll); + Policy.setPolicy(policy); + System.setSecurityManager(new SecurityManager()); + } + if (System.getSecurityManager() == null) { + throw new IllegalStateException("No SecurityManager."); + } + if (policy == null) { + throw new IllegalStateException("policy not configured"); + } + break; + case UNSECURE: + if (System.getSecurityManager() != null) { + throw new IllegalStateException("SecurityManager already set"); + } + break; + default: + new InternalError("No such testcase: " + test); + } + doPrivileged(() -> { + try { + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + propertyFile.store(bytes, propertyFile.getProperty("test.name")); + ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray()); + LogManager.getLogManager().readConfiguration(bais); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + }); + } + static void doPrivileged(Runnable run) { + allowAll.set(true); + try { + run.run(); + } finally { + allowAll.set(false); + } + } + } + + @FunctionalInterface + public static interface FileHandlerSupplier { + public FileHandler test() throws Exception; + } + + private static void checkException(Class type, FileHandlerSupplier test) { + Throwable t = null; + FileHandler f = null; + try { + f = test.test(); + } catch (Throwable x) { + t = x; + } + try { + if (type != null && t == null) { + throw new RuntimeException("Expected " + type.getName() + " not thrown"); + } else if (type != null && t != null) { + if (type.isInstance(t)) { + System.out.println("Recieved expected exception: " + t); + } else { + throw new RuntimeException("Exception type mismatch: " + + type.getName() + " expected, " + + t.getClass().getName() + " received.", t); + } + } else if (t != null) { + throw new RuntimeException("Unexpected exception received: " + t, t); + } + } finally { + if (f != null) { + // f should always be null when an exception is expected, + // but in case the test doesn't behave as expected we will + // want to close f. + try { f.close(); } catch (Throwable x) {}; + } + } + } + + public static void test(String name) throws Exception { + System.out.println("Testing: " + name); + checkException(RuntimeException.class, () -> new FileHandler()); + checkException(IllegalArgumentException.class, () -> new FileHandler("")); + checkException(NullPointerException.class, () -> new FileHandler(null)); + + checkException(IllegalArgumentException.class, () -> new FileHandler("", true)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", false)); + checkException(NullPointerException.class, () -> new FileHandler(null, true)); + checkException(NullPointerException.class, () -> new FileHandler(null, false)); + + checkException(IllegalArgumentException.class, () -> new FileHandler("", 1, 1)); + checkException(IllegalArgumentException.class, () -> new FileHandler(PREFIX, 0, 0)); + checkException(IllegalArgumentException.class, () -> new FileHandler(PREFIX, -1, 1)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", 0, 0)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", -1, 1)); + + checkException(IllegalArgumentException.class, () -> new FileHandler("", 1, 1, true)); + checkException(IllegalArgumentException.class, () -> new FileHandler(PREFIX, 0, 0, true)); + checkException(IllegalArgumentException.class, () -> new FileHandler(PREFIX, -1, 1, true)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", 0, 0, true)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", -1, 1, true)); + + checkException(IllegalArgumentException.class, () -> new FileHandler("", 1, 1, false)); + checkException(IllegalArgumentException.class, () -> new FileHandler(PREFIX, 0, 0, false)); + checkException(IllegalArgumentException.class, () -> new FileHandler(PREFIX, -1, 1, false)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", 0, 0, false)); + checkException(IllegalArgumentException.class, () -> new FileHandler("", -1, 1, false)); + + final Class expectedException = + System.getSecurityManager() != null ? AccessControlException.class : null; + + if (userDirWritable || expectedException != null) { + // These calls will create files in user.dir in the UNSECURE case. + // The file name contain a random UUID (PREFIX) which identifies them + // and allow us to remove them cleanly at the end (see finally block + // in main()). + checkException(expectedException, + () -> new FileHandler(PREFIX, 0, 1, true)); + checkException(expectedException, + () -> new FileHandler(PREFIX, 1, 2, true)); + checkException(expectedException, + () -> new FileHandler(PREFIX, 0, 1, false)); + checkException(expectedException, + () -> new FileHandler(PREFIX, 1, 2, false)); + } + } + + + final static class PermissionsBuilder { + final Permissions perms; + public PermissionsBuilder() { + this(new Permissions()); + } + public PermissionsBuilder(Permissions perms) { + this.perms = perms; + } + public PermissionsBuilder add(Permission p) { + perms.add(p); + return this; + } + public PermissionsBuilder addAll(PermissionCollection col) { + if (col != null) { + for (Enumeration e = col.elements(); e.hasMoreElements(); ) { + perms.add(e.nextElement()); + } + } + return this; + } + public Permissions toPermissions() { + final PermissionsBuilder builder = new PermissionsBuilder(); + builder.addAll(perms); + return builder.perms; + } + } + + public static class SimplePolicy extends Policy { + + final Permissions permissions; + final Permissions allPermissions; + final AtomicBoolean allowAll; + public SimplePolicy(TestCase test, AtomicBoolean allowAll) { + this.allowAll = allowAll; + // we don't actually need any permission to create our + // FileHandlers because we're passing invalid parameters + // which will make the creation fail... + permissions = new Permissions(); + + // these are used for configuring the test itself... + allPermissions = new Permissions(); + allPermissions.add(new java.security.AllPermission()); + + } + + @Override + public boolean implies(ProtectionDomain domain, Permission permission) { + if (allowAll.get()) return allPermissions.implies(permission); + return permissions.implies(permission); + } + + @Override + public PermissionCollection getPermissions(CodeSource codesource) { + return new PermissionsBuilder().addAll(allowAll.get() + ? allPermissions : permissions).toPermissions(); + } + + @Override + public PermissionCollection getPermissions(ProtectionDomain domain) { + return new PermissionsBuilder().addAll(allowAll.get() + ? allPermissions : permissions).toPermissions(); + } + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,173 @@ + +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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.io.ByteArrayOutputStream; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.logging.Handler; +import java.util.logging.Level; +import java.util.logging.LogRecord; +import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; +import java.util.logging.StreamHandler; + +/** + * @test + * @bug 8028788 + * @summary tests that the message format string is correctly constructed + * by Logger.entering + * @run main/othervm LoggerEnteringWithParams + * @author daniel fuchs + */ +public class LoggerEnteringWithParams { + + final static Object[] data = { + "one", "two", "three", "four", "five", "six", "seven", "eight" + }; + + static final class TestHandler extends Handler { + final List events = new CopyOnWriteArrayList<>(); + final ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + final StreamHandler wrapped = new StreamHandler(bytes, new SimpleFormatter()); + + @Override + public void publish(LogRecord record) { + events.add(record); + wrapped.publish(record); + wrapped.flush(); + } + @Override + public void flush() { + wrapped.flush(); + } + @Override + public void close() throws SecurityException { + wrapped.close(); + } + + @Override + public synchronized void setLevel(Level newLevel) throws SecurityException { + super.setLevel(newLevel); + wrapped.setLevel(newLevel); + } + + public void reset() { + bytes.reset(); + events.clear(); + } + + } + + public static void main(String[] args) { + Logger logger = Logger.getLogger("some.logger"); + TestHandler handler = new TestHandler(); + logger.setUseParentHandlers(false); + handler.setLevel(Level.ALL); + logger.setLevel(Level.FINEST); + logger.addHandler(handler); + + // Auto-detect the line termination used by SimpleFormatter - (CR vs CRLF) + logger.entering("test", "test"); + final String test = handler.bytes.toString(); + System.out.println(test); + final String lineEnd = test.substring(test.indexOf("ENTRY")+"ENTRY".length()); + System.out.print("Line termination is " + lineEnd.length() + " char(s) long:"); + for (int i=0; i>"); + } + if (!logged.contains(methodName)) { + throw new RuntimeException("Marker for " + methodName + + " not found." + + "\n\tgot: <<\n" + logged + "\t >>"); + } + if (!logged.contains(expected)) { + throw new RuntimeException("Marker for parameters[size=" + + i + "] not found" + + "\n\tgot: <<\n" + logged + "\t >>"); + } + if (!logged.contains(expected+lineEnd)) { + throw new RuntimeException("Marker for parameters[size=" + + i + "] has extra characters" + + "\n\tgot: <<\n" + logged + "\t >>"); + } + + LogRecord record = handler.events.remove(0); + if (!handler.events.isEmpty()) { + throw new RuntimeException("Handler has more log records: " + + handler.events.toString()); + } + if (!className.equals(record.getSourceClassName())) { + throw new RuntimeException("Unexpected class name in LogRecord." + + "\n\texpected: " + className + + "\n\tgot: " + record.getSourceClassName()); + } + if (!methodName.equals(record.getSourceMethodName())) { + throw new RuntimeException("Unexpected method name in LogRecord." + + "\n\texpected: " + methodName + + "\n\tgot: " + record.getSourceMethodName()); + } + if (!format.equals(record.getMessage())) { + throw new RuntimeException("Unexpected message format in LogRecord." + + "\n\texpected: " + format + + "\n\tgot: " + record.getMessage()); + } + if (!Arrays.deepEquals(params, record.getParameters())) { + throw new RuntimeException("Unexpected parameter array in LogRecord." + + "\n\texpected: " + Arrays.toString(params) + + "\n\tgot: " + Arrays.toString(record.getParameters())); + } + + handler.reset(); + } + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/java/util/logging/TestConfigurationListeners.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/logging/TestConfigurationListeners.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,489 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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.io.ByteArrayInputStream; +import java.io.FilePermission; +import java.io.IOException; +import java.security.AccessControlException; +import java.security.CodeSource; +import java.security.Permission; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.Policy; +import java.security.ProtectionDomain; +import java.util.Arrays; +import java.util.Collections; +import java.util.ConcurrentModificationException; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.PropertyPermission; +import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; +import java.util.logging.LogManager; +import java.util.logging.LoggingPermission; + +/** + * @test + * @bug 8043306 + * @summary tests LogManager.addConfigurationListener and + * LogManager.removeConfigurationListener; + * @build TestConfigurationListeners + * @run main/othervm TestConfigurationListeners UNSECURE + * @run main/othervm TestConfigurationListeners PERMISSION + * @run main/othervm TestConfigurationListeners SECURE + * @author danielfuchs + */ +public class TestConfigurationListeners { + + /** + * We will test add and remove ConfigurationListeners in 3 configurations. + * UNSECURE: No security manager. + * SECURE: With the security manager present - and the required + * LoggingPermission("control") granted. + * PERMISSION: With the security manager present - and the required + * LoggingPermission("control") *not* granted. Here we will + * test that the expected security permission is thrown. + */ + public static enum TestCase { + UNSECURE, SECURE, PERMISSION; + public void run(String name) throws Exception { + System.out.println("Running test case: " + name()); + switch (this) { + case UNSECURE: + testUnsecure(name); + break; + case SECURE: + testSecure(name); + break; + case PERMISSION: + testPermission(name); + break; + default: + throw new Error("Unknown test case: "+this); + } + } + public String loggerName(String name) { + return name; + } + } + + public static void main(String... args) throws Exception { + + + if (args == null || args.length == 0) { + args = new String[] { + TestCase.UNSECURE.name(), + TestCase.SECURE.name(), + }; + } + + for (String testName : args) { + TestCase test = TestCase.valueOf(testName); + test.run(test.loggerName("foo.bar")); + } + } + + /** + * Test without security manager. + * @param loggerName The logger to use. + * @throws Exception if the test fails. + */ + public static void testUnsecure(String loggerName) throws Exception { + if (System.getSecurityManager() != null) { + throw new Error("Security manager is set"); + } + test(loggerName); + } + + /** + * Test with security manager. + * @param loggerName The logger to use. + * @throws Exception if the test fails. + */ + public static void testSecure(String loggerName) throws Exception { + if (System.getSecurityManager() != null) { + throw new Error("Security manager is already set"); + } + Policy.setPolicy(new SimplePolicy(TestCase.SECURE)); + System.setSecurityManager(new SecurityManager()); + test(loggerName); + } + + /** + * Test the LoggingPermission("control") is required. + * @param loggerName The logger to use. + */ + public static void testPermission(String loggerName) { + TestConfigurationListener run = new TestConfigurationListener( + TestCase.PERMISSION.toString()); + if (System.getSecurityManager() != null) { + throw new Error("Security manager is already set"); + } + Policy.setPolicy(new SimplePolicy(TestCase.PERMISSION)); + System.setSecurityManager(new SecurityManager()); + + try { + LogManager.getLogManager().addConfigurationListener(run); + throw new RuntimeException("addConfigurationListener: Permission not checked!"); + } catch (AccessControlException x) { + boolean ok = false; + if (x.getPermission() instanceof LoggingPermission) { + if ("control".equals(x.getPermission().getName())) { + System.out.println("addConfigurationListener: Got expected exception: " + x); + ok = true; + } + } + if (!ok) { + throw new RuntimeException("addConfigurationListener: Unexpected exception: "+x, x); + } + } + + try { + LogManager.getLogManager().removeConfigurationListener(run); + throw new RuntimeException("removeConfigurationListener: Permission not checked!"); + } catch (AccessControlException x) { + boolean ok = false; + if (x.getPermission() instanceof LoggingPermission) { + if ("control".equals(x.getPermission().getName())) { + System.out.println("removeConfigurationListener: Got expected exception: " + x); + ok = true; + } + } + if (!ok) { + throw new RuntimeException("removeConfigurationListener: Unexpected exception: "+x, x); + } + } + try { + LogManager.getLogManager().addConfigurationListener(null); + throw new RuntimeException( + "addConfigurationListener(null): Expected NPE not thrown."); + } catch (NullPointerException npe) { + System.out.println("Got expected NPE: "+npe); + } + + try { + LogManager.getLogManager().removeConfigurationListener(null); + throw new RuntimeException( + "removeConfigurationListener(null): Expected NPE not thrown."); + } catch (NullPointerException npe) { + System.out.println("Got expected NPE: "+npe); + } + + + } + + + static class TestConfigurationListener implements Runnable { + final AtomicLong count = new AtomicLong(0); + final String name; + TestConfigurationListener(String name) { + this.name = name; + } + @Override + public void run() { + final long times = count.incrementAndGet(); + System.out.println("Configured \"" + name + "\": " + times); + } + } + + static class ConfigurationListenerException extends RuntimeException { + public ConfigurationListenerException(String msg) { + super(msg); + } + + @Override + public String toString() { + return this.getClass().getName() + ": " + getMessage(); + } + } + static class ConfigurationListenerError extends Error { + public ConfigurationListenerError(String msg) { + super(msg); + } + + @Override + public String toString() { + return this.getClass().getName() + ": " + getMessage(); + } + } + + static class ThrowingConfigurationListener extends TestConfigurationListener { + + final boolean error; + public ThrowingConfigurationListener(String name, boolean error) { + super(name); + this.error = error; + } + + @Override + public void run() { + if (error) + throw new ConfigurationListenerError(name); + else + throw new ConfigurationListenerException(name); + } + + @Override + public String toString() { + final Class type = + error ? ConfigurationListenerError.class + : ConfigurationListenerException.class; + return type.getName()+ ": " + name; + } + + } + + private static void expect(TestConfigurationListener listener, long value) { + final long got = listener.count.longValue(); + if (got != value) { + throw new RuntimeException(listener.name + " expected " + value +", got " + got); + } + + } + + public interface ThrowingConsumer { + public void accept(T t) throws I; + } + + public static class ReadConfiguration implements ThrowingConsumer { + + @Override + public void accept(LogManager t) throws IOException { + t.readConfiguration(); + } + + } + + public static void test(String loggerName) throws Exception { + System.out.println("Starting test for " + loggerName); + test("m.readConfiguration()", (m) -> m.readConfiguration()); + test("m.readConfiguration(new ByteArrayInputStream(new byte[0]))", + (m) -> m.readConfiguration(new ByteArrayInputStream(new byte[0]))); + System.out.println("Test passed for " + loggerName); + } + + public static void test(String testName, + ThrowingConsumer readConfiguration) throws Exception { + + + System.out.println("\nBEGIN " + testName); + LogManager m = LogManager.getLogManager(); + + final TestConfigurationListener l1 = new TestConfigurationListener("l#1"); + final TestConfigurationListener l2 = new TestConfigurationListener("l#2"); + final TestConfigurationListener l3 = new ThrowingConfigurationListener("l#3", false); + final TestConfigurationListener l4 = new ThrowingConfigurationListener("l#4", true); + final TestConfigurationListener l5 = new ThrowingConfigurationListener("l#5", false); + + final Set expectedExceptions = + Collections.unmodifiableSet( + new HashSet<>(Arrays.asList( + l3.toString(), l4.toString(), l5.toString()))); + + m.addConfigurationListener(l1); + m.addConfigurationListener(l2); + expect(l1, 0); + expect(l2, 0); + + readConfiguration.accept(m); + expect(l1, 1); + expect(l2, 1); + m.addConfigurationListener(l1); + expect(l1, 1); + expect(l2, 1); + readConfiguration.accept(m); + expect(l1, 2); + expect(l2, 2); + m.removeConfigurationListener(l1); + expect(l1, 2); + expect(l2, 2); + readConfiguration.accept(m); + expect(l1, 2); + expect(l2, 3); + m.removeConfigurationListener(l1); + expect(l1, 2); + expect(l2, 3); + readConfiguration.accept(m); + expect(l1, 2); + expect(l2, 4); + m.removeConfigurationListener(l2); + expect(l1, 2); + expect(l2, 4); + readConfiguration.accept(m); + expect(l1, 2); + expect(l2, 4); + + // l1 and l2 should no longer be present: this should not fail... + m.removeConfigurationListener(l1); + m.removeConfigurationListener(l1); + m.removeConfigurationListener(l2); + m.removeConfigurationListener(l2); + expect(l1, 2); + expect(l2, 4); + + readConfiguration.accept(m); + expect(l1, 2); + expect(l2, 4); + + // add back l1 and l2 + m.addConfigurationListener(l1); + m.addConfigurationListener(l2); + expect(l1, 2); + expect(l2, 4); + + readConfiguration.accept(m); + expect(l1, 3); + expect(l2, 5); + + m.removeConfigurationListener(l1); + m.removeConfigurationListener(l2); + expect(l1, 3); + expect(l2, 5); + + readConfiguration.accept(m); + expect(l1, 3); + expect(l2, 5); + + // Check the behavior when listeners throw exceptions + // l3, l4, and l5 will throw an error/exception. + // The first that is raised will be propagated, after all listeners + // have been invoked. The other exceptions will be added to the + // suppressed list. + // + // We will check that all listeners have been invoked and that we + // have the set of 3 exceptions expected from l3, l4, l5. + // + m.addConfigurationListener(l4); + m.addConfigurationListener(l1); + m.addConfigurationListener(l2); + m.addConfigurationListener(l3); + m.addConfigurationListener(l5); + + try { + readConfiguration.accept(m); + throw new RuntimeException("Excpected exception/error not raised"); + } catch(ConfigurationListenerException | ConfigurationListenerError t) { + final Set received = new HashSet<>(); + received.add(t.toString()); + for (Throwable s : t.getSuppressed()) { + received.add(s.toString()); + } + System.out.println("Received exceptions: " + received); + if (!expectedExceptions.equals(received)) { + throw new RuntimeException( + "List of received exceptions differs from expected:" + + "\n\texpected: " + expectedExceptions + + "\n\treceived: " + received); + } + } + expect(l1, 4); + expect(l2, 6); + + m.removeConfigurationListener(l1); + m.removeConfigurationListener(l2); + m.removeConfigurationListener(l3); + m.removeConfigurationListener(l4); + m.removeConfigurationListener(l5); + readConfiguration.accept(m); + expect(l1, 4); + expect(l2, 6); + + + try { + m.addConfigurationListener(null); + throw new RuntimeException( + "addConfigurationListener(null): Expected NPE not thrown."); + } catch (NullPointerException npe) { + System.out.println("Got expected NPE: "+npe); + } + + try { + m.removeConfigurationListener(null); + throw new RuntimeException( + "removeConfigurationListener(null): Expected NPE not thrown."); + } catch (NullPointerException npe) { + System.out.println("Got expected NPE: "+npe); + } + + System.out.println("END " + testName+"\n"); + + } + + + final static class PermissionsBuilder { + final Permissions perms; + public PermissionsBuilder() { + this(new Permissions()); + } + public PermissionsBuilder(Permissions perms) { + this.perms = perms; + } + public PermissionsBuilder add(Permission p) { + perms.add(p); + return this; + } + public PermissionsBuilder addAll(PermissionCollection col) { + if (col != null) { + for (Enumeration e = col.elements(); e.hasMoreElements(); ) { + perms.add(e.nextElement()); + } + } + return this; + } + public Permissions toPermissions() { + final PermissionsBuilder builder = new PermissionsBuilder(); + builder.addAll(perms); + return builder.perms; + } + } + + public static class SimplePolicy extends Policy { + + final Permissions permissions; + public SimplePolicy(TestCase test) { + permissions = new Permissions(); + if (test != TestCase.PERMISSION) { + permissions.add(new LoggingPermission("control", null)); + permissions.add(new PropertyPermission("java.util.logging.config.class", "read")); + permissions.add(new PropertyPermission("java.util.logging.config.file", "read")); + permissions.add(new PropertyPermission("java.home", "read")); + permissions.add(new FilePermission("<>", "read")); + } + } + + @Override + public boolean implies(ProtectionDomain domain, Permission permission) { + return permissions.implies(permission); + } + + @Override + public PermissionCollection getPermissions(CodeSource codesource) { + return new PermissionsBuilder().addAll(permissions).toPermissions(); + } + + @Override + public PermissionCollection getPermissions(ProtectionDomain domain) { + return new PermissionsBuilder().addAll(permissions).toPermissions(); + } + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/TEST.properties --- a/jdk/test/javax/sql/testng/TEST.properties Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/javax/sql/testng/TEST.properties Fri Oct 10 18:00:14 2014 +0000 @@ -1,2 +1,3 @@ # JDBC unit tests uses TestNG -TestNG.dirs= . \ No newline at end of file +TestNG.dirs= . +othervm.dirs= . diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/jars/badFactory/META-INF/services/javax.sql.rowset.RowSetFactory --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/jars/badFactory/META-INF/services/javax.sql.rowset.RowSetFactory Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1 @@ +invalid.RowSetFactoryImpl diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/jars/goodFactory/META-INF/services/javax.sql.rowset.RowSetFactory --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/jars/goodFactory/META-INF/services/javax.sql.rowset.RowSetFactory Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1 @@ +util.StubRowSetFactory diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 test.rowset; + +import java.sql.SQLException; +import javax.sql.rowset.RowSetFactory; +import javax.sql.rowset.RowSetProvider; +import static org.testng.Assert.*; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; +import util.BaseTest; + +public class RowSetFactoryTests extends BaseTest { + + // RowSet implementations that we are testing for + private final String DEFAULT_CACHEDROWSET_CLASSNAME = "com.sun.rowset.CachedRowSetImpl"; + private final String DEFAULT_FILTEREDROWSET_CLASSNAME = "com.sun.rowset.FileteredRowSetImpl"; + private final String DEFAULT_JDBCROWSET_CLASSNAME = "com.sun.rowset.JdbcRowSetImpl"; + private final String DEFAULT_JOINROWSET_CLASSNAME = "com.sun.rowset.JoinRowSetImpl"; + private final String DEFAULT_WEBROWSET_CLASSNAME = "com.sun.rowset.WebRowSetImpl"; + private final String STUB_FACTORY_CLASSNAME = "util.StubRowSetFactory"; + private final String STUB_CACHEDROWSET_CLASSNAME = "util.StubCachedRowSetImpl"; + private final String STUB_FILTEREDROWSET_CLASSNAME = "util.StubFilteredRowSetImpl"; + private final String STUB_JDBCROWSET_CLASSNAME = "util.StubJdbcRowSetImpl"; + private final String STUB_JOINROWSET_CLASSNAME = "util.StubJoinRowSetImpl"; + private final String STUB_WEBROWSET_CLASSNAME = "util.StubWebRowSetImpl"; + + + /* + * Validate that the RowSetFactory returned by RowSetProvider.newFactory() + * returns the correct RowSet implementations + */ + @Test(dataProvider = "RowSetValues", enabled = true) + public void test(RowSetFactory rsf, String impl) throws SQLException { + validateRowSetImpl(rsf, impl); + } + + /* + * Utility Method to validate the RowsetFactory returns the correct + * RowSet implementation + */ + private void validateRowSetImpl(RowSetFactory rsf, String implName) + throws SQLException { + assertNotNull(rsf, "RowSetFactory should not be null"); + switch (implName) { + case DEFAULT_CACHEDROWSET_CLASSNAME: + assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl); + break; + case DEFAULT_FILTEREDROWSET_CLASSNAME: + assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl); + break; + case DEFAULT_JDBCROWSET_CLASSNAME: + assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl); + break; + case DEFAULT_JOINROWSET_CLASSNAME: + assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl); + break; + case DEFAULT_WEBROWSET_CLASSNAME: + assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl); + break; + case STUB_CACHEDROWSET_CLASSNAME: + assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl); + break; + case STUB_FILTEREDROWSET_CLASSNAME: + assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl); + break; + case STUB_JDBCROWSET_CLASSNAME: + assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl); + break; + case STUB_WEBROWSET_CLASSNAME: + assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl); + break; + } + + } + + /* + * DataProvider used to provide the RowSetFactory and the RowSet + * implementation that should be returned + */ + @DataProvider(name = "RowSetValues") + private Object[][] RowSetValues() throws SQLException { + RowSetFactory rsf = RowSetProvider.newFactory(); + RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null); + return new Object[][]{ + {rsf, DEFAULT_CACHEDROWSET_CLASSNAME}, + {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME}, + {rsf, DEFAULT_JDBCROWSET_CLASSNAME}, + {rsf, DEFAULT_JOINROWSET_CLASSNAME}, + {rsf, DEFAULT_WEBROWSET_CLASSNAME}, + {rsf1, STUB_CACHEDROWSET_CLASSNAME}, + {rsf1, STUB_FILTEREDROWSET_CLASSNAME}, + {rsf1, STUB_JDBCROWSET_CLASSNAME}, + {rsf1, STUB_JOINROWSET_CLASSNAME}, + {rsf1, STUB_WEBROWSET_CLASSNAME} + + }; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/test/rowset/RowSetProviderTests.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/test/rowset/RowSetProviderTests.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 test.rowset; + +import com.sun.rowset.RowSetFactoryImpl; +import java.io.File; +import java.net.URL; +import java.net.URLClassLoader; +import java.sql.SQLException; +import javax.sql.rowset.RowSetFactory; +import javax.sql.rowset.RowSetProvider; +import static org.testng.Assert.*; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; +import util.BaseTest; +import util.StubRowSetFactory; + +public class RowSetProviderTests extends BaseTest { + + // Default RowSetFactory Implementation + private final String DEFFAULT_FACTORY_CLASSNAME = "com.sun.rowset.RowSetFactoryImpl"; + // Stub RowSetFactory Implementation + private final String STUB_FACTORY_CLASSNAME = "util.StubRowSetFactory"; + // Indicator that the factory implementation does not need to be checked + private final String NO_VALADATE_IMPL = ""; + // Original System property value for javax.sql.rowset.RowSetFactory + private static String origFactoryProperty; + // Original ClassLoader + private static ClassLoader cl; + // Path to the location of the jar files used by the ServiceLoader API + private static String jarPath; + + /* + * Save off the original property value for javax.sql.rowset.RowSetFactory, + * original classloader and define the path to the jars directory + */ + @BeforeClass + public static void setUpClass() throws Exception { + origFactoryProperty = System.getProperty("javax.sql.rowset.RowSetFactory"); + cl = Thread.currentThread().getContextClassLoader(); + jarPath = System.getProperty("test.src", ".") + File.separatorChar + + "jars" + File.separatorChar; + } + + /* + * Install the original javax.sql.rowset.RowSetFactory property value + */ + @AfterClass + public static void tearDownClass() throws Exception { + if (origFactoryProperty != null) { + System.setProperty("javax.sql.rowset.RowSetFactory", + origFactoryProperty); + } + } + + /* + * Clear the javax.sql.rowset.RowSetFactory property value and + * reset the classloader to its original value + */ + @AfterMethod + public void tearDownMethod() throws Exception { + System.clearProperty("javax.sql.rowset.RowSetFactory"); + Thread.currentThread().setContextClassLoader(cl); + } + + /* + * Validate that the correct RowSetFactory is returned by newFactory(). + */ + @Test(dataProvider = "RowSetFactoryValues") + public void test(RowSetFactory rsf, String impl) throws SQLException { + validateProvider(rsf, impl); + } + + /* + * Validate that the default RowSetFactory is returned by newFactory() + * when specified by the javax.sql.rowset.RowSetFactory property. + */ + @Test + public void test01() throws SQLException { + System.setProperty("javax.sql.rowset.RowSetFactory", + DEFFAULT_FACTORY_CLASSNAME); + validateProvider(RowSetProvider.newFactory(), DEFFAULT_FACTORY_CLASSNAME); + } + + /* + * Validate that the correct RowSetFactory is returned by newFactory() + * when specified by the javax.sql.rowset.RowSetFactory property. + */ + @Test(enabled = true) + public void test02() throws SQLException { + System.setProperty("javax.sql.rowset.RowSetFactory", STUB_FACTORY_CLASSNAME); + validateProvider(RowSetProvider.newFactory(), STUB_FACTORY_CLASSNAME); + } + + /* + * Validate that a SQLException is thrown by newFactory() + * when specified RowSetFactory specified by the + * javax.sql.rowset.RowSetFactory property is not valid. + */ + @Test(expectedExceptions = SQLException.class) + public void test03() throws SQLException { + System.setProperty("javax.sql.rowset.RowSetFactory", + "invalid.RowSetFactoryImpl"); + RowSetFactory rsf = RowSetProvider.newFactory(); + } + + /* + * Validate that the correct RowSetFactory is returned by newFactory() + * when specified by the ServiceLoader API. + */ + @Test + public void test04() throws Exception { + File f = new File(jarPath + "goodFactory"); + URLClassLoader loader = new URLClassLoader(new URL[]{ + new URL(f.toURI().toString())}, getClass().getClassLoader()); + Thread.currentThread().setContextClassLoader(loader); + validateProvider(RowSetProvider.newFactory(), STUB_FACTORY_CLASSNAME); + } + + /* + * Validate that a SQLException is thrown by newFactory() if the default + * RowSetFactory specified by the ServiceLoader API is not valid + */ + @Test(expectedExceptions = SQLException.class) + public void test05() throws Exception { + File f = new File(jarPath + "badFactory"); + URLClassLoader loader = new URLClassLoader(new URL[]{ + new URL(f.toURI().toString())}, getClass().getClassLoader()); + Thread.currentThread().setContextClassLoader(loader); + RowSetProvider.newFactory(); + } + + /* + * Utility Method to validate that the RowsetFactory returned from + * RowSetProvider.newFactory() is correct + */ + private void validateProvider(RowSetFactory rsf, String implName) { + assertNotNull(rsf, "RowSetFactory should not be null"); + switch (implName) { + case DEFFAULT_FACTORY_CLASSNAME: + assertTrue(rsf instanceof RowSetFactoryImpl); + break; + case STUB_FACTORY_CLASSNAME: + assertTrue(rsf instanceof StubRowSetFactory); + break; + default: + } + } + + /* + * DataProvider used to provide a RowSetFactory and the expected + * RowSetFactory implementation that should be returned + */ + @DataProvider(name = "RowSetFactoryValues") + private Object[][] RowSetFactoryValues() throws SQLException { + RowSetFactory rsf = RowSetProvider.newFactory(); + RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null); + RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null); + return new Object[][]{ + {rsf, NO_VALADATE_IMPL}, + {rsf, DEFFAULT_FACTORY_CLASSNAME}, + {rsf1, STUB_FACTORY_CLASSNAME}, + {rsf2, DEFFAULT_FACTORY_CLASSNAME} + }; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/util/StubCachedRowSetImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/util/StubCachedRowSetImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1848 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 util; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Collection; +import java.util.Map; +import javax.sql.RowSet; +import javax.sql.RowSetEvent; +import javax.sql.RowSetListener; +import javax.sql.RowSetMetaData; +import javax.sql.rowset.CachedRowSet; +import javax.sql.rowset.RowSetWarning; +import javax.sql.rowset.spi.SyncProvider; +import javax.sql.rowset.spi.SyncProviderException; + +public class StubCachedRowSetImpl implements CachedRowSet { + + public StubCachedRowSetImpl() { + } + + @Override + public void populate(ResultSet data) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute(Connection conn) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges() throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges(Connection con) throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void restoreOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void release() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoDelete() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoInsert() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoUpdate() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(int idx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(int column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(String column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SyncProvider getSyncProvider() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSyncProvider(String provider) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int size() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMetaData(RowSetMetaData md) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getTableName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTableName(String tabName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getKeyColumns() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setKeyColumns(int[] keys) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSet createShared() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopy() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopySchema() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopyNoConstraints() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSetWarning getRowSetWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getShowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShowDeleted(boolean b) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint s) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet rs, int startRow) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPageSize(int size) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getPageSize() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean nextPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previousPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUrl() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUrl(String url) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getDataSourceName() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDataSourceName(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUsername() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUsername(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getPassword() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPassword(String password) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCommand() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCommand(String cmd) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxFieldSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxFieldSize(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxRows() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxRows(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getEscapeProcessing() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setEscapeProcessing(boolean enable) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getQueryTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setQueryTimeout(int seconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setType(int type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setConcurrency(int concurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int parameterIndex, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(String parameterName, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(int parameterIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(String parameterName, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(int parameterIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(String parameterName, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(int parameterIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(String parameterName, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(int parameterIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(String parameterName, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(int parameterIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(String parameterName, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(int parameterIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(String parameterName, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(int parameterIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(String parameterName, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(String parameterName, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRef(int i, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int i, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int i, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setArray(int i, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearParameters() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(int parameterIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(int parameterIndex, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setURL(int parameterIndex, URL x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean next() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean wasNull() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCursorName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSetMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int findColumn(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isBeforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isAfterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void beforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void afterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean first() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean last() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean absolute(int row) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean relative(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previous() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchDirection(int direction) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchDirection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchSize(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getType() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getConcurrency() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowUpdated() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowInserted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(int columnIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(int columnIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(int columnIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(int columnIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(int columnIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(int columnIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(int columnIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(int columnIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(int columnIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(int columnIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(int columnIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(String columnLabel, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(String columnLabel, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(String columnLabel, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(String columnLabel, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(String columnLabel, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(String columnLabel, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(String columnLabel, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(String columnLabel, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(String columnLabel, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(String columnLabel, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(String columnLabel, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void insertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void deleteRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void refreshRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void cancelRowUpdates() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToInsertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToCurrentRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement getStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(int columnIndex, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(String columnLabel, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(int columnIndex, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(String columnLabel, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(int columnIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(String columnLabel, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(int columnIndex, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(String columnLabel, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(String columnLabel, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getMatchColumnIndexes() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String[] getMatchColumnNames() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String[] columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/util/StubFilteredRowSetImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/util/StubFilteredRowSetImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1892 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 util; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Collection; +import java.util.Map; +import javax.sql.RowSet; +import javax.sql.RowSetEvent; +import javax.sql.RowSetListener; +import javax.sql.RowSetMetaData; +import javax.sql.rowset.CachedRowSet; +import javax.sql.rowset.FilteredRowSet; +import javax.sql.rowset.Predicate; +import javax.sql.rowset.RowSetWarning; +import javax.sql.rowset.spi.SyncProvider; +import javax.sql.rowset.spi.SyncProviderException; + +public class StubFilteredRowSetImpl implements FilteredRowSet { + + public StubFilteredRowSetImpl() { + } + + @Override + public void setFilter(Predicate p) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Predicate getFilter() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void readXml(Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void readXml(InputStream iStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(ResultSet rs, Writer writer) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(ResultSet rs, OutputStream oStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(Writer writer) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(OutputStream oStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet data) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute(Connection conn) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges() throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges(Connection con) throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void restoreOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void release() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoDelete() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoInsert() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoUpdate() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(int idx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(int column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(String column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SyncProvider getSyncProvider() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSyncProvider(String provider) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int size() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMetaData(RowSetMetaData md) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getTableName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTableName(String tabName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getKeyColumns() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setKeyColumns(int[] keys) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSet createShared() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopy() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopySchema() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopyNoConstraints() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSetWarning getRowSetWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getShowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShowDeleted(boolean b) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint s) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet rs, int startRow) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPageSize(int size) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getPageSize() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean nextPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previousPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUrl() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUrl(String url) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getDataSourceName() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDataSourceName(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUsername() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUsername(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getPassword() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPassword(String password) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCommand() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCommand(String cmd) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxFieldSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxFieldSize(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxRows() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxRows(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getEscapeProcessing() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setEscapeProcessing(boolean enable) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getQueryTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setQueryTimeout(int seconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setType(int type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setConcurrency(int concurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int parameterIndex, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(String parameterName, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(int parameterIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(String parameterName, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(int parameterIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(String parameterName, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(int parameterIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(String parameterName, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(int parameterIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(String parameterName, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(int parameterIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(String parameterName, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(int parameterIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(String parameterName, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(int parameterIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(String parameterName, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(String parameterName, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRef(int i, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int i, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int i, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setArray(int i, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearParameters() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(int parameterIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(int parameterIndex, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setURL(int parameterIndex, URL x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean next() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean wasNull() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCursorName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSetMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int findColumn(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isBeforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isAfterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void beforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void afterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean first() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean last() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean absolute(int row) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean relative(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previous() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchDirection(int direction) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchDirection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchSize(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getType() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getConcurrency() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowUpdated() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowInserted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(int columnIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(int columnIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(int columnIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(int columnIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(int columnIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(int columnIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(int columnIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(int columnIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(int columnIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(int columnIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(int columnIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(String columnLabel, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(String columnLabel, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(String columnLabel, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(String columnLabel, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(String columnLabel, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(String columnLabel, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(String columnLabel, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(String columnLabel, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(String columnLabel, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(String columnLabel, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(String columnLabel, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void insertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void deleteRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void refreshRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void cancelRowUpdates() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToInsertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToCurrentRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement getStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(int columnIndex, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(String columnLabel, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(int columnIndex, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(String columnLabel, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(int columnIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(String columnLabel, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(int columnIndex, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(String columnLabel, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(String columnLabel, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getMatchColumnIndexes() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String[] getMatchColumnNames() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String[] columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/util/StubJdbcRowSetImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/util/StubJdbcRowSetImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1672 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 util; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Map; +import javax.sql.RowSetListener; +import javax.sql.rowset.JdbcRowSet; +import javax.sql.rowset.RowSetWarning; + +public class StubJdbcRowSetImpl implements JdbcRowSet { + + @Override + public boolean getShowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShowDeleted(boolean b) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSetWarning getRowSetWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getAutoCommit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAutoCommit(boolean autoCommit) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint s) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUrl() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUrl(String url) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getDataSourceName() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDataSourceName(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUsername() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUsername(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getPassword() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPassword(String password) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCommand() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCommand(String cmd) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxFieldSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxFieldSize(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxRows() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxRows(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getEscapeProcessing() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setEscapeProcessing(boolean enable) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getQueryTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setQueryTimeout(int seconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setType(int type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setConcurrency(int concurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int parameterIndex, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(String parameterName, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(int parameterIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(String parameterName, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(int parameterIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(String parameterName, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(int parameterIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(String parameterName, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(int parameterIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(String parameterName, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(int parameterIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(String parameterName, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(int parameterIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(String parameterName, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(int parameterIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(String parameterName, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(String parameterName, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRef(int i, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int i, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int i, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setArray(int i, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearParameters() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(int parameterIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(int parameterIndex, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setURL(int parameterIndex, URL x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean next() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean wasNull() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCursorName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSetMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int findColumn(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isBeforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isAfterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void beforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void afterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean first() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean last() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean absolute(int row) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean relative(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previous() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchDirection(int direction) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchDirection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchSize(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getType() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getConcurrency() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowUpdated() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowInserted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(int columnIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(int columnIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(int columnIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(int columnIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(int columnIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(int columnIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(int columnIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(int columnIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(int columnIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(int columnIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(int columnIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(String columnLabel, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(String columnLabel, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(String columnLabel, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(String columnLabel, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(String columnLabel, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(String columnLabel, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(String columnLabel, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(String columnLabel, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(String columnLabel, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(String columnLabel, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(String columnLabel, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void insertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void deleteRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void refreshRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void cancelRowUpdates() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToInsertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToCurrentRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement getStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(int columnIndex, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(String columnLabel, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(int columnIndex, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(String columnLabel, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(int columnIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(String columnLabel, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(int columnIndex, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(String columnLabel, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(String columnLabel, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getMatchColumnIndexes() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String[] getMatchColumnNames() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String[] columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/util/StubJoinRowSetImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/util/StubJoinRowSetImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1962 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 util; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Collection; +import java.util.Map; +import javax.sql.RowSet; +import javax.sql.RowSetEvent; +import javax.sql.RowSetListener; +import javax.sql.RowSetMetaData; +import javax.sql.rowset.CachedRowSet; +import javax.sql.rowset.JoinRowSet; +import javax.sql.rowset.Joinable; +import javax.sql.rowset.RowSetWarning; +import javax.sql.rowset.spi.SyncProvider; +import javax.sql.rowset.spi.SyncProviderException; + +class StubJoinRowSetImpl implements JoinRowSet { + + public StubJoinRowSetImpl() { + } + + @Override + public void addRowSet(Joinable rowset) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSet(RowSet rowset, int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSet(RowSet rowset, String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSet(RowSet[] rowset, int[] columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSet(RowSet[] rowset, String[] columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection getRowSets() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String[] getRowSetNames() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet toCachedRowSet() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean supportsCrossJoin() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean supportsInnerJoin() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean supportsLeftOuterJoin() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean supportsRightOuterJoin() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean supportsFullJoin() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setJoinType(int joinType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getWhereClause() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getJoinType() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void readXml(Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void readXml(InputStream iStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(ResultSet rs, Writer writer) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(ResultSet rs, OutputStream oStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(Writer writer) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(OutputStream oStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet data) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute(Connection conn) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges() throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges(Connection con) throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void restoreOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void release() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoDelete() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoInsert() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoUpdate() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(int idx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(int column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(String column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SyncProvider getSyncProvider() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSyncProvider(String provider) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int size() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMetaData(RowSetMetaData md) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getTableName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTableName(String tabName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getKeyColumns() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setKeyColumns(int[] keys) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSet createShared() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopy() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopySchema() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopyNoConstraints() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSetWarning getRowSetWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getShowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShowDeleted(boolean b) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint s) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet rs, int startRow) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPageSize(int size) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getPageSize() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean nextPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previousPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUrl() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUrl(String url) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getDataSourceName() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDataSourceName(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUsername() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUsername(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getPassword() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPassword(String password) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCommand() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCommand(String cmd) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxFieldSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxFieldSize(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxRows() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxRows(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getEscapeProcessing() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setEscapeProcessing(boolean enable) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getQueryTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setQueryTimeout(int seconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setType(int type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setConcurrency(int concurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int parameterIndex, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(String parameterName, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(int parameterIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(String parameterName, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(int parameterIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(String parameterName, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(int parameterIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(String parameterName, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(int parameterIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(String parameterName, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(int parameterIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(String parameterName, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(int parameterIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(String parameterName, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(int parameterIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(String parameterName, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(String parameterName, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRef(int i, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int i, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int i, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setArray(int i, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearParameters() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(int parameterIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(int parameterIndex, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setURL(int parameterIndex, URL x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean next() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean wasNull() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCursorName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSetMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int findColumn(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isBeforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isAfterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void beforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void afterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean first() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean last() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean absolute(int row) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean relative(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previous() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchDirection(int direction) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchDirection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchSize(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getType() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getConcurrency() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowUpdated() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowInserted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(int columnIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(int columnIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(int columnIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(int columnIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(int columnIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(int columnIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(int columnIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(int columnIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(int columnIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(int columnIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(int columnIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(String columnLabel, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(String columnLabel, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(String columnLabel, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(String columnLabel, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(String columnLabel, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(String columnLabel, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(String columnLabel, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(String columnLabel, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(String columnLabel, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(String columnLabel, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(String columnLabel, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void insertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void deleteRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void refreshRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void cancelRowUpdates() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToInsertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToCurrentRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement getStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(int columnIndex, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(String columnLabel, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(int columnIndex, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(String columnLabel, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(int columnIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(String columnLabel, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(int columnIndex, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(String columnLabel, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(String columnLabel, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getMatchColumnIndexes() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String[] getMatchColumnNames() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String[] columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/util/StubRowSetFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/util/StubRowSetFactory.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 util; + +import java.sql.SQLException; +import javax.sql.rowset.CachedRowSet; +import javax.sql.rowset.FilteredRowSet; +import javax.sql.rowset.JdbcRowSet; +import javax.sql.rowset.JoinRowSet; +import javax.sql.rowset.RowSetFactory; +import javax.sql.rowset.WebRowSet; + +public class StubRowSetFactory implements RowSetFactory { + + @Override + public CachedRowSet createCachedRowSet() throws SQLException { + return new StubCachedRowSetImpl(); + } + + @Override + public FilteredRowSet createFilteredRowSet() throws SQLException { + return new StubFilteredRowSetImpl(); + } + + @Override + public JdbcRowSet createJdbcRowSet() throws SQLException { + return new StubJdbcRowSetImpl(); + } + + @Override + public JoinRowSet createJoinRowSet() throws SQLException { + return new StubJoinRowSetImpl(); + } + + @Override + public WebRowSet createWebRowSet() throws SQLException { + return new StubWebRowSetImpl(); + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/javax/sql/testng/util/StubWebRowSetImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/javax/sql/testng/util/StubWebRowSetImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,1879 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 util; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Collection; +import java.util.Map; +import javax.sql.RowSet; +import javax.sql.RowSetEvent; +import javax.sql.RowSetListener; +import javax.sql.RowSetMetaData; +import javax.sql.rowset.CachedRowSet; +import javax.sql.rowset.RowSetWarning; +import javax.sql.rowset.WebRowSet; +import javax.sql.rowset.spi.SyncProvider; +import javax.sql.rowset.spi.SyncProviderException; + +public class StubWebRowSetImpl implements WebRowSet { + + @Override + public void readXml(Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void readXml(InputStream iStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(ResultSet rs, Writer writer) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(ResultSet rs, OutputStream oStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(Writer writer) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void writeXml(OutputStream oStream) throws SQLException, IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet data) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute(Connection conn) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges() throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptChanges(Connection con) throws SyncProviderException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void restoreOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void release() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoDelete() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoInsert() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void undoUpdate() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(int idx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean columnUpdated(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(int column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Collection toCollection(String column) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SyncProvider getSyncProvider() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSyncProvider(String provider) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int size() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMetaData(RowSetMetaData md) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginal() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSet getOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setOriginalRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getTableName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTableName(String tabName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getKeyColumns() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setKeyColumns(int[] keys) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSet createShared() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopy() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopySchema() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CachedRowSet createCopyNoConstraints() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowSetWarning getRowSetWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getShowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShowDeleted(boolean b) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint s) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void populate(ResultSet rs, int startRow) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPageSize(int size) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getPageSize() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean nextPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previousPage() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUrl() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUrl(String url) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getDataSourceName() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDataSourceName(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getUsername() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setUsername(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getPassword() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setPassword(String password) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCommand() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCommand(String cmd) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxFieldSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxFieldSize(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMaxRows() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxRows(int max) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getEscapeProcessing() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setEscapeProcessing(boolean enable) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getQueryTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setQueryTimeout(int seconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setType(int type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setConcurrency(int concurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int parameterIndex, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBoolean(String parameterName, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(int parameterIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setByte(String parameterName, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(int parameterIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setShort(String parameterName, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(int parameterIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setInt(String parameterName, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(int parameterIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLong(String parameterName, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(int parameterIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFloat(String parameterName, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(int parameterIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDouble(String parameterName, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(int parameterIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setString(String parameterName, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBytes(String parameterName, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAsciiStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBinaryStream(String parameterName, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCharacterStream(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(String parameterName, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setObject(int parameterIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRef(int i, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int i, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setBlob(String parameterName, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int i, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setArray(int i, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDate(String parameterName, Date x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTime(String parameterName, Time x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearParameters() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void execute() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeRowSetListener(RowSetListener listener) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(int parameterIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setRowId(String parameterName, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(int parameterIndex, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNString(String parameterName, String value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNCharacterStream(String parameterName, Reader value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(String parameterName, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, NClob value) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNClob(int parameterIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setURL(int parameterIndex, URL x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean next() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean wasNull() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getBoolean(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte getByte(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public short getShort(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getInt(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLong(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFloat(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public double getDouble(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public byte[] getBytes(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getAsciiStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getUnicodeStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getBinaryStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCursorName() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ResultSetMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int findColumn(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public BigDecimal getBigDecimal(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isBeforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isAfterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void beforeFirst() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void afterLast() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean first() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean last() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean absolute(int row) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean relative(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean previous() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchDirection(int direction) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchDirection() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFetchSize(int rows) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFetchSize() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getType() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getConcurrency() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowUpdated() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowInserted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rowDeleted() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(int columnIndex, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(int columnIndex, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(int columnIndex, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(int columnIndex, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(int columnIndex, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(int columnIndex, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(int columnIndex, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(int columnIndex, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(int columnIndex, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(int columnIndex, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(int columnIndex, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(int columnIndex, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNull(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBoolean(String columnLabel, boolean x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateByte(String columnLabel, byte x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateShort(String columnLabel, short x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateInt(String columnLabel, int x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateLong(String columnLabel, long x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateFloat(String columnLabel, float x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDouble(String columnLabel, double x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateString(String columnLabel, String x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBytes(String columnLabel, byte[] x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateDate(String columnLabel, Date x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTime(String columnLabel, Time x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateObject(String columnLabel, Object x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void insertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void deleteRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void refreshRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void cancelRowUpdates() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToInsertRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void moveToCurrentRow() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement getStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(int columnIndex, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object getObject(String columnLabel, Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Ref getRef(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob getBlob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob getClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array getArray(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Date getDate(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Time getTime(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URL getURL(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(int columnIndex, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRef(String columnLabel, Ref x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, Blob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Clob x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(int columnIndex, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateArray(String columnLabel, Array x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public RowId getRowId(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(int columnIndex, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateRowId(String columnLabel, RowId x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(int columnIndex, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNString(String columnLabel, String nString) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, NClob nClob) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob getNClob(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML getSQLXML(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getNString(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(int columnIndex) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader getNCharacterStream(String columnLabel) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(int columnIndex, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void updateNClob(String columnLabel, Reader reader) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(int columnIndex, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T getObject(String columnLabel, Class type) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMatchColumn(String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int[] getMatchColumnIndexes() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String[] getMatchColumnNames() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int columnIdx) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(int[] columnIdxes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void unsetMatchColumn(String[] columnName) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpClient.java --- a/jdk/test/sun/management/jdp/JdpClient.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +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. - */ - -import java.io.IOException; -import java.net.Inet6Address; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.NetworkInterface; -import java.net.ProtocolFamily; -import java.net.StandardProtocolFamily; -import java.net.StandardSocketOptions; -import java.nio.ByteBuffer; -import java.nio.channels.DatagramChannel; -import java.nio.channels.SelectionKey; -import java.nio.channels.Selector; -import java.util.Collections; -import java.util.Enumeration; -import java.util.Map; - -import sun.management.jdp.JdpException; -import sun.management.jdp.JdpJmxPacket; -import sun.management.jdp.JdpPacketReader; - -public class JdpClient { - - private static class PacketListener implements Runnable { - - private static final int BUFFER_LENGTH = 4096; - private final DatagramChannel channel; - private static int maxPacketCount = 1; - private static int maxEmptyPacketCount = 10; - - private void get(Map map, String key) - throws JdpException { - - if (map.get(key) == null) { - throw new JdpException("Test failed, packet field " + key + " missed"); - } - } - - private void checkFieldPresence(JdpJmxPacket p) - throws IOException, JdpException { - - byte[] b = p.getPacketData(); - - JdpPacketReader reader = new JdpPacketReader(b); - Map pMap = reader.getDiscoveryDataAsMap(); - - get(pMap, JdpJmxPacket.UUID_KEY); - get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); - get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); - // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); - get(pMap, JdpJmxPacket.PROCESS_ID_KEY); - get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); - get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); - } - - - PacketListener(DatagramChannel channel) { - this.channel = channel; - } - - @java.lang.Override - public void run() { - try { - Selector sel; - sel = Selector.open(); - channel.configureBlocking(false); - channel.register(sel, SelectionKey.OP_READ); - ByteBuffer buf = ByteBuffer.allocate(1024); - - int count = 1; - int emptyPacketsCount = 1; - - try { - while (true) { - - // Use tcpdump -U -w - -s 1400 -c 2 -vv port 7095 - // to verify that correct packet being sent - sel.selectedKeys().clear(); - buf.rewind(); - - sel.select(10 * 1000); - channel.receive(buf); - - if (buf.position() == 0) { - if (JdpDoSomething.getVerbose()) { - System.err.println("Empty packet received"); - } - if (++emptyPacketsCount > maxEmptyPacketCount) { - throw new RuntimeException("Test failed, maxEmptyPacketCount reached"); - } - - continue; - } - - buf.flip(); - byte[] dgramData = new byte[buf.remaining()]; - buf.get(dgramData); - try { - JdpJmxPacket packet = new JdpJmxPacket(dgramData); - JdpDoSomething.printJdpPacket(packet); - checkFieldPresence(packet); - if (++count > maxPacketCount) { - break; - } - } catch (JdpException e) { - e.printStackTrace(); - throw new RuntimeException("Test failed"); - } - - } - - System.out.println("OK: Test passed"); - - } finally { - sel.close(); - channel.close(); - } - } catch (IOException e) { - e.printStackTrace(); - throw new RuntimeException("Test failed"); - } - } - } - - public static void main(String[] args) { - try { - String discoveryPort = System.getProperty("com.sun.management.jdp.port"); - String discoveryAddress = System.getProperty("com.sun.management.jdp.address"); - if (discoveryAddress == null || discoveryPort == null) { - System.out.println("Test failed. address and port must be specified"); - return; - } - - int port = Integer.parseInt(discoveryPort); - InetAddress address = InetAddress.getByName(discoveryAddress); - - - ProtocolFamily family = (address instanceof Inet6Address) - ? StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; - - DatagramChannel channel; - - channel = DatagramChannel.open(family); - channel.setOption(StandardSocketOptions.SO_REUSEADDR, true); - channel.bind(new InetSocketAddress(port)); - - Enumeration nets = NetworkInterface.getNetworkInterfaces(); - for (NetworkInterface interf : Collections.list(nets)) { - if (interf.supportsMulticast()) { - try { - channel.join(address, interf); - } catch (IOException e) { - // Skip not configured interfaces - } - } - } - - PacketListener listener = new PacketListener(channel); - new Thread(listener, "Jdp Client").start(); - - } catch (RuntimeException e) { - System.out.println("Test failed."); - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Test failed. unexpected error " + e); - } - } -} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpDefaultsTest.java --- a/jdk/test/sun/management/jdp/JdpDefaultsTest.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/management/jdp/JdpDefaultsTest.java Fri Oct 10 18:00:14 2014 +0000 @@ -25,6 +25,9 @@ * A JVM with JDP on should send multicast JDP packets regularly. * * @author Alex Schenkman + */ + +/* * @test JdpDefaultsTest * @summary Assert that we can read JDP packets from a multicast socket connection, on default IP and port. * @library /lib/testlibrary diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpDoSomething.java --- a/jdk/test/sun/management/jdp/JdpDoSomething.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +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. - */ - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.util.Objects; - -import sun.management.jdp.JdpJmxPacket; -import sun.management.jdp.JdpException; - -public class JdpDoSomething { - - private static final String lockFileName = "JdpDoSomething.lck"; - private static final boolean verbose = false; - - public static boolean getVerbose() { - return verbose; - } - - public static void printJdpPacket(JdpJmxPacket p) { - if (getVerbose()) { - try { - RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); - f.write(p.getPacketData()); - f.close(); - } catch (IOException e) { - System.out.println("Can't write a dump file: " + e); - } - - System.out.println("Id: " + p.getId()); - System.out.println("Jmx: " + p.getJmxServiceUrl()); - System.out.println("Main: " + p.getMainClass()); - System.out.println("InstanceName: " + p.getInstanceName()); - System.out.println("ProccessId: " + p.getProcessId()); - System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); - System.out.println("Rmi Hostname: " + p.getRmiHostname()); - - System.out.flush(); - } - } - - public static void compaireJdpPacketEx(JdpJmxPacket p1, JdpJmxPacket p2) - throws JdpException { - - if (!Objects.equals(p1, p1)) { - throw new JdpException("Packet mismatch error"); - } - - if (!Objects.equals(p1.getMainClass(), p2.getMainClass())) { - throw new JdpException("Packet mismatch error (main class)"); - } - - if (!Objects.equals(p1.getInstanceName(), p2.getInstanceName())) { - throw new JdpException("Packet mismatch error (instance name)"); - } - } - - public static void doSomething() { - try { - File lockFile = new File(lockFileName); - lockFile.createNewFile(); - - while (lockFile.exists()) { - long datetime = lockFile.lastModified(); - long epoch = System.currentTimeMillis() / 1000; - - // Don't allow test app to run more than an hour - if (epoch - datetime > 3600) { - System.err.println("Lock is too old. Aborting"); - return; - } - Thread.sleep(1); - } - - } catch (Throwable e) { - System.err.println("Something bad happens:" + e); - } - } - - public static void main(String args[]) throws Exception { - System.err.println("main enter"); - doSomething(); - System.err.println("main exit"); - } -} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpOffTest.java --- a/jdk/test/sun/management/jdp/JdpOffTest.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/management/jdp/JdpOffTest.java Fri Oct 10 18:00:14 2014 +0000 @@ -26,6 +26,9 @@ * com.sun.management.jmxremote.autodiscovery=false should be respected. * * @author Alex Schenkman + */ + +/* * @test JdpOffTest.java * @summary Assert that no JDP packets are sent to the default address and port. * @library /lib/testlibrary diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpSpecificAddressTest.java --- a/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java Fri Oct 10 18:00:14 2014 +0000 @@ -25,6 +25,9 @@ * A JVM with JDP on should send multicast JDP packets regularly. * * @author Alex Schenkman + */ + +/* * @test JdpSpecificAddressTest * @summary Assert that we can read JDP packets from a multicast socket connection, on specific IP and port. * @library /lib/testlibrary diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpTest.sh --- a/jdk/test/sun/management/jdp/JdpTest.sh Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,358 +0,0 @@ -#!/bin/sh -x - -# Copyright (c) 2011, 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 7169888 -# @compile -XDignore.symbol.file JdpUnitTest.java JdpClient.java JdpDoSomething.java -# @run shell JdpTest.sh --jtreg --no-compile -# @summary No word Failed expected in the test output - -_verbose=no -_jtreg=no -_compile=yes - -# temporary disable jcmd related tests -# _testsuite="01,02,03,04,05" -_testsuite="01" - -_pwd=`pwd` - -_testclasses=".classes" -_testsrc="${_pwd}" -_lockFileName="JdpDoSomething.lck" - -_logname=".classes/output.txt" -_last_pid="" - -_ip="224.0.23.178" -_port="7095" -_jmxport="4545" - -_do_compile(){ - # If the test run without JTReg, we have to compile it by our self - # Under JTReg see @compile statement above - # sun.* packages is not included to symbol file lib/ct.sym so we have - # to ignore it - - if [ ! -d ${_testclasses} ] - then - mkdir -p ${_testclasses} - fi - - rm -f ${_testclasses}/*.class - - # Compile testcase - ${COMPILEJAVA}/bin/javac -XDignore.symbol.file -d ${_testclasses} \ - JdpUnitTest.java \ - JdpDoSomething.java \ - JdpClient.java - - - if [ ! -f ${_testclasses}/JdpDoSomething.class -o ! -f ${_testclasses}/JdpClient.class -o ! -f ${_testclasses}/JdpUnitTest.class ] - then - echo "ERROR: Can't compile" - exit 255 - fi -} - - -_app_start(){ - - testappname=$1 - shift - - ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} ${testappname} >> ${_logname} 2>&1 & - _last_pid=$! - -# wait until VM is actually starts. -# please note, if vm doesn't start for some reason -# jtreg kills the test by timeout. Don't file a bug. - cnt=1 - while true - do - npid=`_get_pid` - if [ "${npid}" != "" ] - then - break - fi - if [ "${cnt}" = "10" ] - then - echo "ERROR: Test app not started. Please check machine resources before filing a bug." - if [ "${_jtreg}" = "yes" ] - then - exit 255 - fi - break - fi - cnt=`expr $cnt + 1` - sleep 1 - done -} - -_get_pid(){ - ${TESTJAVA}/bin/jps | sed -n "/Jdp/s/ .*//p" -} - -_app_stop(){ - rm ${_lockFileName} - -# wait until VM is actually shuts down - while true - do - npid=`_get_pid` - if [ "${npid}" = "" ] - then - break - fi - sleep 1 - done -} - -_testme(){ - ${TESTJAVA}/bin/java \ - -cp ${_testclasses} \ - $* \ - -Dcom.sun.management.jdp.port=${_port} \ - -Dcom.sun.management.jdp.address=${_ip} \ - JdpClient -} - - -_jcmd(){ - ${TESTJAVA}/bin/jcmd JdpDoSomething $* > /dev/null 2>/dev/null -} - - -_echo(){ - echo "$*" - echo "$*" >> ${_logname} -} - -# ============= TESTS ====================================== - -test_01(){ - - _echo "**** Test one ****" - - _app_start JdpUnitTest \ - -Dcom.sun.management.jdp.port=${_port} \ - -Dcom.sun.management.jdp.address=${_ip} \ - -Dcom.sun.management.jdp.name=testme \ - -Djava.rmi.server.hostname=localhost \ - -Dcom.sun.management.jdp.pause=5 - - res=`_testme` - - case "${res}" in - OK*) - _echo "Passed" - ;; - *) - _echo "Failed!" - ;; - esac - - _app_stop -} - -test_02(){ - - _echo "**** Test two ****" - - _app_start JdpDoSomething \ - -Dcom.sun.management.jdp.port=${_port} \ - -Dcom.sun.management.jdp.address=${_ip} \ - -Dcom.sun.management.jdp.pause=5 \ - -Dcom.sun.management.jdp.name=testme \ - -Djava.rmi.server.hostname=localhost \ - -Dcom.sun.management.jmxremote.port=${_jmxport} \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=false - - res=`_testme` - - case "${res}" in - OK*) - _echo "Passed" - ;; - *) - _echo "Failed!" - ;; - esac - - _app_stop -} - -test_03(){ - - _echo "**** Test three ****" - - _app_start JdpDoSomething - - _jcmd ManagementAgent.start\ - jdp.port=${_port} \ - jdp.address=${_ip} \ - jdp.pause=5 \ - jdp.name=jcmdtest \ - jmxremote.port=${_jmxport} \ - jmxremote.authenticate=false \ - jmxremote.ssl=false - - res=`_testme` - - case "${res}" in - OK*) - _echo "Passed" - ;; - *) - _echo "Failed!" - ;; - esac - - _app_stop -} - -test_04(){ - - _echo "**** Test four ****" - - _app_start JdpDoSomething \ - -Dcom.sun.management.jmxremote.autodiscovery=true \ - -Dcom.sun.management.jdp.name=testme \ - -Djava.rmi.server.hostname=localhost \ - -Dcom.sun.management.jmxremote.port=${_jmxport} \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=false - - res=`_testme` - - case "${res}" in - OK*) - _echo "Passed" - ;; - *) - _echo "Failed!" - ;; - esac - - _app_stop -} - -test_05(){ - - _echo "**** Test five ****" - - _app_start JdpDoSomething - - _jcmd ManagementAgent.start\ - jmxremote.autodiscovery=true \ - jmxremote.port=${_jmxport} \ - jmxremote.authenticate=false \ - jmxremote.ssl=false - - - res=`_testme` - - case "${res}" in - OK*) - _echo "Passed" - ;; - *) - _echo "Failed!" - ;; - esac - - _app_stop -} - - -# ============= MAIN ======================================= - -if [ "x${TESTJAVA}" = "x" ] -then - echo "TESTJAVA env have to be set" - exit -fi - -# COMPILEJAVA variable is set when we test jre -if [ "x${COMPILEJAVA}" = "x" ] -then - COMPILEJAVA="${TESTJAVA}" -fi - - -#------------------------------------------------------------------------------ -# reading parameters - -for parm in "$@" -do - case $parm in - --verbose) _verbose=yes ;; - --jtreg) _jtreg=yes ;; - --no-compile) _compile=no ;; - --testsuite=*) _testsuite=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; - *) - echo "Undefined parameter $parm. Try --help for help" - exit - ;; - esac -done - -if [ "${_compile}" = "yes" ] -then - _do_compile -fi - -if [ "${_jtreg}" = "yes" ] -then - _testclasses=${TESTCLASSES} - _testsrc=${TESTSRC} - _logname="output.txt" -fi - -# Make sure _tesclasses is absolute path -tt=`echo ${_testclasses} | sed -e 's,/,,'` -if [ "${tt}" = "${_testclasses}" ] -then - _testclasses="${_pwd}/${_testclasses}" -fi - -_policyname="${_testclasses}/policy" - -rm -f ${_logname} -rm -f ${_policyname} - -if [ -f ${_testsrc}/policy.tpl ] -then - -cat ${_testsrc}/policy.tpl | \ - sed -e "s,@_TESTCLASSES@,${_testclasses},g" -e "s,@TESTJAVA@,${TESTJAVA},g" \ - > ${_policyname} - -fi - -# Local mode tests -for i in `echo ${_testsuite} | sed -e "s/,/ /g"` -do - test_${i} -done diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/JdpUnitTest.java --- a/jdk/test/sun/management/jdp/JdpUnitTest.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +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. - */ - -import java.io.IOException; -import java.net.InetAddress; -import java.util.UUID; - -import sun.management.jdp.JdpController; -import sun.management.jdp.JdpPacket; -import sun.management.jdp.JdpJmxPacket; -import sun.management.jdp.JdpException; - -public class JdpUnitTest { - - - static byte[] russian_name = {(byte) 0xd0, (byte) 0xbf, (byte) 0xd1, (byte) 0x80, (byte) 0xd0, (byte) 0xbe, (byte) 0xd0, (byte) 0xb2, - (byte) 0xd0, (byte) 0xb5, (byte) 0xd1, (byte) 0x80, (byte) 0xd0, (byte) 0xba, (byte) 0xd0, (byte) 0xb0, - (byte) 0x20, (byte) 0xd1, (byte) 0x81, (byte) 0xd0, (byte) 0xb2, (byte) 0xd1, (byte) 0x8f, (byte) 0xd0, - (byte) 0xb7, (byte) 0xd0, (byte) 0xb8, (byte) 0x0a}; - - /** - * This test tests that complete packet is build correctly - */ - public static void PacketBuilderTest() - throws IOException, JdpException { - - /* Complete packet test */ - { - JdpJmxPacket p1 = new JdpJmxPacket(UUID.randomUUID(), "fake://unit-test"); - p1.setMainClass("FakeUnitTest"); - p1.setInstanceName(new String(russian_name, "UTF-8")); - byte[] b = p1.getPacketData(); - - JdpJmxPacket p2 = new JdpJmxPacket(b); - JdpDoSomething.printJdpPacket(p1); - JdpDoSomething.compaireJdpPacketEx(p1, p2); - } - - /*Missed field packet test*/ - { - JdpJmxPacket p1 = new JdpJmxPacket(UUID.randomUUID(), "fake://unit-test"); - p1.setMainClass("FakeUnitTest"); - p1.setInstanceName(null); - byte[] b = p1.getPacketData(); - - JdpJmxPacket p2 = new JdpJmxPacket(b); - JdpDoSomething.printJdpPacket(p1); - JdpDoSomething.compaireJdpPacketEx(p1, p2); - } - - System.out.println("OK: Test passed"); - - } - - public static void startFakeDiscoveryService() - throws IOException, JdpException { - - String discoveryPort = System.getProperty("com.sun.management.jdp.port"); - String discoveryAddress = System.getProperty("com.sun.management.jdp.address"); - InetAddress address = InetAddress.getByName(discoveryAddress); - int port = Integer.parseInt(discoveryPort); - JdpController.startDiscoveryService(address, port, "FakeDiscovery", "fake://unit-test"); - } - - public static void main(String[] args) { - try { - PacketBuilderTest(); - startFakeDiscoveryService(); - JdpDoSomething.doSomething(); - - } catch (Throwable e) { - e.printStackTrace(); - System.out.println("Test failed. unexpected error " + e); - } - } -} diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/management/jdp/README --- a/jdk/test/sun/management/jdp/README Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/management/jdp/README Fri Oct 10 18:00:14 2014 +0000 @@ -1,32 +1,4 @@ -The following test were contributed by dmitry.samersoff@oracle.com and will be ported in the near future: -JdpClient.java -JdpDoSomething.java -JdpTest.sh -JdpUnitTest.java - - -JdpTest.sh: -------------------------------------- -test_01 - basic test, check if JDP packet assembler and other - parts of JDP is not broken - -test_02 - test if JDP starts with custom parameters. (disabled) - -test_03 - test if jcmd is able to start jdp with - custom parameters (disabled) - -test_04 - test if JDP starts with default parameters (disabled) - -test_05 - test if jcmd is able to start jdp with default - parameters (disabled) - -Only test_01 is enabled at the moment. - -JdpUnitTest.java: contains unit tests used under development. - - -========================================================================== -The other Java-based tests in this folder are contributed by alex.schenkman@oracle.com +The tests in this folder are contributed by alex.schenkman@oracle.com There are three Jdp test cases in this folder: 1) Jdp is turned off. diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java --- a/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java Fri Oct 10 18:00:14 2014 +0000 @@ -47,7 +47,7 @@ * @summary Verify if CallerSensitive methods are annotated with * sun.reflect.CallerSensitive annotation * @build CallerSensitiveFinder - * @run main/othervm/timeout=900 -mx600m CallerSensitiveFinder + * @run main/othervm/timeout=900 CallerSensitiveFinder */ public class CallerSensitiveFinder { private static int numThreads = 3; diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/PKCS11Test.java --- a/jdk/test/sun/security/pkcs11/PKCS11Test.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java Fri Oct 10 18:00:14 2014 +0000 @@ -189,6 +189,8 @@ if (osName.startsWith("Win")) { osName = "Windows"; NSPR_PREFIX = "lib"; + } else if (osName.equals("Mac OS X")) { + osName = "MacOSX"; } String osid = osName + "-" + props.getProperty("os.arch") + "-" + props.getProperty("sun.arch.data.model"); @@ -507,6 +509,8 @@ PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)}); osMap.put("Windows-amd64-64", new String[]{ PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP)}); + osMap.put("MacOSX-x86_64-64", new String[]{ + PKCS11_BASE + "/nss/lib/macosx-x86_64/"}); } private final static char[] hexDigits = "0123456789abcdef".toCharArray(); diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java --- a/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /** * @test - * @bug 6298106 6275523 6420252 + * @bug 6298106 6275523 6420252 8059627 * @summary make sure we can access the NSS trust anchor module * @author Andreas Sterbenz * @library .. @@ -43,10 +43,12 @@ return; } - if (System.getProperty("os.name").toLowerCase().startsWith("win")) { - // our secmod.db file says nssckbi.*so*, so NSS does not find the - // *DLL* on windows. - System.out.println("Test currently does not work on Windows, skipping"); + // our secmod.db file says nssckbi.*so*, so NSS does not find the + // *DLL* on Windows nor the *DYLIB* on Mac OSX. + String osName = System.getProperty("os.name").toLowerCase(); + if (osName.startsWith("win") || osName.startsWith("mac")) { + System.out.println("Test currently does not work on " + osName + + ", skipping"); return; } diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libfreebl3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libfreebl3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnspr4.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnspr4.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnss3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnss3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssckbi.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssckbi.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssdbm3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssdbm3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssutil3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssutil3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplc4.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplc4.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplds4.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplds4.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsoftokn3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsoftokn3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsqlite3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsqlite3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libssl3.dylib Binary file jdk/test/sun/security/pkcs11/nss/lib/macosx-x86_64/libssl3.dylib has changed diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/tools/keytool/ListKeychainStore.sh --- a/jdk/test/sun/security/tools/keytool/ListKeychainStore.sh Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/security/tools/keytool/ListKeychainStore.sh Fri Oct 10 18:00:14 2014 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ # # @test -# @bug 7133495 +# @bug 7133495 8041740 # @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry if [ "${TESTJAVA}" = "" ] ; then @@ -49,8 +49,10 @@ KEYTOOL="${TESTJAVA}/bin/keytool ${TESTTOOLVMOPTS} -storetype KeychainStore -keystore NONE -storepass $PWD" TEMPORARY_P12="$TESTCLASSES/7133495.p12" TEMPORARY_KC="$TESTCLASSES/7133495.keychain" +TEMPORARY_LIST="$TESTCLASSES/7133495.tmp" CLEANUP_P12="rm -f $TEMPORARY_P12" CLEANUP_KC="security delete-keychain $TEMPORARY_KC" +CLEANUP_LIST="rm -f $TEMPORARY_LIST" # Count the number of private key entries in the Keychain keystores @@ -115,6 +117,15 @@ fi echo "Imported keypairs from PKCS12 keystore into the keychain" +# Adjust the keychain search order + +echo "\"$TEMPORARY_KC\"" > $TEMPORARY_LIST +security list-keychains >> $TEMPORARY_LIST +security list-keychains -s `xargs < ${TEMPORARY_LIST}` +`$CLEANUP_LIST` +echo "Temporary keychain search order:" +security list-keychains + # Recount the number of private key entries in the Keychain keystores COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l` diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/security/tools/keytool/autotest.sh --- a/jdk/test/sun/security/tools/keytool/autotest.sh Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/security/tools/keytool/autotest.sh Fri Oct 10 18:00:14 2014 +0000 @@ -84,6 +84,9 @@ "/usr/lib/nss/libsoftokn3.so"` fi ;; + Darwin ) + LIBNAME="$TESTSRC/../../pkcs11/nss/lib/macosx-x86_64/libsoftokn3.dylib" + ;; * ) echo "Will not run test on: ${OS}" exit 0; @@ -95,6 +98,8 @@ exit 0 fi +echo "Using NSS lib at $LIBNAME" + ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . -XDignore.symbol.file \ ${TESTSRC}${FS}KeyToolTest.java || exit 10 diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/text/resources/LocaleData --- a/jdk/test/sun/text/resources/LocaleData Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/text/resources/LocaleData Fri Oct 10 18:00:14 2014 +0000 @@ -2502,7 +2502,7 @@ CalendarData/pl_PL/minimalDaysInFirstWeek=4 CalendarData/pt_PT/minimalDaysInFirstWeek=4 -#bug 4945388 +#bug 4945388 CurrencyNames/be_BY/BYR=\u0420\u0443\u0431 CurrencyNames/bg_BG/BGN=\u043B\u0432. @@ -5419,7 +5419,7 @@ FormatData/en_SG/DatePatterns/2=MMM d, yyyy FormatData/en_SG/DatePatterns/3=M/d/yy FormatData/en_SG/DateTimePatterns/0={1} {0} -# Use approved data +# Use approved data FormatData/ms/Eras/0=BCE FormatData/ms/Eras/1=CE FormatData/sr_BA/MonthNames/5=\u0458\u0443\u043d\u0438 @@ -5568,7 +5568,7 @@ FormatData/fi/AmPmMarkers/0=ap. FormatData/fi/AmPmMarkers/1=ip. -# bug 6507067 +# bug 6507067 TimeZoneNames/zh_TW/Asia\/Taipei/1=\u53f0\u7063\u6a19\u6e96\u6642\u9593 TimeZoneNames/zh_TW/Asia\/Taipei/2=TST @@ -7699,3 +7699,577 @@ # bug 8055222 CurrencyNames/lt_LT/EUR=\u20AC + +# bug 8042126 + missing MonthNarrows data +FormatData//MonthNarrows/0=1 +FormatData//MonthNarrows/1=2 +FormatData//MonthNarrows/2=3 +FormatData//MonthNarrows/3=4 +FormatData//MonthNarrows/4=5 +FormatData//MonthNarrows/5=6 +FormatData//MonthNarrows/6=7 +FormatData//MonthNarrows/7=8 +FormatData//MonthNarrows/8=9 +FormatData//MonthNarrows/9=10 +FormatData//MonthNarrows/10=11 +FormatData//MonthNarrows/11=12 +FormatData//MonthNarrows/12= +FormatData/bg/MonthNarrows/0=\u044f +FormatData/bg/MonthNarrows/1=\u0444 +FormatData/bg/MonthNarrows/2=\u043c +FormatData/bg/MonthNarrows/3=\u0430 +FormatData/bg/MonthNarrows/4=\u043c +FormatData/bg/MonthNarrows/5=\u044e +FormatData/bg/MonthNarrows/6=\u044e +FormatData/bg/MonthNarrows/7=\u0430 +FormatData/bg/MonthNarrows/8=\u0441 +FormatData/bg/MonthNarrows/9=\u043e +FormatData/bg/MonthNarrows/10=\u043d +FormatData/bg/MonthNarrows/11=\u0434 +FormatData/bg/MonthNarrows/12= +FormatData/zh_TW/MonthNarrows/0=1 +FormatData/zh_TW/MonthNarrows/1=2 +FormatData/zh_TW/MonthNarrows/2=3 +FormatData/zh_TW/MonthNarrows/3=4 +FormatData/zh_TW/MonthNarrows/4=5 +FormatData/zh_TW/MonthNarrows/5=6 +FormatData/zh_TW/MonthNarrows/6=7 +FormatData/zh_TW/MonthNarrows/7=8 +FormatData/zh_TW/MonthNarrows/8=9 +FormatData/zh_TW/MonthNarrows/9=10 +FormatData/zh_TW/MonthNarrows/10=11 +FormatData/zh_TW/MonthNarrows/11=12 +FormatData/zh_TW/MonthNarrows/12= +FormatData/it/MonthNarrows/0=G +FormatData/it/MonthNarrows/1=F +FormatData/it/MonthNarrows/2=M +FormatData/it/MonthNarrows/3=A +FormatData/it/MonthNarrows/4=M +FormatData/it/MonthNarrows/5=G +FormatData/it/MonthNarrows/6=L +FormatData/it/MonthNarrows/7=A +FormatData/it/MonthNarrows/8=S +FormatData/it/MonthNarrows/9=O +FormatData/it/MonthNarrows/10=N +FormatData/it/MonthNarrows/11=D +FormatData/it/MonthNarrows/12= +FormatData/ko/MonthNarrows/0=1\uc6d4 +FormatData/ko/MonthNarrows/1=2\uc6d4 +FormatData/ko/MonthNarrows/2=3\uc6d4 +FormatData/ko/MonthNarrows/3=4\uc6d4 +FormatData/ko/MonthNarrows/4=5\uc6d4 +FormatData/ko/MonthNarrows/5=6\uc6d4 +FormatData/ko/MonthNarrows/6=7\uc6d4 +FormatData/ko/MonthNarrows/7=8\uc6d4 +FormatData/ko/MonthNarrows/8=9\uc6d4 +FormatData/ko/MonthNarrows/9=10\uc6d4 +FormatData/ko/MonthNarrows/10=11\uc6d4 +FormatData/ko/MonthNarrows/11=12\uc6d4 +FormatData/ko/MonthNarrows/12= +FormatData/uk/MonthNarrows/0=\u0421 +FormatData/uk/MonthNarrows/1=\u041b +FormatData/uk/MonthNarrows/2=\u0411 +FormatData/uk/MonthNarrows/3=\u041a +FormatData/uk/MonthNarrows/4=\u0422 +FormatData/uk/MonthNarrows/5=\u0427 +FormatData/uk/MonthNarrows/6=\u041b +FormatData/uk/MonthNarrows/7=\u0421 +FormatData/uk/MonthNarrows/8=\u0412 +FormatData/uk/MonthNarrows/9=\u0416 +FormatData/uk/MonthNarrows/10=\u041b +FormatData/uk/MonthNarrows/11=\u0413 +FormatData/uk/MonthNarrows/12= +FormatData/lv/MonthNarrows/0=J +FormatData/lv/MonthNarrows/1=F +FormatData/lv/MonthNarrows/2=M +FormatData/lv/MonthNarrows/3=A +FormatData/lv/MonthNarrows/4=M +FormatData/lv/MonthNarrows/5=J +FormatData/lv/MonthNarrows/6=J +FormatData/lv/MonthNarrows/7=A +FormatData/lv/MonthNarrows/8=S +FormatData/lv/MonthNarrows/9=O +FormatData/lv/MonthNarrows/10=N +FormatData/lv/MonthNarrows/11=D +FormatData/lv/MonthNarrows/12= +FormatData/pt/MonthNarrows/0=J +FormatData/pt/MonthNarrows/1=F +FormatData/pt/MonthNarrows/2=M +FormatData/pt/MonthNarrows/3=A +FormatData/pt/MonthNarrows/4=M +FormatData/pt/MonthNarrows/5=J +FormatData/pt/MonthNarrows/6=J +FormatData/pt/MonthNarrows/7=A +FormatData/pt/MonthNarrows/8=S +FormatData/pt/MonthNarrows/9=O +FormatData/pt/MonthNarrows/10=N +FormatData/pt/MonthNarrows/11=D +FormatData/pt/MonthNarrows/12= +FormatData/sk/MonthNarrows/0=j +FormatData/sk/MonthNarrows/1=f +FormatData/sk/MonthNarrows/2=m +FormatData/sk/MonthNarrows/3=a +FormatData/sk/MonthNarrows/4=m +FormatData/sk/MonthNarrows/5=j +FormatData/sk/MonthNarrows/6=j +FormatData/sk/MonthNarrows/7=a +FormatData/sk/MonthNarrows/8=s +FormatData/sk/MonthNarrows/9=o +FormatData/sk/MonthNarrows/10=n +FormatData/sk/MonthNarrows/11=d +FormatData/sk/MonthNarrows/12= +FormatData/hi_IN/MonthNarrows/0=\u091c +FormatData/hi_IN/MonthNarrows/1=\u092b\u093c +FormatData/hi_IN/MonthNarrows/2=\u092e\u093e +FormatData/hi_IN/MonthNarrows/3=\u0905 +FormatData/hi_IN/MonthNarrows/4=\u092e +FormatData/hi_IN/MonthNarrows/5=\u091c\u0942 +FormatData/hi_IN/MonthNarrows/6=\u091c\u0941 +FormatData/hi_IN/MonthNarrows/7=\u0905 +FormatData/hi_IN/MonthNarrows/8=\u0938\u093f +FormatData/hi_IN/MonthNarrows/9=\u0905 +FormatData/hi_IN/MonthNarrows/10=\u0928 +FormatData/hi_IN/MonthNarrows/11=\u0926\u093f +FormatData/hi_IN/MonthNarrows/12= +FormatData/ga/MonthNarrows/0=E +FormatData/ga/MonthNarrows/1=F +FormatData/ga/MonthNarrows/2=M +FormatData/ga/MonthNarrows/3=A +FormatData/ga/MonthNarrows/4=B +FormatData/ga/MonthNarrows/5=M +FormatData/ga/MonthNarrows/6=I +FormatData/ga/MonthNarrows/7=L +FormatData/ga/MonthNarrows/8=M +FormatData/ga/MonthNarrows/9=D +FormatData/ga/MonthNarrows/10=S +FormatData/ga/MonthNarrows/11=N +FormatData/ga/MonthNarrows/12= +FormatData/et/MonthNarrows/0=J +FormatData/et/MonthNarrows/1=V +FormatData/et/MonthNarrows/2=M +FormatData/et/MonthNarrows/3=A +FormatData/et/MonthNarrows/4=M +FormatData/et/MonthNarrows/5=J +FormatData/et/MonthNarrows/6=J +FormatData/et/MonthNarrows/7=A +FormatData/et/MonthNarrows/8=S +FormatData/et/MonthNarrows/9=O +FormatData/et/MonthNarrows/10=N +FormatData/et/MonthNarrows/11=D +FormatData/et/MonthNarrows/12= +FormatData/sv/MonthNarrows/0=J +FormatData/sv/MonthNarrows/1=F +FormatData/sv/MonthNarrows/2=M +FormatData/sv/MonthNarrows/3=A +FormatData/sv/MonthNarrows/4=M +FormatData/sv/MonthNarrows/5=J +FormatData/sv/MonthNarrows/6=J +FormatData/sv/MonthNarrows/7=A +FormatData/sv/MonthNarrows/8=S +FormatData/sv/MonthNarrows/9=O +FormatData/sv/MonthNarrows/10=N +FormatData/sv/MonthNarrows/11=D +FormatData/sv/MonthNarrows/12= +FormatData/cs/MonthNarrows/0=l +FormatData/cs/MonthNarrows/1=\u00fa +FormatData/cs/MonthNarrows/2=b +FormatData/cs/MonthNarrows/3=d +FormatData/cs/MonthNarrows/4=k +FormatData/cs/MonthNarrows/5=\u010d +FormatData/cs/MonthNarrows/6=\u010d +FormatData/cs/MonthNarrows/7=s +FormatData/cs/MonthNarrows/8=z +FormatData/cs/MonthNarrows/9=\u0159 +FormatData/cs/MonthNarrows/10=l +FormatData/cs/MonthNarrows/11=p +FormatData/cs/MonthNarrows/12= +FormatData/el/MonthNarrows/0=\u0399 +FormatData/el/MonthNarrows/1=\u03a6 +FormatData/el/MonthNarrows/2=\u039c +FormatData/el/MonthNarrows/3=\u0391 +FormatData/el/MonthNarrows/4=\u039c +FormatData/el/MonthNarrows/5=\u0399 +FormatData/el/MonthNarrows/6=\u0399 +FormatData/el/MonthNarrows/7=\u0391 +FormatData/el/MonthNarrows/8=\u03a3 +FormatData/el/MonthNarrows/9=\u039f +FormatData/el/MonthNarrows/10=\u039d +FormatData/el/MonthNarrows/11=\u0394 +FormatData/el/MonthNarrows/12= +FormatData/hu/MonthNarrows/0=J +FormatData/hu/MonthNarrows/1=F +FormatData/hu/MonthNarrows/2=M +FormatData/hu/MonthNarrows/3=\u00c1 +FormatData/hu/MonthNarrows/4=M +FormatData/hu/MonthNarrows/5=J +FormatData/hu/MonthNarrows/6=J +FormatData/hu/MonthNarrows/7=A +FormatData/hu/MonthNarrows/8=Sz +FormatData/hu/MonthNarrows/9=O +FormatData/hu/MonthNarrows/10=N +FormatData/hu/MonthNarrows/11=D +FormatData/hu/MonthNarrows/12= +FormatData/es/MonthNarrows/0=E +FormatData/es/MonthNarrows/1=F +FormatData/es/MonthNarrows/2=M +FormatData/es/MonthNarrows/3=A +FormatData/es/MonthNarrows/4=M +FormatData/es/MonthNarrows/5=J +FormatData/es/MonthNarrows/6=J +FormatData/es/MonthNarrows/7=A +FormatData/es/MonthNarrows/8=S +FormatData/es/MonthNarrows/9=O +FormatData/es/MonthNarrows/10=N +FormatData/es/MonthNarrows/11=D +FormatData/es/MonthNarrows/12= +FormatData/tr/MonthNarrows/0=O +FormatData/tr/MonthNarrows/1=\u015e +FormatData/tr/MonthNarrows/2=M +FormatData/tr/MonthNarrows/3=N +FormatData/tr/MonthNarrows/4=M +FormatData/tr/MonthNarrows/5=H +FormatData/tr/MonthNarrows/6=T +FormatData/tr/MonthNarrows/7=A +FormatData/tr/MonthNarrows/8=E +FormatData/tr/MonthNarrows/9=E +FormatData/tr/MonthNarrows/10=K +FormatData/tr/MonthNarrows/11=A +FormatData/tr/MonthNarrows/12= +FormatData/hr/MonthNarrows/0=1. +FormatData/hr/MonthNarrows/1=2. +FormatData/hr/MonthNarrows/2=3. +FormatData/hr/MonthNarrows/3=4. +FormatData/hr/MonthNarrows/4=5. +FormatData/hr/MonthNarrows/5=6. +FormatData/hr/MonthNarrows/6=7. +FormatData/hr/MonthNarrows/7=8. +FormatData/hr/MonthNarrows/8=9. +FormatData/hr/MonthNarrows/9=10. +FormatData/hr/MonthNarrows/10=11. +FormatData/hr/MonthNarrows/11=12. +FormatData/hr/MonthNarrows/12= +FormatData/lt/MonthNarrows/0=S +FormatData/lt/MonthNarrows/1=V +FormatData/lt/MonthNarrows/2=K +FormatData/lt/MonthNarrows/3=B +FormatData/lt/MonthNarrows/4=G +FormatData/lt/MonthNarrows/5=B +FormatData/lt/MonthNarrows/6=L +FormatData/lt/MonthNarrows/7=R +FormatData/lt/MonthNarrows/8=R +FormatData/lt/MonthNarrows/9=S +FormatData/lt/MonthNarrows/10=L +FormatData/lt/MonthNarrows/11=G +FormatData/lt/MonthNarrows/12= +FormatData/sq/MonthNarrows/0=J +FormatData/sq/MonthNarrows/1=S +FormatData/sq/MonthNarrows/2=M +FormatData/sq/MonthNarrows/3=P +FormatData/sq/MonthNarrows/4=M +FormatData/sq/MonthNarrows/5=Q +FormatData/sq/MonthNarrows/6=K +FormatData/sq/MonthNarrows/7=G +FormatData/sq/MonthNarrows/8=S +FormatData/sq/MonthNarrows/9=T +FormatData/sq/MonthNarrows/10=N +FormatData/sq/MonthNarrows/11=D +FormatData/sq/MonthNarrows/12= +FormatData/fr/MonthNarrows/0=J +FormatData/fr/MonthNarrows/1=F +FormatData/fr/MonthNarrows/2=M +FormatData/fr/MonthNarrows/3=A +FormatData/fr/MonthNarrows/4=M +FormatData/fr/MonthNarrows/5=J +FormatData/fr/MonthNarrows/6=J +FormatData/fr/MonthNarrows/7=A +FormatData/fr/MonthNarrows/8=S +FormatData/fr/MonthNarrows/9=O +FormatData/fr/MonthNarrows/10=N +FormatData/fr/MonthNarrows/11=D +FormatData/fr/MonthNarrows/12= +FormatData/is/MonthNarrows/0=J +FormatData/is/MonthNarrows/1=F +FormatData/is/MonthNarrows/2=M +FormatData/is/MonthNarrows/3=A +FormatData/is/MonthNarrows/4=M +FormatData/is/MonthNarrows/5=J +FormatData/is/MonthNarrows/6=J +FormatData/is/MonthNarrows/7=\u00c1 +FormatData/is/MonthNarrows/8=L +FormatData/is/MonthNarrows/9=O +FormatData/is/MonthNarrows/10=N +FormatData/is/MonthNarrows/11=D +FormatData/is/MonthNarrows/12= +FormatData/de/MonthNarrows/0=J +FormatData/de/MonthNarrows/1=F +FormatData/de/MonthNarrows/2=M +FormatData/de/MonthNarrows/3=A +FormatData/de/MonthNarrows/4=M +FormatData/de/MonthNarrows/5=J +FormatData/de/MonthNarrows/6=J +FormatData/de/MonthNarrows/7=A +FormatData/de/MonthNarrows/8=S +FormatData/de/MonthNarrows/9=O +FormatData/de/MonthNarrows/10=N +FormatData/de/MonthNarrows/11=D +FormatData/de/MonthNarrows/12= +FormatData/en/MonthNarrows/0=J +FormatData/en/MonthNarrows/1=F +FormatData/en/MonthNarrows/2=M +FormatData/en/MonthNarrows/3=A +FormatData/en/MonthNarrows/4=M +FormatData/en/MonthNarrows/5=J +FormatData/en/MonthNarrows/6=J +FormatData/en/MonthNarrows/7=A +FormatData/en/MonthNarrows/8=S +FormatData/en/MonthNarrows/9=O +FormatData/en/MonthNarrows/10=N +FormatData/en/MonthNarrows/11=D +FormatData/en/MonthNarrows/12= +FormatData/ca/MonthNarrows/0=G +FormatData/ca/MonthNarrows/1=F +FormatData/ca/MonthNarrows/2=M +FormatData/ca/MonthNarrows/3=A +FormatData/ca/MonthNarrows/4=M +FormatData/ca/MonthNarrows/5=J +FormatData/ca/MonthNarrows/6=G +FormatData/ca/MonthNarrows/7=A +FormatData/ca/MonthNarrows/8=S +FormatData/ca/MonthNarrows/9=O +FormatData/ca/MonthNarrows/10=N +FormatData/ca/MonthNarrows/11=D +FormatData/ca/MonthNarrows/12= +FormatData/sl/MonthNarrows/0=j +FormatData/sl/MonthNarrows/1=f +FormatData/sl/MonthNarrows/2=m +FormatData/sl/MonthNarrows/3=a +FormatData/sl/MonthNarrows/4=m +FormatData/sl/MonthNarrows/5=j +FormatData/sl/MonthNarrows/6=j +FormatData/sl/MonthNarrows/7=a +FormatData/sl/MonthNarrows/8=s +FormatData/sl/MonthNarrows/9=o +FormatData/sl/MonthNarrows/10=n +FormatData/sl/MonthNarrows/11=d +FormatData/sl/MonthNarrows/12= +FormatData/fi/MonthNarrows/0=T +FormatData/fi/MonthNarrows/1=H +FormatData/fi/MonthNarrows/2=M +FormatData/fi/MonthNarrows/3=H +FormatData/fi/MonthNarrows/4=T +FormatData/fi/MonthNarrows/5=K +FormatData/fi/MonthNarrows/6=H +FormatData/fi/MonthNarrows/7=E +FormatData/fi/MonthNarrows/8=S +FormatData/fi/MonthNarrows/9=L +FormatData/fi/MonthNarrows/10=M +FormatData/fi/MonthNarrows/11=J +FormatData/fi/MonthNarrows/12= +FormatData/mk/MonthNarrows/0=\u0458 +FormatData/mk/MonthNarrows/1=\u0444 +FormatData/mk/MonthNarrows/2=\u043c +FormatData/mk/MonthNarrows/3=\u0430 +FormatData/mk/MonthNarrows/4=\u043c +FormatData/mk/MonthNarrows/5=\u0458 +FormatData/mk/MonthNarrows/6=\u0458 +FormatData/mk/MonthNarrows/7=\u0430 +FormatData/mk/MonthNarrows/8=\u0441 +FormatData/mk/MonthNarrows/9=\u043e +FormatData/mk/MonthNarrows/10=\u043d +FormatData/mk/MonthNarrows/11=\u0434 +FormatData/mk/MonthNarrows/12= +FormatData/sr-Latn/MonthNarrows/0=j +FormatData/sr-Latn/MonthNarrows/1=f +FormatData/sr-Latn/MonthNarrows/2=m +FormatData/sr-Latn/MonthNarrows/3=a +FormatData/sr-Latn/MonthNarrows/4=m +FormatData/sr-Latn/MonthNarrows/5=j +FormatData/sr-Latn/MonthNarrows/6=j +FormatData/sr-Latn/MonthNarrows/7=a +FormatData/sr-Latn/MonthNarrows/8=s +FormatData/sr-Latn/MonthNarrows/9=o +FormatData/sr-Latn/MonthNarrows/10=n +FormatData/sr-Latn/MonthNarrows/11=d +FormatData/sr-Latn/MonthNarrows/12= +FormatData/th/MonthNarrows/0=\u0e21.\u0e04. +FormatData/th/MonthNarrows/1=\u0e01.\u0e1e. +FormatData/th/MonthNarrows/2=\u0e21\u0e35.\u0e04. +FormatData/th/MonthNarrows/3=\u0e40\u0e21.\u0e22. +FormatData/th/MonthNarrows/4=\u0e1e.\u0e04. +FormatData/th/MonthNarrows/5=\u0e21\u0e34.\u0e22 +FormatData/th/MonthNarrows/6=\u0e01.\u0e04. +FormatData/th/MonthNarrows/7=\u0e2a.\u0e04. +FormatData/th/MonthNarrows/8=\u0e01.\u0e22. +FormatData/th/MonthNarrows/9=\u0e15.\u0e04. +FormatData/th/MonthNarrows/10=\u0e1e.\u0e22. +FormatData/th/MonthNarrows/11=\u0e18.\u0e04. +FormatData/th/MonthNarrows/12= +FormatData/ar/MonthNarrows/0=\u064a +FormatData/ar/MonthNarrows/1=\u0641 +FormatData/ar/MonthNarrows/2=\u0645 +FormatData/ar/MonthNarrows/3=\u0623 +FormatData/ar/MonthNarrows/4=\u0648 +FormatData/ar/MonthNarrows/5=\u0646 +FormatData/ar/MonthNarrows/6=\u0644 +FormatData/ar/MonthNarrows/7=\u063a +FormatData/ar/MonthNarrows/8=\u0633 +FormatData/ar/MonthNarrows/9=\u0643 +FormatData/ar/MonthNarrows/10=\u0628 +FormatData/ar/MonthNarrows/11=\u062f +FormatData/ar/MonthNarrows/12= +FormatData/ru/MonthNarrows/0=\u042f +FormatData/ru/MonthNarrows/1=\u0424 +FormatData/ru/MonthNarrows/2=\u041c +FormatData/ru/MonthNarrows/3=\u0410 +FormatData/ru/MonthNarrows/4=\u041c +FormatData/ru/MonthNarrows/5=\u0418 +FormatData/ru/MonthNarrows/6=\u0418 +FormatData/ru/MonthNarrows/7=\u0410 +FormatData/ru/MonthNarrows/8=\u0421 +FormatData/ru/MonthNarrows/9=\u041e +FormatData/ru/MonthNarrows/10=\u041d +FormatData/ru/MonthNarrows/11=\u0414 +FormatData/ru/MonthNarrows/12= +FormatData/ms/MonthNarrows/0=J +FormatData/ms/MonthNarrows/1=F +FormatData/ms/MonthNarrows/2=M +FormatData/ms/MonthNarrows/3=A +FormatData/ms/MonthNarrows/4=M +FormatData/ms/MonthNarrows/5=J +FormatData/ms/MonthNarrows/6=J +FormatData/ms/MonthNarrows/7=O +FormatData/ms/MonthNarrows/8=S +FormatData/ms/MonthNarrows/9=O +FormatData/ms/MonthNarrows/10=N +FormatData/ms/MonthNarrows/11=D +FormatData/ms/MonthNarrows/12= +FormatData/nl/MonthNarrows/0=J +FormatData/nl/MonthNarrows/1=F +FormatData/nl/MonthNarrows/2=M +FormatData/nl/MonthNarrows/3=A +FormatData/nl/MonthNarrows/4=M +FormatData/nl/MonthNarrows/5=J +FormatData/nl/MonthNarrows/6=J +FormatData/nl/MonthNarrows/7=A +FormatData/nl/MonthNarrows/8=S +FormatData/nl/MonthNarrows/9=O +FormatData/nl/MonthNarrows/10=N +FormatData/nl/MonthNarrows/11=D +FormatData/nl/MonthNarrows/12= +FormatData/vi/MonthNarrows/0=1 +FormatData/vi/MonthNarrows/1=2 +FormatData/vi/MonthNarrows/2=3 +FormatData/vi/MonthNarrows/3=4 +FormatData/vi/MonthNarrows/4=5 +FormatData/vi/MonthNarrows/5=6 +FormatData/vi/MonthNarrows/6=7 +FormatData/vi/MonthNarrows/7=8 +FormatData/vi/MonthNarrows/8=9 +FormatData/vi/MonthNarrows/9=10 +FormatData/vi/MonthNarrows/10=11 +FormatData/vi/MonthNarrows/11=12 +FormatData/vi/MonthNarrows/12= +FormatData/sr/MonthNarrows/0=\u0458 +FormatData/sr/MonthNarrows/1=\u0444 +FormatData/sr/MonthNarrows/2=\u043c +FormatData/sr/MonthNarrows/3=\u0430 +FormatData/sr/MonthNarrows/4=\u043c +FormatData/sr/MonthNarrows/5=\u0458 +FormatData/sr/MonthNarrows/6=\u0458 +FormatData/sr/MonthNarrows/7=\u0430 +FormatData/sr/MonthNarrows/8=\u0441 +FormatData/sr/MonthNarrows/9=\u043e +FormatData/sr/MonthNarrows/10=\u043d +FormatData/sr/MonthNarrows/11=\u0434 +FormatData/sr/MonthNarrows/12= +FormatData/mt/MonthNarrows/0=J +FormatData/mt/MonthNarrows/1=F +FormatData/mt/MonthNarrows/2=M +FormatData/mt/MonthNarrows/3=A +FormatData/mt/MonthNarrows/4=M +FormatData/mt/MonthNarrows/5=\u0120 +FormatData/mt/MonthNarrows/6=L +FormatData/mt/MonthNarrows/7=A +FormatData/mt/MonthNarrows/8=S +FormatData/mt/MonthNarrows/9=O +FormatData/mt/MonthNarrows/10=N +FormatData/mt/MonthNarrows/11=D +FormatData/mt/MonthNarrows/12= +FormatData/da/MonthNarrows/0=J +FormatData/da/MonthNarrows/1=F +FormatData/da/MonthNarrows/2=M +FormatData/da/MonthNarrows/3=A +FormatData/da/MonthNarrows/4=M +FormatData/da/MonthNarrows/5=J +FormatData/da/MonthNarrows/6=J +FormatData/da/MonthNarrows/7=A +FormatData/da/MonthNarrows/8=S +FormatData/da/MonthNarrows/9=O +FormatData/da/MonthNarrows/10=N +FormatData/da/MonthNarrows/11=D +FormatData/da/MonthNarrows/12= +FormatData/ro/MonthNarrows/0=I +FormatData/ro/MonthNarrows/1=F +FormatData/ro/MonthNarrows/2=M +FormatData/ro/MonthNarrows/3=A +FormatData/ro/MonthNarrows/4=M +FormatData/ro/MonthNarrows/5=I +FormatData/ro/MonthNarrows/6=I +FormatData/ro/MonthNarrows/7=A +FormatData/ro/MonthNarrows/8=S +FormatData/ro/MonthNarrows/9=O +FormatData/ro/MonthNarrows/10=N +FormatData/ro/MonthNarrows/11=D +FormatData/ro/MonthNarrows/12= +FormatData/no/MonthNarrows/0=J +FormatData/no/MonthNarrows/1=F +FormatData/no/MonthNarrows/2=M +FormatData/no/MonthNarrows/3=A +FormatData/no/MonthNarrows/4=M +FormatData/no/MonthNarrows/5=J +FormatData/no/MonthNarrows/6=J +FormatData/no/MonthNarrows/7=A +FormatData/no/MonthNarrows/8=S +FormatData/no/MonthNarrows/9=O +FormatData/no/MonthNarrows/10=N +FormatData/no/MonthNarrows/11=D +FormatData/no/MonthNarrows/12= +FormatData/pl/MonthNarrows/0=s +FormatData/pl/MonthNarrows/1=l +FormatData/pl/MonthNarrows/2=m +FormatData/pl/MonthNarrows/3=k +FormatData/pl/MonthNarrows/4=m +FormatData/pl/MonthNarrows/5=c +FormatData/pl/MonthNarrows/6=l +FormatData/pl/MonthNarrows/7=s +FormatData/pl/MonthNarrows/8=w +FormatData/pl/MonthNarrows/9=p +FormatData/pl/MonthNarrows/10=l +FormatData/pl/MonthNarrows/11=g +FormatData/pl/MonthNarrows/12= +FormatData/iw/MonthNarrows/0=1 +FormatData/iw/MonthNarrows/1=2 +FormatData/iw/MonthNarrows/2=3 +FormatData/iw/MonthNarrows/3=4 +FormatData/iw/MonthNarrows/4=5 +FormatData/iw/MonthNarrows/5=6 +FormatData/iw/MonthNarrows/6=7 +FormatData/iw/MonthNarrows/7=8 +FormatData/iw/MonthNarrows/8=9 +FormatData/iw/MonthNarrows/9=10 +FormatData/iw/MonthNarrows/10=11 +FormatData/iw/MonthNarrows/11=12 +FormatData/iw/MonthNarrows/12= +FormatData/zh/MonthNarrows/0=1 +FormatData/zh/MonthNarrows/1=2 +FormatData/zh/MonthNarrows/2=3 +FormatData/zh/MonthNarrows/3=4 +FormatData/zh/MonthNarrows/4=5 +FormatData/zh/MonthNarrows/5=6 +FormatData/zh/MonthNarrows/6=7 +FormatData/zh/MonthNarrows/7=8 +FormatData/zh/MonthNarrows/8=9 +FormatData/zh/MonthNarrows/9=10 +FormatData/zh/MonthNarrows/10=11 +FormatData/zh/MonthNarrows/11=12 +FormatData/zh/MonthNarrows/12= diff -r 3d2543e475e4 -r cd50a16cf47e jdk/test/sun/text/resources/LocaleDataTest.java --- a/jdk/test/sun/text/resources/LocaleDataTest.java Thu Oct 09 16:41:28 2014 +0400 +++ b/jdk/test/sun/text/resources/LocaleDataTest.java Fri Oct 10 18:00:14 2014 +0000 @@ -36,7 +36,7 @@ * 6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495 * 7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509 * 7114053 7074882 7040556 8013836 8021121 6192407 6931564 8027695 8017142 - * 8037343 8055222 + * 8037343 8055222 8042126 * @summary Verify locale data * */ diff -r 3d2543e475e4 -r cd50a16cf47e langtools/.hgtags --- a/langtools/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -275,3 +275,5 @@ ef5427c13e1e741c457a2ed868e3b6d6bf717754 jdk9-b30 0046d55383a9d873ffbc7253d7c5e28ab98c5bea jdk9-b31 ad99965443d19a59e810ae67b0b742bb9722f5ed jdk9-b32 +e891e0c4edc5174a4da6d19dc2d59697b79f1916 jdk9-b33 +e18407fcede818b30709913784cb6b904030531d jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Fri Oct 10 18:00:14 2014 +0000 @@ -3159,14 +3159,6 @@ result = checkId(tree, env1.enclClass.sym.type, sym, env, resultInfo); } - /** Report dependencies. - * @param from The enclosing class sym - * @param to The found identifier that the class depends on. - */ - public void reportDependence(Symbol from, Symbol to) { - // Override if you want to collect the reported dependencies. - } - public void visitSelect(JCFieldAccess tree) { // Determine the expected kind of the qualifier expression. int skind = 0; @@ -3299,10 +3291,6 @@ env.info.selectSuper = selectSuperPrev; result = checkId(tree, site, sym, env, resultInfo); - - if ((tree.sym.kind & TYP) != 0) { - reportDependence(env.enclClass.sym, tree.sym); - } } //where /** Determine symbol referenced by a Select expression, diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Fri Oct 10 18:00:14 2014 +0000 @@ -825,6 +825,10 @@ if (rcvr == null) return null; JCExpression rcvrExpr = make.Ident(rcvr); Type rcvrType = tree.sym.enclClass().type; + if (rcvrType == syms.arrayClass.type) { + // Map the receiver type to the actually type, not just "array" + rcvrType = tree.getQualifierExpression().type; + } if (!rcvr.type.tsym.isSubClass(rcvrType.tsym, types)) { rcvrExpr = make.TypeCast(make.Type(rcvrType), rcvrExpr).setType(rcvrType); } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Oct 10 18:00:14 2014 +0000 @@ -2083,9 +2083,6 @@ if ((kind & TYP) != 0) { sym = findType(env, name); - if (sym.kind==TYP) { - reportDependence(env.enclClass.sym, sym); - } if (sym.exists()) return sym; else if (sym.kind < bestSoFar.kind) bestSoFar = sym; } @@ -2094,14 +2091,6 @@ else return bestSoFar; } - /** Report dependencies. - * @param from The enclosing class sym - * @param to The found identifier that the class depends on. - */ - public void reportDependence(Symbol from, Symbol to) { - // Override if you want to collect the reported dependencies. - } - /** Find an identifier in a package which matches a specified kind set. * @param env The current environment. * @param name The identifier's name. diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java Fri Oct 10 18:00:14 2014 +0000 @@ -1228,12 +1228,6 @@ attr.postAttr(env.tree); } compileStates.put(env, CompileState.ATTR); - if (rootClasses != null && rootClasses.contains(env.enclClass)) { - // This was a class that was explicitly supplied for compilation. - // If we want to capture the public api of this class, - // then now is a good time to do it. - reportPublicApi(env.enclClass.sym); - } } finally { log.useSource(prev); @@ -1242,14 +1236,6 @@ return env; } - /** Report the public api of a class that was supplied explicitly for compilation, - * for example on the command line to javac. - * @param sym The symbol of the class. - */ - public void reportPublicApi(ClassSymbol sym) { - // Override to collect the reported public api. - } - /** * Perform dataflow checks on attributed parse trees. * These include checks for definite assignment and unreachable statements. diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java Fri Oct 10 18:00:14 2014 +0000 @@ -2271,9 +2271,11 @@ } /* - * This method parses a statement treating it as a block, relaxing the - * JLS restrictions, allows us to parse more faulty code, doing so - * enables us to provide better and accurate diagnostics to the user. + * Parse a Statement (JLS 14.5). As an enhancement to improve error recovery, + * this method will also recognize variable and class declarations (which are + * not legal for a Statement) by delegating the parsing to BlockStatement (JLS 14.2). + * If any illegal declarations are found, they will be wrapped in an erroneous tree, + * and an error will be produced by this method. */ JCStatement parseStatementAsBlock() { int pos = token.pos; @@ -2302,6 +2304,8 @@ } } + /**This method parses a statement appearing inside a block. + */ List blockStatement() { //todo: skip to anchor on error(?) int pos = token.pos; @@ -2311,7 +2315,8 @@ case LBRACE: case IF: case FOR: case WHILE: case DO: case TRY: case SWITCH: case SYNCHRONIZED: case RETURN: case THROW: case BREAK: case CONTINUE: case SEMI: case ELSE: case FINALLY: case CATCH: - return List.of(parseStatement()); + case ASSERT: + return List.of(parseSimpleStatement()); case MONKEYS_AT: case FINAL: { Comment dc = token.comment(CommentStyle.JAVADOC); @@ -2343,14 +2348,12 @@ error(token.pos, "local.enum"); dc = token.comment(CommentStyle.JAVADOC); return List.of(classOrInterfaceOrEnumDeclaration(modifiersOpt(), dc)); - case ASSERT: - return List.of(parseStatement()); default: Token prevToken = token; JCExpression t = term(EXPR | TYPE); if (token.kind == COLON && t.hasTag(IDENT)) { nextToken(); - JCStatement stat = parseStatement(); + JCStatement stat = parseStatementAsBlock(); return List.of(F.at(pos).Labelled(prevToken.name(), stat)); } else if ((lastmode & TYPE) != 0 && LAX_IDENTIFIER.accepts(token.kind)) { pos = token.pos; @@ -2389,10 +2392,8 @@ * | CONTINUE [Ident] ";" * | ASSERT Expression [ ":" Expression ] ";" * | ";" - * | ExpressionStatement - * | Ident ":" Statement */ - public JCStatement parseStatement() { + JCStatement parseSimpleStatement() { int pos = token.pos; switch (token.kind) { case LBRACE: @@ -2542,24 +2543,17 @@ JCAssert t = toP(F.at(pos).Assert(assertion, message)); return t; } - case ENUM: default: - Token prevToken = token; - JCExpression expr = parseExpression(); - if (token.kind == COLON && expr.hasTag(IDENT)) { - nextToken(); - JCStatement stat = parseStatement(); - return F.at(pos).Labelled(prevToken.name(), stat); - } else { - // This Exec is an "ExpressionStatement"; it subsumes the terminating semicolon - expr = checkExprStat(expr); - accept(SEMI); - JCExpressionStatement stat = toP(F.at(pos).Exec(expr)); - return stat; - } + Assert.error(); + return null; } } + @Override + public JCStatement parseStatement() { + return parseStatementAsBlock(); + } + private JCStatement doRecover(int startPos, ErrorRecoveryAction action, String key) { int errPos = S.errPos(); JCTree stm = action.doRecover(this); diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java Fri Oct 10 18:00:14 2014 +0000 @@ -26,6 +26,8 @@ package com.sun.tools.sjavac; import java.io.File; +import java.io.PrintWriter; +import java.io.StringWriter; import java.nio.file.Path; import java.util.Arrays; import java.util.HashSet; @@ -173,6 +175,20 @@ return null; } + public static Set union(Set s1, + Set s2) { + Set union = new HashSet<>(); + union.addAll(s1); + union.addAll(s2); + return union; + } + + public static String getStackTrace(Throwable t) { + StringWriter sw = new StringWriter(); + t.printStackTrace(new PrintWriter(sw)); + return sw.toString(); + } + // TODO: Remove when refactoring from java.io.File to java.nio.file.Path. public static File pathToFile(Path path) { return path == null ? null : path.toFile(); diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java Fri Oct 10 18:00:14 2014 +0000 @@ -172,7 +172,7 @@ } catch (IOException | ClassNotFoundException ex) { Log.error("Exception caught: " + ex); result = new CompilationResult(CompilationResult.ERROR_FATAL); - result.stderr = ex.getMessage(); + result.stderr = Util.getStackTrace(ex); } return result; } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/AttrWithDeps.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/AttrWithDeps.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.sun.tools.sjavac.comp; - -import com.sun.tools.javac.comp.Attr; -import com.sun.tools.javac.util.Context; -import com.sun.tools.javac.code.Symbol; - -/** Subclass to Attr that overrides reportDepedence. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - */ -public class AttrWithDeps extends Attr { - - /** The dependency database - */ - protected Dependencies deps; - - protected AttrWithDeps(Context context) { - super(context); - deps = Dependencies.instance(context); - } - - public static void preRegister(Context context) { - context.put(attrKey, new Context.Factory() { - public Attr make(Context c) { - Attr instance = new AttrWithDeps(c); - c.put(Attr.class, instance); - return instance; - } - }); - } - - /** Collect dependencies in the enclosing class - * @param from The enclosing class sym - * @param to The enclosing classes references this sym. - * */ - @Override - public void reportDependence(Symbol from, Symbol to) { - // Capture dependencies between the packages. - deps.collect(from.packge().fullname, to.packge().fullname); - } -} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/JavaCompilerWithDeps.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/JavaCompilerWithDeps.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.sun.tools.sjavac.comp; - -import java.util.StringTokenizer; - -import com.sun.tools.javac.main.JavaCompiler; -import com.sun.tools.javac.util.Context; -import com.sun.tools.javac.code.Symbol.ClassSymbol; - -/** Subclass to Resolve that overrides collect. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - */ -public class JavaCompilerWithDeps extends JavaCompiler { - - /** The dependency database - */ - protected Dependencies deps; - protected SjavacErrorHandler errorHandler; - - public JavaCompilerWithDeps(Context context, SjavacErrorHandler eh) { - super(context); - deps = Dependencies.instance(context); - errorHandler = eh; - needRootClasses = true; - } - - public static void preRegister(Context context, final SjavacErrorHandler eh) { - context.put(compilerKey, new Context.Factory() { - public JavaCompiler make(Context c) { - JavaCompiler instance = new JavaCompilerWithDeps(c, eh); - c.put(JavaCompiler.class, instance); - return instance; - } - }); - } - - /** Collect the public apis of classes supplied explicitly for compilation. - * @param sym The class to visit. - */ - @Override - public void reportPublicApi(ClassSymbol sym) { - // The next test will catch when source files are located in the wrong directory! - // This ought to be moved into javac as a new warning, or perhaps as part - // of the auxiliary class warning. - - // For example if sun.swing.BeanInfoUtils - // is in fact stored in: /mybuild/jdk/gensrc/javax/swing/beaninfo/BeanInfoUtils.java - - // We do not need to test that BeanInfoUtils is stored in a file named BeanInfoUtils - // since this is checked earlier. - if (sym.sourcefile != null) { - // Rewrite sun.swing.BeanInfoUtils into /sun/swing/ - StringBuilder pathb = new StringBuilder(); - StringTokenizer qn = new StringTokenizer(sym.packge().toString(), "."); - boolean first = true; - while (qn.hasMoreTokens()) { - String o = qn.nextToken(); - pathb.append("/"); - pathb.append(o); - first = false; - } - pathb.append("/"); - String path = pathb.toString(); - - // Now cut the uri to be: file:///mybuild/jdk/gensrc/javax/swing/beaninfo/ - String p = sym.sourcefile.toUri().getPath(); - // Do not use File.separatorChar here, a URI always uses slashes /. - int i = p.lastIndexOf("/"); - String pp = p.substring(0,i+1); - - // Now check if the truncated uri ends with the path. (It does not == failure!) - if (path.length() > 0 && !path.equals("/unnamed package/") && !pp.endsWith(path)) { - errorHandler.logError("Error: The source file "+sym.sourcefile.getName()+ - " is located in the wrong package directory, because it contains the class "+ - sym.getQualifiedName()); - } - } - deps.visitPubapi(sym); - } -} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/PathAndPackageVerifier.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/PathAndPackageVerifier.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import javax.tools.JavaFileObject; + +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.util.TaskEvent; +import com.sun.source.util.TaskListener; +import com.sun.tools.javac.tree.JCTree; +import com.sun.tools.javac.tree.JCTree.JCFieldAccess; +import com.sun.tools.javac.tree.JCTree.JCIdent; +import com.sun.tools.javac.util.DefinedBy; +import com.sun.tools.javac.util.DefinedBy.Api; +import com.sun.tools.javac.util.Name; + +public class PathAndPackageVerifier implements TaskListener { + + // Stores the set of compilation units whose source file path does not + // match the package declaration. + Set misplacedCompilationUnits = new HashSet<>(); + + @Override + @DefinedBy(Api.COMPILER_TREE) + public void started(TaskEvent e) { + } + + @Override + @DefinedBy(Api.COMPILER_TREE) + public void finished(TaskEvent e) { + if (e.getKind() != TaskEvent.Kind.ANALYZE) + return; + + CompilationUnitTree cu = e.getCompilationUnit(); + if (cu == null) + return; + + JavaFileObject jfo = cu.getSourceFile(); + if (jfo == null) + return; // No source file -> package doesn't matter + + JCTree pkg = (JCTree) cu.getPackageName(); + if (pkg == null) + return; // Default package. See JDK-8048144. + + Path dir = Paths.get(jfo.toUri()).normalize().getParent(); + if (!checkPathAndPackage(dir, pkg)) + misplacedCompilationUnits.add(cu); + } + + /* Returns true if dir matches pkgName. + * + * Examples: + * (a/b/c, a.b.c) gives true + * (i/j/k, i.x.k) gives false + * + * Currently (x/a/b/c, a.b.c) also gives true. See JDK-8059598. + */ + private boolean checkPathAndPackage(Path dir, JCTree pkgName) { + Iterator pathIter = new ParentIterator(dir); + Iterator pkgIter = new EnclosingPkgIterator(pkgName); + while (pathIter.hasNext() && pkgIter.hasNext()) { + if (!pathIter.next().equals(pkgIter.next())) + return false; + } + return !pkgIter.hasNext(); /*&& !pathIter.hasNext() See JDK-8059598 */ + } + + public Set getMisplacedCompilationUnits() { + return misplacedCompilationUnits; + } + + /* Iterates over the names of the parents of the given path: + * Example: dir1/dir2/dir3 results in dir3 -> dir2 -> dir1 + */ + private static class ParentIterator implements Iterator { + Path next; + ParentIterator(Path initial) { + next = initial; + } + @Override + public boolean hasNext() { + return next != null; + } + @Override + public String next() { + String tmp = next.getFileName().toString(); + next = next.getParent(); + return tmp; + } + } + + /* Iterates over the names of the enclosing packages: + * Example: pkg1.pkg2.pkg3 results in pkg3 -> pkg2 -> pkg1 + */ + private static class EnclosingPkgIterator implements Iterator { + JCTree next; + EnclosingPkgIterator(JCTree initial) { + next = initial; + } + @Override + public boolean hasNext() { + return next != null; + } + @Override + public String next() { + Name name; + if (next instanceof JCIdent) { + name = ((JCIdent) next).name; + next = null; + } else { + JCFieldAccess fa = (JCFieldAccess) next; + name = fa.name; + next = fa.selected; + } + return name.toString(); + } + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.sun.tools.sjavac.comp; - -import com.sun.tools.javac.comp.Resolve; -import com.sun.tools.javac.util.Context; -import com.sun.tools.javac.code.Symbol; - -/** Subclass to Resolve that overrides collect. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - */ -public class ResolveWithDeps extends Resolve { - - /** The dependency database - */ - protected Dependencies deps; - - protected ResolveWithDeps(Context context) { - super(context); - deps = Dependencies.instance(context); - } - - public static void preRegister(Context context) { - context.put(resolveKey, new Context.Factory() { - public Resolve make(Context c) { - Resolve instance = new ResolveWithDeps(c); - c.put(Resolve.class, instance); - return instance; - } - }); - } - /** Collect dependencies in the enclosing class - * @param from The enclosing class sym - * @param to The enclosing classes references this sym. - * */ - @Override - public void reportDependence(Symbol from, Symbol to) { - // Capture dependencies between the packages. - deps.collect(from.packge().fullname, to.packge().fullname); - } -} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacErrorHandler.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacErrorHandler.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.tools.sjavac.comp; - -/** - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - */ -public interface SjavacErrorHandler { - void logError(String msg); -} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacImpl.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacImpl.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacImpl.java Fri Oct 10 18:00:14 2014 +0000 @@ -28,20 +28,25 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.net.URI; +import java.nio.file.Paths; import java.util.Arrays; import java.util.List; import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; -import javax.tools.JavaCompiler.CompilationTask; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; +import com.sun.source.tree.CompilationUnitTree; import com.sun.tools.javac.api.JavacTaskImpl; import com.sun.tools.javac.api.JavacTool; +import com.sun.tools.javac.code.Symbol.ClassSymbol; +import com.sun.tools.javac.code.Symbol.PackageSymbol; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Options; +import com.sun.tools.sjavac.Util; +import com.sun.tools.sjavac.comp.dependencies.DependencyCollector; +import com.sun.tools.sjavac.comp.dependencies.PublicApiCollector; import com.sun.tools.sjavac.server.CompilationResult; import com.sun.tools.sjavac.server.Sjavac; import com.sun.tools.sjavac.server.SysInfo; @@ -70,20 +75,10 @@ List explicitSources, Set sourcesToCompile, Set visibleSources) { - final AtomicBoolean forcedExit = new AtomicBoolean(); - JavacTool compiler = JavacTool.create(); StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null); SmartFileManager smartFileManager = new SmartFileManager(fileManager); Context context = new Context(); - ResolveWithDeps.preRegister(context); - AttrWithDeps.preRegister(context); - JavaCompilerWithDeps.preRegister(context, new SjavacErrorHandler() { - @Override - public void logError(String msg) { - forcedExit.set(true); - } - }); // Now setup the actual compilation.... CompilationResult compilationResult = new CompilationResult(0); @@ -101,13 +96,16 @@ for (JavaFileObject i : fileManager.getJavaFileObjectsFromFiles(sourcesToCompileFiles)) { compilationUnits.append(i); } - forcedExit.set(false); + // Create a new logger. StringWriter stdoutLog = new StringWriter(); StringWriter stderrLog = new StringWriter(); PrintWriter stdout = new PrintWriter(stdoutLog); PrintWriter stderr = new PrintWriter(stderrLog); com.sun.tools.javac.main.Main.Result rc = com.sun.tools.javac.main.Main.Result.OK; + DependencyCollector depsCollector = new DependencyCollector(); + PublicApiCollector pubApiCollector = new PublicApiCollector(); + PathAndPackageVerifier papVerifier = new PathAndPackageVerifier(); try { if (compilationUnits.size() > 0) { smartFileManager.setVisibleSources(visibleSources); @@ -115,32 +113,51 @@ smartFileManager.setLog(stdout); // Do the compilation! - CompilationTask task = compiler.getTask(stderr, - smartFileManager, - null, - Arrays.asList(args), - null, - compilationUnits, - context); + JavacTaskImpl task = + (JavacTaskImpl) compiler.getTask(stderr, + smartFileManager, + null, + Arrays.asList(args), + null, + compilationUnits, + context); smartFileManager.setSymbolFileEnabled(!Options.instance(context).isSet("ignore.symbol.file")); - rc = ((JavacTaskImpl) task).doCall(); + task.addTaskListener(depsCollector); + task.addTaskListener(pubApiCollector); + task.addTaskListener(papVerifier); + rc = task.doCall(); smartFileManager.flush(); } } catch (Exception e) { - stderrLog.append(e.getMessage()); - forcedExit.set(true); + stderrLog.append(Util.getStackTrace(e)); + rc = com.sun.tools.javac.main.Main.Result.ERROR; } compilationResult.packageArtifacts = smartFileManager.getPackageArtifacts(); Dependencies deps = Dependencies.instance(context); + for (PackageSymbol from : depsCollector.getSourcePackages()) { + for (PackageSymbol to : depsCollector.getDependenciesForPkg(from)) + deps.collect(from.fullname, to.fullname); + } + + for (ClassSymbol cs : pubApiCollector.getClassSymbols()) + deps.visitPubapi(cs); + + if (papVerifier.getMisplacedCompilationUnits().size() > 0) { + for (CompilationUnitTree cu : papVerifier.getMisplacedCompilationUnits()) { + System.err.println("Misplaced compilation unit."); + System.err.println(" Directory: " + Paths.get(cu.getSourceFile().toUri()).getParent()); + System.err.println(" Package: " + cu.getPackageName()); + } + rc = com.sun.tools.javac.main.Main.Result.ERROR; + } + compilationResult.packageDependencies = deps.getDependencies(); compilationResult.packagePubapis = deps.getPubapis(); - compilationResult.stdout = stdoutLog.toString(); compilationResult.stderr = stderrLog.toString(); - - compilationResult.returnCode = rc.exitCode == 0 && forcedExit.get() ? -1 : rc.exitCode; + compilationResult.returnCode = rc.exitCode; return compilationResult; } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/Dependency.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/Dependency.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp.dependencies; + +import java.util.Set; + +import com.sun.tools.javac.code.Symbol.PackageSymbol; + +interface Dependency { + Set getPackages(); +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/DependencyCollector.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/DependencyCollector.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp.dependencies; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import com.sun.source.util.TaskEvent; +import com.sun.source.util.TaskListener; +import com.sun.tools.javac.code.Symbol.PackageSymbol; +import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; +import com.sun.tools.javac.util.DefinedBy; +import com.sun.tools.javac.util.DefinedBy.Api; +import com.sun.tools.sjavac.Util; + +public class DependencyCollector implements TaskListener { + + Map> collectedDependencies = new HashMap<>(); + + @Override + @DefinedBy(Api.COMPILER_TREE) + public void started(TaskEvent e) { + } + + @Override + @DefinedBy(Api.COMPILER_TREE) + public void finished(TaskEvent e) { + if (e.getKind() == TaskEvent.Kind.ANALYZE) { + JCCompilationUnit cu = (JCCompilationUnit) e.getCompilationUnit(); + PackageSymbol thisPkg = cu.packge; + if (thisPkg == null) { + // Compilation unit in default package. See JDK-8048144. + return; + } + DependencyScanner ds = new DependencyScanner(); + cu.accept(ds); + Set pkgDeps = ds.getResult() + .stream() + .flatMap(dep -> dep.getPackages().stream()) + .collect(Collectors.toSet()); + collectedDependencies.merge(thisPkg, pkgDeps, Util::union); + } + } + + public Set getSourcePackages() { + return collectedDependencies.keySet(); + } + + public Set getDependenciesForPkg(PackageSymbol ps) { + return collectedDependencies.get(ps); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/DependencyScanner.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/DependencyScanner.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp.dependencies; + +import java.util.HashSet; +import java.util.Set; + +import com.sun.tools.javac.code.Symbol; +import com.sun.tools.javac.code.Symbol.ClassSymbol; +import com.sun.tools.javac.code.Symbol.PackageSymbol; +import com.sun.tools.javac.code.Type; +import com.sun.tools.javac.code.TypeTag; +import com.sun.tools.javac.tree.JCTree.JCFieldAccess; +import com.sun.tools.javac.tree.JCTree.JCIdent; +import com.sun.tools.javac.tree.TreeScanner; + +class DependencyScanner extends TreeScanner { + + public final Set dependencies = new HashSet<>(); + + private boolean isValidDependency(Type t) { + if (t == null || t.isPrimitiveOrVoid() || t.isErroneous()) + return false; + TypeTag tag = t.getTag(); + return tag != TypeTag.PACKAGE + && tag != TypeTag.METHOD + && tag != TypeTag.ARRAY + && tag != TypeTag.TYPEVAR; + } + + @Override + public void visitIdent(JCIdent tree) { + if (isValidDependency(tree.type)) + dependencies.add(new TypeAndSupertypesDependency(tree.type.tsym)); + super.visitIdent(tree); + } + + @Override + public void visitSelect(JCFieldAccess tree) { + if (tree.getIdentifier().contentEquals("*")) { + Symbol sym = tree.selected instanceof JCIdent ? ((JCIdent) tree.selected).sym + : ((JCFieldAccess) tree.selected).sym; + if (sym instanceof ClassSymbol) { + ClassSymbol clsSym = (ClassSymbol) sym; + dependencies.add(new TypeAndSupertypesDependency(clsSym.type.tsym)); + } else { + dependencies.add(new PackageDependency((PackageSymbol) sym)); + } + } else if (tree.type != null && tree.type.hasTag(TypeTag.METHOD)) { // Method call? Depend on the result (even though we never access it elsewhere) + Type retType = tree.type.getReturnType(); + if (isValidDependency(retType)) + dependencies.add(new TypeAndSupertypesDependency(retType.tsym)); + } else if (isValidDependency(tree.type)) { + dependencies.add(new TypeAndSupertypesDependency(tree.type.tsym)); + } + super.visitSelect(tree); + } + + public Set getResult() { + return dependencies; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/PackageDependency.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/PackageDependency.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp.dependencies; + +import java.util.Collections; +import java.util.Set; + +import com.sun.tools.javac.code.Symbol.PackageSymbol; + +public class PackageDependency implements Dependency { + PackageSymbol ps; + public PackageDependency(PackageSymbol ps) { + this.ps = ps; + } + @Override + public Set getPackages() { + return Collections.singleton(ps); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/PublicApiCollector.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/PublicApiCollector.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp.dependencies; + +import java.util.HashSet; +import java.util.Set; + +import com.sun.source.tree.Tree; +import com.sun.source.util.TaskEvent; +import com.sun.source.util.TaskListener; +import com.sun.tools.javac.code.Symbol.ClassSymbol; +import com.sun.tools.javac.tree.JCTree.JCClassDecl; +import com.sun.tools.javac.util.DefinedBy; +import com.sun.tools.javac.util.DefinedBy.Api; + +public class PublicApiCollector implements TaskListener { + + final Set classSymbols = new HashSet<>(); + + @Override + @DefinedBy(Api.COMPILER_TREE) + public void started(TaskEvent e) { + } + + @Override + @DefinedBy(Api.COMPILER_TREE) + public void finished(TaskEvent e) { + if (e.getKind() == TaskEvent.Kind.ANALYZE) { + for (Tree t : e.getCompilationUnit().getTypeDecls()) { + if (t instanceof JCClassDecl) // Can also be a JCSkip + classSymbols.add(((JCClassDecl) t).sym); + } + } + } + + public Set getClassSymbols() { + return classSymbols; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/TypeAndSupertypesDependency.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/dependencies/TypeAndSupertypesDependency.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.sjavac.comp.dependencies; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; + +import com.sun.tools.javac.code.Symbol.ClassSymbol; +import com.sun.tools.javac.code.Symbol.PackageSymbol; +import com.sun.tools.javac.code.Symbol.TypeSymbol; +import com.sun.tools.javac.code.Kinds; +import com.sun.tools.javac.code.Type; + + +public class TypeAndSupertypesDependency implements Dependency { + + protected TypeSymbol type; + + public TypeAndSupertypesDependency(TypeSymbol type) { + this.type = Objects.requireNonNull(type); + } + + private Set allSupertypes(TypeSymbol t) { + if (t == null) + return Collections.emptySet(); + Set result = new HashSet<>(); + result.add(t); + if (t instanceof ClassSymbol) { + ClassSymbol cs = (ClassSymbol) t; + result.addAll(allSupertypes(cs.getSuperclass().tsym)); + for (Type it : cs.getInterfaces()) + result.addAll(allSupertypes(it.tsym)); + } + return result; + } + + @Override + public Set getPackages() { + if (type.kind == Kinds.ERR) + return Collections.emptySet(); + if (type instanceof ClassSymbol) { + return allSupertypes(type).stream() + .map(TypeSymbol::packge) + .collect(Collectors.toSet()); + } + throw new AssertionError("Could not get package name for " + type); + } +} + diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Fri Oct 10 18:00:14 2014 +0000 @@ -333,7 +333,7 @@ HtmlTree ul = new HtmlTree(HtmlTag.UL); ul.addStyle(HtmlStyle.blockList); for (PackageDoc pkg : pkgSet) { - Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name())); + Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(getPackageAnchorName(pkg))); Content link = getResource("doclet.ClassUse_Uses.of.0.in.1", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)), @@ -355,7 +355,7 @@ */ protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException { Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, - getHyperLink(pkg.name(), new StringContent(utils.getPackageName(pkg)))); + getHyperLink(getPackageAnchorName(pkg), new StringContent(utils.getPackageName(pkg)))); contentTree.addContent(tdFirst); HtmlTree tdLast = new HtmlTree(HtmlTag.TD); tdLast.addStyle(HtmlStyle.colLast); diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Fri Oct 10 18:00:14 2014 +0000 @@ -992,6 +992,16 @@ } /** + * Given a package, return the name to be used in HTML anchor tag. + * @param packageDoc the package. + * @return the name to be used in HTML anchor tag. + */ + public String getPackageAnchorName(PackageDoc packageDoc) { + return packageDoc == null || packageDoc.name().length() == 0 ? + SectionName.UNNAMED_PACKAGE_ANCHOR.getName() : packageDoc.name(); + } + + /** * Return the link to the given package. * * @param pkg the package to link to. diff -r 3d2543e475e4 -r cd50a16cf47e langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java Fri Oct 10 18:00:14 2014 +0000 @@ -207,7 +207,7 @@ } else { tr.addStyle(HtmlStyle.rowColor); } - addClassRow(itc.next(), packageName, tr); + addClassRow(itc.next(), usingPackage, tr); tbody.addContent(tr); } table.addContent(tbody); @@ -220,15 +220,15 @@ * Add a row for the class that uses the given package. * * @param usedClass the class that uses the given package - * @param packageName the name of the package to which the class belongs + * @param pkg the package to which the class belongs * @param contentTree the content tree to which the row will be added */ - protected void addClassRow(ClassDoc usedClass, String packageName, + protected void addClassRow(ClassDoc usedClass, PackageDoc pkg, Content contentTree) { DocPath dp = pathString(usedClass, DocPaths.CLASS_USE.resolve(DocPath.forName(usedClass))); Content td = HtmlTree.TD(HtmlStyle.colOne, - getHyperLink(dp.fragment(packageName), new StringContent(usedClass.name()))); + getHyperLink(dp.fragment(getPackageAnchorName(pkg)), new StringContent(usedClass.name()))); addIndexComment(usedClass, td); contentTree.addContent(td); } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java --- a/langtools/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java Fri Oct 10 18:00:14 2014 +0000 @@ -23,7 +23,7 @@ /* * @test - * @bug 6492694 8026567 + * @bug 6492694 8026567 8048351 * @summary Test package deprecation. * @author bpatel * @library ../lib/ @@ -70,6 +70,8 @@ "pkg1"); checkOutput("allclasses-frame.html", false, "FooDepr"); + checkOutput("class-use/C2.ModalExclusionType.html", true, + "<Unnamed>"); checkFiles(false, "pkg1/package-summary.html", diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java --- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Fri Oct 10 18:00:14 2014 +0000 @@ -23,7 +23,7 @@ /* * @test - * @bug 4496290 4985072 7006178 7068595 8016328 8050031 + * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 * @summary A simple test to ensure class-use files are correct. * @author jamieh * @library ../lib @@ -134,9 +134,12 @@ "Uses of " + "UsedInC in <Unnamed>" ); + checkOutput("class-use/UsedInC.html", true, + "

  • " + ); checkOutput("package-use.html", true, "" - + "UsedInC " + + "UsedInC " ); } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/LabeledDeclaration.java --- a/langtools/test/tools/javac/LabeledDeclaration.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/LabeledDeclaration.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,6 +1,6 @@ /* * @test /nodynamiccopyright/ - * @bug 4039843 + * @bug 4039843 8057652 * @summary The compiler should not allow labeled declarations. * @author turnidge * diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/LabeledDeclaration.out --- a/langtools/test/tools/javac/LabeledDeclaration.out Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/LabeledDeclaration.out Fri Oct 10 18:00:14 2014 +0000 @@ -1,3 +1,2 @@ -LabeledDeclaration.java:12:14: compiler.err.dot.class.expected -LabeledDeclaration.java:12:10: compiler.err.not.stmt -2 errors +LabeledDeclaration.java:12:14: compiler.err.variable.not.allowed +1 error diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6306967.java --- a/langtools/test/tools/javac/T6306967.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/T6306967.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,32 +1,9 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * 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 + * @test /nodynamiccopyright/ * @bug 6306967 * @summary Variable x is used before initialized * @author Wei Tao - * @compile/fail T6306967.java + * @compile/fail/ref=T6306967.out -XDrawDiagnostics T6306967.java */ public class T6306967 { diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6306967.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/T6306967.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,2 @@ +T6306967.java:18:28: compiler.err.var.might.not.have.been.initialized: x +1 error diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6379327.java --- a/langtools/test/tools/javac/T6379327.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/T6379327.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,32 +1,9 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * 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 + * @test /nodynamiccopyright/ * @bug 6379327 * @summary Erroneous catch block not detected with anonymous class declaration * @author Peter Jones, Wei Tao - * @compile/fail T6379327.java + * @compile/fail/ref=T6379327.out -XDrawDiagnostics T6379327.java */ import java.security.*; diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6379327.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/T6379327.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,2 @@ +T6379327.java:19:11: compiler.err.except.never.thrown.in.try: java.lang.ClassNotFoundException +1 error diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6407257.java --- a/langtools/test/tools/javac/T6407257.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/T6407257.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,32 +1,9 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * 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 + * @test /nodynamiccopyright/ * @bug 6407257 * @summary javac locks up when encountering cyclic inheritance * @author Peter von der Ah\u00e9 - * @compile/fail T6407257.java + * @compile/fail/ref=T6407257.out -XDrawDiagnostics T6407257.java */ class T6407257a extends T6407257a {} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6407257.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/T6407257.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,2 @@ +T6407257.java:9:1: compiler.err.cyclic.inheritance: T6407257a +1 error diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6663588.java --- a/langtools/test/tools/javac/T6663588.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/T6663588.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,32 +1,9 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * 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 + * @test /nodynamiccopyright/ * @bug 6663588 * @summary Compiler goes into infinite loop for Cyclic Inheritance test case * @author Maurizio Cimadamore - * @compile/fail T6663588.java + * @compile/fail/ref=T6663588.out -XDrawDiagnostics T6663588.java */ public class T6663588 extends T6663588 { diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/T6663588.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/T6663588.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,2 @@ +T6663588.java:9:8: compiler.err.cyclic.inheritance: T6663588 +1 error diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/UncaughtOverflow.java --- a/langtools/test/tools/javac/UncaughtOverflow.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/UncaughtOverflow.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,36 +1,14 @@ /* - * Copyright (c) 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. - * - * 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 4035346 + * @test /nodynamiccopyright/ + * @bug 4035346 4097402 * @summary Compiler used to allow this initialization, despite the overflow. * @author turnidge * - * @compile/fail UncaughtOverflow.java + * @compile/fail/ref=UncaughtOverflow.out -XDrawDiagnostics UncaughtOverflow.java */ public class UncaughtOverflow { - int i = 100000000000; + int i1 = 100000000000; + int i2 = -2147483649; } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/UncaughtOverflow.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/UncaughtOverflow.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,3 @@ +UncaughtOverflow.java:12:14: compiler.err.int.number.too.large: 100000000000 +UncaughtOverflow.java:13:15: compiler.err.int.number.too.large: -2147483649 +2 errors diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/UncaughtOverflow2.java --- a/langtools/test/tools/javac/UncaughtOverflow2.java Thu Oct 09 16:41:28 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. - * 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 4097402 - * @summary Compiler used to allow this initialization, despite the overflow. - * @author turnidge - * - * @compile/fail UncaughtOverflow2.java - */ - -public -class UncaughtOverflow2 { - int i = -2147483649; -} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/UseEnum.java --- a/langtools/test/tools/javac/UseEnum.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/UseEnum.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,40 +1,16 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. - * 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 + * @test /nodynamiccopyright/ * @bug 5013488 * @summary Compiler AssertionError: com.sun.tools.javac.util.Bits.incl(Bits.java:73) * - * @compile/fail UseEnum.java + * @compile/fail/ref=UseEnum.out -XDrawDiagnostics UseEnum.java */ import static java.lang.System.out; class UseEnum { - + enum Animal {cat, dog, bird, fish}; public static void main(String args[]) { - enum Animal {cat, dog, bird, fish}; Animal pet; pet = Animal.cat; diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/UseEnum.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/UseEnum.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,2 @@ +UseEnum.java:19:29: compiler.err.cant.resolve.location: kindname.variable, beast, , , (compiler.misc.location: kindname.class, UseEnum, null) +1 error diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/VoidArray.java --- a/langtools/test/tools/javac/VoidArray.java Thu Oct 09 16:41:28 2014 +0400 +++ b/langtools/test/tools/javac/VoidArray.java Fri Oct 10 18:00:14 2014 +0000 @@ -1,33 +1,10 @@ /* - * Copyright (c) 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. - * - * 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 + * @test /nodynamiccopyright/ * @bug 4034979 * @summary The compiler should never allow void[] to appear as a type * in a program. * - * @compile/fail VoidArray.java + * @compile/fail/ref=VoidArray.out -XDrawDiagnostics VoidArray.java */ public diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/VoidArray.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/VoidArray.out Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,7 @@ +VoidArray.java:12:9: compiler.err.expected: token.identifier +VoidArray.java:12:13: compiler.err.expected: token.identifier +VoidArray.java:14:9: compiler.err.expected: token.identifier +VoidArray.java:14:12: compiler.err.invalid.meth.decl.ret.type.req +VoidArray.java:14:24: compiler.err.expected: token.identifier +VoidArray.java:14:28: compiler.err.expected3: ',', ')', '[' +6 errors diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/javac/lambda/MethodReferenceArrayClone.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/lambda/MethodReferenceArrayClone.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 8056051 + * @summary int[]::clone causes "java.lang.NoClassDefFoundError: Array" + * @run main MethodReferenceArrayClone + */ + +import java.util.Arrays; +import java.util.function.Function; +import java.util.function.Supplier; + +public class MethodReferenceArrayClone { + public static void main(String[] args) { + int[] intArgs = new int[] {1, 2, 3, 4, 5}; + checkInt("int[]::clone", int[]::clone, intArgs); + checkInt("a -> a.clone()", a -> a.clone(), intArgs); + checkInt("intArgs::clone", intArgs::clone, intArgs); + + String[] stringArgs = new String[] {"hi", "de", "ho"}; + checkString("String[]::clone", String[]::clone, stringArgs); + checkString("a -> a.clone()", a -> a.clone(), stringArgs); + checkString("args::clone", stringArgs::clone, stringArgs); + } + + private static void checkInt(String label, Supplier s, int[] expected) { + if (!Arrays.equals(s.get(), expected)) { + throw new RuntimeException("Unexpected value " + label + ": " + Arrays.toString(s.get())); + } + } + + private static void checkInt(String label, Function f, int[] a) { + checkInt(label, () -> f.apply(a), a); + } + + private static void checkString(String label, Supplier s, String[] expected) { + if (!Arrays.equals(s.get(), expected)) { + throw new RuntimeException("Unexpected value " + label + ": " + Arrays.toString(s.get())); + } + } + + private static void checkString(String label, Function f, String[] a) { + checkString(label, () -> f.apply(a), a); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/DependencyCollection.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/DependencyCollection.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8056258 8048609 + * @summary Ensures that the DependencyCollector covers various cases. + * @library /tools/lib + * @build Wrapper ToolBox + * @run main Wrapper DependencyCollection + */ + +import java.io.PrintWriter; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.Comparator; +import java.util.HashSet; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import javax.tools.JavaCompiler; +import javax.tools.JavaFileObject; +import javax.tools.StandardJavaFileManager; +import javax.tools.ToolProvider; + +import com.sun.tools.javac.api.JavacTaskImpl; +import com.sun.tools.javac.code.Symbol.PackageSymbol; +import com.sun.tools.sjavac.comp.SmartFileManager; +import com.sun.tools.sjavac.comp.dependencies.DependencyCollector; + +public class DependencyCollection { + + public static void main(String[] args) { + Path src = Paths.get(ToolBox.testSrc, "test-input", "src"); + + JavaCompiler javac = ToolProvider.getSystemJavaCompiler(); + StandardJavaFileManager fileManager = javac.getStandardFileManager(null, null, null); + SmartFileManager smartFileManager = new SmartFileManager(fileManager); + smartFileManager.setSymbolFileEnabled(false); + Iterable fileObjects = + fileManager.getJavaFileObjectsFromFiles(Arrays.asList(src.resolve("pkg/Test.java").toFile())); + JavacTaskImpl task = (JavacTaskImpl) javac.getTask(new PrintWriter(System.out), + smartFileManager, + null, + Arrays.asList("-d", "classes", + "-sourcepath", src.toAbsolutePath().toString()), + null, + fileObjects); + DependencyCollector depsCollector = new DependencyCollector(); + task.addTaskListener(depsCollector); + task.doCall(); + + // Find pkg symbol + PackageSymbol pkg = findPkgSymbolWithName(depsCollector.getSourcePackages(), "pkg"); + Set foundDependencies = depsCollector.getDependenciesForPkg(pkg); + + // Print dependencies + System.out.println("Found dependencies:"); + foundDependencies.stream() + .sorted(Comparator.comparing(DependencyCollection::extractNumber)) + .forEach(p -> System.out.println(" " + p)); + + // Check result + Set found = foundDependencies.stream() + .map(DependencyCollection::extractNumber) + .collect(Collectors.toSet()); + found.remove(-1); // Dependencies with no number (java.lang etc) + Set expected = new HashSet<>(); + for (int i = 2; i <= 30; i++) { + if (i == 15) continue; // Case 15 correspond to the type of a throw-away return value. + expected.add(i); + } + + Set missing = new HashSet<>(expected); + missing.removeAll(found); + if (missing.size() > 0) { + System.out.println("Missing dependencies:"); + missing.forEach(i -> System.out.println(" Dependency " + i)); + } + + Set unexpected = new HashSet<>(found); + unexpected.removeAll(expected); + if (unexpected.size() > 0) { + System.out.println("Unexpected dependencies found:"); + unexpected.forEach(i -> System.out.println(" Dependency " + i)); + } + + if (missing.size() > 0 || unexpected.size() > 0) + throw new AssertionError("Missing and/or unexpected dependencies found."); + } + + private static PackageSymbol findPkgSymbolWithName(Set syms, String name) { + for (PackageSymbol ps : syms) + if (ps.fullname.toString().equals("pkg")) + return ps; + throw new AssertionError("Could not find package named \"pkg\"."); + } + + public static int extractNumber(PackageSymbol p) { + Matcher m = Pattern.compile("\\d+").matcher(p.fullname.toString()); + if (!m.find()) + return -1; + return Integer.parseInt(m.group()); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/IncCompInheritance.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/IncCompInheritance.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8056258 + * @summary Analysis of public API does not take super classes into account + * @library /tools/lib + * @build Wrapper ToolBox + * @run main Wrapper IncCompInheritance + */ + +import java.nio.file.Path; +import java.nio.file.Paths; + +public class IncCompInheritance extends SjavacBase { + public static void main(String... args) throws Exception { + + Path root = Paths.get(IncCompInheritance.class.getSimpleName() + "Test"); + Path src = root.resolve("src"); + Path classes = root.resolve("classes"); + + // Prep source files: A <- B <- C + String a = "package pkga; public class A { public void m() {} }"; + String b = "package pkgb; public class B extends pkga.A {}"; + String c = "package pkgc; public class C extends pkgb.B {{ new pkgb.B().m(); }}"; + toolbox.writeFile(src.resolve("pkga/A.java"), a); + toolbox.writeFile(src.resolve("pkgb/B.java"), b); + toolbox.writeFile(src.resolve("pkgc/C.java"), c); + + // Initial compile (should succeed) + String server = "--server:portfile=testserver,background=false"; + int rc1 = compile(server, "-d", classes, src); + if (rc1 != 0) + throw new AssertionError("Compilation failed unexpectedly"); + + // Remove method A.m + String aModified = "package pkga; public class A { }"; + toolbox.writeFile(src.resolve("pkga/A.java"), aModified); + + // Incremental compile (C should now be recompiled even though it + // depends on A only through inheritance via B). + // Since A.m is removed, this should fail. + int rc2 = compile(server, "-d", classes, src); + if (rc2 == 0) + throw new AssertionError("Compilation succeeded unexpectedly"); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/PackagePathMismatch.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/PackagePathMismatch.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8059349 + * @summary This test makes sure file paths matches package declarations + * @library /tools/lib + * @build Wrapper ToolBox + * @run main Wrapper PackagePathMismatch + */ + +import java.nio.file.Path; +import java.nio.file.Paths; + +public class PackagePathMismatch extends SjavacBase { + public static void main(String... args) throws Exception { + + Path root = Paths.get(PackagePathMismatch.class.getSimpleName() + "Test"); + Path src = root.resolve("src"); + Path classes = root.resolve("classes"); + + toolbox.writeFile(src.resolve("a/x/c/Test.java"), + "package a.b.c; class Test { }"); + + // Compile should fail since package a.b.c does not match path a/x/c. + String server = "--server:portfile=testserver,background=false"; + int rc1 = compile(server, "-d", classes, src); + if (rc1 == 0) + throw new AssertionError("Compilation succeeded unexpectedly"); + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/SjavacBase.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/SjavacBase.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.reflect.Method; +import java.util.Arrays; + +public class SjavacBase { + + protected final static ToolBox toolbox = new ToolBox(); + + /** + * Utility method for invoking sjavac. Method accepts Objects as arguments + * (which are turned into Strings through Object::toString) to allow clients + * to pass for instance Path objects. + */ + public static int compile(Object... args) throws ReflectiveOperationException { + // Use reflection to avoid a compile-time dependency on sjavac Main + System.err.println("compile: " + Arrays.toString(args)); + Class c = Class.forName("com.sun.tools.sjavac.Main"); + Method m = c.getDeclaredMethod("go", String[].class); + String[] strArgs = new String[args.length]; + for (int i = 0; i < args.length; i++) + strArgs[i] = args[i].toString(); + int rc = (Integer) m.invoke(null, (Object) strArgs); + return rc; + } + +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/nondependency/pkg26/Cls26.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/nondependency/pkg26/Cls26.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nondependency.pkg26; + +public class Cls26 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg/Test.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg/Test.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +// Use fully qualified names to avoid accidentally capturing dependencies in import statements. + +package pkg; + +import pkg2.*; // pkg2 as a whole +import pkg3.Cls3; // pkg3.Cls3 +import pkg25.Cls25; // pkg25.Cls25 +import nondependency.pkg26.Cls26; // pkg26.Cls26 (but not nondependency) +import pkg28.Cls28.Inner28; // pkg29.Cls28, pkg29.Cls28.Inner28 +import static pkg29.Cls29.Inner29; // pkg29.Cls29, pkg29.Cls29.Inner29 +import static pkg30.Cls30.*; // pkg30.Cls30 as a whole + +@pkg5.Anno5 // pkg5.Anno5 +public class Test // pkg23.Cls23 + extends pkg4.Cls4/*extends pkg11.Cls11*/ // pkg4.Cls4, pkg11.Cls11, pkg6.Cls6, pkg12.Cls12 + implements pkg7.Cls7, pkg8.Cls8 { // pkg7.Cls7, pkg8.Cls8, pkg9.Cls9 + + pkg27.Cls27 cls27[][][] = new pkg27.Cls27[0][0][0]; // pkg27.Cls27 + + pkg2.Cls2 cls2; + pkg19.Cls19 f19; // pkg19.Cls19 + + public static void main(String[] args) { // java.lang.String + pkg10.Cls10 o = new pkg10.Cls10(); // pkg10.Cls10 + + o.getCls13().getCls14().getCls15(); // pkg13.Cls13, pkg14.Cls14, pkg15.Cls15 + pkg23.Cls23.f24 = null; // pkg23.Cls23, pkg24.Cls24 + } + + static pkg16.Cls16 m1(pkg17.Cls17 o) { // pkg16.Cls16, pkg17.Cls17 + return null; + } + + public void m2() { // pkg18.Cls18 + } + + public T m3() { + T t; + t = null; + return t; + } + + @pkg20.Anno20(pkg21.Cls21.class) // pkg20.Anno20, pkg21.Cls21 + private void m3(@pkg22.Anno22 String s) { // pkg22.Anno22 + Runnable r = () -> { System.out.println("hello"); }; + } + + private void m4() throws Cls25 { // pkg25.Cls25 + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg10/Cls10.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg10/Cls10.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg10; +public class Cls10 { + public pkg13.Cls13 getCls13() { + return null; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg11/Cls11.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg11/Cls11.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg11; public class Cls11 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg12/Cls12.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg12/Cls12.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg12; public class Cls12 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg13/Cls13.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg13/Cls13.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg13; +public class Cls13 { + public pkg14.Cls14 getCls14() { + return null; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg14/Cls14.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg14/Cls14.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg14; +public class Cls14 { + public int[] getCls15() { + return null; + } +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg15/Cls15.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg15/Cls15.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg15; public class Cls15 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg16/Cls16.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg16/Cls16.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg16; public class Cls16 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg17/Cls17.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg17/Cls17.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg17; public class Cls17 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg18/Cls18.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg18/Cls18.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg18; public class Cls18 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg19/Cls19.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg19/Cls19.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg19; public class Cls19 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg2/Cls2.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg2/Cls2.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg2; public class Cls2 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg20/Anno20.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg20/Anno20.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg20; +public @interface Anno20 { + Class value(); +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg21/Cls21.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg21/Cls21.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg21; public class Cls21 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg22/Anno22.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg22/Anno22.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg22; +public @interface Anno22 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg23/Cls23.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg23/Cls23.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg23; +public class Cls23 { + public static pkg24.Cls24 f24; +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg24/Cls24.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg24/Cls24.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg24; public class Cls24 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg25/Cls25.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg25/Cls25.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg25; + +public class Cls25 extends Throwable { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg27/Cls27.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg27/Cls27.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg27; +public class Cls27 {} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg28/Cls28.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg28/Cls28.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg28; +public class Cls28 { + public static class Inner28 {} +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg29/Cls29.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg29/Cls29.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg29; +public class Cls29 { + public static class Inner29 {} +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg3/Cls3.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg3/Cls3.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg3; public class Cls3 { } diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg30/Cls30.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg30/Cls30.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg30; + +public class Cls30 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg4/Cls4.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg4/Cls4.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg4; +public class Cls4 extends pkg11.Cls11 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg5/Anno5.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg5/Anno5.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg5; +public @interface Anno5 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg6/Cls6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg6/Cls6.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg6; +public class Cls6 extends pkg12.Cls12 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg7/Cls7.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg7/Cls7.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg7; +public interface Cls7 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg8/Cls8.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg8/Cls8.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg8; +public interface Cls8 { +} diff -r 3d2543e475e4 -r cd50a16cf47e langtools/test/tools/sjavac/test-input/src/pkg9/Cls9.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/sjavac/test-input/src/pkg9/Cls9.java Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package pkg9; public class Cls9 { } diff -r 3d2543e475e4 -r cd50a16cf47e make/jprt.properties --- a/make/jprt.properties Thu Oct 09 16:41:28 2014 +0400 +++ b/make/jprt.properties Fri Oct 10 18:00:14 2014 +0000 @@ -483,7 +483,10 @@ ${my.make.rule.test.targets.hotspot.servertests}, \ ${my.make.rule.test.targets.hotspot.internalvmtests}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_wbapitest}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler}, \ + ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_1}, \ + ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_2}, \ + ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_3}, \ + ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_closed}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime_closed}, \ diff -r 3d2543e475e4 -r cd50a16cf47e modules.xml --- a/modules.xml Thu Oct 09 16:41:28 2014 +0400 +++ b/modules.xml Fri Oct 10 18:00:14 2014 +0000 @@ -1603,6 +1603,9 @@ jdk.rmic jdk.xml.bind jdk.xml.ws + + com.sun.jarsigner + jdk.hotspot.agent diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/.hgtags --- a/nashorn/.hgtags Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/.hgtags Fri Oct 10 18:00:14 2014 +0000 @@ -266,3 +266,5 @@ 072dbed6c5d968a6b9e156c36cd8838b4ff86ea1 jdk9-b30 77efdecfa2a5c28672b7c7dcc2d1b52dcb90d493 jdk9-b31 62ba20541b948fb98a7036d9f01baa54e95fb6fa jdk9-b32 +b374d8910e7f8de2b7ecacee9ae4cad88f23feab jdk9-b33 +4ece2dad8c37f520f1ccc1cf84870f362c8eb9d6 jdk9-b34 diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/bin/fixwhitespace.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nashorn/bin/fixwhitespace.sh Fri Oct 10 18:00:14 2014 +0000 @@ -0,0 +1,37 @@ +#!/bin/bash +# +# 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 +# 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. +# + +fix() { + #convert tabs to spaces + find . -name $1 -exec sed -i "" 's/ / /g' {} \; + #remove trailing whitespace + find . -name $1 -exec sed -i "" 's/[ ]*$//' \{} \; +} + +if [ ! -z $1 ]; then + fix $1; +else + fix "*.java" + fix "*.js" +fi diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java --- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java Fri Oct 10 18:00:14 2014 +0000 @@ -85,6 +85,7 @@ import jdk.internal.org.objectweb.asm.Handle; import jdk.internal.org.objectweb.asm.MethodVisitor; import jdk.internal.org.objectweb.asm.Type; +import jdk.nashorn.internal.objects.annotations.SpecializedFunction.LinkLogic; /** * Base class for all method generating classes. @@ -97,7 +98,7 @@ private final Type returnType; private final Type[] argumentTypes; - static final Type EMPTY_LINK_LOGIC_TYPE = Type.getType("Ljdk/nashorn/internal/objects/annotations/SpecializedFunction$LinkLogic$Empty;"); + static final Type EMPTY_LINK_LOGIC_TYPE = Type.getType(LinkLogic.getEmptyLinkLogicClass()); MethodGenerator(final MethodVisitor mv, final int access, final String name, final String descriptor) { super(Main.ASM_VERSION, mv); diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java --- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java Fri Oct 10 18:00:14 2014 +0000 @@ -38,6 +38,7 @@ import jdk.nashorn.internal.objects.annotations.ScriptClass; import jdk.nashorn.internal.objects.annotations.Setter; import jdk.nashorn.internal.objects.annotations.SpecializedFunction; +import jdk.nashorn.internal.objects.annotations.SpecializedFunction.LinkLogic; import jdk.nashorn.internal.objects.annotations.Where; import jdk.nashorn.internal.tools.nasgen.MemberInfo.Kind; @@ -55,8 +56,8 @@ static final String SETTER_ANNO_DESC = Type.getDescriptor(Setter.class); static final String PROPERTY_ANNO_DESC = Type.getDescriptor(Property.class); static final String WHERE_ENUM_DESC = Type.getDescriptor(Where.class); + static final String LINK_LOGIC_DESC = Type.getDescriptor(LinkLogic.class); static final String SPECIALIZED_FUNCTION = Type.getDescriptor(SpecializedFunction.class); - static final String LINK_LOGIC_DESC = "Ljdk/nashorn/internal/objects/annotations/SpecializedFunction$LinkLogic;"; static final Map annotations = new HashMap<>(); diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/make/BuildNashorn.gmk --- a/nashorn/make/BuildNashorn.gmk Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/make/BuildNashorn.gmk Fri Oct 10 18:00:14 2014 +0000 @@ -29,6 +29,7 @@ -include $(SPEC) include MakeBase.gmk include JavaCompilation.gmk +include SetupJavaCompilers.gmk JDK_CLASSES := $(subst $(SPACE),$(PATH_SEP),$(strip $(addprefix $(JDK_OUTPUTDIR)/modules/, \ java.base java.logging java.scripting))) @@ -63,10 +64,10 @@ # Build nasgen $(eval $(call SetupJavaCompilation,BUILD_NASGEN, \ - SETUP := GENERATE_NEWBYTECODE_DEBUG, \ + SETUP := GENERATE_OLDBYTECODE, \ SRC := $(NASGEN_SRC) $(ASM_SRC), \ BIN := $(NASHORN_OUTPUTDIR)/nasgen_classes, \ - ADD_JAVAC_FLAGS := -cp $(NASHORN_OUTPUTDIR)/nashorn_classes)) + ADD_JAVAC_FLAGS := -bootclasspath "$(BOOT_RTJAR)$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes")) # Nasgen needs nashorn classes $(BUILD_NASGEN): $(BUILD_NASHORN) diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/make/build.xml --- a/nashorn/make/build.xml Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/make/build.xml Fri Oct 10 18:00:14 2014 +0000 @@ -78,7 +78,7 @@ - + @@ -420,6 +420,7 @@ + @@ -431,7 +432,7 @@ + verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> @@ -442,6 +443,7 @@ + @@ -449,7 +451,27 @@ - + + + + + + + + + + + + + + + + + + + + + diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/make/project.properties --- a/nashorn/make/project.properties Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/make/project.properties Fri Oct 10 18:00:14 2014 +0000 @@ -286,7 +286,8 @@ # turn on assertions for tests run.test.jvmargs.main=${run.test.jvmargs.common} -ea -# extra jvmargs that might be useful for debugging +# Extra jvmargs that might be useful for debugging +# and performance improvements/monitoring # # -XX:+UnlockDiagnosticVMOptions # @@ -304,9 +305,25 @@ # # print all compiled nmethods with oopmaps and lots of other info # -XX:+PrintNMethods +# +# activate the generic "UseNewCode" flag to test whatever functionality +# lies behind it. This is the preferred way to test a, yet flagless, +# feature in HotSpot - for example, the uncommon trap placement fix +# was hidden behind this flag before it became the default +# +# -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode +# +# Crank up the type profile level to 222, which has some warmup +# penalties, but produces much better code for JavaScript, where better +# and more intrusive type profiling is required to get rid of +# a large amount of unnecessary guard code, that could not otherwise +# be eliminated +# +# -XX:TypeProfileLevel=222 +# # Use best known performance options for octane -run.test.jvmargs.octane.main=${run.test.jvmargs.common} -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode -XX:TypeProfileLevel=222 +run.test.jvmargs.octane.main=${run.test.jvmargs.common} -XX:TypeProfileLevel=222 # Security manager args - make sure that we run with the nashorn.policy that the build creates run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${build.dir}/nashorn.policy diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/samples/BufferArray.java --- a/nashorn/samples/BufferArray.java Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/samples/BufferArray.java Fri Oct 10 18:00:14 2014 +0000 @@ -29,8 +29,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.nio.DoubleBuffer; import jdk.nashorn.api.scripting.AbstractJSObject; -import java.nio.DoubleBuffer; /** * Simple class demonstrating pluggable script object @@ -112,6 +112,8 @@ return true; } }; + default: + break; } return null; } diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java Fri Oct 10 18:00:14 2014 +0000 @@ -27,7 +27,6 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.ARGUMENTS_VAR; import static jdk.nashorn.internal.codegen.CompilerConstants.EXPLODED_ARGUMENT_PREFIX; - import java.lang.invoke.MethodType; import java.util.ArrayDeque; import java.util.ArrayList; @@ -35,7 +34,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; - import jdk.nashorn.internal.ir.AccessNode; import jdk.nashorn.internal.ir.CallNode; import jdk.nashorn.internal.ir.Expression; @@ -131,7 +129,7 @@ @SuppressWarnings("serial") final UnsupportedOperationException uoe = new UnsupportedOperationException() { @Override - public Throwable fillInStackTrace() { + public synchronized Throwable fillInStackTrace() { return null; } }; diff -r 3d2543e475e4 -r cd50a16cf47e nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java Thu Oct 09 16:41:28 2014 +0400 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java Fri Oct 10 18:00:14 2014 +0000 @@ -104,6 +104,7 @@ import jdk.nashorn.internal.ir.IndexNode; import jdk.nashorn.internal.ir.JoinPredecessor; import jdk.nashorn.internal.ir.JoinPredecessorExpression; +import jdk.nashorn.internal.ir.JumpStatement; import jdk.nashorn.internal.ir.LabelNode; import jdk.nashorn.internal.ir.LexicalContext; import jdk.nashorn.internal.ir.LexicalContextNode; @@ -1204,17 +1205,21 @@ @Override public boolean enterBreakNode(final BreakNode breakNode) { + return enterJumpStatement(breakNode); + } + + private boolean enterJumpStatement(final JumpStatement jump) { if(!method.isReachable()) { return false; } - enterStatement(breakNode); - - method.beforeJoinPoint(breakNode); - final BreakableNode breakFrom = lc.getBreakable(breakNode.getLabelName()); - popScopesUntil(breakFrom); - final Label breakLabel = breakFrom.getBreakLabel(); - breakLabel.markAsBreakTarget(); - method.splitAwareGoto(lc, breakLabel, breakFrom); + enterStatement(jump); + + method.beforeJoinPoint(jump); + final BreakableNode target = jump.getTarget(lc); + popScopesUntil(target); + final Label targetLabel = jump.getTargetLabel(target); + targetLabel.markAsBreakTarget(); + method.splitAwareGoto(lc, targetLabel, target); return false; } @@ -1517,19 +1522,7 @@ @Override public boolean enterContinueNode(final ContinueNode continueNode) { - if(!method.isReachable()) { - return false; - } - enterStatement(continueNode); - method.beforeJoinPoint(continueNode); - - final LoopNode continueTo = lc.getContinueTo(continueNode.getLabelName()); - popScopesUntil(continueTo); - final Label continueLabel = continueTo.getContinueLabel(); - continueLabel.markAsBreakTarget(); - method.splitAwareGoto(lc, continueLabel, continueTo); - - return false; + return enterJumpStatement(continueNode); } @Override @@ -2807,6 +2800,7 @@ final boolean hasReturn = method.hasReturn(); final SplitMethodEmitter splitMethod = ((SplitMethodEmitter)method); final List