Merge
authorlana
Thu, 29 Jul 2010 22:02:45 -0700
changeset 6131 faa55a02c27a
parent 6130 7cec6f30de9c (current diff)
parent 6053 647709708658 (diff)
child 6132 bb7d59eb0f18
Merge
hotspot/src/os/linux/vm/vtune_linux.cpp
hotspot/src/os/solaris/vm/vtune_solaris.cpp
hotspot/src/os/windows/vm/vtune_windows.cpp
hotspot/src/share/vm/runtime/vtune.hpp
jdk/src/linux/doc/man/ja/kinit.1
jdk/src/linux/doc/man/ja/klist.1
jdk/src/linux/doc/man/ja/ktab.1
jdk/test/ProblemList.txt
--- a/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -73,3 +73,7 @@
 d260f892491e040ae385a8e6df59557a7d721abf jdk7-b96
 7e406ebed9a5968b584f3c3e6b60893b5d6d9741 jdk7-b97
 db6e660120446c407e2d908d52ec046592b21726 jdk7-b98
+c4c8a5bc54f66abc68cd185d9294042121922154 jdk7-b99
+2d6ba7a221915bdf0311acc5641c7f3875cb793e jdk7-b100
+2548ac036b8fca3326d058d758e6df8355a42469 jdk7-b101
+88db80c8e49cea352c2900f689600dc410761c1f jdk7-b102
--- a/.hgtags-top-repo	Thu Jul 29 17:04:07 2010 +0100
+++ b/.hgtags-top-repo	Thu Jul 29 22:02:45 2010 -0700
@@ -73,3 +73,7 @@
 cf71cb5151166f35433afebaf67dbf34a704a170 jdk7-b96
 5e197c942c6ebd8b92f324a31049c5f1d26d40ef jdk7-b97
 6cea9984d73d74de0cd01f30d07ac0a1ed196117 jdk7-b98
+e7f18db469a3e947b7096bfd12e87380e5a042cd jdk7-b99
+b218a53ec7d3d42be61d31d6917a6c5c037b6f56 jdk7-b100
+4193eaf5f1b82794c6a0fb1a8d11af43d1b1d611 jdk7-b101
+a136a51f5113da4dad3853b74a8536ab583ab112 jdk7-b102
--- a/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,6 @@
   TOPDIR:=.
 endif
 
-ifndef CONTROL_TOPDIR
-  CONTROL_TOPDIR=$(TOPDIR)
-endif
-
 # Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
 OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
 OPENJDK_BUILDDIR:=$(shell \
@@ -120,7 +116,7 @@
 all_product_build:: 
 	@$(FINISH_ECHO)
 
-# Generis build of basic repo series
+# Generic build of basic repo series
 generic_build_repo_series::
 	$(MKDIR) -p $(OUTPUTDIR)
 	$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
@@ -179,11 +175,15 @@
 #     The install process needs to know what the DEBUG_NAME is, so
 #     look for INSTALL_DEBUG_NAME in the install rules.
 #
+#   NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
+#         Due to the use of short paths in $(ABS_OUTPUTDIR), this may 
+#         not be the same location.
+#
 
 # Location of fresh bootdir output
 ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
 FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
-FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image
+FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
   
 create_fresh_product_bootdir: FRC
 	@$(START_ECHO)
@@ -248,10 +248,14 @@
 	        generic_build_repo_series
 	@$(FINISH_ECHO)
 
+#   NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
+#         Due to the use of short paths in $(ABS_OUTPUTDIR), this may 
+#         not be the same location.
+
 generic_debug_build:
 	@$(START_ECHO)
 	$(MAKE) \
-		ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
+		ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
 	        DEBUG_NAME=$(DEBUG_NAME) \
 		GENERATE_DOCS=false \
 	        $(BOOT_CYCLE_DEBUG_SETTINGS) \
@@ -348,8 +352,8 @@
 
 clobber::
 	$(RM) -r $(OUTPUTDIR)/*
-	$(RM) -r $(OUTPUTDIR)-debug/*
-	$(RM) -r $(OUTPUTDIR)-fastdebug/*
+	$(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/*
+	$(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/*
 	-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
 
 clean: clobber
@@ -551,6 +555,56 @@
 endif
 
 ################################################################
+# rule to test
+################################################################
+
+.NOTPARALLEL: test
+
+test: test_clean test_start test_summary
+
+test_start:
+	@$(ECHO) "Tests started at `$(DATE)`"
+
+test_clean:
+	$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
+
+test_summary: $(OUTPUTDIR)/test_failures.txt
+	@$(ECHO) "#################################################"
+	@$(ECHO) "Tests completed at `$(DATE)`"
+	@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
+          || $(ECHO) "No TEST STATS seen in log" )
+	@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
+	@$(ECHO) "#################################################"
+	@if [ -s $< ] ; then                                           \
+          $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
+          $(CAT) $<;                                                   \
+          exit 1;                                                      \
+        else                                                           \
+          $(ECHO) "Success! No failures detected";                     \
+        fi
+
+# Get failure list from log
+$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
+	@$(RM) $@
+	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) > $@
+
+# Get log file of all tests run
+JDK_TO_TEST := $(shell 							\
+  if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then 			\
+    $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; 				\
+  elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then 				\
+    $(ECHO) "$(ABS_OUTPUTDIR)"; 					\
+  elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then 	\
+    $(ECHO) "$(PRODUCT_HOME)"; 						\
+  fi 									\
+)
+$(OUTPUTDIR)/test_log.txt:
+	$(RM) $@
+	( $(CD) test &&                                     \
+          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) \
+        ) | tee $@
+
+################################################################
 # JPRT rule to build
 ################################################################
 
@@ -560,7 +614,7 @@
 #  PHONY
 ################################################################
 
-.PHONY: all \
+.PHONY: all  test test_start test_summary test_clean \
 	generic_build_repo_series \
 	what clobber insane \
         dev dev-build dev-sanity dev-clobber \
--- a/corba/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/corba/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -73,3 +73,7 @@
 edc2a2659c77dabc55cb55bb617bad89e3a05bb3 jdk7-b96
 4ec9d59374caa1e5d72fa802291b4d66955a4936 jdk7-b97
 3b99409057e4c255da946f9f540d051a5ef4ab23 jdk7-b98
+95db968660e7d87c345d5cf3dc2e3db037fb7220 jdk7-b99
+a56d734a1e970e1a21a8f4feb13053e9a33674c7 jdk7-b100
+86a239832646a74811695428984b6947c0bd6dc8 jdk7-b101
+78561a95779090b5106c8d0f1a75360a027ef087 jdk7-b102
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/CorbaResourceUtil.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/CorbaResourceUtil.java	Thu Jul 29 22:02:45 2010 -0700
@@ -75,7 +75,7 @@
         args[1] = (arg1 != null ? arg1.toString() : "null");
         args[2] = (arg2 != null ? arg2.toString() : "null");
 
-        return java.text.MessageFormat.format(format, args);
+        return java.text.MessageFormat.format(format, (Object[]) args);
     }
 
     private static boolean resourcesInitialized = false;
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java	Thu Jul 29 22:02:45 2010 -0700
@@ -350,7 +350,7 @@
 
         if (useToString) {
             try {
-                cls.getDeclaredMethod( "toString", null ) ;
+                cls.getDeclaredMethod( "toString", (Class[])null ) ;
                 return true ;
             } catch (Exception exc) {
                 return false ;
--- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl.java	Thu Jul 29 22:02:45 2010 -0700
@@ -108,8 +108,8 @@
 
             try {
                 helperClass = Class.forName( helperName, true, loader ) ;
-                Method idMethod = helperClass.getDeclaredMethod( "id", null ) ;
-                setId( (String)idMethod.invoke( null, null ) ) ;
+                Method idMethod = helperClass.getDeclaredMethod( "id", (Class[])null ) ;
+                setId( (String)idMethod.invoke( null, (Object[])null ) ) ;
             } catch (Exception ex) {
                 throw wrapper.badHelperIdMethod( ex, helperName ) ;
             }
--- a/corba/src/share/classes/org/omg/CORBA/ORB.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/corba/src/share/classes/org/omg/CORBA/ORB.java	Thu Jul 29 22:02:45 2010 -0700
@@ -589,7 +589,7 @@
                 this.getClass().getMethod("create_operation_list", argc);
 
             // OK, the method exists, so invoke it and be happy.
-            Object[] argx = { oper };
+            java.lang.Object[] argx = { oper };
             return (org.omg.CORBA.NVList)meth.invoke(this, argx);
         }
         catch( java.lang.reflect.InvocationTargetException exs ) {
--- a/corba/src/share/classes/sun/corba/Bridge.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/corba/src/share/classes/sun/corba/Bridge.java	Thu Jul 29 22:02:45 2010 -0700
@@ -187,7 +187,7 @@
         try {
             // Invoke the ObjectInputStream.latestUserDefinedLoader method
             return (ClassLoader)latestUserDefinedLoaderMethod.invoke(null,
-                                                                     NO_ARGS);
+                                                                     (Object[])NO_ARGS);
         } catch (InvocationTargetException ite) {
             Error err = new Error(
                 "sun.corba.Bridge.latestUserDefinedLoader: " + ite ) ;
--- a/hotspot/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -102,3 +102,8 @@
 573e8ea5fd68e8e51eb6308d283ac3b3889d15e0 hs19-b02
 5f42499e57adc16380780f40541e1a66cd601891 jdk7-b97
 8a045b3f5c13eaad92ff4baf15ca671845fcad1a jdk7-b98
+6a236384a379642b5a2398e2819db9ab4e711e9b jdk7-b99
+ad1977f08c4d69162a0775fe3f9576b9fd521d10 jdk7-b100
+6c3a919105b68c15b7db923ec9a00006e9560910 jdk7-b101
+ad1977f08c4d69162a0775fe3f9576b9fd521d10 hs19-b03
+c5cadf1a07717955cf60dbaec16e35b529fd2cb0 jdk7-b102
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,7 +35,6 @@
 
 public class NMethod extends CodeBlob {
   private static long          pcDescSize;
-  private static CIntegerField zombieInstructionSizeField;
   private static sun.jvm.hotspot.types.OopField methodField;
   /** != InvocationEntryBci if this nmethod is an on-stack replacement method */
   private static CIntegerField entryBCIField;
@@ -88,7 +87,6 @@
   private static void initialize(TypeDataBase db) {
     Type type = db.lookupType("nmethod");
 
-    zombieInstructionSizeField  = type.getCIntegerField("_zombie_instruction_size");
     methodField                 = type.getOopField("_method");
     entryBCIField               = type.getCIntegerField("_entry_bci");
     osrLinkField                = type.getAddressField("_osr_link");
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeDisassembler.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeDisassembler.java	Thu Jul 29 22:02:45 2010 -0700
@@ -72,6 +72,7 @@
       addBytecodeClass(Bytecodes._invokestatic, BytecodeInvoke.class);
       addBytecodeClass(Bytecodes._invokespecial, BytecodeInvoke.class);
       addBytecodeClass(Bytecodes._invokeinterface, BytecodeInvoke.class);
+      addBytecodeClass(Bytecodes._invokedynamic, BytecodeInvoke.class);
       addBytecodeClass(Bytecodes._jsr, BytecodeJsr.class);
       addBytecodeClass(Bytecodes._jsr_w, BytecodeJsrW.class);
       addBytecodeClass(Bytecodes._iload, BytecodeLoad.class);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeInvoke.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeInvoke.java	Thu Jul 29 22:02:45 2010 -0700
@@ -54,15 +54,31 @@
   // returns the name of the invoked method
   public Symbol name() {
     ConstantPool cp = method().getConstants();
+    if (isInvokedynamic()) {
+       int[] nt = cp.getNameAndTypeAt(indexForFieldOrMethod());
+       return cp.getSymbolAt(nt[0]);
+    }
     return cp.getNameRefAt(index());
   }
 
   // returns the signature of the invoked method
   public Symbol signature() {
     ConstantPool cp = method().getConstants();
+    if (isInvokedynamic()) {
+       int[] nt = cp.getNameAndTypeAt(indexForFieldOrMethod());
+       return cp.getSymbolAt(nt[1]);
+    }
     return cp.getSignatureRefAt(index());
   }
 
+  public int getSecondaryIndex() {
+    if (isInvokedynamic()) {
+      // change byte-ordering of 4-byte integer
+      return VM.getVM().getBytes().swapInt(javaSignedWordAt(1));
+    }
+    return super.getSecondaryIndex();  // throw an error
+  }
+
   public Method getInvokedMethod() {
     return method().getConstants().getMethodRefAt(index());
   }
@@ -87,6 +103,7 @@
   public boolean isInvokevirtual()   { return adjustedInvokeCode() == Bytecodes._invokevirtual;   }
   public boolean isInvokestatic()    { return adjustedInvokeCode() == Bytecodes._invokestatic;    }
   public boolean isInvokespecial()   { return adjustedInvokeCode() == Bytecodes._invokespecial;   }
+  public boolean isInvokedynamic()   { return adjustedInvokeCode() == Bytecodes._invokedynamic; }
 
   public boolean isValid()           { return isInvokeinterface() ||
                                               isInvokevirtual()   ||
@@ -104,6 +121,11 @@
     buf.append(spaces);
     buf.append('#');
     buf.append(Integer.toString(indexForFieldOrMethod()));
+    if (isInvokedynamic()) {
+       buf.append('(');
+       buf.append(Integer.toString(getSecondaryIndex()));
+       buf.append(')');
+    }
     buf.append(" [Method ");
     StringBuffer sigBuf = new StringBuffer();
     new SignatureConverter(signature(), sigBuf).iterateReturntype();
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeLoadConstant.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeLoadConstant.java	Thu Jul 29 22:02:45 2010 -0700
@@ -25,6 +25,7 @@
 package sun.jvm.hotspot.interpreter;
 
 import sun.jvm.hotspot.oops.*;
+import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.utilities.*;
 
 public class BytecodeLoadConstant extends BytecodeWithCPIndex {
@@ -32,10 +33,47 @@
     super(method, bci);
   }
 
+  public boolean hasCacheIndex() {
+    // normal ldc uses CP index, but fast_aldc uses swapped CP cache index
+    return javaCode() != code();
+  }
+
   public int index() {
-    return javaCode() == Bytecodes._ldc ?
+    int i = javaCode() == Bytecodes._ldc ?
                  (int) (0xFF & javaByteAt(1))
                : (int) (0xFFFF & javaShortAt(1));
+    if (hasCacheIndex()) {
+      return (0xFFFF & VM.getVM().getBytes().swapShort((short) i));
+    } else {
+      return i;
+    }
+  }
+
+  public int poolIndex() {
+    int i = index();
+    if (hasCacheIndex()) {
+      ConstantPoolCache cpCache = method().getConstants().getCache();
+      return cpCache.getEntryAt(i).getConstantPoolIndex();
+    } else {
+      return i;
+    }
+  }
+
+  public int cacheIndex() {
+    if (hasCacheIndex()) {
+      return index();
+    } else {
+      return -1;  // no cache index
+    }
+  }
+
+  private Oop getCachedConstant() {
+    int i = cacheIndex();
+    if (i >= 0) {
+      ConstantPoolCache cpCache = method().getConstants().getCache();
+      return cpCache.getEntryAt(i).getF1();
+    }
+    return null;
   }
 
   public void verify() {
@@ -58,6 +96,7 @@
        // has to be int or float or String or Klass
        return (ctag.isUnresolvedString() || ctag.isString()
                || ctag.isUnresolvedKlass() || ctag.isKlass()
+               || ctag.isMethodHandle() || ctag.isMethodType()
                || ctag.isInt() || ctag.isFloat())? true: false;
     }
   }
@@ -112,7 +151,7 @@
 
   public String getConstantValue() {
     ConstantPool cpool = method().getConstants();
-    int cpIndex = index();
+    int cpIndex = poolIndex();
     ConstantTag ctag = cpool.getTagAt(cpIndex);
     if (ctag.isInt()) {
        return "<int " + Integer.toString(cpool.getIntAt(cpIndex)) +">";
@@ -149,6 +188,18 @@
        } else {
           throw new RuntimeException("should not reach here");
        }
+    } else if (ctag.isMethodHandle() || ctag.isMethodType()) {
+       Oop x = getCachedConstant();
+       int refidx = cpool.getMethodHandleIndexAt(cpIndex);
+       int refkind = cpool.getMethodHandleRefKindAt(cpIndex);
+       return "<MethodHandle kind=" + Integer.toString(refkind) +
+           " ref=" + Integer.toString(refidx)
+           + (x == null ? "" : " @" + x.getHandle()) + ">";
+    } else if (ctag.isMethodType()) {
+       Oop x = getCachedConstant();
+       int refidx = cpool.getMethodTypeIndexAt(cpIndex);
+       return "<MethodType " + cpool.getSymbolAt(refidx).asString()
+           + (x == null ? "" : " @" + x.getHandle()) + ">";
     } else {
        if (Assert.ASSERTS_ENABLED) {
          Assert.that(false, "invalid load constant type");
@@ -162,7 +213,12 @@
     buf.append(getJavaBytecodeName());
     buf.append(spaces);
     buf.append('#');
-    buf.append(Integer.toString(index()));
+    buf.append(Integer.toString(poolIndex()));
+    if (hasCacheIndex()) {
+       buf.append('(');
+       buf.append(Integer.toString(cacheIndex()));
+       buf.append(')');
+    }
     buf.append(spaces);
     buf.append(getConstantValue());
     if (code() != javaCode()) {
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithCPIndex.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithCPIndex.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,12 +37,19 @@
   // the constant pool index for this bytecode
   public int index() { return 0xFFFF & javaShortAt(1); }
 
+  public int getSecondaryIndex() {
+     throw new IllegalArgumentException("must be invokedynamic");
+  }
+
   protected int indexForFieldOrMethod() {
      ConstantPoolCache cpCache = method().getConstants().getCache();
      // get ConstantPool index from ConstantPoolCacheIndex at given bci
      int cpCacheIndex = index();
      if (cpCache == null) {
         return cpCacheIndex;
+     } else if (code() == Bytecodes._invokedynamic) {
+        int secondaryIndex = getSecondaryIndex();
+        return cpCache.getMainEntryAt(secondaryIndex).getConstantPoolIndex();
      } else {
         // change byte-ordering and go via cache
         return cpCache.getEntryAt((int) (0xFFFF & VM.getVM().getBytes().swapShort((short) cpCacheIndex))).getConstantPoolIndex();
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java	Thu Jul 29 22:02:45 2010 -0700
@@ -222,7 +222,7 @@
   public static final int _invokespecial        = 183; // 0xb7
   public static final int _invokestatic         = 184; // 0xb8
   public static final int _invokeinterface      = 185; // 0xb9
-  public static final int _xxxunusedxxx         = 186; // 0xba
+  public static final int _invokedynamic        = 186; // 0xba
   public static final int _new                  = 187; // 0xbb
   public static final int _newarray             = 188; // 0xbc
   public static final int _anewarray            = 189; // 0xbd
@@ -269,9 +269,12 @@
   public static final int _fast_invokevfinal    = 226;
   public static final int _fast_linearswitch    = 227;
   public static final int _fast_binaryswitch    = 228;
-  public static final int _shouldnotreachhere   = 229; // For debugging
+  public static final int _fast_aldc            = 229;
+  public static final int _fast_aldc_w          = 230;
+  public static final int _return_register_finalizer = 231;
+  public static final int _shouldnotreachhere   = 232; // For debugging
 
-  public static final int number_of_codes       = 230;
+  public static final int number_of_codes       = 233;
 
   public static int specialLengthAt(Method method, int bci) {
     int code = codeAt(method, bci);
@@ -458,9 +461,9 @@
     def(_dconst_1            , "dconst_1"            , "b"    , null    , BasicType.getTDouble() ,  2, false);
     def(_bipush              , "bipush"              , "bc"   , null    , BasicType.getTInt()    ,  1, false);
     def(_sipush              , "sipush"              , "bcc"  , null    , BasicType.getTInt()    ,  1, false);
-    def(_ldc                 , "ldc"                 , "bi"   , null    , BasicType.getTIllegal(),  1, true );
-    def(_ldc_w               , "ldc_w"               , "bii"  , null    , BasicType.getTIllegal(),  1, true );
-    def(_ldc2_w              , "ldc2_w"              , "bii"  , null    , BasicType.getTIllegal(),  2, true );
+    def(_ldc                 , "ldc"                 , "bk"   , null    , BasicType.getTIllegal(),  1, true );
+    def(_ldc_w               , "ldc_w"               , "bkk"  , null    , BasicType.getTIllegal(),  1, true );
+    def(_ldc2_w              , "ldc2_w"              , "bkk"  , null    , BasicType.getTIllegal(),  2, true );
     def(_iload               , "iload"               , "bi"   , "wbii"  , BasicType.getTInt()    ,  1, false);
     def(_lload               , "lload"               , "bi"   , "wbii"  , BasicType.getTLong()   ,  2, false);
     def(_fload               , "fload"               , "bi"   , "wbii"  , BasicType.getTFloat()  ,  1, false);
@@ -618,26 +621,26 @@
     def(_dreturn             , "dreturn"             , "b"    , null    , BasicType.getTDouble() , -2, true );
     def(_areturn             , "areturn"             , "b"    , null    , BasicType.getTObject() , -1, true );
     def(_return              , "return"              , "b"    , null    , BasicType.getTVoid()   ,  0, true );
-    def(_getstatic           , "getstatic"           , "bjj"  , null    , BasicType.getTIllegal(),  1, true );
-    def(_putstatic           , "putstatic"           , "bjj"  , null    , BasicType.getTIllegal(), -1, true );
-    def(_getfield            , "getfield"            , "bjj"  , null    , BasicType.getTIllegal(),  0, true );
-    def(_putfield            , "putfield"            , "bjj"  , null    , BasicType.getTIllegal(), -2, true );
-    def(_invokevirtual       , "invokevirtual"       , "bjj"  , null    , BasicType.getTIllegal(), -1, true );
-    def(_invokespecial       , "invokespecial"       , "bjj"  , null    , BasicType.getTIllegal(), -1, true );
-    def(_invokestatic        , "invokestatic"        , "bjj"  , null    , BasicType.getTIllegal(),  0, true );
-    def(_invokeinterface     , "invokeinterface"     , "bjj__", null    , BasicType.getTIllegal(), -1, true );
-    def(_xxxunusedxxx        , "xxxunusedxxx"        , null   , null    , BasicType.getTVoid()   ,  0, false);
-    def(_new                 , "new"                 , "bii"  , null    , BasicType.getTObject() ,  1, true );
+    def(_getstatic           , "getstatic"           , "bJJ"  , null    , BasicType.getTIllegal(),  1, true );
+    def(_putstatic           , "putstatic"           , "bJJ"  , null    , BasicType.getTIllegal(), -1, true );
+    def(_getfield            , "getfield"            , "bJJ"  , null    , BasicType.getTIllegal(),  0, true );
+    def(_putfield            , "putfield"            , "bJJ"  , null    , BasicType.getTIllegal(), -2, true );
+    def(_invokevirtual       , "invokevirtual"       , "bJJ"  , null    , BasicType.getTIllegal(), -1, true );
+    def(_invokespecial       , "invokespecial"       , "bJJ"  , null    , BasicType.getTIllegal(), -1, true );
+    def(_invokestatic        , "invokestatic"        , "bJJ"  , null    , BasicType.getTIllegal(),  0, true );
+    def(_invokeinterface     , "invokeinterface"     , "bJJ__", null    , BasicType.getTIllegal(), -1, true );
+    def(_invokedynamic       , "invokedynamic"       , "bJJJJ", null    , BasicType.getTIllegal(), -1, true );
+    def(_new                 , "new"                 , "bkk"  , null    , BasicType.getTObject() ,  1, true );
     def(_newarray            , "newarray"            , "bc"   , null    , BasicType.getTObject() ,  0, true );
-    def(_anewarray           , "anewarray"           , "bii"  , null    , BasicType.getTObject() ,  0, true );
+    def(_anewarray           , "anewarray"           , "bkk"  , null    , BasicType.getTObject() ,  0, true );
     def(_arraylength         , "arraylength"         , "b"    , null    , BasicType.getTVoid()   ,  0, true );
     def(_athrow              , "athrow"              , "b"    , null    , BasicType.getTVoid()   , -1, true );
-    def(_checkcast           , "checkcast"           , "bii"  , null    , BasicType.getTObject() ,  0, true );
-    def(_instanceof          , "instanceof"          , "bii"  , null    , BasicType.getTInt()    ,  0, true );
+    def(_checkcast           , "checkcast"           , "bkk"  , null    , BasicType.getTObject() ,  0, true );
+    def(_instanceof          , "instanceof"          , "bkk"  , null    , BasicType.getTInt()    ,  0, true );
     def(_monitorenter        , "monitorenter"        , "b"    , null    , BasicType.getTVoid()   , -1, true );
     def(_monitorexit         , "monitorexit"         , "b"    , null    , BasicType.getTVoid()   , -1, true );
     def(_wide                , "wide"                , ""     , null    , BasicType.getTVoid()   ,  0, false);
-    def(_multianewarray      , "multianewarray"      , "biic" , null    , BasicType.getTObject() ,  1, true );
+    def(_multianewarray      , "multianewarray"      , "bkkc" , null    , BasicType.getTObject() ,  1, true );
     def(_ifnull              , "ifnull"              , "boo"  , null    , BasicType.getTVoid()   , -1, false);
     def(_ifnonnull           , "ifnonnull"           , "boo"  , null    , BasicType.getTVoid()   , -1, false);
     def(_goto_w              , "goto_w"              , "boooo", null    , BasicType.getTVoid()   ,  0, false);
@@ -646,38 +649,44 @@
 
     //  JVM bytecodes
     //  bytecode               bytecode name           format   wide f.   result tp               stk traps  std code
-    def(_fast_agetfield      , "fast_agetfield"      , "bjj"  , null    , BasicType.getTObject() ,  0, true , _getfield       );
-    def(_fast_bgetfield      , "fast_bgetfield"      , "bjj"  , null    , BasicType.getTInt()    ,  0, true , _getfield       );
-    def(_fast_cgetfield      , "fast_cgetfield"      , "bjj"  , null    , BasicType.getTChar()   ,  0, true , _getfield       );
-    def(_fast_dgetfield      , "fast_dgetfield"      , "bjj"  , null    , BasicType.getTDouble() ,  0, true , _getfield       );
-    def(_fast_fgetfield      , "fast_fgetfield"      , "bjj"  , null    , BasicType.getTFloat()  ,  0, true , _getfield       );
-    def(_fast_igetfield      , "fast_igetfield"      , "bjj"  , null    , BasicType.getTInt()    ,  0, true , _getfield       );
-    def(_fast_lgetfield      , "fast_lgetfield"      , "bjj"  , null    , BasicType.getTLong()   ,  0, true , _getfield       );
-    def(_fast_sgetfield      , "fast_sgetfield"      , "bjj"  , null    , BasicType.getTShort()  ,  0, true , _getfield       );
+    def(_fast_agetfield      , "fast_agetfield"      , "bJJ"  , null    , BasicType.getTObject() ,  0, true , _getfield       );
+    def(_fast_bgetfield      , "fast_bgetfield"      , "bJJ"  , null    , BasicType.getTInt()    ,  0, true , _getfield       );
+    def(_fast_cgetfield      , "fast_cgetfield"      , "bJJ"  , null    , BasicType.getTChar()   ,  0, true , _getfield       );
+    def(_fast_dgetfield      , "fast_dgetfield"      , "bJJ"  , null    , BasicType.getTDouble() ,  0, true , _getfield       );
+    def(_fast_fgetfield      , "fast_fgetfield"      , "bJJ"  , null    , BasicType.getTFloat()  ,  0, true , _getfield       );
+    def(_fast_igetfield      , "fast_igetfield"      , "bJJ"  , null    , BasicType.getTInt()    ,  0, true , _getfield       );
+    def(_fast_lgetfield      , "fast_lgetfield"      , "bJJ"  , null    , BasicType.getTLong()   ,  0, true , _getfield       );
+    def(_fast_sgetfield      , "fast_sgetfield"      , "bJJ"  , null    , BasicType.getTShort()  ,  0, true , _getfield       );
 
-    def(_fast_aputfield      , "fast_aputfield"      , "bjj"  , null    , BasicType.getTObject() ,  0, true , _putfield       );
-    def(_fast_bputfield      , "fast_bputfield"      , "bjj"  , null    , BasicType.getTInt()    ,  0, true , _putfield       );
-    def(_fast_cputfield      , "fast_cputfield"      , "bjj"  , null    , BasicType.getTChar()   ,  0, true , _putfield       );
-    def(_fast_dputfield      , "fast_dputfield"      , "bjj"  , null    , BasicType.getTDouble() ,  0, true , _putfield       );
-    def(_fast_fputfield      , "fast_fputfield"      , "bjj"  , null    , BasicType.getTFloat()  ,  0, true , _putfield       );
-    def(_fast_iputfield      , "fast_iputfield"      , "bjj"  , null    , BasicType.getTInt()    ,  0, true , _putfield       );
-    def(_fast_lputfield      , "fast_lputfield"      , "bjj"  , null    , BasicType.getTLong()   ,  0, true , _putfield       );
-    def(_fast_sputfield      , "fast_sputfield"      , "bjj"  , null    , BasicType.getTShort()  ,  0, true , _putfield       );
+    def(_fast_aputfield      , "fast_aputfield"      , "bJJ"  , null    , BasicType.getTObject() ,  0, true , _putfield       );
+    def(_fast_bputfield      , "fast_bputfield"      , "bJJ"  , null    , BasicType.getTInt()    ,  0, true , _putfield       );
+    def(_fast_cputfield      , "fast_cputfield"      , "bJJ"  , null    , BasicType.getTChar()   ,  0, true , _putfield       );
+    def(_fast_dputfield      , "fast_dputfield"      , "bJJ"  , null    , BasicType.getTDouble() ,  0, true , _putfield       );
+    def(_fast_fputfield      , "fast_fputfield"      , "bJJ"  , null    , BasicType.getTFloat()  ,  0, true , _putfield       );
+    def(_fast_iputfield      , "fast_iputfield"      , "bJJ"  , null    , BasicType.getTInt()    ,  0, true , _putfield       );
+    def(_fast_lputfield      , "fast_lputfield"      , "bJJ"  , null    , BasicType.getTLong()   ,  0, true , _putfield       );
+    def(_fast_sputfield      , "fast_sputfield"      , "bJJ"  , null    , BasicType.getTShort()  ,  0, true , _putfield       );
 
     def(_fast_aload_0        , "fast_aload_0"        , "b"    , null    , BasicType.getTObject() ,  1, true , _aload_0        );
-    def(_fast_iaccess_0      , "fast_iaccess_0"      , "b_jj" , null    , BasicType.getTInt()    ,  1, true , _aload_0        );
-    def(_fast_aaccess_0      , "fast_aaccess_0"      , "b_jj" , null    , BasicType.getTObject() ,  1, true , _aload_0        );
-    def(_fast_faccess_0      , "fast_faccess_0"      , "b_jj" , null    , BasicType.getTObject() ,  1, true , _aload_0        );
+    def(_fast_iaccess_0      , "fast_iaccess_0"      , "b_JJ" , null    , BasicType.getTInt()    ,  1, true , _aload_0        );
+    def(_fast_aaccess_0      , "fast_aaccess_0"      , "b_JJ" , null    , BasicType.getTObject() ,  1, true , _aload_0        );
+    def(_fast_faccess_0      , "fast_faccess_0"      , "b_JJ" , null    , BasicType.getTObject() ,  1, true , _aload_0        );
 
     def(_fast_iload          , "fast_iload"          , "bi"   , null    , BasicType.getTInt()    ,  1, false, _iload);
     def(_fast_iload2         , "fast_iload2"         , "bi_i" , null    , BasicType.getTInt()    ,  2, false, _iload);
     def(_fast_icaload        , "fast_icaload"        , "bi_"  , null    , BasicType.getTInt()    ,  0, false, _iload);
 
     // Faster method invocation.
-    def(_fast_invokevfinal   , "fast_invokevfinal"   , "bjj"  , null    , BasicType.getTIllegal(), -1, true, _invokevirtual);
+    def(_fast_invokevfinal   , "fast_invokevfinal"   , "bJJ"  , null    , BasicType.getTIllegal(), -1, true, _invokevirtual);
 
     def(_fast_linearswitch   , "fast_linearswitch"   , ""     , null    , BasicType.getTVoid()   , -1, false, _lookupswitch   );
     def(_fast_binaryswitch   , "fast_binaryswitch"   , ""     , null    , BasicType.getTVoid()   , -1, false, _lookupswitch   );
+
+    def(_return_register_finalizer, "return_register_finalizer", "b"    , null    , BasicType.getTVoid()   , 0, true, _return );
+
+    def(_fast_aldc           , "fast_aldc"           , "bj"   , null    , BasicType.getTObject(),   1, true,  _ldc   );
+    def(_fast_aldc_w         , "fast_aldc_w"         , "bJJ"  , null    , BasicType.getTObject(),   1, true,  _ldc_w );
+
     def(_shouldnotreachhere  , "_shouldnotreachhere" , "b"    , null    , BasicType.getTVoid()   ,  0, false);
 
     if (Assert.ASSERTS_ENABLED) {
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -152,7 +152,7 @@
     return res;
   }
 
-  public int getNameAndTypeAt(int which) {
+  public int[] getNameAndTypeAt(int which) {
     if (Assert.ASSERTS_ENABLED) {
       Assert.that(getTagAt(which).isNameAndType(), "Corrupted constant pool");
     }
@@ -160,18 +160,16 @@
     if (DEBUG) {
       System.err.println("ConstantPool.getNameAndTypeAt(" + which + "): result = " + i);
     }
-    return i;
+    return new int[] { extractLowShortFromInt(i), extractHighShortFromInt(i) };
   }
 
   public Symbol getNameRefAt(int which) {
-    int refIndex = getNameAndTypeAt(getNameAndTypeRefIndexAt(which));
-    int nameIndex = extractLowShortFromInt(refIndex);
+    int nameIndex = getNameAndTypeAt(getNameAndTypeRefIndexAt(which))[0];
     return getSymbolAt(nameIndex);
   }
 
   public Symbol getSignatureRefAt(int which) {
-    int refIndex = getNameAndTypeAt(getNameAndTypeRefIndexAt(which));
-    int sigIndex = extractHighShortFromInt(refIndex);
+    int sigIndex = getNameAndTypeAt(getNameAndTypeRefIndexAt(which))[1];
     return getSymbolAt(sigIndex);
   }
 
@@ -220,11 +218,11 @@
 
   /** Lookup for entries consisting of (name_index, signature_index) */
   public int getNameRefIndexAt(int index) {
-    int refIndex = getNameAndTypeAt(index);
+    int[] refIndex = getNameAndTypeAt(index);
     if (DEBUG) {
-      System.err.println("ConstantPool.getNameRefIndexAt(" + index + "): refIndex = " + refIndex);
+      System.err.println("ConstantPool.getNameRefIndexAt(" + index + "): refIndex = " + refIndex[0]+"/"+refIndex[1]);
     }
-    int i = extractLowShortFromInt(refIndex);
+    int i = refIndex[0];
     if (DEBUG) {
       System.err.println("ConstantPool.getNameRefIndexAt(" + index + "): result = " + i);
     }
@@ -233,17 +231,53 @@
 
   /** Lookup for entries consisting of (name_index, signature_index) */
   public int getSignatureRefIndexAt(int index) {
-    int refIndex = getNameAndTypeAt(index);
+    int[] refIndex = getNameAndTypeAt(index);
     if (DEBUG) {
-      System.err.println("ConstantPool.getSignatureRefIndexAt(" + index + "): refIndex = " + refIndex);
+      System.err.println("ConstantPool.getSignatureRefIndexAt(" + index + "): refIndex = " + refIndex[0]+"/"+refIndex[1]);
     }
-    int i = extractHighShortFromInt(refIndex);
+    int i = refIndex[1];
     if (DEBUG) {
       System.err.println("ConstantPool.getSignatureRefIndexAt(" + index + "): result = " + i);
     }
     return i;
   }
 
+  /** Lookup for MethodHandle entries. */
+  public int getMethodHandleIndexAt(int i) {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(getTagAt(i).isMethodHandle(), "Corrupted constant pool");
+    }
+    int res = extractHighShortFromInt(getIntAt(i));
+    if (DEBUG) {
+      System.err.println("ConstantPool.getMethodHandleIndexAt(" + i + "): result = " + res);
+    }
+    return res;
+  }
+
+  /** Lookup for MethodHandle entries. */
+  public int getMethodHandleRefKindAt(int i) {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(getTagAt(i).isMethodHandle(), "Corrupted constant pool");
+    }
+    int res = extractLowShortFromInt(getIntAt(i));
+    if (DEBUG) {
+      System.err.println("ConstantPool.getMethodHandleRefKindAt(" + i + "): result = " + res);
+    }
+    return res;
+  }
+
+  /** Lookup for MethodType entries. */
+  public int getMethodTypeIndexAt(int i) {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(getTagAt(i).isMethodType(), "Corrupted constant pool");
+    }
+    int res = getIntAt(i);
+    if (DEBUG) {
+      System.err.println("ConstantPool.getMethodHandleTypeAt(" + i + "): result = " + res);
+    }
+    return res;
+  }
+
   final private static String[] nameForTag = new String[] {
   };
 
@@ -261,6 +295,8 @@
     case JVM_CONSTANT_Methodref:          return "JVM_CONSTANT_Methodref";
     case JVM_CONSTANT_InterfaceMethodref: return "JVM_CONSTANT_InterfaceMethodref";
     case JVM_CONSTANT_NameAndType:        return "JVM_CONSTANT_NameAndType";
+    case JVM_CONSTANT_MethodHandle:       return "JVM_CONSTANT_MethodHandle";
+    case JVM_CONSTANT_MethodType:         return "JVM_CONSTANT_MethodType";
     case JVM_CONSTANT_Invalid:            return "JVM_CONSTANT_Invalid";
     case JVM_CONSTANT_UnresolvedClass:    return "JVM_CONSTANT_UnresolvedClass";
     case JVM_CONSTANT_UnresolvedClassInError:    return "JVM_CONSTANT_UnresolvedClassInError";
@@ -317,6 +353,8 @@
         case JVM_CONSTANT_Methodref:
         case JVM_CONSTANT_InterfaceMethodref:
         case JVM_CONSTANT_NameAndType:
+        case JVM_CONSTANT_MethodHandle:
+        case JVM_CONSTANT_MethodType:
           visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
           break;
         }
@@ -467,6 +505,18 @@
                                           + ", type = " + signatureIndex);
                   break;
               }
+
+              case JVM_CONSTANT_MethodHandle: {
+                  dos.writeByte(cpConstType);
+                  int value = getIntAt(ci);
+                  short nameIndex = (short) extractLowShortFromInt(value);
+                  short signatureIndex = (short) extractHighShortFromInt(value);
+                  dos.writeShort(nameIndex);
+                  dos.writeShort(signatureIndex);
+                  if (DEBUG) debugMessage("CP[" + ci + "] = N&T name = " + nameIndex
+                                          + ", type = " + signatureIndex);
+                  break;
+              }
               default:
                   throw new InternalError("unknown tag: " + cpConstType);
           } // switch
@@ -488,10 +538,12 @@
   //
 
   private static int extractHighShortFromInt(int val) {
+    // must stay in sync with constantPoolOopDesc::name_and_type_at_put, method_at_put, etc.
     return (val >> 16) & 0xFFFF;
   }
 
   private static int extractLowShortFromInt(int val) {
+    // must stay in sync with constantPoolOopDesc::name_and_type_at_put, method_at_put, etc.
     return val & 0xFFFF;
   }
 }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCache.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCache.java	Thu Jul 29 22:02:45 2010 -0700
@@ -78,6 +78,31 @@
     return new ConstantPoolCacheEntry(this, i);
   }
 
+  public static boolean isSecondaryIndex(int i)     { return (i < 0); }
+  public static int     decodeSecondaryIndex(int i) { return  isSecondaryIndex(i) ? ~i : i; }
+  public static int     encodeSecondaryIndex(int i) { return !isSecondaryIndex(i) ? ~i : i; }
+
+  // secondary entries hold invokedynamic call site bindings
+  public ConstantPoolCacheEntry getSecondaryEntryAt(int i) {
+    ConstantPoolCacheEntry e = new ConstantPoolCacheEntry(this, decodeSecondaryIndex(i));
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(e.isSecondaryEntry(), "must be a secondary entry");
+    }
+    return e;
+  }
+
+  public ConstantPoolCacheEntry getMainEntryAt(int i) {
+    if (isSecondaryIndex(i)) {
+      // run through an extra level of indirection:
+      i = getSecondaryEntryAt(i).getMainEntryIndex();
+    }
+    ConstantPoolCacheEntry e = new ConstantPoolCacheEntry(this, i);
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(!e.isSecondaryEntry(), "must not be a secondary entry");
+    }
+    return e;
+  }
+
   public int getIntAt(int entry, int fld) {
     //alignObjectSize ?
     long offset = baseOffset + /*alignObjectSize*/entry * elementSize + fld* getHeap().getIntSize();
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheEntry.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheEntry.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,6 +28,7 @@
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.utilities.*;
 
 public class ConstantPoolCacheEntry {
   private static long          size;
@@ -67,9 +68,23 @@
   }
 
   public int getConstantPoolIndex() {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(!isSecondaryEntry(), "must not be a secondary CP entry");
+    }
     return (int) (getIndices() & 0xFFFF);
   }
 
+  public boolean isSecondaryEntry() {
+    return (getIndices() & 0xFFFF) == 0;
+  }
+
+  public int getMainEntryIndex() {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(isSecondaryEntry(), "must be a secondary CP entry");
+    }
+    return (int) (getIndices() >>> 16);
+  }
+
   private long getIndices() {
       return cp.getHandle().getCIntegerAt(indices.getOffset() + offset, indices.getSize(), indices.isUnsigned());
   }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java	Thu Jul 29 22:02:45 2010 -0700
@@ -566,6 +566,7 @@
       case Bytecodes._invokespecial:
       case Bytecodes._invokestatic:
       case Bytecodes._invokeinterface:
+      case Bytecodes._invokedynamic:
         // FIXME: print signature of referenced method (need more
         // accessors in ConstantPool and ConstantPoolCache)
         int idx = currentBC.getIndexBig();
@@ -605,6 +606,7 @@
       case Bytecodes._invokespecial:
       case Bytecodes._invokestatic:
       case Bytecodes._invokeinterface:
+      case Bytecodes._invokedynamic:
         // FIXME: print signature of referenced method (need more
         // accessors in ConstantPool and ConstantPoolCache)
         int idx = currentBC.getIndexBig();
@@ -1134,6 +1136,7 @@
       case Bytecodes._invokespecial:
       case Bytecodes._invokestatic:
       case Bytecodes._invokeinterface:
+      case Bytecodes._invokedynamic:
         _itr_send = itr;
         _report_result_for_send = true;
         break;
@@ -1379,6 +1382,7 @@
     case Bytecodes._invokevirtual:
     case Bytecodes._invokespecial:     doMethod(false, false, itr.getIndexBig(), itr.bci()); break;
     case Bytecodes._invokestatic:      doMethod(true,  false, itr.getIndexBig(), itr.bci()); break;
+    case Bytecodes._invokedynamic:     doMethod(false, true,  itr.getIndexBig(), itr.bci()); break;
     case Bytecodes._invokeinterface:   doMethod(false, true,  itr.getIndexBig(), itr.bci()); break;
     case Bytecodes._newarray:
     case Bytecodes._anewarray:         ppNewRef(vCTS, itr.bci()); break;
@@ -1725,7 +1729,7 @@
   void  doMethod                            (boolean is_static, boolean is_interface, int idx, int bci) {
     // Dig up signature for field in constant pool
     ConstantPool cp       = _method.getConstants();
-    int nameAndTypeIdx    = cp.getNameAndTypeRefIndexAt(idx);
+    int nameAndTypeIdx    = cp.getTagAt(idx).isNameAndType() ? idx : cp.getNameAndTypeRefIndexAt(idx);
     int signatureIdx      = cp.getSignatureRefIndexAt(nameAndTypeIdx);
     Symbol signature      = cp.getSymbolAt(signatureIdx);
 
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,6 +40,19 @@
     public static final int JVM_CONSTANT_Methodref          = 10;
     public static final int JVM_CONSTANT_InterfaceMethodref = 11;
     public static final int JVM_CONSTANT_NameAndType        = 12;
+    public static final int JVM_CONSTANT_MethodHandle       = 15;
+    public static final int JVM_CONSTANT_MethodType         = 16;
+
+    // JVM_CONSTANT_MethodHandle subtypes
+    public static final int JVM_REF_getField                = 1;
+    public static final int JVM_REF_getStatic               = 2;
+    public static final int JVM_REF_putField                = 3;
+    public static final int JVM_REF_putStatic               = 4;
+    public static final int JVM_REF_invokeVirtual           = 5;
+    public static final int JVM_REF_invokeStatic            = 6;
+    public static final int JVM_REF_invokeSpecial           = 7;
+    public static final int JVM_REF_newInvokeSpecial        = 8;
+    public static final int JVM_REF_invokeInterface         = 9;
 
     // HotSpot specific constant pool constant types.
 
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -54,14 +54,34 @@
 
     }
 
-    protected short getConstantPoolIndex(int bci) {
+    protected short getConstantPoolIndex(int rawcode, int bci) {
        // get ConstantPool index from ConstantPoolCacheIndex at given bci
-       short cpCacheIndex = method.getBytecodeShortArg(bci);
+       String fmt = Bytecodes.format(rawcode);
+       int cpCacheIndex;
+       switch (fmt.length()) {
+       case 2: cpCacheIndex = method.getBytecodeByteArg(bci); break;
+       case 3: cpCacheIndex = method.getBytecodeShortArg(bci); break;
+       case 5:
+           if (fmt.indexOf("__") >= 0)
+               cpCacheIndex = method.getBytecodeShortArg(bci);
+           else
+               cpCacheIndex = method.getBytecodeIntArg(bci);
+           break;
+       default: throw new IllegalArgumentException();
+       }
        if (cpCache == null) {
-          return cpCacheIndex;
+          return (short) cpCacheIndex;
+       } else if (fmt.indexOf("JJJJ") >= 0) {
+          // change byte-ordering and go via secondary cache entry
+          return (short) cpCache.getMainEntryAt(bytes.swapInt(cpCacheIndex)).getConstantPoolIndex();
+       } else if (fmt.indexOf("JJ") >= 0) {
+          // change byte-ordering and go via cache
+          return (short) cpCache.getEntryAt((int) (0xFFFF & bytes.swapShort((short)cpCacheIndex))).getConstantPoolIndex();
+       } else if (fmt.indexOf("j") >= 0) {
+          // go via cache
+          return (short) cpCache.getEntryAt((int) (0xFF & cpCacheIndex)).getConstantPoolIndex();
        } else {
-          // change byte-ordering and go via cache
-          return (short) cpCache.getEntryAt((int) (0xFFFF & bytes.swapShort(cpCacheIndex))).getConstantPoolIndex();
+          return (short) cpCacheIndex;
        }
     }
 
@@ -100,10 +120,31 @@
                 case Bytecodes._invokespecial:
                 case Bytecodes._invokestatic:
                 case Bytecodes._invokeinterface: {
-                    cpoolIndex = getConstantPoolIndex(bci + 1);
+                    cpoolIndex = getConstantPoolIndex(hotspotcode, bci + 1);
                     writeShort(code, bci + 1, cpoolIndex);
                     break;
                 }
+
+                case Bytecodes._invokedynamic:
+                    cpoolIndex = getConstantPoolIndex(hotspotcode, bci + 1);
+                    writeShort(code, bci + 1, cpoolIndex);
+                    writeShort(code, bci + 3, (short)0);  // clear out trailing bytes
+                    break;
+
+                case Bytecodes._ldc_w:
+                    if (hotspotcode != bytecode) {
+                        // fast_aldc_w puts constant in CP cache
+                        cpoolIndex = getConstantPoolIndex(hotspotcode, bci + 1);
+                        writeShort(code, bci + 1, cpoolIndex);
+                    }
+                    break;
+                case Bytecodes._ldc:
+                    if (hotspotcode != bytecode) {
+                        // fast_aldc puts constant in CP cache
+                        cpoolIndex = getConstantPoolIndex(hotspotcode, bci + 1);
+                        code[bci + 1] = (byte)(cpoolIndex);
+                    }
+                    break;
             }
 
             len = Bytecodes.lengthFor(bytecode);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -61,10 +61,12 @@
     protected short  _signatureIndex;
 
     protected static int extractHighShortFromInt(int val) {
+        // must stay in sync with constantPoolOopDesc::name_and_type_at_put, method_at_put, etc.
         return (val >> 16) & 0xFFFF;
     }
 
     protected static int extractLowShortFromInt(int val) {
+        // must stay in sync with constantPoolOopDesc::name_and_type_at_put, method_at_put, etc.
         return val & 0xFFFF;
     }
 
@@ -297,6 +299,28 @@
                                         + ", type = " + signatureIndex);
                      break;
                 }
+
+                case JVM_CONSTANT_MethodHandle: {
+                     dos.writeByte(cpConstType);
+                     int value = cpool.getIntAt(ci);
+                     short refIndex = (short) extractHighShortFromInt(value);
+                     byte  refKind  = (byte)  extractLowShortFromInt(value);
+                     dos.writeByte(refKind);
+                     dos.writeShort(refIndex);
+                     if (DEBUG) debugMessage("CP[" + ci + "] = MH index = " + refIndex
+                                        + ", kind = " + refKind);
+                     break;
+                }
+
+                case JVM_CONSTANT_MethodType: {
+                     dos.writeByte(cpConstType);
+                     int value = cpool.getIntAt(ci);
+                     short refIndex = (short) value;
+                     dos.writeShort(refIndex);
+                     if (DEBUG) debugMessage("CP[" + ci + "] = MT index = " + refIndex);
+                     break;
+                }
+
                 default:
                   throw new InternalError("Unknown tag: " + cpConstType);
             } // switch
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java	Thu Jul 29 22:02:45 2010 -0700
@@ -572,6 +572,16 @@
                buf.cell(Integer.toString(cpool.getIntAt(index)));
                break;
 
+            case JVM_CONSTANT_MethodHandle:
+               buf.cell("JVM_CONSTANT_MethodHandle");
+               buf.cell(genLowHighShort(cpool.getIntAt(index)));
+               break;
+
+            case JVM_CONSTANT_MethodType:
+               buf.cell("JVM_CONSTANT_MethodType");
+               buf.cell(Integer.toString(cpool.getIntAt(index)));
+               break;
+
             default:
                throw new InternalError("unknown tag: " + ctag);
          }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,12 +38,26 @@
   private static int JVM_CONSTANT_Methodref               = 10;
   private static int JVM_CONSTANT_InterfaceMethodref      = 11;
   private static int JVM_CONSTANT_NameAndType             = 12;
+  private static int JVM_CONSTANT_MethodHandle            = 15;  // JSR 292
+  private static int JVM_CONSTANT_MethodType              = 16;  // JSR 292
   private static int JVM_CONSTANT_Invalid                 = 0;   // For bad value initialization
   private static int JVM_CONSTANT_UnresolvedClass         = 100; // Temporary tag until actual use
   private static int JVM_CONSTANT_ClassIndex              = 101; // Temporary tag while constructing constant pool
   private static int JVM_CONSTANT_UnresolvedString        = 102; // Temporary tag until actual use
   private static int JVM_CONSTANT_StringIndex             = 103; // Temporary tag while constructing constant pool
   private static int JVM_CONSTANT_UnresolvedClassInError  = 104; // Resolution failed
+  private static int JVM_CONSTANT_Object                  = 105; // Required for BoundMethodHandle arguments.
+
+  // JVM_CONSTANT_MethodHandle subtypes //FIXME: connect these to data structure
+  private static int JVM_REF_getField                = 1;
+  private static int JVM_REF_getStatic               = 2;
+  private static int JVM_REF_putField                = 3;
+  private static int JVM_REF_putStatic               = 4;
+  private static int JVM_REF_invokeVirtual           = 5;
+  private static int JVM_REF_invokeStatic            = 6;
+  private static int JVM_REF_invokeSpecial           = 7;
+  private static int JVM_REF_newInvokeSpecial        = 8;
+  private static int JVM_REF_invokeInterface         = 9;
 
   private byte tag;
 
@@ -62,6 +76,8 @@
   public boolean isDouble()           { return tag == JVM_CONSTANT_Double; }
   public boolean isNameAndType()      { return tag == JVM_CONSTANT_NameAndType; }
   public boolean isUtf8()             { return tag == JVM_CONSTANT_Utf8; }
+  public boolean isMethodHandle()     { return tag == JVM_CONSTANT_MethodHandle; }
+  public boolean isMethodType()       { return tag == JVM_CONSTANT_MethodType; }
 
   public boolean isInvalid()          { return tag == JVM_CONSTANT_Invalid; }
 
@@ -73,6 +89,8 @@
   public boolean isUnresolvedString()       { return tag == JVM_CONSTANT_UnresolvedString; }
   public boolean isStringIndex()            { return tag == JVM_CONSTANT_StringIndex; }
 
+  public boolean isObject()                 { return tag == JVM_CONSTANT_Object; }
+
   public boolean isKlassReference()   { return isKlassIndex() || isUnresolvedKlass(); }
   public boolean isFieldOrMethod()    { return isField() || isMethod() || isInterfaceMethod(); }
   public boolean isSymbol()           { return isUtf8(); }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js	Thu Jul 29 22:02:45 2010 -0700
@@ -825,6 +825,8 @@
    }
    writeln("");
    disAsm.decode(new sapkg.interpreter.BytecodeVisitor() {
+                    prologue: function(method) { },
+                    epilogue: function() { },
                     visit: function(bytecode) {
                        if (hasLines) {
                           var line = method.getLineNumberFromBCI(bci);
--- a/hotspot/make/hotspot_version	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/make/hotspot_version	Thu Jul 29 22:02:45 2010 -0700
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=19
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=03
+HS_BUILD_NUMBER=04
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/hotspot/make/linux/makefiles/adlc.make	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/make/linux/makefiles/adlc.make	Thu Jul 29 22:02:45 2010 -0700
@@ -138,7 +138,11 @@
 
 # Normally, debugging is done directly on the ad_<arch>*.cpp files.
 # But -g will put #line directives in those files pointing back to <arch>.ad.
+# Some builds of gcc 3.2 have a bug that gets tickled by the extra #line directives
+# so skip it for 3.2 and ealier.
+ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 ADLCFLAGS += -g
+endif
 
 ifdef LP64
 ADLCFLAGS += -D_LP64
--- a/hotspot/make/linux/makefiles/sa.make	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/make/linux/makefiles/sa.make	Thu Jul 29 22:02:45 2010 -0700
@@ -40,6 +40,9 @@
 # tools.jar is needed by the JDI - SA binding
 SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
 
+# TODO: if it's a modules image, check if SA module is installed.
+MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
+
 # gnumake 3.78.1 does not accept the *s that
 # are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
 AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
@@ -65,7 +68,7 @@
 	  echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
 	  exit 1; \
 	fi
-	$(QUIETLY) if [ ! -f $(SA_CLASSPATH) ] ; then \
+	$(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \
 	  echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\
 	  echo ""; \
 	  exit 1; \
--- a/hotspot/make/solaris/makefiles/sa.make	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/make/solaris/makefiles/sa.make	Thu Jul 29 22:02:45 2010 -0700
@@ -36,6 +36,9 @@
 # tools.jar is needed by the JDI - SA binding
 SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
 
+# TODO: if it's a modules image, check if SA module is installed.
+MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
+
 # gnumake 3.78.1 does not accept the *s that
 # are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
 AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
@@ -59,7 +62,7 @@
 	   echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
 	   exit 1; \
 	fi
-	$(QUIETLY) if [ ! -f $(SA_CLASSPATH) ] ; then \
+	$(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \
 	  echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\
 	  echo ""; \
 	  exit 1; \
--- a/hotspot/make/windows/makefiles/defs.make	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/make/windows/makefiles/defs.make	Thu Jul 29 22:02:45 2010 -0700
@@ -32,6 +32,17 @@
 PATH_SEP = ;
 
 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
+ifeq ($(ARCH_DATA_MODEL),32)
+  ARCH_DATA_MODEL=32
+  PLATFORM=windows-i586
+  VM_PLATFORM=windows_i486
+  HS_ARCH=x86
+  MAKE_ARGS += ARCH=x86
+  MAKE_ARGS += BUILDARCH=i486
+  MAKE_ARGS += Platform_arch=x86
+  MAKE_ARGS += Platform_arch_model=x86_32
+endif
+
 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) x86),)
   ARCH_DATA_MODEL=32
   PLATFORM=windows-i586
@@ -43,55 +54,57 @@
   MAKE_ARGS += Platform_arch_model=x86_32
 endif
 
-ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)
-  ARCH_DATA_MODEL=64
-  PLATFORM=windows-ia64
-  VM_PLATFORM=windows_ia64
-  HS_ARCH=ia64
-  MAKE_ARGS += LP64=1
-  MAKE_ARGS += ARCH=ia64
-  MAKE_ARGS += BUILDARCH=ia64
-  MAKE_ARGS += Platform_arch=ia64
-  MAKE_ARGS += Platform_arch_model=ia64
-endif
+ifneq ($(ARCH_DATA_MODEL),32)
+  ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)
+    ARCH_DATA_MODEL=64
+    PLATFORM=windows-ia64
+    VM_PLATFORM=windows_ia64
+    HS_ARCH=ia64
+    MAKE_ARGS += LP64=1
+    MAKE_ARGS += ARCH=ia64
+    MAKE_ARGS += BUILDARCH=ia64
+    MAKE_ARGS += Platform_arch=ia64
+    MAKE_ARGS += Platform_arch_model=ia64
+  endif
 
 # http://support.microsoft.com/kb/888731 : this can be either
 # AMD64 for AMD, or EM64T for Intel chips.
-ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
-  ARCH_DATA_MODEL=64
-  PLATFORM=windows-amd64
-  VM_PLATFORM=windows_amd64
-  HS_ARCH=x86
-  MAKE_ARGS += LP64=1
-  MAKE_ARGS += ARCH=x86
-  MAKE_ARGS += BUILDARCH=amd64
-  MAKE_ARGS += Platform_arch=x86
-  MAKE_ARGS += Platform_arch_model=x86_64
-endif
+  ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
+    ARCH_DATA_MODEL=64
+    PLATFORM=windows-amd64
+    VM_PLATFORM=windows_amd64
+    HS_ARCH=x86
+    MAKE_ARGS += LP64=1
+    MAKE_ARGS += ARCH=x86
+    MAKE_ARGS += BUILDARCH=amd64
+    MAKE_ARGS += Platform_arch=x86
+    MAKE_ARGS += Platform_arch_model=x86_64
+  endif
 
 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) EM64T),)
-  ARCH_DATA_MODEL=64
-  PLATFORM=windows-amd64
-  VM_PLATFORM=windows_amd64
-  HS_ARCH=x86
-  MAKE_ARGS += LP64=1
-  MAKE_ARGS += ARCH=x86
-  MAKE_ARGS += BUILDARCH=amd64
-  MAKE_ARGS += Platform_arch=x86
-  MAKE_ARGS += Platform_arch_model=x86_64
-endif
+    ARCH_DATA_MODEL=64
+    PLATFORM=windows-amd64
+    VM_PLATFORM=windows_amd64
+    HS_ARCH=x86
+    MAKE_ARGS += LP64=1
+    MAKE_ARGS += ARCH=x86
+    MAKE_ARGS += BUILDARCH=amd64
+    MAKE_ARGS += Platform_arch=x86
+    MAKE_ARGS += Platform_arch_model=x86_64
+  endif
 
 # NB later OS versions than 2003 may report "Intel64"
-ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)
-  ARCH_DATA_MODEL=64
-  PLATFORM=windows-amd64
-  VM_PLATFORM=windows_amd64
-  HS_ARCH=x86
-  MAKE_ARGS += LP64=1
-  MAKE_ARGS += ARCH=x86
-  MAKE_ARGS += BUILDARCH=amd64
-  MAKE_ARGS += Platform_arch=x86
-  MAKE_ARGS += Platform_arch_model=x86_64
+  ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)
+    ARCH_DATA_MODEL=64
+    PLATFORM=windows-amd64
+    VM_PLATFORM=windows_amd64
+    HS_ARCH=x86
+    MAKE_ARGS += LP64=1
+    MAKE_ARGS += ARCH=x86
+    MAKE_ARGS += BUILDARCH=amd64
+    MAKE_ARGS += Platform_arch=x86
+    MAKE_ARGS += Platform_arch_model=x86_64
+  endif
 endif
 
 JDK_INCLUDE_SUBDIR=win32
--- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -318,6 +318,31 @@
   __ bind(exit);
 }
 
+// Fast path for caching oop constants.
+// %%% We should use this to handle Class and String constants also.
+// %%% It will simplify the ldc/primitive path considerably.
+void TemplateTable::fast_aldc(bool wide) {
+  transition(vtos, atos);
+
+  if (!EnableMethodHandles) {
+    // We should not encounter this bytecode if !EnableMethodHandles.
+    // The verifier will stop it.  However, if we get past the verifier,
+    // this will stop the thread in a reasonable way, without crashing the JVM.
+    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
+                     InterpreterRuntime::throw_IncompatibleClassChangeError));
+    // the call_VM checks for exception, so we should never return here.
+    __ should_not_reach_here();
+    return;
+  }
+
+  Register Rcache = G3_scratch;
+  Register Rscratch = G4_scratch;
+
+  resolve_cache_and_index(f1_oop, Otos_i, Rcache, Rscratch, wide ? sizeof(u2) : sizeof(u1));
+
+  __ verify_oop(Otos_i);
+}
+
 void TemplateTable::ldc2_w() {
   transition(vtos, vtos);
   Label retry, resolved, Long, exit;
@@ -1994,6 +2019,8 @@
     case Bytecodes::_invokestatic   : // fall through
     case Bytecodes::_invokeinterface: entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invoke);  break;
     case Bytecodes::_invokedynamic  : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invokedynamic);  break;
+    case Bytecodes::_fast_aldc      : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);     break;
+    case Bytecodes::_fast_aldc_w    : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);     break;
     default                         : ShouldNotReachHere();                                 break;
   }
   // first time invocation - must resolve first
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -375,6 +375,32 @@
   __ bind(Done);
 }
 
+// Fast path for caching oop constants.
+// %%% We should use this to handle Class and String constants also.
+// %%% It will simplify the ldc/primitive path considerably.
+void TemplateTable::fast_aldc(bool wide) {
+  transition(vtos, atos);
+
+  if (!EnableMethodHandles) {
+    // We should not encounter this bytecode if !EnableMethodHandles.
+    // The verifier will stop it.  However, if we get past the verifier,
+    // this will stop the thread in a reasonable way, without crashing the JVM.
+    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
+                     InterpreterRuntime::throw_IncompatibleClassChangeError));
+    // the call_VM checks for exception, so we should never return here.
+    __ should_not_reach_here();
+    return;
+  }
+
+  const Register cache = rcx;
+  const Register index = rdx;
+
+  resolve_cache_and_index(f1_oop, rax, cache, index, wide ? sizeof(u2) : sizeof(u1));
+  if (VerifyOops) {
+    __ verify_oop(rax);
+  }
+}
+
 void TemplateTable::ldc2_w() {
   transition(vtos, vtos);
   Label Long, Done;
@@ -2055,6 +2081,8 @@
     case Bytecodes::_invokestatic   : // fall through
     case Bytecodes::_invokeinterface: entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invoke);  break;
     case Bytecodes::_invokedynamic  : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invokedynamic); break;
+    case Bytecodes::_fast_aldc      : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);     break;
+    case Bytecodes::_fast_aldc_w    : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);     break;
     default                         : ShouldNotReachHere();                                 break;
   }
   __ movl(temp, (int)bytecode());
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -389,6 +389,32 @@
   __ bind(Done);
 }
 
+// Fast path for caching oop constants.
+// %%% We should use this to handle Class and String constants also.
+// %%% It will simplify the ldc/primitive path considerably.
+void TemplateTable::fast_aldc(bool wide) {
+  transition(vtos, atos);
+
+  if (!EnableMethodHandles) {
+    // We should not encounter this bytecode if !EnableMethodHandles.
+    // The verifier will stop it.  However, if we get past the verifier,
+    // this will stop the thread in a reasonable way, without crashing the JVM.
+    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
+                     InterpreterRuntime::throw_IncompatibleClassChangeError));
+    // the call_VM checks for exception, so we should never return here.
+    __ should_not_reach_here();
+    return;
+  }
+
+  const Register cache = rcx;
+  const Register index = rdx;
+
+  resolve_cache_and_index(f1_oop, rax, cache, index, wide ? sizeof(u2) : sizeof(u1));
+  if (VerifyOops) {
+    __ verify_oop(rax);
+  }
+}
+
 void TemplateTable::ldc2_w() {
   transition(vtos, vtos);
   Label Long, Done;
@@ -2063,6 +2089,12 @@
   case Bytecodes::_invokedynamic:
     entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invokedynamic);
     break;
+  case Bytecodes::_fast_aldc:
+    entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);
+    break;
+  case Bytecodes::_fast_aldc_w:
+    entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);
+    break;
   default:
     ShouldNotReachHere();
     break;
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
 VM_Version::CpuidInfo VM_Version::_cpuid_info   = { 0, };
 
 static BufferBlob* stub_blob;
-static const int stub_size = 300;
+static const int stub_size = 400;
 
 extern "C" {
   typedef void (*getPsrInfo_stub_t)(void*);
@@ -56,7 +56,7 @@
     const uint32_t CPU_FAMILY_386   = (3 << CPU_FAMILY_SHIFT);
     const uint32_t CPU_FAMILY_486   = (4 << CPU_FAMILY_SHIFT);
 
-    Label detect_486, cpu486, detect_586, std_cpuid1;
+    Label detect_486, cpu486, detect_586, std_cpuid1, std_cpuid4;
     Label ext_cpuid1, ext_cpuid5, done;
 
     StubCodeMark mark(this, "VM_Version", "getPsrInfo_stub");
@@ -131,13 +131,62 @@
     __ movl(Address(rsi, 8), rcx);
     __ movl(Address(rsi,12), rdx);
 
-    __ cmpl(rax, 3);     // Is cpuid(0x4) supported?
-    __ jccb(Assembler::belowEqual, std_cpuid1);
+    __ cmpl(rax, 0xa);                  // Is cpuid(0xB) supported?
+    __ jccb(Assembler::belowEqual, std_cpuid4);
+
+    //
+    // cpuid(0xB) Processor Topology
+    //
+    __ movl(rax, 0xb);
+    __ xorl(rcx, rcx);   // Threads level
+    __ cpuid();
+
+    __ lea(rsi, Address(rbp, in_bytes(VM_Version::tpl_cpuidB0_offset())));
+    __ movl(Address(rsi, 0), rax);
+    __ movl(Address(rsi, 4), rbx);
+    __ movl(Address(rsi, 8), rcx);
+    __ movl(Address(rsi,12), rdx);
+
+    __ movl(rax, 0xb);
+    __ movl(rcx, 1);     // Cores level
+    __ cpuid();
+    __ push(rax);
+    __ andl(rax, 0x1f);  // Determine if valid topology level
+    __ orl(rax, rbx);    // eax[4:0] | ebx[0:15] == 0 indicates invalid level
+    __ andl(rax, 0xffff);
+    __ pop(rax);
+    __ jccb(Assembler::equal, std_cpuid4);
+
+    __ lea(rsi, Address(rbp, in_bytes(VM_Version::tpl_cpuidB1_offset())));
+    __ movl(Address(rsi, 0), rax);
+    __ movl(Address(rsi, 4), rbx);
+    __ movl(Address(rsi, 8), rcx);
+    __ movl(Address(rsi,12), rdx);
+
+    __ movl(rax, 0xb);
+    __ movl(rcx, 2);     // Packages level
+    __ cpuid();
+    __ push(rax);
+    __ andl(rax, 0x1f);  // Determine if valid topology level
+    __ orl(rax, rbx);    // eax[4:0] | ebx[0:15] == 0 indicates invalid level
+    __ andl(rax, 0xffff);
+    __ pop(rax);
+    __ jccb(Assembler::equal, std_cpuid4);
+
+    __ lea(rsi, Address(rbp, in_bytes(VM_Version::tpl_cpuidB2_offset())));
+    __ movl(Address(rsi, 0), rax);
+    __ movl(Address(rsi, 4), rbx);
+    __ movl(Address(rsi, 8), rcx);
+    __ movl(Address(rsi,12), rdx);
 
     //
     // cpuid(0x4) Deterministic cache params
     //
+    __ bind(std_cpuid4);
     __ movl(rax, 4);
+    __ cmpl(rax, Address(rbp, in_bytes(VM_Version::std_cpuid0_offset()))); // Is cpuid(0x4) supported?
+    __ jccb(Assembler::greater, std_cpuid1);
+
     __ xorl(rcx, rcx);   // L1 cache
     __ cpuid();
     __ push(rax);
@@ -460,13 +509,18 @@
   AllocatePrefetchDistance = allocate_prefetch_distance();
   AllocatePrefetchStyle    = allocate_prefetch_style();
 
-  if( AllocatePrefetchStyle == 2 && is_intel() &&
-      cpu_family() == 6 && supports_sse3() ) { // watermark prefetching on Core
+  if( is_intel() && cpu_family() == 6 && supports_sse3() ) {
+    if( AllocatePrefetchStyle == 2 ) { // watermark prefetching on Core
 #ifdef _LP64
-    AllocatePrefetchDistance = 384;
+      AllocatePrefetchDistance = 384;
 #else
-    AllocatePrefetchDistance = 320;
+      AllocatePrefetchDistance = 320;
 #endif
+    }
+    if( supports_sse4_2() && supports_ht() ) { // Nehalem based cpus
+      AllocatePrefetchDistance = 192;
+      AllocatePrefetchLines = 4;
+    }
   }
   assert(AllocatePrefetchDistance % AllocatePrefetchStepSize == 0, "invalid value");
 
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -114,6 +114,14 @@
     } bits;
   };
 
+  union TplCpuidBEbx {
+    uint32_t value;
+    struct {
+      uint32_t logical_cpus : 16,
+                            : 16;
+    } bits;
+  };
+
   union ExtCpuid1Ecx {
     uint32_t value;
     struct {
@@ -211,6 +219,25 @@
     uint32_t     dcp_cpuid4_ecx; // unused currently
     uint32_t     dcp_cpuid4_edx; // unused currently
 
+    // cpuid function 0xB (processor topology)
+    // ecx = 0
+    uint32_t     tpl_cpuidB0_eax;
+    TplCpuidBEbx tpl_cpuidB0_ebx;
+    uint32_t     tpl_cpuidB0_ecx; // unused currently
+    uint32_t     tpl_cpuidB0_edx; // unused currently
+
+    // ecx = 1
+    uint32_t     tpl_cpuidB1_eax;
+    TplCpuidBEbx tpl_cpuidB1_ebx;
+    uint32_t     tpl_cpuidB1_ecx; // unused currently
+    uint32_t     tpl_cpuidB1_edx; // unused currently
+
+    // ecx = 2
+    uint32_t     tpl_cpuidB2_eax;
+    TplCpuidBEbx tpl_cpuidB2_ebx;
+    uint32_t     tpl_cpuidB2_ecx; // unused currently
+    uint32_t     tpl_cpuidB2_edx; // unused currently
+
     // cpuid function 0x80000000 // example, unused
     uint32_t ext_max_function;
     uint32_t ext_vendor_name_0;
@@ -316,6 +343,9 @@
   static ByteSize ext_cpuid1_offset() { return byte_offset_of(CpuidInfo, ext_cpuid1_eax); }
   static ByteSize ext_cpuid5_offset() { return byte_offset_of(CpuidInfo, ext_cpuid5_eax); }
   static ByteSize ext_cpuid8_offset() { return byte_offset_of(CpuidInfo, ext_cpuid8_eax); }
+  static ByteSize tpl_cpuidB0_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB0_eax); }
+  static ByteSize tpl_cpuidB1_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB1_eax); }
+  static ByteSize tpl_cpuidB2_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB2_eax); }
 
   // Initialization
   static void initialize();
@@ -346,10 +376,22 @@
   static bool is_amd()            { assert_is_initialized(); return _cpuid_info.std_vendor_name_0 == 0x68747541; } // 'htuA'
   static bool is_intel()          { assert_is_initialized(); return _cpuid_info.std_vendor_name_0 == 0x756e6547; } // 'uneG'
 
+  static bool supports_processor_topology() {
+    return (_cpuid_info.std_max_function >= 0xB) &&
+           // eax[4:0] | ebx[0:15] == 0 indicates invalid topology level.
+           // Some cpus have max cpuid >= 0xB but do not support processor topology.
+           ((_cpuid_info.tpl_cpuidB0_eax & 0x1f | _cpuid_info.tpl_cpuidB0_ebx.bits.logical_cpus) != 0);
+  }
+
   static uint cores_per_cpu()  {
     uint result = 1;
     if (is_intel()) {
-      result = (_cpuid_info.dcp_cpuid4_eax.bits.cores_per_cpu + 1);
+      if (supports_processor_topology()) {
+        result = _cpuid_info.tpl_cpuidB1_ebx.bits.logical_cpus /
+                 _cpuid_info.tpl_cpuidB0_ebx.bits.logical_cpus;
+      } else {
+        result = (_cpuid_info.dcp_cpuid4_eax.bits.cores_per_cpu + 1);
+      }
     } else if (is_amd()) {
       result = (_cpuid_info.ext_cpuid8_ecx.bits.cores_per_cpu + 1);
     }
@@ -358,7 +400,9 @@
 
   static uint threads_per_core()  {
     uint result = 1;
-    if (_cpuid_info.std_cpuid1_edx.bits.ht != 0) {
+    if (is_intel() && supports_processor_topology()) {
+      result = _cpuid_info.tpl_cpuidB0_ebx.bits.logical_cpus;
+    } else if (_cpuid_info.std_cpuid1_edx.bits.ht != 0) {
       result = _cpuid_info.std_cpuid1_ebx.bits.threads_per_cpu /
                cores_per_cpu();
     }
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -820,7 +820,7 @@
                                            bool      is_top_frame) {
   assert(popframe_extra_args == 0, "what to do?");
   assert(!is_top_frame || (!callee_locals && !callee_param_count),
-         "top frame should have no caller")
+         "top frame should have no caller");
 
   // This code must exactly match what InterpreterFrame::build
   // does (the full InterpreterFrame::build, that is, not the
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -2079,9 +2079,9 @@
 static char saved_jvm_path[MAXPATHLEN] = {0};
 
 // Find the full path to the current module, libjvm.so or libjvm_g.so
-void os::jvm_path(char *buf, jint len) {
+void os::jvm_path(char *buf, jint buflen) {
   // Error checking.
-  if (len < MAXPATHLEN) {
+  if (buflen < MAXPATHLEN) {
     assert(false, "must use a large-enough buffer");
     buf[0] = '\0';
     return;
@@ -2117,6 +2117,9 @@
       // Look for JAVA_HOME in the environment.
       char* java_home_var = ::getenv("JAVA_HOME");
       if (java_home_var != NULL && java_home_var[0] != 0) {
+        char* jrelib_p;
+        int len;
+
         // Check the current module name "libjvm.so" or "libjvm_g.so".
         p = strrchr(buf, '/');
         assert(strstr(p, "/libjvm") == p, "invalid library name");
@@ -2124,14 +2127,24 @@
 
         if (realpath(java_home_var, buf) == NULL)
           return;
-        sprintf(buf + strlen(buf), "/jre/lib/%s", cpu_arch);
+
+        // determine if this is a legacy image or modules image
+        // modules image doesn't have "jre" subdirectory
+        len = strlen(buf);
+        jrelib_p = buf + len;
+        snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
+        if (0 != access(buf, F_OK)) {
+          snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
+        }
+
         if (0 == access(buf, F_OK)) {
           // Use current module name "libjvm[_g].so" instead of
           // "libjvm"debug_only("_g")".so" since for fastdebug version
           // we should have "libjvm.so" but debug_only("_g") adds "_g"!
           // It is used when we are choosing the HPI library's name
           // "libhpi[_g].so" in hpi::initialize_get_interface().
-          sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p);
+          len = strlen(buf);
+          snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p);
         } else {
           // Go back to path of .so
           if (realpath(dli_fname, buf) == NULL)
--- a/hotspot/src/os/linux/vm/vtune_linux.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "incls/_precompiled.incl"
-#include "incls/_vtune_linux.cpp.incl"
-
-// empty implementation
-
-void VTune::start_GC() {}
-void VTune::end_GC() {}
-void VTune::start_class_load() {}
-void VTune::end_class_load() {}
-void VTune::exit() {}
-void VTune::register_stub(const char* name, address start, address end) {}
-
-void VTune::create_nmethod(nmethod* nm) {}
-void VTune::delete_nmethod(nmethod* nm) {}
-
-void vtune_init() {}
-
-
-// Reconciliation History
-// vtune_solaris.cpp    1.8 99/07/12 23:54:21
-// End
--- a/hotspot/src/os/solaris/vm/osThread_solaris.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os/solaris/vm/osThread_solaris.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -123,7 +123,7 @@
 
   int set_interrupt_callback    (Sync_Interrupt_Callback * cb);
   void remove_interrupt_callback(Sync_Interrupt_Callback * cb);
-  void OSThread::do_interrupt_callbacks_at_interrupt(InterruptArguments *args);
+  void do_interrupt_callbacks_at_interrupt(InterruptArguments *args);
 
  // ***************************************************************
  // java.lang.Thread.interrupt state.
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -2435,6 +2435,8 @@
       char* java_home_var = ::getenv("JAVA_HOME");
       if (java_home_var != NULL && java_home_var[0] != 0) {
         char cpu_arch[12];
+        char* jrelib_p;
+        int   len;
         sysinfo(SI_ARCHITECTURE, cpu_arch, sizeof(cpu_arch));
 #ifdef _LP64
         // If we are on sparc running a 64-bit vm, look in jre/lib/sparcv9.
@@ -2450,14 +2452,23 @@
         p = strstr(p, "_g") ? "_g" : "";
 
         realpath(java_home_var, buf);
-        sprintf(buf + strlen(buf), "/jre/lib/%s", cpu_arch);
+        // determine if this is a legacy image or modules image
+        // modules image doesn't have "jre" subdirectory
+        len = strlen(buf);
+        jrelib_p = buf + len;
+        snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
+        if (0 != access(buf, F_OK)) {
+          snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
+        }
+
         if (0 == access(buf, F_OK)) {
           // Use current module name "libjvm[_g].so" instead of
           // "libjvm"debug_only("_g")".so" since for fastdebug version
           // we should have "libjvm.so" but debug_only("_g") adds "_g"!
           // It is used when we are choosing the HPI library's name
           // "libhpi[_g].so" in hpi::initialize_get_interface().
-          sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p);
+          len = strlen(buf);
+          snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p);
         } else {
           // Go back to path of .so
           realpath((char *)dlinfo.dli_fname, buf);
--- a/hotspot/src/os/solaris/vm/vtune_solaris.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "incls/_precompiled.incl"
-#include "incls/_vtune_solaris.cpp.incl"
-
-// empty implementation
-
-void VTune::start_GC() {}
-void VTune::end_GC() {}
-void VTune::start_class_load() {}
-void VTune::end_class_load() {}
-void VTune::exit() {}
-void VTune::register_stub(const char* name, address start, address end) {}
-
-void VTune::create_nmethod(nmethod* nm) {}
-void VTune::delete_nmethod(nmethod* nm) {}
-
-void vtune_init() {}
--- a/hotspot/src/os/windows/vm/vtune_windows.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "incls/_precompiled.incl"
-#include "incls/_vtune_windows.cpp.incl"
-
-static int current_method_ID = 0;
-
-// ------------- iJITProf.h -------------------
-// defined by Intel -- do not change
-
-#include "windows.h"
-
-extern "C" {
-  enum iJITP_Event {
-    ExceptionOccurred_S,                  // Java exception
-    ExceptionOccurred_IDS,
-
-    Shutdown,                             // VM exit
-
-    ThreadCreate,                         // threads
-    ThreadDestroy,
-    ThreadSwitch,
-
-    ClassLoadStart,                       // class loading
-    ClassLoadEnd,
-
-    GCStart,                              // GC
-    GCEnd,
-
-    NMethodCreate = 13,                   // nmethod creation
-    NMethodDelete
-
-    // rest of event types omitted (call profiling not supported yet)
-  };
-
-  // version number -- 0 if VTune not installed
-  int WINAPI iJitP_VersionNumber();
-
-  enum iJITP_ModeFlags {
-    NoNotification = 0x0,                // don't call vtune
-    NotifyNMethodCreate   = 0x1,         // notify NMethod_Create
-    NotifyNMethodDelete   = 0x2,         // notify NMethod_Create
-    NotifyMethodEnter     = 0x4,         // method entry
-    NotifyMethodExit      = 0x8,         // method exit
-    NotifyShutdown        = 0x10,        // VM exit
-    NotifyGC              = 0x20,        // GC
-  };
-
-  // call back function type
-  typedef void (WINAPI *ModeChangedFn)(iJITP_ModeFlags flags);
-
-  // -------------  VTune method interfaces ----------------------
-  typedef void  (WINAPI *RegisterCallbackFn)(ModeChangedFn fn);   // register callback
-  typedef int   (WINAPI *NotifyEventFn)(iJITP_Event, void* event_data);
-
-  // specific event data structures
-
-  // data for NMethodCreate
-
-  struct VTuneObj {                       // base class for allocation
-                                          // (can't use CHeapObj -- has vtable ptr)
-    void* operator new(size_t size) { return os::malloc(size); }
-    void  operator delete(void* p)  { fatal("never delete VTune data"); }
-  };
-
-  struct LineNumberInfo : VTuneObj {      // PC-to-line number mapping
-    unsigned long offset;                 // byte offset from start of method
-    unsigned long line_num;               // corresponding line number
-  };
-
-  struct MethodLoadInfo : VTuneObj {
-    unsigned long methodID;               // unique method ID
-    const char* name;                     // method name
-    unsigned long instr_start;            // start address
-    unsigned long instr_size;             // length in bytes
-    unsigned long line_number_size;       // size of line number table
-    LineNumberInfo* line_number_table;    // line number mapping
-    unsigned long classID;                // unique class ID
-    char* class_file_name;                // fully qualified class file name
-    char* source_file_name;               // fully qualified source file name
-
-    MethodLoadInfo(nmethod* nm);          // for real nmethods
-    MethodLoadInfo(const char* vm_name, address start, address end);
-                                          // for "nmethods" like stubs, interpreter, etc
-
-  };
-
-  // data for NMethodDelete
-  struct MethodInfo : VTuneObj {
-    unsigned long methodID;               // unique method ID
-    unsigned long classID;                // (added for convenience -- not part of Intel interface)
-
-    MethodInfo(methodOop m);
-  };
-};
-
-MethodInfo::MethodInfo(methodOop m) {
-  // just give it a new ID -- we're not compiling methods twice (usually)
-  // (and even if we did, one might want to see the two versions separately)
-  methodID = ++current_method_ID;
-}
-
-MethodLoadInfo::MethodLoadInfo(const char* vm_name, address start, address end) {
-  classID  = 0;
-  methodID = ++current_method_ID;
-  name = vm_name;
-  instr_start = (unsigned long)start;
-  instr_size = end - start;
-  line_number_size = 0;
-  line_number_table = NULL;
-  class_file_name = source_file_name = "HotSpot JVM";
-}
-
-MethodLoadInfo::MethodLoadInfo(nmethod* nm) {
-  methodOop m = nm->method();
-  MethodInfo info(m);
-  classID  = info.classID;
-  methodID = info.methodID;
-  name = strdup(m->name()->as_C_string());
-  instr_start = (unsigned long)nm->instructions_begin();
-  instr_size = nm->code_size();
-  line_number_size = 0;
-  line_number_table = NULL;
-  klassOop kl = m->method_holder();
-  char* class_name = Klass::cast(kl)->name()->as_C_string();
-  char* file_name = NEW_C_HEAP_ARRAY(char, strlen(class_name) + 1);
-  strcpy(file_name, class_name);
-  class_file_name = file_name;
-  char* src_name = NEW_C_HEAP_ARRAY(char, strlen(class_name) + strlen(".java") + 1);
-  strcpy(src_name, class_name);
-  strcat(src_name, ".java");
-  source_file_name = src_name;
-}
-
-// --------------------- DLL loading functions ------------------------
-
-#define DLLNAME "iJitProf.dll"
-
-static HINSTANCE load_lib(char* name) {
-  HINSTANCE lib = NULL;
-  HKEY hk;
-
-  // try to get VTune directory from the registry
-  if (RegOpenKey(HKEY_CURRENT_USER, "Software\\VB and VBA Program Settings\\VTune\\StartUp", &hk) == ERROR_SUCCESS) {
-    for (int i = 0; true; i++) {
-      char szName[MAX_PATH + 1];
-      char szVal [MAX_PATH + 1];
-      DWORD cbName, cbVal;
-
-      cbName = cbVal = MAX_PATH + 1;
-      if (RegEnumValue(hk, i, szName, &cbName, NULL, NULL, (LPBYTE)szVal, &cbVal) == ERROR_SUCCESS) {
-        // get VTune directory
-        if (!strcmp(szName, name)) {
-          char*p = szVal;
-          while (*p == ' ') p++;    // trim
-          char* q = p + strlen(p) - 1;
-          while (*q == ' ') *(q--) = '\0';
-
-          // chdir to the VTune dir
-          GetCurrentDirectory(MAX_PATH + 1, szName);
-          SetCurrentDirectory(p);
-          // load lib
-          lib = LoadLibrary(strcat(strcat(p, "\\"), DLLNAME));
-          if (lib != NULL && WizardMode) tty->print_cr("*loaded VTune DLL %s", p);
-          // restore current dir
-          SetCurrentDirectory(szName);
-          break;
-        }
-      } else {
-        break;
-      }
-    }
-  }
-  return lib;
-}
-
-static RegisterCallbackFn iJIT_RegisterCallback = NULL;
-static NotifyEventFn      iJIT_NotifyEvent      = NULL;
-
-static bool load_iJIT_funcs() {
-  // first try to load from PATH
-  HINSTANCE lib = LoadLibrary(DLLNAME);
-  if (lib != NULL && WizardMode) tty->print_cr("*loaded VTune DLL %s via PATH", DLLNAME);
-
-  // if not successful, try to look in the VTUNE directory
-  if (lib == NULL) lib = load_lib("VTUNEDIR30");
-  if (lib == NULL) lib = load_lib("VTUNEDIR25");
-  if (lib == NULL) lib = load_lib("VTUNEDIR");
-
-  if (lib == NULL) return false;    // unsuccessful
-
-  // try to load the functions
-  iJIT_RegisterCallback = (RegisterCallbackFn)GetProcAddress(lib, "iJIT_RegisterCallback");
-  iJIT_NotifyEvent      = (NotifyEventFn)     GetProcAddress(lib, "iJIT_NotifyEvent");
-
-  if (!iJIT_RegisterCallback) tty->print_cr("*couldn't find VTune entry point iJIT_RegisterCallback");
-  if (!iJIT_NotifyEvent)      tty->print_cr("*couldn't find VTune entry point iJIT_NotifyEvent");
-  return iJIT_RegisterCallback != NULL && iJIT_NotifyEvent != NULL;
-}
-
-// --------------------- VTune class ------------------------
-
-static bool active = false;
-static int  flags  = 0;
-
-void VTune::start_GC() {
-  if (active && (flags & NotifyGC)) iJIT_NotifyEvent(GCStart, NULL);
-}
-
-void VTune::end_GC() {
-  if (active && (flags & NotifyGC)) iJIT_NotifyEvent(GCEnd, NULL);
-}
-
-void VTune::start_class_load() {
-  // not yet implemented in VTune
-}
-
-void VTune::end_class_load() {
-  // not yet implemented in VTune
-}
-
-void VTune::exit() {
-  if (active && (flags & NotifyShutdown)) iJIT_NotifyEvent(Shutdown, NULL);
-}
-
-void VTune::register_stub(const char* name, address start, address end) {
-  if (flags & NotifyNMethodCreate) {
-    MethodLoadInfo* info = new MethodLoadInfo(name, start, end);
-    if (PrintMiscellaneous && WizardMode && Verbose) {
-      tty->print_cr("NMethodCreate %s (%d): %#x..%#x", info->name, info->methodID,
-                    info->instr_start, info->instr_start + info->instr_size);
-    }
-    iJIT_NotifyEvent(NMethodCreate, info);
-  }
-}
-
-void VTune::create_nmethod(nmethod* nm) {
-  if (flags & NotifyNMethodCreate) {
-    MethodLoadInfo* info = new MethodLoadInfo(nm);
-    if (PrintMiscellaneous && WizardMode && Verbose) {
-      tty->print_cr("NMethodCreate %s (%d): %#x..%#x", info->name, info->methodID,
-                    info->instr_start, info->instr_start + info->instr_size);
-    }
-    iJIT_NotifyEvent(NMethodCreate, info);
-  }
-}
-
-void VTune::delete_nmethod(nmethod* nm) {
-  if (flags & NotifyNMethodDelete) {
-    MethodInfo* info = new MethodInfo(nm->method());
-    iJIT_NotifyEvent(NMethodDelete, info);
-  }
-}
-
-static void set_flags(int new_flags) {
-  flags = new_flags;
-  // if (WizardMode) tty->print_cr("*new VTune flags: %#x", flags);
-}
-
-void vtune_init() {
-  if (!UseVTune) return;
-  active = load_iJIT_funcs();
-  if (active) {
-    iJIT_RegisterCallback((ModeChangedFn)set_flags);
-  } else {
-    assert(flags == 0, "flags shouldn't be set");
-  }
-}
--- a/hotspot/src/os_cpu/linux_x86/vm/copy_linux_x86.inline.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os_cpu/linux_x86/vm/copy_linux_x86.inline.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -26,7 +26,7 @@
 #ifdef AMD64
   (void)memmove(to, from, count * HeapWordSize);
 #else
-  // Same as pd_aligned_conjoint_words, except includes a zero-count check.
+  // Includes a zero-count check.
   intx temp;
   __asm__ volatile("        testl   %6,%6         ;"
                    "        jz      7f            ;"
@@ -84,7 +84,7 @@
     break;
   }
 #else
-  // Same as pd_aligned_disjoint_words, except includes a zero-count check.
+  // Includes a zero-count check.
   intx temp;
   __asm__ volatile("        testl   %6,%6       ;"
                    "        jz      3f          ;"
@@ -130,75 +130,18 @@
 }
 
 static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
-#ifdef AMD64
-  (void)memmove(to, from, count * HeapWordSize);
-#else
-  // Same as pd_conjoint_words, except no zero-count check.
-  intx temp;
-  __asm__ volatile("        cmpl    %4,%5         ;"
-                   "        leal    -4(%4,%6,4),%3;"
-                   "        jbe     1f            ;"
-                   "        cmpl    %7,%5         ;"
-                   "        jbe     4f            ;"
-                   "1:      cmpl    $32,%6        ;"
-                   "        ja      3f            ;"
-                   "        subl    %4,%1         ;"
-                   "2:      movl    (%4),%3       ;"
-                   "        movl    %7,(%5,%4,1)  ;"
-                   "        addl    $4,%0         ;"
-                   "        subl    $1,%2          ;"
-                   "        jnz     2b            ;"
-                   "        jmp     7f            ;"
-                   "3:      rep;    smovl         ;"
-                   "        jmp     7f            ;"
-                   "4:      cmpl    $32,%2        ;"
-                   "        movl    %7,%0         ;"
-                   "        leal    -4(%5,%6,4),%1;"
-                   "        ja      6f            ;"
-                   "        subl    %4,%1         ;"
-                   "5:      movl    (%4),%3       ;"
-                   "        movl    %7,(%5,%4,1)  ;"
-                   "        subl    $4,%0         ;"
-                   "        subl    $1,%2          ;"
-                   "        jnz     5b            ;"
-                   "        jmp     7f            ;"
-                   "6:      std                   ;"
-                   "        rep;    smovl         ;"
-                   "        cld                   ;"
-                   "7:      nop                    "
-                   : "=S" (from), "=D" (to), "=c" (count), "=r" (temp)
-                   : "0"  (from), "1"  (to), "2"  (count), "3"  (temp)
-                   : "memory", "flags");
-#endif // AMD64
+  pd_conjoint_words(from, to, count);
 }
 
 static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
-#ifdef AMD64
   pd_disjoint_words(from, to, count);
-#else
-  // Same as pd_disjoint_words, except no zero-count check.
-  intx temp;
-  __asm__ volatile("        cmpl    $32,%6      ;"
-                   "        ja      2f          ;"
-                   "        subl    %4,%1       ;"
-                   "1:      movl    (%4),%3     ;"
-                   "        movl    %7,(%5,%4,1);"
-                   "        addl    $4,%0       ;"
-                   "        subl    $1,%2        ;"
-                   "        jnz     1b          ;"
-                   "        jmp     3f          ;"
-                   "2:      rep;    smovl       ;"
-                   "3:      nop                  "
-                   : "=S" (from), "=D" (to), "=c" (count), "=r" (temp)
-                   : "0"  (from), "1"  (to), "2"  (count), "3"  (temp)
-                   : "memory", "cc");
-#endif // AMD64
 }
 
 static void pd_conjoint_bytes(void* from, void* to, size_t count) {
 #ifdef AMD64
   (void)memmove(to, from, count);
 #else
+  // Includes a zero-count check.
   intx temp;
   __asm__ volatile("        testl   %6,%6          ;"
                    "        jz      13f            ;"
--- a/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s	Thu Jul 29 22:02:45 2010 -0700
@@ -121,10 +121,10 @@
         jnz      3b
         addl     %esi,%edi
 4:      movl     %eax,%ecx            # byte count less prefix
-        andl     $3,%ecx              # suffix byte count
+5:      andl     $3,%ecx              # suffix byte count
         jz       7f                   # no suffix
         # copy suffix
-5:      xorl     %eax,%eax
+        xorl     %eax,%eax
 6:      movb     (%esi,%eax,1),%dl
         movb     %dl,(%edi,%eax,1)
         addl     $1,%eax
@@ -159,10 +159,10 @@
         # copy dwords, aligned or not
 3:      rep;     smovl
 4:      movl     %eax,%ecx            # byte count
-        andl     $3,%ecx              # suffix byte count
+5:      andl     $3,%ecx              # suffix byte count
         jz       7f                   # no suffix
         # copy suffix
-5:      subl     %esi,%edi
+        subl     %esi,%edi
         addl     $3,%esi
 6:      movb     (%esi),%dl
         movb     %dl,(%edi,%esi,1)
@@ -214,10 +214,10 @@
         # copy aligned dwords
 3:      rep;     smovl
 4:      movl     %eax,%ecx
-        andl     $3,%ecx
+5:      andl     $3,%ecx
         jz       7f
         # copy suffix
-5:      xorl     %eax,%eax
+        xorl     %eax,%eax
 6:      movb     (%esi,%eax,1),%dl
         movb     %dl,(%edi,%eax,1)
         addl     $1,%eax
@@ -250,9 +250,9 @@
         jnz      3b
         addl     %esi,%edi
 4:      movl     %eax,%ecx
-        andl     $3,%ecx
+5:      andl     $3,%ecx
         jz       7f
-5:      subl     %esi,%edi
+        subl     %esi,%edi
         addl     $3,%esi
 6:      movb     (%esi),%dl
         movb     %dl,(%edi,%esi,1)
@@ -287,11 +287,12 @@
         andl     $3,%eax              # either 0 or 2
         jz       1f                   # no prefix
         # copy prefix
+        subl     $1,%ecx
+        jl       5f                   # zero count
         movw     (%esi),%dx
         movw     %dx,(%edi)
         addl     %eax,%esi            # %eax == 2
         addl     %eax,%edi
-        subl     $1,%ecx
 1:      movl     %ecx,%eax            # word count less prefix
         sarl     %ecx                 # dword count
         jz       4f                   # no dwords to move
@@ -454,12 +455,13 @@
         ret
         .=.+10
 2:      subl     %esi,%edi
+        jmp      4f
         .p2align 4,,15
 3:      movl     (%esi),%edx
         movl     %edx,(%edi,%esi,1)
         addl     $4,%esi
-        subl     $1,%ecx
-        jnz      3b
+4:      subl     $1,%ecx
+        jge      3b
         popl     %edi
         popl     %esi
         ret
@@ -467,19 +469,20 @@
         std
         leal     -4(%edi,%ecx,4),%edi # to + count*4 - 4
         cmpl     $32,%ecx
-        ja       3f                   # > 32 dwords
+        ja       4f                   # > 32 dwords
         subl     %eax,%edi            # eax == from + count*4 - 4
+        jmp      3f
         .p2align 4,,15
 2:      movl     (%eax),%edx
         movl     %edx,(%edi,%eax,1)
         subl     $4,%eax
-        subl     $1,%ecx
-        jnz      2b
+3:      subl     $1,%ecx
+        jge      2b
         cld
         popl     %edi
         popl     %esi
         ret
-3:      movl     %eax,%esi            # from + count*4 - 4
+4:      movl     %eax,%esi            # from + count*4 - 4
         rep;     smovl
         cld
         popl     %edi
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -861,7 +861,7 @@
 cmpxchg_long_func_t* os::atomic_cmpxchg_long_func = os::atomic_cmpxchg_long_bootstrap;
 add_func_t*          os::atomic_add_func          = os::atomic_add_bootstrap;
 
-extern "C" _solaris_raw_setup_fpu(address ptr);
+extern "C" void _solaris_raw_setup_fpu(address ptr);
 void os::setup_fpu() {
   address fpu_cntrl = StubRoutines::addr_fpu_cntrl_wrd_std();
   _solaris_raw_setup_fpu(fpu_cntrl);
--- a/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.s	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.s	Thu Jul 29 22:02:45 2010 -0700
@@ -154,10 +154,10 @@
         jnz      3b
         addl     %esi,%edi
 4:      movl     %eax,%ecx            / byte count less prefix
-        andl     $3,%ecx              / suffix byte count
+5:      andl     $3,%ecx              / suffix byte count
         jz       7f                   / no suffix
         / copy suffix
-5:      xorl     %eax,%eax
+        xorl     %eax,%eax
 6:      movb     (%esi,%eax,1),%dl
         movb     %dl,(%edi,%eax,1)
         addl     $1,%eax
@@ -192,10 +192,10 @@
         / copy dwords, aligned or not
 3:      rep;     smovl
 4:      movl     %eax,%ecx            / byte count
-        andl     $3,%ecx              / suffix byte count
+5:      andl     $3,%ecx              / suffix byte count
         jz       7f                   / no suffix
         / copy suffix
-5:      subl     %esi,%edi
+        subl     %esi,%edi
         addl     $3,%esi
 6:      movb     (%esi),%dl
         movb     %dl,(%edi,%esi,1)
@@ -246,10 +246,10 @@
         / copy aligned dwords
 3:      rep;     smovl
 4:      movl     %eax,%ecx
-        andl     $3,%ecx
+5:      andl     $3,%ecx
         jz       7f
         / copy suffix
-5:      xorl     %eax,%eax
+        xorl     %eax,%eax
 6:      movb     (%esi,%eax,1),%dl
         movb     %dl,(%edi,%eax,1)
         addl     $1,%eax
@@ -282,9 +282,9 @@
         jnz      3b
         addl     %esi,%edi
 4:      movl     %eax,%ecx
-        andl     $3,%ecx
+5:      andl     $3,%ecx
         jz       7f
-5:      subl     %esi,%edi
+        subl     %esi,%edi
         addl     $3,%esi
 6:      movb     (%esi),%dl
         movb     %dl,(%edi,%esi,1)
@@ -318,11 +318,12 @@
         andl     $3,%eax              / either 0 or 2
         jz       1f                   / no prefix
         / copy prefix
+        subl     $1,%ecx
+        jl       5f                   / zero count
         movw     (%esi),%dx
         movw     %dx,(%edi)
         addl     %eax,%esi            / %eax == 2
         addl     %eax,%edi
-        subl     $1,%ecx
 1:      movl     %ecx,%eax            / word count less prefix
         sarl     %ecx                 / dword count
         jz       4f                   / no dwords to move
@@ -482,12 +483,13 @@
         ret
         .=.+10
 2:      subl     %esi,%edi
+        jmp      4f
         .align   16
 3:      movl     (%esi),%edx
         movl     %edx,(%edi,%esi,1)
         addl     $4,%esi
-        subl     $1,%ecx
-        jnz      3b
+4:      subl     $1,%ecx
+        jge      3b
         popl     %edi
         popl     %esi
         ret
@@ -495,19 +497,20 @@
         std
         leal     -4(%edi,%ecx,4),%edi / to + count*4 - 4
         cmpl     $32,%ecx
-        ja       3f                   / > 32 dwords
+        ja       4f                   / > 32 dwords
         subl     %eax,%edi            / eax == from + count*4 - 4
+        jmp      3f
         .align   16
 2:      movl     (%eax),%edx
         movl     %edx,(%edi,%eax,1)
         subl     $4,%eax
-        subl     $1,%ecx
-        jnz      2b
+3:      subl     $1,%ecx
+        jge      2b
         cld
         popl     %edi
         popl     %esi
         ret
-3:      movl     %eax,%esi            / from + count*4 - 4
+4:      movl     %eax,%esi            / from + count*4 - 4
         rep;     smovl
         cld
         popl     %edi
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -404,7 +404,7 @@
       locs_start = REALLOC_RESOURCE_ARRAY(relocInfo, _locs_start, old_capacity, new_capacity);
     } else {
       locs_start = NEW_RESOURCE_ARRAY(relocInfo, new_capacity);
-      Copy::conjoint_bytes(_locs_start, locs_start, old_capacity * sizeof(relocInfo));
+      Copy::conjoint_jbytes(_locs_start, locs_start, old_capacity * sizeof(relocInfo));
       _locs_own = true;
     }
     _locs_start    = locs_start;
@@ -581,7 +581,7 @@
                              (HeapWord*)(buf+buf_offset),
                              (lsize + HeapWordSize-1) / HeapWordSize);
       } else {
-        Copy::conjoint_bytes(lstart, buf+buf_offset, lsize);
+        Copy::conjoint_jbytes(lstart, buf+buf_offset, lsize);
       }
     }
     buf_offset += lsize;
--- a/hotspot/src/share/vm/c1/c1_Compilation.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/c1/c1_Compilation.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -242,10 +242,10 @@
   code->insts()->initialize_shared_locs((relocInfo*)locs_buffer,
                                         locs_buffer_size / sizeof(relocInfo));
   code->initialize_consts_size(Compilation::desired_max_constant_size());
-  // Call stubs + deopt/exception handler
+  // Call stubs + two deopt handlers (regular and MH) + exception handler
   code->initialize_stubs_size((call_stub_estimate * LIR_Assembler::call_stub_size) +
                               LIR_Assembler::exception_handler_size +
-                              LIR_Assembler::deopt_handler_size);
+                              2 * LIR_Assembler::deopt_handler_size);
 }
 
 
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -878,15 +878,12 @@
       case T_OBJECT :
        {
         ciObject* obj = con.as_object();
-        if (obj->is_klass()) {
-          ciKlass* klass = obj->as_klass();
-          if (!klass->is_loaded() || PatchALot) {
-            patch_state = state()->copy();
-            t = new ObjectConstant(obj);
-          } else {
-            t = new InstanceConstant(klass->java_mirror());
-          }
+        if (!obj->is_loaded()
+            || (PatchALot && obj->klass() != ciEnv::current()->String_klass())) {
+          patch_state = state()->copy();
+          t = new ObjectConstant(obj);
         } else {
+          assert(!obj->is_klass(), "must be java_mirror of klass");
           t = new InstanceConstant(obj->as_instance());
         }
         break;
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -601,7 +601,7 @@
 
 
 static klassOop resolve_field_return_klass(methodHandle caller, int bci, TRAPS) {
-  Bytecode_field* field_access = Bytecode_field_at(caller(), caller->bcp_from(bci));
+  Bytecode_field* field_access = Bytecode_field_at(caller, bci);
   // This can be static or non-static field access
   Bytecodes::Code code       = field_access->code();
 
@@ -721,7 +721,7 @@
   Handle load_klass(THREAD, NULL);                // oop needed by load_klass_patching code
   if (stub_id == Runtime1::access_field_patching_id) {
 
-    Bytecode_field* field_access = Bytecode_field_at(caller_method(), caller_method->bcp_from(bci));
+    Bytecode_field* field_access = Bytecode_field_at(caller_method, bci);
     FieldAccessInfo result; // initialize class if needed
     Bytecodes::Code code = field_access->code();
     constantPoolHandle constants(THREAD, caller_method->constants());
@@ -781,11 +781,9 @@
       case Bytecodes::_ldc:
       case Bytecodes::_ldc_w:
         {
-          Bytecode_loadconstant* cc = Bytecode_loadconstant_at(caller_method(),
-                                                               caller_method->bcp_from(bci));
-          klassOop resolved = caller_method->constants()->klass_at(cc->index(), CHECK);
-          // ldc wants the java mirror.
-          k = resolved->klass_part()->java_mirror();
+          Bytecode_loadconstant* cc = Bytecode_loadconstant_at(caller_method, bci);
+          k = cc->resolve_constant(CHECK);
+          assert(k != NULL && !k->is_klass(), "must be class mirror or other Java constant");
         }
         break;
       default: Unimplemented();
@@ -816,6 +814,15 @@
     // Return to the now deoptimized frame.
   }
 
+  // If we are patching in a non-perm oop, make sure the nmethod
+  // is on the right list.
+  if (ScavengeRootsInCode && load_klass.not_null() && load_klass->is_scavengable()) {
+    MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag);
+    nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
+    guarantee(nm != NULL, "only nmethods can contain non-perm oops");
+    if (!nm->on_scavenge_root_list())
+      CodeCache::add_scavenge_root_nmethod(nm);
+  }
 
   // Now copy code back
 
@@ -1115,7 +1122,7 @@
   if (length == 0) return;
   // Not guaranteed to be word atomic, but that doesn't matter
   // for anything but an oop array, which is covered by oop_arraycopy.
-  Copy::conjoint_bytes(src, dst, length);
+  Copy::conjoint_jbytes(src, dst, length);
 JRT_END
 
 JRT_LEAF(void, Runtime1::oop_arraycopy(HeapWord* src, HeapWord* dst, int num))
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -106,7 +106,7 @@
 void BCEscapeAnalyzer::set_returned(ArgumentMap vars) {
   for (int i = 0; i < _arg_size; i++) {
     if (vars.contains(i))
-      _arg_returned.set_bit(i);
+      _arg_returned.set(i);
   }
   _return_local = _return_local && !(vars.contains_unknown() || vars.contains_allocated());
   _return_allocated = _return_allocated && vars.contains_allocated() && !(vars.contains_unknown() || vars.contains_vars());
@@ -126,16 +126,16 @@
   if (_conservative)
     return true;
   for (int i = 0; i < _arg_size; i++) {
-    if (vars.contains(i) && _arg_stack.at(i))
+    if (vars.contains(i) && _arg_stack.test(i))
       return true;
   }
   return false;
 }
 
-void BCEscapeAnalyzer::clear_bits(ArgumentMap vars, BitMap &bm) {
+void BCEscapeAnalyzer::clear_bits(ArgumentMap vars, VectorSet &bm) {
   for (int i = 0; i < _arg_size; i++) {
     if (vars.contains(i)) {
-      bm.clear_bit(i);
+      bm >>= i;
     }
   }
 }
@@ -1157,15 +1157,15 @@
   ciSignature* sig = method()->signature();
   int j = 0;
   if (!method()->is_static()) {
-    _arg_local.set_bit(0);
-    _arg_stack.set_bit(0);
+    _arg_local.set(0);
+    _arg_stack.set(0);
     j++;
   }
   for (i = 0; i < sig->count(); i++) {
     ciType* t = sig->type_at(i);
     if (!t->is_primitive_type()) {
-      _arg_local.set_bit(j);
-      _arg_stack.set_bit(j);
+      _arg_local.set(j);
+      _arg_stack.set(j);
     }
     j += t->size();
   }
@@ -1198,9 +1198,9 @@
     set_modified(var, OFFSET_ANY, 4);
     set_global_escape(var);
   }
-  _arg_local.clear();
-  _arg_stack.clear();
-  _arg_returned.clear();
+  _arg_local.Clear();
+  _arg_stack.Clear();
+  _arg_returned.Clear();
   _return_local = false;
   _return_allocated = false;
   _allocated_escapes = true;
@@ -1254,7 +1254,7 @@
 
   // Do not scan method if it has no object parameters and
   // does not returns an object (_return_allocated is set in initialize()).
-  if (_arg_local.is_empty() && !_return_allocated) {
+  if (_arg_local.Size() == 0 && !_return_allocated) {
     // Clear all info since method's bytecode was not analysed and
     // set pessimistic escape information.
     clear_escape_info();
@@ -1275,14 +1275,14 @@
   //
   if (!has_dependencies() && !methodData()->is_empty()) {
     for (i = 0; i < _arg_size; i++) {
-      if (_arg_local.at(i)) {
-        assert(_arg_stack.at(i), "inconsistent escape info");
+      if (_arg_local.test(i)) {
+        assert(_arg_stack.test(i), "inconsistent escape info");
         methodData()->set_arg_local(i);
         methodData()->set_arg_stack(i);
-      } else if (_arg_stack.at(i)) {
+      } else if (_arg_stack.test(i)) {
         methodData()->set_arg_stack(i);
       }
-      if (_arg_returned.at(i)) {
+      if (_arg_returned.test(i)) {
         methodData()->set_arg_returned(i);
       }
       methodData()->set_arg_modified(i, _arg_modified[i]);
@@ -1308,9 +1308,12 @@
 
   // read escape information from method descriptor
   for (int i = 0; i < _arg_size; i++) {
-    _arg_local.at_put(i, methodData()->is_arg_local(i));
-    _arg_stack.at_put(i, methodData()->is_arg_stack(i));
-    _arg_returned.at_put(i, methodData()->is_arg_returned(i));
+    if (methodData()->is_arg_local(i))
+      _arg_local.set(i);
+    if (methodData()->is_arg_stack(i))
+      _arg_stack.set(i);
+    if (methodData()->is_arg_returned(i))
+      _arg_returned.set(i);
     _arg_modified[i] = methodData()->arg_modified(i);
   }
   _return_local = methodData()->eflag_set(methodDataOopDesc::return_local);
@@ -1358,26 +1361,26 @@
 
 BCEscapeAnalyzer::BCEscapeAnalyzer(ciMethod* method, BCEscapeAnalyzer* parent)
     : _conservative(method == NULL || !EstimateArgEscape)
+    , _arena(CURRENT_ENV->arena())
     , _method(method)
     , _methodData(method ? method->method_data() : NULL)
     , _arg_size(method ? method->arg_size() : 0)
-    , _stack()
-    , _arg_local(_arg_size)
-    , _arg_stack(_arg_size)
-    , _arg_returned(_arg_size)
-    , _dirty(_arg_size)
+    , _arg_local(_arena)
+    , _arg_stack(_arena)
+    , _arg_returned(_arena)
+    , _dirty(_arena)
     , _return_local(false)
     , _return_allocated(false)
     , _allocated_escapes(false)
     , _unknown_modified(false)
-    , _dependencies()
+    , _dependencies(_arena, 4, 0, NULL)
     , _parent(parent)
     , _level(parent == NULL ? 0 : parent->level() + 1) {
   if (!_conservative) {
-    _arg_local.clear();
-    _arg_stack.clear();
-    _arg_returned.clear();
-    _dirty.clear();
+    _arg_local.Clear();
+    _arg_stack.Clear();
+    _arg_returned.Clear();
+    _dirty.Clear();
     Arena* arena = CURRENT_ENV->arena();
     _arg_modified = (uint *) arena->Amalloc(_arg_size * sizeof(uint));
     Copy::zero_to_bytes(_arg_modified, _arg_size * sizeof(uint));
@@ -1414,8 +1417,8 @@
     deps->assert_evol_method(method());
   }
   for (int i = 0; i < _dependencies.length(); i+=2) {
-    ciKlass *k = _dependencies[i]->as_klass();
-    ciMethod *m = _dependencies[i+1]->as_method();
+    ciKlass *k = _dependencies.at(i)->as_klass();
+    ciMethod *m = _dependencies.at(i+1)->as_method();
     deps->assert_unique_concrete_method(k, m);
   }
 }
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -22,9 +22,6 @@
  *
  */
 
-define_array(ciObjectArray, ciObject*);
-define_stack(ciObjectList, ciObjectArray);
-
 // This class implements a fast, conservative analysis of effect of methods
 // on the escape state of their arguments.  The analysis is at the bytecode
 // level.
@@ -34,18 +31,17 @@
 
 class BCEscapeAnalyzer : public ResourceObj {
  private:
+  Arena*            _arena;        // ciEnv arena
+
   bool              _conservative; // If true, return maximally
                                    // conservative results.
   ciMethod*         _method;
   ciMethodData*     _methodData;
   int               _arg_size;
-
-  intStack          _stack;
-
-  BitMap            _arg_local;
-  BitMap            _arg_stack;
-  BitMap            _arg_returned;
-  BitMap            _dirty;
+  VectorSet         _arg_local;
+  VectorSet         _arg_stack;
+  VectorSet         _arg_returned;
+  VectorSet         _dirty;
   enum{ ARG_OFFSET_MAX = 31};
   uint              *_arg_modified;
 
@@ -54,7 +50,7 @@
   bool              _allocated_escapes;
   bool              _unknown_modified;
 
-  ciObjectList     _dependencies;
+  GrowableArray<ciObject *> _dependencies;
 
   ciMethodBlocks   *_methodBlocks;
 
@@ -68,20 +64,10 @@
  private:
   // helper functions
   bool is_argument(int i)    { return i >= 0 && i < _arg_size; }
-
-  void raw_push(int i)       { _stack.push(i); }
-  int  raw_pop()             { return _stack.is_empty() ? -1 : _stack.pop(); }
-  void apush(int i)          { raw_push(i); }
-  void spush()               { raw_push(-1); }
-  void lpush()               { spush(); spush(); }
-  int  apop()                { return raw_pop(); }
-  void spop()                { assert(_stack.is_empty() || _stack.top() == -1, ""); raw_pop(); }
-  void lpop()                { spop(); spop(); }
-
   void set_returned(ArgumentMap vars);
   bool is_argument(ArgumentMap vars);
   bool is_arg_stack(ArgumentMap vars);
-  void clear_bits(ArgumentMap vars, BitMap &bs);
+  void clear_bits(ArgumentMap vars, VectorSet &bs);
   void set_method_escape(ArgumentMap vars);
   void set_global_escape(ArgumentMap vars);
   void set_dirty(ArgumentMap vars);
@@ -116,25 +102,25 @@
   ciMethodData*     methodData() const           { return _methodData; }
   BCEscapeAnalyzer* parent() const               { return _parent; }
   int               level() const                { return _level; }
-  ciObjectList*     dependencies()               { return &_dependencies; }
+  GrowableArray<ciObject *>* dependencies()               { return &_dependencies; }
   bool              has_dependencies() const     { return !_dependencies.is_empty(); }
 
   // retrieval of interprocedural escape information
 
   // The given argument does not escape the callee.
   bool is_arg_local(int i) const {
-    return !_conservative && _arg_local.at(i);
+    return !_conservative && _arg_local.test(i);
   }
 
   // The given argument escapes the callee, but does not become globally
   // reachable.
   bool is_arg_stack(int i) const {
-    return !_conservative && _arg_stack.at(i);
+    return !_conservative && _arg_stack.test(i);
   }
 
   // The given argument does not escape globally, and may be returned.
   bool is_arg_returned(int i) const {
-    return !_conservative && _arg_returned.at(i); }
+    return !_conservative && _arg_returned.test(i); }
 
   // True iff only input arguments are returned.
   bool is_return_local() const {
--- a/hotspot/src/share/vm/ci/ciCPCache.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciCPCache.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -44,13 +44,23 @@
 // ciCPCache::is_f1_null_at
 bool ciCPCache::is_f1_null_at(int index) {
   VM_ENTRY_MARK;
-  constantPoolCacheOop cpcache = (constantPoolCacheOop) get_oop();
-  oop f1 = cpcache->secondary_entry_at(index)->f1();
+  oop f1 = entry_at(index)->f1();
   return (f1 == NULL);
 }
 
 
 // ------------------------------------------------------------------
+// ciCPCache::get_pool_index
+int ciCPCache::get_pool_index(int index) {
+  VM_ENTRY_MARK;
+  ConstantPoolCacheEntry* e = entry_at(index);
+  if (e->is_secondary_entry())
+    e = entry_at(e->main_entry_index());
+  return e->constant_pool_index();
+}
+
+
+// ------------------------------------------------------------------
 // ciCPCache::print
 //
 // Print debugging information about the cache.
--- a/hotspot/src/share/vm/ci/ciCPCache.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciCPCache.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -29,6 +29,18 @@
 // Note: This class is called ciCPCache as ciConstantPoolCache is used
 // for something different.
 class ciCPCache : public ciObject {
+private:
+  constantPoolCacheOop get_cpCacheOop() {   // must be called inside a VM_ENTRY_MARK
+    return (constantPoolCacheOop) get_oop();
+  }
+
+  ConstantPoolCacheEntry* entry_at(int i) {
+    int raw_index = i;
+    if (constantPoolCacheOopDesc::is_secondary_index(i))
+      raw_index = constantPoolCacheOopDesc::decode_secondary_index(i);
+    return get_cpCacheOop()->entry_at(raw_index);
+  }
+
 public:
   ciCPCache(constantPoolCacheHandle cpcache) : ciObject(cpcache) {}
 
@@ -41,5 +53,7 @@
 
   bool is_f1_null_at(int index);
 
+  int get_pool_index(int index);
+
   void print();
 };
--- a/hotspot/src/share/vm/ci/ciClassList.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciClassList.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -85,6 +85,7 @@
 friend class ciConstantPoolCache;      \
 friend class ciField;                  \
 friend class ciConstant;               \
+friend class ciCPCache;                \
 friend class ciFlags;                  \
 friend class ciExceptionHandler;       \
 friend class ciCallProfile;            \
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -511,9 +511,22 @@
 //
 // Implementation of get_constant_by_index().
 ciConstant ciEnv::get_constant_by_index_impl(constantPoolHandle cpool,
-                                             int index,
+                                             int pool_index, int cache_index,
                                              ciInstanceKlass* accessor) {
+  bool ignore_will_link;
   EXCEPTION_CONTEXT;
+  int index = pool_index;
+  if (cache_index >= 0) {
+    assert(index < 0, "only one kind of index at a time");
+    ConstantPoolCacheEntry* cpc_entry = cpool->cache()->entry_at(cache_index);
+    index = cpc_entry->constant_pool_index();
+    oop obj = cpc_entry->f1();
+    if (obj != NULL) {
+      assert(obj->is_instance(), "must be an instance");
+      ciObject* ciobj = get_object(obj);
+      return ciConstant(T_OBJECT, ciobj);
+    }
+  }
   constantTag tag = cpool->tag_at(index);
   if (tag.is_int()) {
     return ciConstant(T_INT, (jint)cpool->int_at(index));
@@ -540,8 +553,7 @@
     return ciConstant(T_OBJECT, constant);
   } else if (tag.is_klass() || tag.is_unresolved_klass()) {
     // 4881222: allow ldc to take a class type
-    bool ignore;
-    ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore, accessor);
+    ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);
     if (HAS_PENDING_EXCEPTION) {
       CLEAR_PENDING_EXCEPTION;
       record_out_of_memory_failure();
@@ -549,12 +561,26 @@
     }
     assert (klass->is_instance_klass() || klass->is_array_klass(),
             "must be an instance or array klass ");
-    return ciConstant(T_OBJECT, klass);
+    return ciConstant(T_OBJECT, klass->java_mirror());
   } else if (tag.is_object()) {
     oop obj = cpool->object_at(index);
     assert(obj->is_instance(), "must be an instance");
     ciObject* ciobj = get_object(obj);
     return ciConstant(T_OBJECT, ciobj);
+  } else if (tag.is_method_type()) {
+    // must execute Java code to link this CP entry into cache[i].f1
+    ciSymbol* signature = get_object(cpool->method_type_signature_at(index))->as_symbol();
+    ciObject* ciobj = get_unloaded_method_type_constant(signature);
+    return ciConstant(T_OBJECT, ciobj);
+  } else if (tag.is_method_handle()) {
+    // must execute Java code to link this CP entry into cache[i].f1
+    int ref_kind        = cpool->method_handle_ref_kind_at(index);
+    int callee_index    = cpool->method_handle_klass_index_at(index);
+    ciKlass* callee     = get_klass_by_index_impl(cpool, callee_index, ignore_will_link, accessor);
+    ciSymbol* name      = get_object(cpool->method_handle_name_ref_at(index))->as_symbol();
+    ciSymbol* signature = get_object(cpool->method_handle_signature_ref_at(index))->as_symbol();
+    ciObject* ciobj     = get_unloaded_method_handle_constant(callee, name, signature, ref_kind);
+    return ciConstant(T_OBJECT, ciobj);
   } else {
     ShouldNotReachHere();
     return ciConstant();
@@ -562,61 +588,15 @@
 }
 
 // ------------------------------------------------------------------
-// ciEnv::is_unresolved_string_impl
-//
-// Implementation of is_unresolved_string().
-bool ciEnv::is_unresolved_string_impl(instanceKlass* accessor, int index) const {
-  EXCEPTION_CONTEXT;
-  assert(accessor->is_linked(), "must be linked before accessing constant pool");
-  constantPoolOop cpool = accessor->constants();
-  constantTag tag = cpool->tag_at(index);
-  return tag.is_unresolved_string();
-}
-
-// ------------------------------------------------------------------
-// ciEnv::is_unresolved_klass_impl
-//
-// Implementation of is_unresolved_klass().
-bool ciEnv::is_unresolved_klass_impl(instanceKlass* accessor, int index) const {
-  EXCEPTION_CONTEXT;
-  assert(accessor->is_linked(), "must be linked before accessing constant pool");
-  constantPoolOop cpool = accessor->constants();
-  constantTag tag = cpool->tag_at(index);
-  return tag.is_unresolved_klass();
-}
-
-// ------------------------------------------------------------------
 // ciEnv::get_constant_by_index
 //
 // Pull a constant out of the constant pool.  How appropriate.
 //
 // Implementation note: this query is currently in no way cached.
 ciConstant ciEnv::get_constant_by_index(constantPoolHandle cpool,
-                                        int index,
+                                        int pool_index, int cache_index,
                                         ciInstanceKlass* accessor) {
-  GUARDED_VM_ENTRY(return get_constant_by_index_impl(cpool, index, accessor);)
-}
-
-// ------------------------------------------------------------------
-// ciEnv::is_unresolved_string
-//
-// Check constant pool
-//
-// Implementation note: this query is currently in no way cached.
-bool ciEnv::is_unresolved_string(ciInstanceKlass* accessor,
-                                 int index) const {
-  GUARDED_VM_ENTRY(return is_unresolved_string_impl(accessor->get_instanceKlass(), index); )
-}
-
-// ------------------------------------------------------------------
-// ciEnv::is_unresolved_klass
-//
-// Check constant pool
-//
-// Implementation note: this query is currently in no way cached.
-bool ciEnv::is_unresolved_klass(ciInstanceKlass* accessor,
-                                int index) const {
-  GUARDED_VM_ENTRY(return is_unresolved_klass_impl(accessor->get_instanceKlass(), index); )
+  GUARDED_VM_ENTRY(return get_constant_by_index_impl(cpool, pool_index, cache_index, accessor);)
 }
 
 // ------------------------------------------------------------------
--- a/hotspot/src/share/vm/ci/ciEnv.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -116,12 +116,8 @@
                                 bool& is_accessible,
                                 ciInstanceKlass* loading_klass);
   ciConstant get_constant_by_index(constantPoolHandle cpool,
-                                   int constant_index,
+                                   int pool_index, int cache_index,
                                    ciInstanceKlass* accessor);
-  bool       is_unresolved_string(ciInstanceKlass* loading_klass,
-                                   int constant_index) const;
-  bool       is_unresolved_klass(ciInstanceKlass* loading_klass,
-                                   int constant_index) const;
   ciField*   get_field_by_index(ciInstanceKlass* loading_klass,
                                 int field_index);
   ciMethod*  get_method_by_index(constantPoolHandle cpool,
@@ -137,12 +133,8 @@
                                      bool& is_accessible,
                                      ciInstanceKlass* loading_klass);
   ciConstant get_constant_by_index_impl(constantPoolHandle cpool,
-                                        int constant_index,
+                                        int pool_index, int cache_index,
                                         ciInstanceKlass* loading_klass);
-  bool       is_unresolved_string_impl (instanceKlass* loading_klass,
-                                        int constant_index) const;
-  bool       is_unresolved_klass_impl (instanceKlass* loading_klass,
-                                        int constant_index) const;
   ciField*   get_field_by_index_impl(ciInstanceKlass* loading_klass,
                                      int field_index);
   ciMethod*  get_method_by_index_impl(constantPoolHandle cpool,
@@ -190,6 +182,25 @@
     return _factory->get_unloaded_klass(accessing_klass, name, true);
   }
 
+  // Get a ciKlass representing an unloaded klass mirror.
+  // Result is not necessarily unique, but will be unloaded.
+  ciInstance* get_unloaded_klass_mirror(ciKlass* type) {
+    return _factory->get_unloaded_klass_mirror(type);
+  }
+
+  // Get a ciInstance representing an unresolved method handle constant.
+  ciInstance* get_unloaded_method_handle_constant(ciKlass*  holder,
+                                                  ciSymbol* name,
+                                                  ciSymbol* signature,
+                                                  int       ref_kind) {
+    return _factory->get_unloaded_method_handle_constant(holder, name, signature, ref_kind);
+  }
+
+  // Get a ciInstance representing an unresolved method type constant.
+  ciInstance* get_unloaded_method_type_constant(ciSymbol* signature) {
+    return _factory->get_unloaded_method_type_constant(signature);
+  }
+
   // See if we already have an unloaded klass for the given name
   // or return NULL if not.
   ciKlass *check_get_unloaded_klass(ciKlass* accessing_klass, ciSymbol* name) {
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,9 +44,7 @@
   _flags = ciFlags(access_flags);
   _has_finalizer = access_flags.has_finalizer();
   _has_subklass = ik->subklass() != NULL;
-  _is_initialized = ik->is_initialized();
-  // Next line must follow and use the result of the previous line:
-  _is_linked = _is_initialized || ik->is_linked();
+  _init_state = (instanceKlass::ClassState)ik->get_init_state();
   _nonstatic_field_size = ik->nonstatic_field_size();
   _has_nonstatic_fields = ik->has_nonstatic_fields();
   _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields:
@@ -91,8 +89,7 @@
   : ciKlass(name, ciInstanceKlassKlass::make())
 {
   assert(name->byte_at(0) != '[', "not an instance klass");
-  _is_initialized = false;
-  _is_linked = false;
+  _init_state = (instanceKlass::ClassState)0;
   _nonstatic_field_size = -1;
   _has_nonstatic_fields = false;
   _nonstatic_fields = NULL;
@@ -109,21 +106,10 @@
 
 // ------------------------------------------------------------------
 // ciInstanceKlass::compute_shared_is_initialized
-bool ciInstanceKlass::compute_shared_is_initialized() {
+void ciInstanceKlass::compute_shared_init_state() {
   GUARDED_VM_ENTRY(
     instanceKlass* ik = get_instanceKlass();
-    _is_initialized = ik->is_initialized();
-    return _is_initialized;
-  )
-}
-
-// ------------------------------------------------------------------
-// ciInstanceKlass::compute_shared_is_linked
-bool ciInstanceKlass::compute_shared_is_linked() {
-  GUARDED_VM_ENTRY(
-    instanceKlass* ik = get_instanceKlass();
-    _is_linked = ik->is_linked();
-    return _is_linked;
+    _init_state = (instanceKlass::ClassState)ik->get_init_state();
   )
 }
 
@@ -323,8 +309,8 @@
 // ciInstanceKlass::java_mirror
 //
 // Get the instance of java.lang.Class corresponding to this klass.
+// Cache it on this->_java_mirror.
 ciInstance* ciInstanceKlass::java_mirror() {
-  assert(is_loaded(), "must be loaded");
   if (_java_mirror == NULL) {
     _java_mirror = ciKlass::java_mirror();
   }
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,9 +39,8 @@
   jobject                _loader;
   jobject                _protection_domain;
 
+  instanceKlass::ClassState _init_state;           // state of class
   bool                   _is_shared;
-  bool                   _is_initialized;
-  bool                   _is_linked;
   bool                   _has_finalizer;
   bool                   _has_subklass;
   bool                   _has_nonstatic_fields;
@@ -87,27 +86,34 @@
 
   bool is_shared() { return _is_shared; }
 
-  bool compute_shared_is_initialized();
-  bool compute_shared_is_linked();
+  void compute_shared_init_state();
   bool compute_shared_has_subklass();
   int  compute_shared_nof_implementors();
   int  compute_nonstatic_fields();
   GrowableArray<ciField*>* compute_nonstatic_fields_impl(GrowableArray<ciField*>* super_fields);
 
+  // Update the init_state for shared klasses
+  void update_if_shared(instanceKlass::ClassState expected) {
+    if (_is_shared && _init_state != expected) {
+      if (is_loaded()) compute_shared_init_state();
+    }
+  }
+
 public:
   // Has this klass been initialized?
   bool                   is_initialized() {
-    if (_is_shared && !_is_initialized) {
-      return is_loaded() && compute_shared_is_initialized();
-    }
-    return _is_initialized;
+    update_if_shared(instanceKlass::fully_initialized);
+    return _init_state == instanceKlass::fully_initialized;
+  }
+  // Is this klass being initialized?
+  bool                   is_being_initialized() {
+    update_if_shared(instanceKlass::being_initialized);
+    return _init_state == instanceKlass::being_initialized;
   }
   // Has this klass been linked?
   bool                   is_linked() {
-    if (_is_shared && !_is_linked) {
-      return is_loaded() && compute_shared_is_linked();
-    }
-    return _is_linked;
+    update_if_shared(instanceKlass::linked);
+    return _init_state >= instanceKlass::linked;
   }
 
   // General klass information.
--- a/hotspot/src/share/vm/ci/ciKlass.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciKlass.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -192,8 +192,14 @@
 
 // ------------------------------------------------------------------
 // ciKlass::java_mirror
+//
+// Get the instance of java.lang.Class corresponding to this klass.
+// If it is an unloaded instance or array klass, return an unloaded
+// mirror object of type Class.
 ciInstance* ciKlass::java_mirror() {
   GUARDED_VM_ENTRY(
+    if (!is_loaded())
+      return ciEnv::current()->get_unloaded_klass_mirror(this);
     oop java_mirror = get_Klass()->java_mirror();
     return CURRENT_ENV->get_object(java_mirror)->as_instance();
   )
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -54,10 +54,10 @@
   _code               = NULL;
   _exception_handlers = NULL;
   _liveness           = NULL;
-  _bcea = NULL;
   _method_blocks = NULL;
 #ifdef COMPILER2
   _flow               = NULL;
+  _bcea               = NULL;
 #endif // COMPILER2
 
   ciEnv *env = CURRENT_ENV;
@@ -121,11 +121,11 @@
   _intrinsic_id = vmIntrinsics::_none;
   _liveness = NULL;
   _can_be_statically_bound = false;
-  _bcea = NULL;
   _method_blocks = NULL;
   _method_data = NULL;
 #ifdef COMPILER2
   _flow = NULL;
+  _bcea = NULL;
 #endif // COMPILER2
 }
 
@@ -1033,10 +1033,15 @@
 bool ciMethod::is_initializer () const {         FETCH_FLAG_FROM_VM(is_initializer); }
 
 BCEscapeAnalyzer  *ciMethod::get_bcea() {
+#ifdef COMPILER2
   if (_bcea == NULL) {
     _bcea = new (CURRENT_ENV->arena()) BCEscapeAnalyzer(this, NULL);
   }
   return _bcea;
+#else // COMPILER2
+  ShouldNotReachHere();
+  return NULL;
+#endif // COMPILER2
 }
 
 ciMethodBlocks  *ciMethod::get_method_blocks() {
--- a/hotspot/src/share/vm/ci/ciMethod.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -48,7 +48,6 @@
   ciInstanceKlass* _holder;
   ciSignature*     _signature;
   ciMethodData*    _method_data;
-  BCEscapeAnalyzer* _bcea;
   ciMethodBlocks*   _method_blocks;
 
   // Code attributes.
@@ -72,7 +71,8 @@
   // Optional liveness analyzer.
   MethodLiveness* _liveness;
 #ifdef COMPILER2
-  ciTypeFlow*     _flow;
+  ciTypeFlow*         _flow;
+  BCEscapeAnalyzer*   _bcea;
 #endif
 
   ciMethod(methodHandle h_m);
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -70,6 +70,7 @@
 
   _unloaded_methods = new (arena) GrowableArray<ciMethod*>(arena, 4, 0, NULL);
   _unloaded_klasses = new (arena) GrowableArray<ciKlass*>(arena, 8, 0, NULL);
+  _unloaded_instances = new (arena) GrowableArray<ciInstance*>(arena, 4, 0, NULL);
   _return_addresses =
     new (arena) GrowableArray<ciReturnAddress*>(arena, 8, 0, NULL);
 }
@@ -443,6 +444,74 @@
   return new_klass;
 }
 
+
+//------------------------------------------------------------------
+// ciObjectFactory::get_unloaded_instance
+//
+// Get a ciInstance representing an as-yet undetermined instance of a given class.
+//
+ciInstance* ciObjectFactory::get_unloaded_instance(ciInstanceKlass* instance_klass) {
+  for (int i=0; i<_unloaded_instances->length(); i++) {
+    ciInstance* entry = _unloaded_instances->at(i);
+    if (entry->klass()->equals(instance_klass)) {
+      // We've found a match.
+      return entry;
+    }
+  }
+
+  // This is a new unloaded instance.  Create it and stick it in
+  // the cache.
+  ciInstance* new_instance = new (arena()) ciInstance(instance_klass);
+
+  init_ident_of(new_instance);
+  _unloaded_instances->append(new_instance);
+
+  // make sure it looks the way we want:
+  assert(!new_instance->is_loaded(), "");
+  assert(new_instance->klass() == instance_klass, "");
+
+  return new_instance;
+}
+
+
+//------------------------------------------------------------------
+// ciObjectFactory::get_unloaded_klass_mirror
+//
+// Get a ciInstance representing an unresolved klass mirror.
+//
+// Currently, this ignores the parameters and returns a unique unloaded instance.
+ciInstance* ciObjectFactory::get_unloaded_klass_mirror(ciKlass*  type) {
+  assert(ciEnv::_Class_klass != NULL, "");
+  return get_unloaded_instance(ciEnv::_Class_klass->as_instance_klass());
+}
+
+//------------------------------------------------------------------
+// ciObjectFactory::get_unloaded_method_handle_constant
+//
+// Get a ciInstance representing an unresolved method handle constant.
+//
+// Currently, this ignores the parameters and returns a unique unloaded instance.
+ciInstance* ciObjectFactory::get_unloaded_method_handle_constant(ciKlass*  holder,
+                                                                 ciSymbol* name,
+                                                                 ciSymbol* signature,
+                                                                 int       ref_kind) {
+  if (ciEnv::_MethodHandle_klass == NULL)  return NULL;
+  return get_unloaded_instance(ciEnv::_MethodHandle_klass->as_instance_klass());
+}
+
+//------------------------------------------------------------------
+// ciObjectFactory::get_unloaded_method_type_constant
+//
+// Get a ciInstance representing an unresolved method type constant.
+//
+// Currently, this ignores the parameters and returns a unique unloaded instance.
+ciInstance* ciObjectFactory::get_unloaded_method_type_constant(ciSymbol* signature) {
+  if (ciEnv::_MethodType_klass == NULL)  return NULL;
+  return get_unloaded_instance(ciEnv::_MethodType_klass->as_instance_klass());
+}
+
+
+
 //------------------------------------------------------------------
 // ciObjectFactory::get_empty_methodData
 //
@@ -637,7 +706,8 @@
 //
 // Print debugging information about the object factory
 void ciObjectFactory::print() {
-  tty->print("<ciObjectFactory oops=%d unloaded_methods=%d unloaded_klasses=%d>",
+  tty->print("<ciObjectFactory oops=%d unloaded_methods=%d unloaded_instances=%d unloaded_klasses=%d>",
              _ci_objects->length(), _unloaded_methods->length(),
+             _unloaded_instances->length(),
              _unloaded_klasses->length());
 }
--- a/hotspot/src/share/vm/ci/ciObjectFactory.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -39,6 +39,7 @@
   GrowableArray<ciObject*>* _ci_objects;
   GrowableArray<ciMethod*>* _unloaded_methods;
   GrowableArray<ciKlass*>* _unloaded_klasses;
+  GrowableArray<ciInstance*>* _unloaded_instances;
   GrowableArray<ciReturnAddress*>* _return_addresses;
   int                       _next_ident;
 
@@ -73,6 +74,8 @@
 
   void print_contents_impl();
 
+  ciInstance* get_unloaded_instance(ciInstanceKlass* klass);
+
 public:
   static bool is_initialized() { return _initialized; }
 
@@ -98,6 +101,18 @@
                               ciSymbol* name,
                               bool create_if_not_found);
 
+  // Get a ciInstance representing an unresolved klass mirror.
+  ciInstance* get_unloaded_klass_mirror(ciKlass* type);
+
+  // Get a ciInstance representing an unresolved method handle constant.
+  ciInstance* get_unloaded_method_handle_constant(ciKlass*  holder,
+                                                  ciSymbol* name,
+                                                  ciSymbol* signature,
+                                                  int       ref_kind);
+
+  // Get a ciInstance representing an unresolved method type constant.
+  ciInstance* get_unloaded_method_type_constant(ciSymbol* signature);
+
 
   // Get the ciMethodData representing the methodData for a method
   // with none.
--- a/hotspot/src/share/vm/ci/ciStreams.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciStreams.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -186,12 +186,13 @@
 }
 
 // ------------------------------------------------------------------
-// ciBytecodeStream::get_constant_index
+// ciBytecodeStream::get_constant_raw_index
 //
 // If this bytecode is one of the ldc variants, get the index of the
 // referenced constant.
-int ciBytecodeStream::get_constant_index() const {
-  switch(cur_bc()) {
+int ciBytecodeStream::get_constant_raw_index() const {
+  // work-alike for Bytecode_loadconstant::raw_index()
+  switch (cur_bc()) {
   case Bytecodes::_ldc:
     return get_index_u1();
   case Bytecodes::_ldc_w:
@@ -202,25 +203,52 @@
     return 0;
   }
 }
+
+// ------------------------------------------------------------------
+// ciBytecodeStream::get_constant_pool_index
+// Decode any CP cache index into a regular pool index.
+int ciBytecodeStream::get_constant_pool_index() const {
+  // work-alike for Bytecode_loadconstant::pool_index()
+  int index = get_constant_raw_index();
+  if (has_cache_index()) {
+    return get_cpcache()->get_pool_index(index);
+  }
+  return index;
+}
+
+// ------------------------------------------------------------------
+// ciBytecodeStream::get_constant_cache_index
+// Return the CP cache index, or -1 if there isn't any.
+int ciBytecodeStream::get_constant_cache_index() const {
+  // work-alike for Bytecode_loadconstant::cache_index()
+  return has_cache_index() ? get_constant_raw_index() : -1;
+}
+
 // ------------------------------------------------------------------
 // ciBytecodeStream::get_constant
 //
 // If this bytecode is one of the ldc variants, get the referenced
 // constant.
 ciConstant ciBytecodeStream::get_constant() {
+  int pool_index = get_constant_raw_index();
+  int cache_index = -1;
+  if (has_cache_index()) {
+    cache_index = pool_index;
+    pool_index = -1;
+  }
   VM_ENTRY_MARK;
   constantPoolHandle cpool(_method->get_methodOop()->constants());
-  return CURRENT_ENV->get_constant_by_index(cpool, get_constant_index(), _holder);
+  return CURRENT_ENV->get_constant_by_index(cpool, pool_index, cache_index, _holder);
 }
 
 // ------------------------------------------------------------------
-bool ciBytecodeStream::is_unresolved_string() const {
-  return CURRENT_ENV->is_unresolved_string(_holder, get_constant_index());
-}
-
-// ------------------------------------------------------------------
-bool ciBytecodeStream::is_unresolved_klass() const {
-  return CURRENT_ENV->is_unresolved_klass(_holder, get_klass_index());
+// ciBytecodeStream::get_constant_pool_tag
+//
+// If this bytecode is one of the ldc variants, get the referenced
+// constant.
+constantTag ciBytecodeStream::get_constant_pool_tag(int index) const {
+  VM_ENTRY_MARK;
+  return _method->get_methodOop()->constants()->tag_at(index);
 }
 
 // ------------------------------------------------------------------
@@ -378,13 +406,16 @@
 
 // ------------------------------------------------------------------
 // ciBytecodeStream::get_cpcache
-ciCPCache* ciBytecodeStream::get_cpcache() {
-  VM_ENTRY_MARK;
-  // Get the constant pool.
-  constantPoolOop      cpool   = _holder->get_instanceKlass()->constants();
-  constantPoolCacheOop cpcache = cpool->cache();
+ciCPCache* ciBytecodeStream::get_cpcache() const {
+  if (_cpcache == NULL) {
+    VM_ENTRY_MARK;
+    // Get the constant pool.
+    constantPoolOop      cpool   = _holder->get_instanceKlass()->constants();
+    constantPoolCacheOop cpcache = cpool->cache();
 
-  return CURRENT_ENV->get_object(cpcache)->as_cpcache();
+    *(ciCPCache**)&_cpcache = CURRENT_ENV->get_object(cpcache)->as_cpcache();
+  }
+  return _cpcache;
 }
 
 // ------------------------------------------------------------------
--- a/hotspot/src/share/vm/ci/ciStreams.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciStreams.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -46,6 +46,7 @@
 
   ciMethod* _method;           // the method
   ciInstanceKlass* _holder;
+  ciCPCache* _cpcache;
   address _bc_start;            // Start of current bytecode for table
   address _was_wide;            // Address past last wide bytecode
   jint* _table_base;            // Aligned start of last table or switch
@@ -58,7 +59,9 @@
 
   void reset( address base, unsigned int size ) {
     _bc_start =_was_wide = 0;
-    _start = _pc = base; _end = base + size; }
+    _start = _pc = base; _end = base + size;
+    _cpcache = NULL;
+  }
 
   void assert_wide(bool require_wide) const {
     if (require_wide)
@@ -136,15 +139,20 @@
   bool is_wide() const { return ( _pc == _was_wide ); }
 
   // Does this instruction contain an index which refes into the CP cache?
-  bool uses_cp_cache() const { return Bytecodes::uses_cp_cache(cur_bc_raw()); }
+  bool has_cache_index() const { return Bytecodes::uses_cp_cache(cur_bc_raw()); }
 
   int get_index_u1() const {
     return bytecode()->get_index_u1(cur_bc_raw());
   }
 
+  int get_index_u1_cpcache() const {
+    return bytecode()->get_index_u1_cpcache(cur_bc_raw());
+  }
+
   // Get a byte index following this bytecode.
   // If prefixed with a wide bytecode, get a wide index.
   int get_index() const {
+    assert(!has_cache_index(), "else use cpcache variant");
     return (_pc == _was_wide)   // was widened?
       ? get_index_u2(true)      // yes, return wide index
       : get_index_u1();         // no, return narrow index
@@ -207,7 +215,9 @@
     return cur_bci() + get_int_table(index); }
 
   // --- Constant pool access ---
-  int get_constant_index() const;
+  int get_constant_raw_index() const;
+  int get_constant_pool_index() const;
+  int get_constant_cache_index() const;
   int get_field_index();
   int get_method_index();
 
@@ -217,12 +227,17 @@
   int get_klass_index() const;
 
   // If this bytecode is one of the ldc variants, get the referenced
-  // constant
+  // constant.  Do not attempt to resolve it, since that would require
+  // execution of Java code.  If it is not resolved, return an unloaded
+  // object (ciConstant.as_object()->is_loaded() == false).
   ciConstant get_constant();
-  // True if the ldc variant points to an unresolved string
-  bool is_unresolved_string() const;
-  // True if the ldc variant points to an unresolved klass
-  bool is_unresolved_klass() const;
+  constantTag get_constant_pool_tag(int index) const;
+
+  // True if the klass-using bytecode points to an unresolved klass
+  bool is_unresolved_klass() const {
+    constantTag tag = get_constant_pool_tag(get_klass_index());
+    return tag.is_unresolved_klass();
+  }
 
   // If this bytecode is one of get_field, get_static, put_field,
   // or put_static, get the referenced field.
@@ -238,7 +253,7 @@
   int       get_method_holder_index();
   int       get_method_signature_index();
 
-  ciCPCache*  get_cpcache();
+  ciCPCache*  get_cpcache() const;
   ciCallSite* get_call_site();
 };
 
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -712,10 +712,8 @@
     ciObject* obj = con.as_object();
     if (obj->is_null_object()) {
       push_null();
-    } else if (obj->is_klass()) {
-      // The type of ldc <class> is java.lang.Class
-      push_object(outer()->env()->Class_klass());
     } else {
+      assert(!obj->is_klass(), "must be java_mirror of klass");
       push_object(obj->klass());
     }
   } else {
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -117,6 +117,29 @@
           cp->string_index_at_put(index, string_index);
         }
         break;
+      case JVM_CONSTANT_MethodHandle :
+      case JVM_CONSTANT_MethodType :
+        if (!EnableMethodHandles ||
+            _major_version < Verifier::INVOKEDYNAMIC_MAJOR_VERSION) {
+          classfile_parse_error(
+            (!EnableInvokeDynamic ?
+             "This JVM does not support constant tag %u in class file %s" :
+             "Class file version does not support constant tag %u in class file %s"),
+            tag, CHECK);
+        }
+        if (tag == JVM_CONSTANT_MethodHandle) {
+          cfs->guarantee_more(4, CHECK);  // ref_kind, method_index, tag/access_flags
+          u1 ref_kind = cfs->get_u1_fast();
+          u2 method_index = cfs->get_u2_fast();
+          cp->method_handle_index_at_put(index, ref_kind, method_index);
+        } else if (tag == JVM_CONSTANT_MethodType) {
+          cfs->guarantee_more(3, CHECK);  // signature_index, tag/access_flags
+          u2 signature_index = cfs->get_u2_fast();
+          cp->method_type_index_at_put(index, signature_index);
+        } else {
+          ShouldNotReachHere();
+        }
+        break;
       case JVM_CONSTANT_Integer :
         {
           cfs->guarantee_more(5, CHECK);  // bytes, tag/access_flags
@@ -337,6 +360,60 @@
           cp->unresolved_string_at_put(index, sym);
         }
         break;
+      case JVM_CONSTANT_MethodHandle :
+        {
+          int ref_index = cp->method_handle_index_at(index);
+          check_property(
+            valid_cp_range(ref_index, length) &&
+                EnableMethodHandles,
+              "Invalid constant pool index %u in class file %s",
+              ref_index, CHECK_(nullHandle));
+          constantTag tag = cp->tag_at(ref_index);
+          int ref_kind  = cp->method_handle_ref_kind_at(index);
+          switch (ref_kind) {
+          case JVM_REF_getField:
+          case JVM_REF_getStatic:
+          case JVM_REF_putField:
+          case JVM_REF_putStatic:
+            check_property(
+              tag.is_field(),
+              "Invalid constant pool index %u in class file %s (not a field)",
+              ref_index, CHECK_(nullHandle));
+            break;
+          case JVM_REF_invokeVirtual:
+          case JVM_REF_invokeStatic:
+          case JVM_REF_invokeSpecial:
+          case JVM_REF_newInvokeSpecial:
+            check_property(
+              tag.is_method(),
+              "Invalid constant pool index %u in class file %s (not a method)",
+              ref_index, CHECK_(nullHandle));
+            break;
+          case JVM_REF_invokeInterface:
+            check_property(
+              tag.is_interface_method(),
+              "Invalid constant pool index %u in class file %s (not an interface method)",
+              ref_index, CHECK_(nullHandle));
+            break;
+          default:
+            classfile_parse_error(
+              "Bad method handle kind at constant pool index %u in class file %s",
+              index, CHECK_(nullHandle));
+          }
+          // Keep the ref_index unchanged.  It will be indirected at link-time.
+        }
+        break;
+      case JVM_CONSTANT_MethodType :
+        {
+          int ref_index = cp->method_type_index_at(index);
+          check_property(
+            valid_cp_range(ref_index, length) &&
+                cp->tag_at(ref_index).is_utf8() &&
+                EnableMethodHandles,
+              "Invalid constant pool index %u in class file %s",
+              ref_index, CHECK_(nullHandle));
+        }
+        break;
       default:
         fatal(err_msg("bad constant pool tag value %u",
                       cp->tag_at(index).value()));
@@ -452,6 +529,43 @@
         }
         break;
       }
+      case JVM_CONSTANT_MethodHandle: {
+        int ref_index = cp->method_handle_index_at(index);
+        int ref_kind  = cp->method_handle_ref_kind_at(index);
+        switch (ref_kind) {
+        case JVM_REF_invokeVirtual:
+        case JVM_REF_invokeStatic:
+        case JVM_REF_invokeSpecial:
+        case JVM_REF_newInvokeSpecial:
+          {
+            int name_and_type_ref_index = cp->name_and_type_ref_index_at(ref_index);
+            int name_ref_index = cp->name_ref_index_at(name_and_type_ref_index);
+            symbolHandle name(THREAD, cp->symbol_at(name_ref_index));
+            if (ref_kind == JVM_REF_newInvokeSpecial) {
+              if (name() != vmSymbols::object_initializer_name()) {
+                classfile_parse_error(
+                  "Bad constructor name at constant pool index %u in class file %s",
+                  name_ref_index, CHECK_(nullHandle));
+              }
+            } else {
+              if (name() == vmSymbols::object_initializer_name()) {
+                classfile_parse_error(
+                  "Bad method name at constant pool index %u in class file %s",
+                  name_ref_index, CHECK_(nullHandle));
+              }
+            }
+          }
+          break;
+          // Other ref_kinds are already fully checked in previous pass.
+        }
+        break;
+      }
+      case JVM_CONSTANT_MethodType: {
+        symbolHandle no_name = vmSymbolHandles::type_name(); // place holder
+        symbolHandle signature(THREAD, cp->method_type_signature_at(index));
+        verify_legal_method_signature(no_name, signature, CHECK_(nullHandle));
+        break;
+      }
     }  // end of switch
   }  // end of for
 
@@ -467,7 +581,7 @@
   case JVM_CONSTANT_UnresolvedClass :
     // Patching a class means pre-resolving it.
     // The name in the constant pool is ignored.
-    if (patch->klass() == SystemDictionary::Class_klass()) { // %%% java_lang_Class::is_instance
+    if (java_lang_Class::is_instance(patch())) {
       guarantee_property(!java_lang_Class::is_primitive(patch()),
                          "Illegal class patch at %d in class file %s",
                          index, CHECK);
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -832,7 +832,6 @@
 
 
 instanceKlassHandle ClassLoader::load_classfile(symbolHandle h_name, TRAPS) {
-  VTuneClassLoadMarker clm;
   ResourceMark rm(THREAD);
   EventMark m("loading class " INTPTR_FORMAT, (address)h_name());
   ThreadProfilerMark tpm(ThreadProfilerMark::classLoaderRegion);
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -2454,6 +2454,48 @@
   return Handle(THREAD, (oop) result.get_jobject());
 }
 
+// Ask Java code to find or construct a method handle constant.
+Handle SystemDictionary::link_method_handle_constant(KlassHandle caller,
+                                                     int ref_kind, //e.g., JVM_REF_invokeVirtual
+                                                     KlassHandle callee,
+                                                     symbolHandle name_sym,
+                                                     symbolHandle signature,
+                                                     TRAPS) {
+  Handle empty;
+  Handle name = java_lang_String::create_from_symbol(name_sym(), CHECK_(empty));
+  Handle type;
+  if (signature->utf8_length() > 0 && signature->byte_at(0) == '(') {
+    bool ignore_is_on_bcp = false;
+    type = find_method_handle_type(signature, caller, ignore_is_on_bcp, CHECK_(empty));
+  } else {
+    SignatureStream ss(signature(), false);
+    if (!ss.is_done()) {
+      oop mirror = ss.as_java_mirror(caller->class_loader(), caller->protection_domain(),
+                                     SignatureStream::NCDFError, CHECK_(empty));
+      type = Handle(THREAD, mirror);
+      ss.next();
+      if (!ss.is_done())  type = Handle();  // error!
+    }
+  }
+  if (type.is_null()) {
+    THROW_MSG_(vmSymbols::java_lang_LinkageError(), "bad signature", empty);
+  }
+
+  // call sun.dyn.MethodHandleNatives::linkMethodHandleConstant(Class caller, int refKind, Class callee, String name, Object type) -> MethodHandle
+  JavaCallArguments args;
+  args.push_oop(caller->java_mirror());  // the referring class
+  args.push_int(ref_kind);
+  args.push_oop(callee->java_mirror());  // the target class
+  args.push_oop(name());
+  args.push_oop(type());
+  JavaValue result(T_OBJECT);
+  JavaCalls::call_static(&result,
+                         SystemDictionary::MethodHandleNatives_klass(),
+                         vmSymbols::linkMethodHandleConstant_name(),
+                         vmSymbols::linkMethodHandleConstant_signature(),
+                         &args, CHECK_(empty));
+  return Handle(THREAD, (oop) result.get_jobject());
+}
 
 // Ask Java code to find or construct a java.dyn.CallSite for the given
 // name and signature, as interpreted relative to the given class loader.
--- a/hotspot/src/share/vm/classfile/systemDictionary.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/systemDictionary.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -473,6 +473,13 @@
                                            KlassHandle accessing_klass,
                                            bool& return_bcp_flag,
                                            TRAPS);
+  // ask Java to compute a java.dyn.MethodHandle object for a given CP entry
+  static Handle    link_method_handle_constant(KlassHandle caller,
+                                               int ref_kind, //e.g., JVM_REF_invokeVirtual
+                                               KlassHandle callee,
+                                               symbolHandle name,
+                                               symbolHandle signature,
+                                               TRAPS);
   // ask Java to create a dynamic call site, while linking an invokedynamic op
   static Handle    make_dynamic_call_site(Handle bootstrap_method,
                                           // Callee information:
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1598,7 +1598,10 @@
   if (opcode == Bytecodes::_ldc || opcode == Bytecodes::_ldc_w) {
     if (!tag.is_unresolved_string() && !tag.is_unresolved_klass()) {
       types = (1 << JVM_CONSTANT_Integer) | (1 << JVM_CONSTANT_Float)
-            | (1 << JVM_CONSTANT_String)  | (1 << JVM_CONSTANT_Class);
+            | (1 << JVM_CONSTANT_String)  | (1 << JVM_CONSTANT_Class)
+            | (1 << JVM_CONSTANT_MethodHandle) | (1 << JVM_CONSTANT_MethodType);
+      // Note:  The class file parser already verified the legality of
+      // MethodHandle and MethodType constants.
       verify_cp_type(index, cp, types, CHECK_VERIFY(this));
     }
   } else {
@@ -1632,6 +1635,14 @@
     current_frame->push_stack_2(
       VerificationType::long_type(),
       VerificationType::long2_type(), CHECK_VERIFY(this));
+  } else if (tag.is_method_handle()) {
+    current_frame->push_stack(
+      VerificationType::reference_type(
+        vmSymbols::java_dyn_MethodHandle()), CHECK_VERIFY(this));
+  } else if (tag.is_method_type()) {
+    current_frame->push_stack(
+      VerificationType::reference_type(
+        vmSymbols::java_dyn_MethodType()), CHECK_VERIFY(this));
   } else {
     verify_error(bci, "Invalid index in ldc");
     return;
@@ -1920,9 +1931,12 @@
   // Get referenced class type
   VerificationType ref_class_type;
   if (opcode == Bytecodes::_invokedynamic) {
-    if (!EnableInvokeDynamic) {
+    if (!EnableInvokeDynamic ||
+        _klass->major_version() < Verifier::INVOKEDYNAMIC_MAJOR_VERSION) {
       class_format_error(
-        "invokedynamic instructions not enabled on this JVM",
+        (!EnableInvokeDynamic ?
+         "invokedynamic instructions not enabled in this JVM" :
+         "invokedynamic instructions not supported by this class file version"),
         _klass->external_name());
       return;
     }
--- a/hotspot/src/share/vm/classfile/verifier.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/verifier.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -25,7 +25,10 @@
 // The verifier class
 class Verifier : AllStatic {
  public:
-  enum { STACKMAP_ATTRIBUTE_MAJOR_VERSION = 50 };
+  enum {
+    STACKMAP_ATTRIBUTE_MAJOR_VERSION    = 50,
+    INVOKEDYNAMIC_MAJOR_VERSION         = 51
+  };
   typedef enum { ThrowException, NoException } Mode;
 
   /**
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -246,6 +246,8 @@
   /* internal up-calls made only by the JVM, via class sun.dyn.MethodHandleNatives: */            \
   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
   template(findMethodHandleType_signature, "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/dyn/MethodType;") \
+  template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
+  template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/dyn/MethodHandle;") \
   template(makeDynamicCallSite_name,                  "makeDynamicCallSite")                      \
   template(makeDynamicCallSite_signature, "(Ljava/dyn/MethodHandle;Ljava/lang/String;Ljava/dyn/MethodType;Ljava/lang/Object;Lsun/dyn/MemberName;I)Ljava/dyn/CallSite;") \
   NOT_LP64(  do_alias(machine_word_signature,         int_signature)  )                           \
--- a/hotspot/src/share/vm/code/codeBlob.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/code/codeBlob.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -210,6 +210,7 @@
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     blob = new (size) AdapterBlob(size, cb);
+    CodeCache::commit(blob);
   }
   // Track memory usage statistic after releasing CodeCache_lock
   MemoryService::track_code_cache_memory_usage();
@@ -281,7 +282,6 @@
       tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, stub);
       Disassembler::decode(stub->instructions_begin(), stub->instructions_end());
     }
-    VTune::register_stub(stub_id, stub->instructions_begin(), stub->instructions_end());
     Forte::register_stub(stub_id, stub->instructions_begin(), stub->instructions_end());
 
     if (JvmtiExport::should_post_dynamic_code_generated()) {
@@ -356,7 +356,6 @@
       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
     }
-    VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
 
     if (JvmtiExport::should_post_dynamic_code_generated()) {
@@ -414,7 +413,6 @@
       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
     }
-    VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
 
     if (JvmtiExport::should_post_dynamic_code_generated()) {
@@ -474,7 +472,6 @@
       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
     }
-    VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
 
     if (JvmtiExport::should_post_dynamic_code_generated()) {
@@ -533,7 +530,6 @@
       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
     }
-    VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
 
     if (JvmtiExport::should_post_dynamic_code_generated()) {
--- a/hotspot/src/share/vm/code/codeCache.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -93,6 +93,8 @@
 
 CodeHeap * CodeCache::_heap = new CodeHeap();
 int CodeCache::_number_of_blobs = 0;
+int CodeCache::_number_of_adapters = 0;
+int CodeCache::_number_of_nmethods = 0;
 int CodeCache::_number_of_nmethods_with_dependencies = 0;
 bool CodeCache::_needs_cache_clean = false;
 nmethod* CodeCache::_scavenge_root_nmethods = NULL;
@@ -176,8 +178,14 @@
   verify_if_often();
 
   print_trace("free", cb);
-  if (cb->is_nmethod() && ((nmethod *)cb)->has_dependencies()) {
-    _number_of_nmethods_with_dependencies--;
+  if (cb->is_nmethod()) {
+    _number_of_nmethods--;
+    if (((nmethod *)cb)->has_dependencies()) {
+      _number_of_nmethods_with_dependencies--;
+    }
+  }
+  if (cb->is_adapter_blob()) {
+    _number_of_adapters--;
   }
   _number_of_blobs--;
 
@@ -191,9 +199,16 @@
 void CodeCache::commit(CodeBlob* cb) {
   // this is called by nmethod::nmethod, which must already own CodeCache_lock
   assert_locked_or_safepoint(CodeCache_lock);
-  if (cb->is_nmethod() && ((nmethod *)cb)->has_dependencies()) {
-    _number_of_nmethods_with_dependencies++;
+  if (cb->is_nmethod()) {
+    _number_of_nmethods++;
+    if (((nmethod *)cb)->has_dependencies()) {
+      _number_of_nmethods_with_dependencies++;
+    }
   }
+  if (cb->is_adapter_blob()) {
+    _number_of_adapters++;
+  }
+
   // flush the hardware I-cache
   ICache::invalidate_range(cb->instructions_begin(), cb->instructions_size());
 }
--- a/hotspot/src/share/vm/code/codeCache.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/code/codeCache.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,8 @@
   // 4422213 or 4436291 for details.
   static CodeHeap * _heap;
   static int _number_of_blobs;
+  static int _number_of_adapters;
+  static int _number_of_nmethods;
   static int _number_of_nmethods_with_dependencies;
   static bool _needs_cache_clean;
   static nmethod* _scavenge_root_nmethods;  // linked via nm->scavenge_root_link()
@@ -105,6 +107,8 @@
   static nmethod* first_nmethod();
   static nmethod* next_nmethod (CodeBlob* cb);
   static int       nof_blobs()                 { return _number_of_blobs; }
+  static int       nof_adapters()              { return _number_of_adapters; }
+  static int       nof_nmethods()              { return _number_of_nmethods; }
 
   // GC support
   static void gc_epilogue();
--- a/hotspot/src/share/vm/code/nmethod.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -397,11 +397,6 @@
 //-------------end of code for ExceptionCache--------------
 
 
-void nmFlags::clear() {
-  assert(sizeof(nmFlags) == sizeof(int), "using more than one word for nmFlags");
-  *(jint*)this = 0;
-}
-
 int nmethod::total_size() const {
   return
     code_size()          +
@@ -419,8 +414,32 @@
   return NULL;
 }
 
-// %%% This variable is no longer used?
-int nmethod::_zombie_instruction_size = NativeJump::instruction_size;
+// Fill in default values for various flag fields
+void nmethod::init_defaults() {
+  _state                      = alive;
+  _marked_for_reclamation     = 0;
+  _has_flushed_dependencies   = 0;
+  _speculatively_disconnected = 0;
+  _has_unsafe_access          = 0;
+  _has_method_handle_invokes  = 0;
+  _marked_for_deoptimization  = 0;
+  _lock_count                 = 0;
+  _stack_traversal_mark       = 0;
+  _unload_reported            = false;           // jvmti state
+
+  NOT_PRODUCT(_has_debug_info = false);
+  _oops_do_mark_link       = NULL;
+  _jmethod_id              = NULL;
+  _osr_link                = NULL;
+  _scavenge_root_link      = NULL;
+  _scavenge_root_state     = 0;
+  _saved_nmethod_link      = NULL;
+  _compiler                = NULL;
+
+#ifdef HAVE_DTRACE_H
+  _trap_offset             = 0;
+#endif // def HAVE_DTRACE_H
+}
 
 
 nmethod* nmethod::new_native_nmethod(methodHandle method,
@@ -580,24 +599,16 @@
     debug_only(No_Safepoint_Verifier nsv;)
     assert_locked_or_safepoint(CodeCache_lock);
 
-    NOT_PRODUCT(_has_debug_info = false);
-    _oops_do_mark_link       = NULL;
+    init_defaults();
     _method                  = method;
     _entry_bci               = InvocationEntryBci;
-    _osr_link                = NULL;
-    _scavenge_root_link      = NULL;
-    _scavenge_root_state     = 0;
-    _saved_nmethod_link      = NULL;
-    _compiler                = NULL;
     // We have no exception handler or deopt handler make the
     // values something that will never match a pc like the nmethod vtable entry
     _exception_offset        = 0;
     _deoptimize_offset       = 0;
     _deoptimize_mh_offset    = 0;
     _orig_pc_offset          = 0;
-#ifdef HAVE_DTRACE_H
-    _trap_offset             = 0;
-#endif // def HAVE_DTRACE_H
+
     _stub_offset             = data_offset();
     _consts_offset           = data_offset();
     _oops_offset             = data_offset();
@@ -615,17 +626,9 @@
     _exception_cache         = NULL;
     _pc_desc_cache.reset_to(NULL);
 
-    flags.clear();
-    flags.state              = alive;
-    _markedForDeoptimization = 0;
-
-    _lock_count = 0;
-    _stack_traversal_mark    = 0;
-
     code_buffer->copy_oops_to(this);
     debug_only(verify_scavenge_root_oops());
     CodeCache::commit(this);
-    VTune::create_nmethod(this);
   }
 
   if (PrintNativeNMethods || PrintDebugInfo || PrintRelocations || PrintDependencies) {
@@ -673,14 +676,9 @@
     debug_only(No_Safepoint_Verifier nsv;)
     assert_locked_or_safepoint(CodeCache_lock);
 
-    NOT_PRODUCT(_has_debug_info = false);
-    _oops_do_mark_link       = NULL;
+    init_defaults();
     _method                  = method;
     _entry_bci               = InvocationEntryBci;
-    _osr_link                = NULL;
-    _scavenge_root_link      = NULL;
-    _scavenge_root_state     = 0;
-    _compiler                = NULL;
     // We have no exception handler or deopt handler make the
     // values something that will never match a pc like the nmethod vtable entry
     _exception_offset        = 0;
@@ -706,17 +704,9 @@
     _exception_cache         = NULL;
     _pc_desc_cache.reset_to(NULL);
 
-    flags.clear();
-    flags.state              = alive;
-    _markedForDeoptimization = 0;
-
-    _lock_count = 0;
-    _stack_traversal_mark    = 0;
-
     code_buffer->copy_oops_to(this);
     debug_only(verify_scavenge_root_oops());
     CodeCache::commit(this);
-    VTune::create_nmethod(this);
   }
 
   if (PrintNMethods || PrintDebugInfo || PrintRelocations || PrintDependencies) {
@@ -781,20 +771,13 @@
     debug_only(No_Safepoint_Verifier nsv;)
     assert_locked_or_safepoint(CodeCache_lock);
 
-    NOT_PRODUCT(_has_debug_info = false);
-    _oops_do_mark_link       = NULL;
+    init_defaults();
     _method                  = method;
+    _entry_bci               = entry_bci;
     _compile_id              = compile_id;
     _comp_level              = comp_level;
-    _entry_bci               = entry_bci;
-    _osr_link                = NULL;
-    _scavenge_root_link      = NULL;
-    _scavenge_root_state     = 0;
     _compiler                = compiler;
     _orig_pc_offset          = orig_pc_offset;
-#ifdef HAVE_DTRACE_H
-    _trap_offset             = 0;
-#endif // def HAVE_DTRACE_H
     _stub_offset             = instructions_offset() + code_buffer->total_offset_of(code_buffer->stubs()->start());
 
     // Exception handler and deopt handler are in the stub section
@@ -821,15 +804,6 @@
     _exception_cache         = NULL;
     _pc_desc_cache.reset_to(scopes_pcs_begin());
 
-    flags.clear();
-    flags.state              = alive;
-    _markedForDeoptimization = 0;
-
-    _unload_reported         = false;           // jvmti state
-
-    _lock_count = 0;
-    _stack_traversal_mark    = 0;
-
     // Copy contents of ScopeDescRecorder to nmethod
     code_buffer->copy_oops_to(this);
     debug_info->copy_to(this);
@@ -841,8 +815,6 @@
 
     CodeCache::commit(this);
 
-    VTune::create_nmethod(this);
-
     // Copy contents of ExceptionHandlerTable to nmethod
     handler_table->copy_to(this);
     nul_chk_table->copy_to(this);
@@ -988,11 +960,6 @@
 }
 
 
-void nmethod::set_version(int v) {
-  flags.version = v;
-}
-
-
 // Promote one word from an assembly-time handle to a live embedded oop.
 inline void nmethod::initialize_immediate_oop(oop* dest, jobject handle) {
   if (handle == NULL ||
@@ -1139,6 +1106,8 @@
 // This is a private interface with the sweeper.
 void nmethod::mark_as_seen_on_stack() {
   assert(is_not_entrant(), "must be a non-entrant method");
+  // Set the traversal mark to ensure that the sweeper does 2
+  // cleaning passes before moving to zombie.
   set_stack_traversal_mark(NMethodSweeper::traversal_count());
 }
 
@@ -1207,7 +1176,7 @@
     // for later on.
     CodeCache::set_needs_cache_clean(true);
   }
-  flags.state = unloaded;
+  _state = unloaded;
 
   // Log the unloading.
   log_state_change();
@@ -1233,21 +1202,21 @@
   if (LogCompilation) {
     if (xtty != NULL) {
       ttyLocker ttyl;  // keep the following output all in one block
-      if (flags.state == unloaded) {
+      if (_state == unloaded) {
         xtty->begin_elem("make_unloaded thread='" UINTX_FORMAT "'",
                          os::current_thread_id());
       } else {
         xtty->begin_elem("make_not_entrant thread='" UINTX_FORMAT "'%s",
                          os::current_thread_id(),
-                         (flags.state == zombie ? " zombie='1'" : ""));
+                         (_state == zombie ? " zombie='1'" : ""));
       }
       log_identity(xtty);
       xtty->stamp();
       xtty->end_elem();
     }
   }
-  if (PrintCompilation && flags.state != unloaded) {
-    print_on(tty, flags.state == zombie ? "made zombie " : "made not entrant ");
+  if (PrintCompilation && _state != unloaded) {
+    print_on(tty, _state == zombie ? "made zombie " : "made not entrant ");
     tty->cr();
   }
 }
@@ -1258,8 +1227,9 @@
 
   bool was_alive = false;
 
-  // Make sure the nmethod is not flushed in case of a safepoint in code below.
+  // Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
   nmethodLocker nml(this);
+  methodHandle the_method(method());
 
   {
     // If the method is already zombie there is nothing to do
@@ -1279,7 +1249,7 @@
     // Enter critical section.  Does not block for safepoint.
     MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
 
-    if (flags.state == state) {
+    if (_state == state) {
       // another thread already performed this transition so nothing
       // to do, but return false to indicate this.
       return false;
@@ -1290,17 +1260,37 @@
     if (!is_osr_method() && !is_not_entrant()) {
       NativeJump::patch_verified_entry(entry_point(), verified_entry_point(),
                   SharedRuntime::get_handle_wrong_method_stub());
-      assert (NativeJump::instruction_size == nmethod::_zombie_instruction_size, "");
     }
 
-    was_alive = is_in_use(); // Read state under lock
+    if (is_in_use()) {
+      // It's a true state change, so mark the method as decompiled.
+      // Do it only for transition from alive.
+      inc_decompile_count();
+    }
 
     // Change state
-    flags.state = state;
+    _state = state;
 
     // Log the transition once
     log_state_change();
 
+    // Remove nmethod from method.
+    // We need to check if both the _code and _from_compiled_code_entry_point
+    // refer to this nmethod because there is a race in setting these two fields
+    // in methodOop as seen in bugid 4947125.
+    // If the vep() points to the zombie nmethod, the memory for the nmethod
+    // could be flushed and the compiler and vtable stubs could still call
+    // through it.
+    if (method() != NULL && (method()->code() == this ||
+                             method()->from_compiled_entry() == verified_entry_point())) {
+      HandleMark hm;
+      method()->clear_code();
+    }
+
+    if (state == not_entrant) {
+      mark_as_seen_on_stack();
+    }
+
   } // leave critical region under Patching_lock
 
   // When the nmethod becomes zombie it is no longer alive so the
@@ -1308,18 +1298,17 @@
   // state will be flushed later when the transition to zombie
   // happens or they get unloaded.
   if (state == zombie) {
+    // zombie only - if a JVMTI agent has enabled the CompiledMethodUnload event
+    // and it hasn't already been reported for this nmethod then report it now.
+    // (the event may have been reported earilier if the GC marked it for unloading).
+    post_compiled_method_unload();
+
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     flush_dependencies(NULL);
   } else {
     assert(state == not_entrant, "other cases may need to be handled differently");
   }
 
-  if (state == not_entrant) {
-    Events::log("Make nmethod not entrant " INTPTR_FORMAT, this);
-  } else {
-    Events::log("Make nmethod zombie " INTPTR_FORMAT, this);
-  }
-
   if (TraceCreateZombies) {
     tty->print_cr("nmethod <" INTPTR_FORMAT "> code made %s", this, (state == not_entrant) ? "not entrant" : "zombie");
   }
@@ -1327,47 +1316,6 @@
   // Make sweeper aware that there is a zombie method that needs to be removed
   NMethodSweeper::notify(this);
 
-  // not_entrant only stuff
-  if (state == not_entrant) {
-    mark_as_seen_on_stack();
-  }
-
-  if (was_alive) {
-    // It's a true state change, so mark the method as decompiled.
-    // Do it only for transition from alive.
-    inc_decompile_count();
-  }
-
-  // zombie only - if a JVMTI agent has enabled the CompiledMethodUnload event
-  // and it hasn't already been reported for this nmethod then report it now.
-  // (the event may have been reported earilier if the GC marked it for unloading).
-  if (state == zombie) {
-    post_compiled_method_unload();
-  }
-
-
-  // Zombie only stuff
-  if (state == zombie) {
-    VTune::delete_nmethod(this);
-  }
-
-  // Check whether method got unloaded at a safepoint before this,
-  // if so we can skip the flushing steps below
-  if (method() == NULL) return true;
-
-  // Remove nmethod from method.
-  // We need to check if both the _code and _from_compiled_code_entry_point
-  // refer to this nmethod because there is a race in setting these two fields
-  // in methodOop as seen in bugid 4947125.
-  // If the vep() points to the zombie nmethod, the memory for the nmethod
-  // could be flushed and the compiler and vtable stubs could still call
-  // through it.
-  if (method()->code() == this ||
-      method()->from_compiled_entry() == verified_entry_point()) {
-    HandleMark hm;
-    method()->clear_code();
-  }
-
   return true;
 }
 
@@ -1488,11 +1436,25 @@
       moop->signature()->utf8_length(),
       code_begin(), code_size());
 
+  if (JvmtiExport::should_post_compiled_method_load() ||
+      JvmtiExport::should_post_compiled_method_unload()) {
+    get_and_cache_jmethod_id();
+  }
+
   if (JvmtiExport::should_post_compiled_method_load()) {
     JvmtiExport::post_compiled_method_load(this);
   }
 }
 
+jmethodID nmethod::get_and_cache_jmethod_id() {
+  if (_jmethod_id == NULL) {
+    // Cache the jmethod_id since it can no longer be looked up once the
+    // method itself has been marked for unloading.
+    _jmethod_id = method()->jmethod_id();
+  }
+  return _jmethod_id;
+}
+
 void nmethod::post_compiled_method_unload() {
   if (unload_reported()) {
     // During unloading we transition to unloaded and then to zombie
@@ -1504,12 +1466,17 @@
   DTRACE_METHOD_UNLOAD_PROBE(method());
 
   // If a JVMTI agent has enabled the CompiledMethodUnload event then
-  // post the event. Sometime later this nmethod will be made a zombie by
-  // the sweeper but the methodOop will not be valid at that point.
-  if (JvmtiExport::should_post_compiled_method_unload()) {
+  // post the event. Sometime later this nmethod will be made a zombie
+  // by the sweeper but the methodOop will not be valid at that point.
+  // If the _jmethod_id is null then no load event was ever requested
+  // so don't bother posting the unload.  The main reason for this is
+  // that the jmethodID is a weak reference to the methodOop so if
+  // it's being unloaded there's no way to look it up since the weak
+  // ref will have been cleared.
+  if (_jmethod_id != NULL && JvmtiExport::should_post_compiled_method_unload()) {
     assert(!unload_reported(), "already unloaded");
     HandleMark hm;
-    JvmtiExport::post_compiled_method_unload(method()->jmethod_id(), code_begin());
+    JvmtiExport::post_compiled_method_unload(_jmethod_id, code_begin());
   }
 
   // The JVMTI CompiledMethodUnload event can be enabled or disabled at
@@ -2087,7 +2054,6 @@
 
 void nmethod_init() {
   // make sure you didn't forget to adjust the filler fields
-  assert(sizeof(nmFlags) <= 4,           "nmFlags occupies more than a word");
   assert(sizeof(nmethod) % oopSize == 0, "nmethod size must be multiple of a word");
 }
 
@@ -2323,7 +2289,6 @@
     tty->print("((nmethod*) "INTPTR_FORMAT ") ", this);
     tty->print(" for method " INTPTR_FORMAT , (address)method());
     tty->print(" { ");
-    if (version())        tty->print("v%d ", version());
     if (is_in_use())      tty->print("in_use ");
     if (is_not_entrant()) tty->print("not_entrant ");
     if (is_zombie())      tty->print("zombie ");
@@ -2659,13 +2624,10 @@
         case Bytecodes::_getstatic:
         case Bytecodes::_putstatic:
           {
-            methodHandle sdm = sd->method();
-            Bytecode_field* field = Bytecode_field_at(sdm(), sdm->bcp_from(sd->bci()));
-            constantPoolOop sdmc = sdm->constants();
-            symbolOop name = sdmc->name_ref_at(field->index());
+            Bytecode_field* field = Bytecode_field_at(sd->method(), sd->bci());
             st->print(" ");
-            if (name != NULL)
-              name->print_symbol_on(st);
+            if (field->name() != NULL)
+              field->name()->print_symbol_on(st);
             else
               st->print("<UNKNOWN>");
           }
--- a/hotspot/src/share/vm/code/nmethod.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -78,29 +78,8 @@
 
 
 // nmethods (native methods) are the compiled code versions of Java methods.
-
-struct nmFlags {
-  friend class VMStructs;
-  unsigned int version:8;                    // version number (0 = first version)
-  unsigned int age:4;                        // age (in # of sweep steps)
-
-  unsigned int state:2;                      // {alive, zombie, unloaded)
-
-  unsigned int isUncommonRecompiled:1;       // recompiled because of uncommon trap?
-  unsigned int isToBeRecompiled:1;           // to be recompiled as soon as it matures
-  unsigned int hasFlushedDependencies:1;     // Used for maintenance of dependencies
-  unsigned int markedForReclamation:1;       // Used by NMethodSweeper
-
-  unsigned int has_unsafe_access:1;          // May fault due to unsafe access.
-  unsigned int has_method_handle_invokes:1;  // Has this method MethodHandle invokes?
-
-  unsigned int speculatively_disconnected:1; // Marked for potential unload
-
-  void clear();
-};
-
-
-// A nmethod contains:
+//
+// An nmethod contains:
 //  - header                 (the nmethod structure)
 //  [Relocation]
 //  - relocation information
@@ -131,10 +110,9 @@
   friend class CodeCache;  // non-perm oops
  private:
   // Shared fields for all nmethod's
-  static int _zombie_instruction_size;
-
   methodOop _method;
   int       _entry_bci;        // != InvocationEntryBci if this nmethod is an on-stack replacement method
+  jmethodID _jmethod_id;       // Cache of method()->jmethod_id()
 
   // To support simple linked-list chaining of nmethods:
   nmethod*  _osr_link;         // from instanceKlass::osr_nmethods_head
@@ -146,6 +124,11 @@
 
   AbstractCompiler* _compiler; // The compiler which compiled this nmethod
 
+  // offsets for entry points
+  address _entry_point;                      // entry point with class check
+  address _verified_entry_point;             // entry point without class check
+  address _osr_entry_point;                  // entry point for on stack replacement
+
   // Offsets for different nmethod parts
   int _exception_offset;
   // All deoptee's will resume execution at this location described by
@@ -174,23 +157,31 @@
   // pc during a deopt.
   int _orig_pc_offset;
 
-  int _compile_id;                     // which compilation made this nmethod
-  int _comp_level;                     // compilation level
+  int _compile_id;                           // which compilation made this nmethod
+  int _comp_level;                           // compilation level
+
+  // protected by CodeCache_lock
+  bool _has_flushed_dependencies;            // Used for maintenance of dependencies (CodeCache_lock)
+  bool _speculatively_disconnected;          // Marked for potential unload
+
+  bool _marked_for_reclamation;              // Used by NMethodSweeper (set only by sweeper)
+  bool _marked_for_deoptimization;           // Used for stack deoptimization
 
-  // offsets for entry points
-  address _entry_point;                // entry point with class check
-  address _verified_entry_point;       // entry point without class check
-  address _osr_entry_point;            // entry point for on stack replacement
+  // used by jvmti to track if an unload event has been posted for this nmethod.
+  bool _unload_reported;
 
-  nmFlags flags;           // various flags to keep track of nmethod state
-  bool _markedForDeoptimization;       // Used for stack deoptimization
+  // set during construction
+  unsigned int _has_unsafe_access:1;         // May fault due to unsafe access.
+  unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
+
+  // Protected by Patching_lock
+  unsigned char _state;                      // {alive, not_entrant, zombie, unloaded)
+
   enum { alive        = 0,
          not_entrant  = 1, // uncommon trap has happened but activations may still exist
          zombie       = 2,
          unloaded     = 3 };
 
-  // used by jvmti to track if an unload event has been posted for this nmethod.
-  bool _unload_reported;
 
   jbyte _scavenge_root_state;
 
@@ -269,15 +260,15 @@
   bool make_not_entrant_or_zombie(unsigned int state);
   void inc_decompile_count();
 
-  // used to check that writes to nmFlags are done consistently.
-  static void check_safepoint() PRODUCT_RETURN;
-
   // Used to manipulate the exception cache
   void add_exception_cache_entry(ExceptionCache* new_entry);
   ExceptionCache* exception_cache_entry_for_exception(Handle exception);
 
   // Inform external interfaces that a compiled method has been unloaded
-  inline void post_compiled_method_unload();
+  void post_compiled_method_unload();
+
+  // Initailize fields to their default values
+  void init_defaults();
 
  public:
   // create nmethod with entry_bci
@@ -392,11 +383,11 @@
   address verified_entry_point() const            { return _verified_entry_point;    } // if klass is correct
 
   // flag accessing and manipulation
-  bool  is_in_use() const                         { return flags.state == alive; }
-  bool  is_alive() const                          { return flags.state == alive || flags.state == not_entrant; }
-  bool  is_not_entrant() const                    { return flags.state == not_entrant; }
-  bool  is_zombie() const                         { return flags.state == zombie; }
-  bool  is_unloaded() const                       { return flags.state == unloaded;   }
+  bool  is_in_use() const                         { return _state == alive; }
+  bool  is_alive() const                          { return _state == alive || _state == not_entrant; }
+  bool  is_not_entrant() const                    { return _state == not_entrant; }
+  bool  is_zombie() const                         { return _state == zombie; }
+  bool  is_unloaded() const                       { return _state == unloaded;   }
 
   // Make the nmethod non entrant. The nmethod will continue to be
   // alive.  It is used when an uncommon trap happens.  Returns true
@@ -409,37 +400,33 @@
   bool  unload_reported()                         { return _unload_reported; }
   void  set_unload_reported()                     { _unload_reported = true; }
 
-  bool  is_marked_for_deoptimization() const      { return _markedForDeoptimization; }
-  void  mark_for_deoptimization()                 { _markedForDeoptimization = true; }
+  bool  is_marked_for_deoptimization() const      { return _marked_for_deoptimization; }
+  void  mark_for_deoptimization()                 { _marked_for_deoptimization = true; }
 
   void  make_unloaded(BoolObjectClosure* is_alive, oop cause);
 
   bool has_dependencies()                         { return dependencies_size() != 0; }
   void flush_dependencies(BoolObjectClosure* is_alive);
-  bool  has_flushed_dependencies()                { return flags.hasFlushedDependencies; }
-  void  set_has_flushed_dependencies()            {
+  bool has_flushed_dependencies()                 { return _has_flushed_dependencies; }
+  void set_has_flushed_dependencies()             {
     assert(!has_flushed_dependencies(), "should only happen once");
-    flags.hasFlushedDependencies = 1;
+    _has_flushed_dependencies = 1;
   }
 
-  bool  is_marked_for_reclamation() const         { return flags.markedForReclamation; }
-  void  mark_for_reclamation()                    { flags.markedForReclamation = 1; }
-  void  unmark_for_reclamation()                  { flags.markedForReclamation = 0; }
+  bool  is_marked_for_reclamation() const         { return _marked_for_reclamation; }
+  void  mark_for_reclamation()                    { _marked_for_reclamation = 1; }
+
+  bool  has_unsafe_access() const                 { return _has_unsafe_access; }
+  void  set_has_unsafe_access(bool z)             { _has_unsafe_access = z; }
 
-  bool  has_unsafe_access() const                 { return flags.has_unsafe_access; }
-  void  set_has_unsafe_access(bool z)             { flags.has_unsafe_access = z; }
+  bool  has_method_handle_invokes() const         { return _has_method_handle_invokes; }
+  void  set_has_method_handle_invokes(bool z)     { _has_method_handle_invokes = z; }
 
-  bool  has_method_handle_invokes() const         { return flags.has_method_handle_invokes; }
-  void  set_has_method_handle_invokes(bool z)     { flags.has_method_handle_invokes = z; }
-
-  bool  is_speculatively_disconnected() const     { return flags.speculatively_disconnected; }
-  void  set_speculatively_disconnected(bool z)     { flags.speculatively_disconnected = z; }
+  bool  is_speculatively_disconnected() const     { return _speculatively_disconnected; }
+  void  set_speculatively_disconnected(bool z)     { _speculatively_disconnected = z; }
 
   int   comp_level() const                        { return _comp_level; }
 
-  int   version() const                           { return flags.version; }
-  void  set_version(int v);
-
   // Support for oops in scopes and relocs:
   // Note: index 0 is reserved for null.
   oop   oop_at(int index) const                   { return index == 0 ? (oop) NULL: *oop_addr_at(index); }
@@ -599,6 +586,7 @@
 
   // jvmti support:
   void post_compiled_method_load_event();
+  jmethodID get_and_cache_jmethod_id();
 
   // verify operations
   void verify();
--- a/hotspot/src/share/vm/code/vtableStubs.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/code/vtableStubs.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,6 @@
     }
     _chunk = blob->instructions_begin();
     _chunk_end = _chunk + bytes;
-    VTune::register_stub("vtable stub", _chunk, _chunk_end);
     Forte::register_stub("vtable stub", _chunk, _chunk_end);
     // Notify JVMTI about this stub. The event will be recorded by the enclosing
     // JvmtiDynamicCodeEventCollector and posted when this thread has released
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -3972,6 +3972,10 @@
 
   void work(int i) {
     if (i >= _n_workers) return;  // no work needed this round
+
+    double start_time_ms = os::elapsedTime() * 1000.0;
+    _g1h->g1_policy()->record_gc_worker_start_time(i, start_time_ms);
+
     ResourceMark rm;
     HandleMark   hm;
 
@@ -4019,7 +4023,7 @@
       double elapsed_ms = (os::elapsedTime()-start)*1000.0;
       double term_ms = pss.term_time()*1000.0;
       _g1h->g1_policy()->record_obj_copy_time(i, elapsed_ms-term_ms);
-      _g1h->g1_policy()->record_termination_time(i, term_ms);
+      _g1h->g1_policy()->record_termination(i, term_ms, pss.term_attempts());
     }
     _g1h->g1_policy()->record_thread_age_table(pss.age_table());
     _g1h->update_surviving_young_words(pss.surviving_young_words()+1);
@@ -4043,7 +4047,8 @@
       double term         = pss.term_time();
       gclog_or_tty->print("  Elapsed: %7.2f ms.\n"
                           "    Strong roots: %7.2f ms (%6.2f%%)\n"
-                          "    Termination:  %7.2f ms (%6.2f%%) (in %d entries)\n",
+                          "    Termination:  %7.2f ms (%6.2f%%) "
+                                                 "(in "SIZE_FORMAT" entries)\n",
                           elapsed * 1000.0,
                           strong_roots * 1000.0, (strong_roots*100.0/elapsed),
                           term * 1000.0, (term*100.0/elapsed),
@@ -4059,6 +4064,8 @@
 
     assert(pss.refs_to_scan() == 0, "Task queue should be empty");
     assert(pss.overflowed_refs_to_scan() == 0, "Overflow queue should be empty");
+    double end_time_ms = os::elapsedTime() * 1000.0;
+    _g1h->g1_policy()->record_gc_worker_end_time(i, end_time_ms);
   }
 };
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1549,7 +1549,7 @@
   int _hash_seed;
   int _queue_num;
 
-  int _term_attempts;
+  size_t _term_attempts;
 #if G1_DETAILED_STATS
   int _pushes, _pops, _steals, _steal_attempts;
   int _overflow_pushes;
@@ -1727,8 +1727,8 @@
   int* hash_seed() { return &_hash_seed; }
   int  queue_num() { return _queue_num; }
 
-  int term_attempts()   { return _term_attempts; }
-  void note_term_attempt()  { _term_attempts++; }
+  size_t term_attempts()   { return _term_attempts; }
+  void note_term_attempt() { _term_attempts++; }
 
 #if G1_DETAILED_STATS
   int pushes()          { return _pushes; }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -231,20 +231,21 @@
   _recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime());
   _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0;
 
+  _par_last_gc_worker_start_times_ms = new double[_parallel_gc_threads];
   _par_last_ext_root_scan_times_ms = new double[_parallel_gc_threads];
   _par_last_mark_stack_scan_times_ms = new double[_parallel_gc_threads];
 
-  _par_last_update_rs_start_times_ms = new double[_parallel_gc_threads];
   _par_last_update_rs_times_ms = new double[_parallel_gc_threads];
   _par_last_update_rs_processed_buffers = new double[_parallel_gc_threads];
 
-  _par_last_scan_rs_start_times_ms = new double[_parallel_gc_threads];
   _par_last_scan_rs_times_ms = new double[_parallel_gc_threads];
   _par_last_scan_new_refs_times_ms = new double[_parallel_gc_threads];
 
   _par_last_obj_copy_times_ms = new double[_parallel_gc_threads];
 
   _par_last_termination_times_ms = new double[_parallel_gc_threads];
+  _par_last_termination_attempts = new double[_parallel_gc_threads];
+  _par_last_gc_worker_end_times_ms = new double[_parallel_gc_threads];
 
   // start conservatively
   _expensive_region_limit_ms = 0.5 * (double) MaxGCPauseMillis;
@@ -274,10 +275,64 @@
 
   // </NEW PREDICTION>
 
-  double time_slice  = (double) GCPauseIntervalMillis / 1000.0;
+  // Below, we might need to calculate the pause time target based on
+  // the pause interval. When we do so we are going to give G1 maximum
+  // flexibility and allow it to do pauses when it needs to. So, we'll
+  // arrange that the pause interval to be pause time target + 1 to
+  // ensure that a) the pause time target is maximized with respect to
+  // the pause interval and b) we maintain the invariant that pause
+  // time target < pause interval. If the user does not want this
+  // maximum flexibility, they will have to set the pause interval
+  // explicitly.
+
+  // First make sure that, if either parameter is set, its value is
+  // reasonable.
+  if (!FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
+    if (MaxGCPauseMillis < 1) {
+      vm_exit_during_initialization("MaxGCPauseMillis should be "
+                                    "greater than 0");
+    }
+  }
+  if (!FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
+    if (GCPauseIntervalMillis < 1) {
+      vm_exit_during_initialization("GCPauseIntervalMillis should be "
+                                    "greater than 0");
+    }
+  }
+
+  // Then, if the pause time target parameter was not set, set it to
+  // the default value.
+  if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
+    if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
+      // The default pause time target in G1 is 200ms
+      FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
+    } else {
+      // We do not allow the pause interval to be set without the
+      // pause time target
+      vm_exit_during_initialization("GCPauseIntervalMillis cannot be set "
+                                    "without setting MaxGCPauseMillis");
+    }
+  }
+
+  // Then, if the interval parameter was not set, set it according to
+  // the pause time target (this will also deal with the case when the
+  // pause time target is the default value).
+  if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
+    FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
+  }
+
+  // Finally, make sure that the two parameters are consistent.
+  if (MaxGCPauseMillis >= GCPauseIntervalMillis) {
+    char buffer[256];
+    jio_snprintf(buffer, 256,
+                 "MaxGCPauseMillis (%u) should be less than "
+                 "GCPauseIntervalMillis (%u)",
+                 MaxGCPauseMillis, GCPauseIntervalMillis);
+    vm_exit_during_initialization(buffer);
+  }
+
   double max_gc_time = (double) MaxGCPauseMillis / 1000.0;
-  guarantee(max_gc_time < time_slice,
-            "Max GC time should not be greater than the time slice");
+  double time_slice  = (double) GCPauseIntervalMillis / 1000.0;
   _mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time);
   _sigma = (double) G1ConfidencePercent / 100.0;
 
@@ -782,16 +837,17 @@
   // if they are not set properly
 
   for (int i = 0; i < _parallel_gc_threads; ++i) {
-    _par_last_ext_root_scan_times_ms[i] = -666.0;
-    _par_last_mark_stack_scan_times_ms[i] = -666.0;
-    _par_last_update_rs_start_times_ms[i] = -666.0;
-    _par_last_update_rs_times_ms[i] = -666.0;
-    _par_last_update_rs_processed_buffers[i] = -666.0;
-    _par_last_scan_rs_start_times_ms[i] = -666.0;
-    _par_last_scan_rs_times_ms[i] = -666.0;
-    _par_last_scan_new_refs_times_ms[i] = -666.0;
-    _par_last_obj_copy_times_ms[i] = -666.0;
-    _par_last_termination_times_ms[i] = -666.0;
+    _par_last_gc_worker_start_times_ms[i] = -1234.0;
+    _par_last_ext_root_scan_times_ms[i] = -1234.0;
+    _par_last_mark_stack_scan_times_ms[i] = -1234.0;
+    _par_last_update_rs_times_ms[i] = -1234.0;
+    _par_last_update_rs_processed_buffers[i] = -1234.0;
+    _par_last_scan_rs_times_ms[i] = -1234.0;
+    _par_last_scan_new_refs_times_ms[i] = -1234.0;
+    _par_last_obj_copy_times_ms[i] = -1234.0;
+    _par_last_termination_times_ms[i] = -1234.0;
+    _par_last_termination_attempts[i] = -1234.0;
+    _par_last_gc_worker_end_times_ms[i] = -1234.0;
   }
 #endif
 
@@ -942,9 +998,9 @@
   return sum;
 }
 
-void G1CollectorPolicy::print_par_stats (int level,
-                                         const char* str,
-                                         double* data,
+void G1CollectorPolicy::print_par_stats(int level,
+                                        const char* str,
+                                        double* data,
                                          bool summary) {
   double min = data[0], max = data[0];
   double total = 0.0;
@@ -973,10 +1029,10 @@
   gclog_or_tty->print_cr("]");
 }
 
-void G1CollectorPolicy::print_par_buffers (int level,
-                                         const char* str,
-                                         double* data,
-                                         bool summary) {
+void G1CollectorPolicy::print_par_sizes(int level,
+                                        const char* str,
+                                        double* data,
+                                        bool summary) {
   double min = data[0], max = data[0];
   double total = 0.0;
   int j;
@@ -1321,15 +1377,22 @@
       }
       if (parallel) {
         print_stats(1, "Parallel Time", _cur_collection_par_time_ms);
-        print_par_stats(2, "Update RS (Start)", _par_last_update_rs_start_times_ms, false);
+        print_par_stats(2, "GC Worker Start Time",
+                        _par_last_gc_worker_start_times_ms, false);
         print_par_stats(2, "Update RS", _par_last_update_rs_times_ms);
-        print_par_buffers(3, "Processed Buffers",
-                          _par_last_update_rs_processed_buffers, true);
-        print_par_stats(2, "Ext Root Scanning", _par_last_ext_root_scan_times_ms);
-        print_par_stats(2, "Mark Stack Scanning", _par_last_mark_stack_scan_times_ms);
+        print_par_sizes(3, "Processed Buffers",
+                        _par_last_update_rs_processed_buffers, true);
+        print_par_stats(2, "Ext Root Scanning",
+                        _par_last_ext_root_scan_times_ms);
+        print_par_stats(2, "Mark Stack Scanning",
+                        _par_last_mark_stack_scan_times_ms);
         print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms);
         print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms);
         print_par_stats(2, "Termination", _par_last_termination_times_ms);
+        print_par_sizes(3, "Termination Attempts",
+                        _par_last_termination_attempts, true);
+        print_par_stats(2, "GC Worker End Time",
+                        _par_last_gc_worker_end_times_ms, false);
         print_stats(2, "Other", parallel_other_time);
         print_stats(1, "Clear CT", _cur_clear_ct_time_ms);
       } else {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -171,16 +171,17 @@
   double*    _cur_aux_times_ms;
   bool*      _cur_aux_times_set;
 
+  double* _par_last_gc_worker_start_times_ms;
   double* _par_last_ext_root_scan_times_ms;
   double* _par_last_mark_stack_scan_times_ms;
-  double* _par_last_update_rs_start_times_ms;
   double* _par_last_update_rs_times_ms;
   double* _par_last_update_rs_processed_buffers;
-  double* _par_last_scan_rs_start_times_ms;
   double* _par_last_scan_rs_times_ms;
   double* _par_last_scan_new_refs_times_ms;
   double* _par_last_obj_copy_times_ms;
   double* _par_last_termination_times_ms;
+  double* _par_last_termination_attempts;
+  double* _par_last_gc_worker_end_times_ms;
 
   // indicates that we are in young GC mode
   bool _in_young_gc_mode;
@@ -559,13 +560,14 @@
   }
 
 protected:
-  void print_stats (int level, const char* str, double value);
-  void print_stats (int level, const char* str, int value);
-  void print_par_stats (int level, const char* str, double* data) {
+  void print_stats(int level, const char* str, double value);
+  void print_stats(int level, const char* str, int value);
+
+  void print_par_stats(int level, const char* str, double* data) {
     print_par_stats(level, str, data, true);
   }
-  void print_par_stats (int level, const char* str, double* data, bool summary);
-  void print_par_buffers (int level, const char* str, double* data, bool summary);
+  void print_par_stats(int level, const char* str, double* data, bool summary);
+  void print_par_sizes(int level, const char* str, double* data, bool summary);
 
   void check_other_times(int level,
                          NumberSeq* other_times_ms,
@@ -891,6 +893,10 @@
   virtual void record_full_collection_start();
   virtual void record_full_collection_end();
 
+  void record_gc_worker_start_time(int worker_i, double ms) {
+    _par_last_gc_worker_start_times_ms[worker_i] = ms;
+  }
+
   void record_ext_root_scan_time(int worker_i, double ms) {
     _par_last_ext_root_scan_times_ms[worker_i] = ms;
   }
@@ -912,10 +918,6 @@
     _all_mod_union_times_ms->add(ms);
   }
 
-  void record_update_rs_start_time(int thread, double ms) {
-    _par_last_update_rs_start_times_ms[thread] = ms;
-  }
-
   void record_update_rs_time(int thread, double ms) {
     _par_last_update_rs_times_ms[thread] = ms;
   }
@@ -925,10 +927,6 @@
     _par_last_update_rs_processed_buffers[thread] = processed_buffers;
   }
 
-  void record_scan_rs_start_time(int thread, double ms) {
-    _par_last_scan_rs_start_times_ms[thread] = ms;
-  }
-
   void record_scan_rs_time(int thread, double ms) {
     _par_last_scan_rs_times_ms[thread] = ms;
   }
@@ -953,16 +951,13 @@
     _par_last_obj_copy_times_ms[thread] += ms;
   }
 
-  void record_obj_copy_time(double ms) {
-    record_obj_copy_time(0, ms);
+  void record_termination(int thread, double ms, size_t attempts) {
+    _par_last_termination_times_ms[thread] = ms;
+    _par_last_termination_attempts[thread] = (double) attempts;
   }
 
-  void record_termination_time(int thread, double ms) {
-    _par_last_termination_times_ms[thread] = ms;
-  }
-
-  void record_termination_time(double ms) {
-    record_termination_time(0, ms);
+  void record_gc_worker_end_time(int worker_i, double ms) {
+    _par_last_gc_worker_end_times_ms[worker_i] = ms;
   }
 
   void record_pause_time_ms(double ms) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -303,7 +303,6 @@
   assert( _cards_scanned != NULL, "invariant" );
   _cards_scanned[worker_i] = scanRScl.cards_done();
 
-  _g1p->record_scan_rs_start_time(worker_i, rs_time_start * 1000.0);
   _g1p->record_scan_rs_time(worker_i, scan_rs_time_sec * 1000.0);
 }
 
@@ -311,8 +310,6 @@
   ConcurrentG1Refine* cg1r = _g1->concurrent_g1_refine();
 
   double start = os::elapsedTime();
-  _g1p->record_update_rs_start_time(worker_i, start * 1000.0);
-
   // Apply the appropriate closure to all remaining log entries.
   _g1->iterate_dirty_card_closure(false, worker_i);
   // Now there should be no dirty cards.
@@ -471,7 +468,6 @@
       updateRS(worker_i);
       scanNewRefsRS(oc, worker_i);
     } else {
-      _g1p->record_update_rs_start_time(worker_i, os::elapsedTime() * 1000.0);
       _g1p->record_update_rs_processed_buffers(worker_i, 0.0);
       _g1p->record_update_rs_time(worker_i, 0.0);
       _g1p->record_scan_new_refs_time(worker_i, 0.0);
@@ -479,7 +475,6 @@
     if (G1UseParallelRSetScanning || (worker_i == 0)) {
       scanRS(oc, worker_i);
     } else {
-      _g1p->record_scan_rs_start_time(worker_i, os::elapsedTime() * 1000.0);
       _g1p->record_scan_rs_time(worker_i, 0.0);
     }
   } else {
--- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	Thu Jul 29 22:02:45 2010 -0700
@@ -270,7 +270,7 @@
 psParallelCompact.cpp			pcTasks.hpp
 psParallelCompact.cpp			psMarkSweep.hpp
 psParallelCompact.cpp			psMarkSweepDecorator.hpp
-psParallelCompact.cpp			psCompactionManager.hpp
+psParallelCompact.cpp			psCompactionManager.inline.hpp
 psParallelCompact.cpp                   psPromotionManager.inline.hpp
 psParallelCompact.cpp			psOldGen.hpp
 psParallelCompact.cpp			psParallelCompact.hpp
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -566,14 +566,14 @@
 #endif
 
   // Commit new or uncommit old pages, if necessary.
-  resize_commit_uncommit(changed_region, new_region);
+  if (resize_commit_uncommit(changed_region, new_region)) {
+    // Set the new start of the committed region
+    resize_update_committed_table(changed_region, new_region);
+  }
 
   // Update card table entries
   resize_update_card_table_entries(changed_region, new_region);
 
-  // Set the new start of the committed region
-  resize_update_committed_table(changed_region, new_region);
-
   // Update the covered region
   resize_update_covered_table(changed_region, new_region);
 
@@ -604,8 +604,9 @@
   debug_only(verify_guard();)
 }
 
-void CardTableExtension::resize_commit_uncommit(int changed_region,
+bool CardTableExtension::resize_commit_uncommit(int changed_region,
                                                 MemRegion new_region) {
+  bool result = false;
   // Commit new or uncommit old pages, if necessary.
   MemRegion cur_committed = _committed[changed_region];
   assert(_covered[changed_region].end() == new_region.end(),
@@ -675,20 +676,31 @@
                               "card table expansion");
       }
     }
+    result = true;
   } else if (new_start_aligned > cur_committed.start()) {
     // Shrink the committed region
+#if 0 // uncommitting space is currently unsafe because of the interactions
+      // of growing and shrinking regions.  One region A can uncommit space
+      // that it owns but which is being used by another region B (maybe).
+      // Region B has not committed the space because it was already
+      // committed by region A.
     MemRegion uncommit_region = committed_unique_to_self(changed_region,
       MemRegion(cur_committed.start(), new_start_aligned));
     if (!uncommit_region.is_empty()) {
       if (!os::uncommit_memory((char*)uncommit_region.start(),
                                uncommit_region.byte_size())) {
-        vm_exit_out_of_memory(uncommit_region.byte_size(),
-          "card table contraction");
+        // If the uncommit fails, ignore it.  Let the
+        // committed table resizing go even though the committed
+        // table will over state the committed space.
       }
     }
+#else
+    assert(!result, "Should be false with current workaround");
+#endif
   }
   assert(_committed[changed_region].end() == cur_committed.end(),
     "end should not change");
+  return result;
 }
 
 void CardTableExtension::resize_update_committed_table(int changed_region,
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,9 @@
 class CardTableExtension : public CardTableModRefBS {
  private:
   // Support methods for resizing the card table.
-  void resize_commit_uncommit(int changed_region, MemRegion new_region);
+  // resize_commit_uncommit() returns true if the pages were committed or
+  // uncommitted
+  bool resize_commit_uncommit(int changed_region, MemRegion new_region);
   void resize_update_card_table_entries(int changed_region,
                                         MemRegion new_region);
   void resize_update_committed_table(int changed_region, MemRegion new_region);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
   ParCompactionManager::_objarray_queues = NULL;
 ObjectStartArray*    ParCompactionManager::_start_array = NULL;
 ParMarkBitMap*       ParCompactionManager::_mark_bitmap = NULL;
-RegionTaskQueueSet*   ParCompactionManager::_region_array = NULL;
+RegionTaskQueueSet*  ParCompactionManager::_region_array = NULL;
 
 ParCompactionManager::ParCompactionManager() :
     _action(CopyAndUpdate) {
@@ -43,25 +43,9 @@
   _old_gen = heap->old_gen();
   _start_array = old_gen()->start_array();
 
-
   marking_stack()->initialize();
-
-  // We want the overflow stack to be permanent
-  _overflow_stack = new (ResourceObj::C_HEAP) GrowableArray<oop>(10, true);
-
-  _objarray_queue.initialize();
-  _objarray_overflow_stack =
-    new (ResourceObj::C_HEAP) ObjArrayOverflowStack(10, true);
-
-#ifdef USE_RegionTaskQueueWithOverflow
+  _objarray_stack.initialize();
   region_stack()->initialize();
-#else
-  region_stack()->initialize();
-
-  // We want the overflow stack to be permanent
-  _region_overflow_stack =
-    new (ResourceObj::C_HEAP) GrowableArray<size_t>(10, true);
-#endif
 
   // Note that _revisit_klass_stack is allocated out of the
   // C heap (as opposed to out of ResourceArena).
@@ -71,12 +55,9 @@
   // From some experiments (#klass/k)^2 for k = 10 seems a better fit, but this will
   // have to do for now until we are able to investigate a more optimal setting.
   _revisit_mdo_stack = new (ResourceObj::C_HEAP) GrowableArray<DataLayout*>(size*2, true);
-
 }
 
 ParCompactionManager::~ParCompactionManager() {
-  delete _overflow_stack;
-  delete _objarray_overflow_stack;
   delete _revisit_klass_stack;
   delete _revisit_mdo_stack;
   // _manager_array and _stack_array are statics
@@ -108,12 +89,8 @@
     _manager_array[i] = new ParCompactionManager();
     guarantee(_manager_array[i] != NULL, "Could not create ParCompactionManager");
     stack_array()->register_queue(i, _manager_array[i]->marking_stack());
-    _objarray_queues->register_queue(i, &_manager_array[i]->_objarray_queue);
-#ifdef USE_RegionTaskQueueWithOverflow
-    region_array()->register_queue(i, _manager_array[i]->region_stack()->task_queue());
-#else
+    _objarray_queues->register_queue(i, &_manager_array[i]->_objarray_stack);
     region_array()->register_queue(i, _manager_array[i]->region_stack());
-#endif
   }
 
   // The VMThread gets its own ParCompactionManager, which is not available
@@ -149,57 +126,6 @@
   return action() == ParCompactionManager::ResetObjects;
 }
 
-// For now save on a stack
-void ParCompactionManager::save_for_scanning(oop m) {
-  stack_push(m);
-}
-
-void ParCompactionManager::stack_push(oop obj) {
-
-  if(!marking_stack()->push(obj)) {
-    overflow_stack()->push(obj);
-  }
-}
-
-oop ParCompactionManager::retrieve_for_scanning() {
-
-  // Should not be used in the parallel case
-  ShouldNotReachHere();
-  return NULL;
-}
-
-// Save region on a stack
-void ParCompactionManager::save_for_processing(size_t region_index) {
-#ifdef ASSERT
-  const ParallelCompactData& sd = PSParallelCompact::summary_data();
-  ParallelCompactData::RegionData* const region_ptr = sd.region(region_index);
-  assert(region_ptr->claimed(), "must be claimed");
-  assert(region_ptr->_pushed++ == 0, "should only be pushed once");
-#endif
-  region_stack_push(region_index);
-}
-
-void ParCompactionManager::region_stack_push(size_t region_index) {
-
-#ifdef USE_RegionTaskQueueWithOverflow
-  region_stack()->save(region_index);
-#else
-  if(!region_stack()->push(region_index)) {
-    region_overflow_stack()->push(region_index);
-  }
-#endif
-}
-
-bool ParCompactionManager::retrieve_for_processing(size_t& region_index) {
-#ifdef USE_RegionTaskQueueWithOverflow
-  return region_stack()->retrieve(region_index);
-#else
-  // Should not be used in the parallel case
-  ShouldNotReachHere();
-  return false;
-#endif
-}
-
 ParCompactionManager*
 ParCompactionManager::gc_thread_compaction_manager(int index) {
   assert(index >= 0 && index < (int)ParallelGCThreads, "index out of range");
@@ -218,8 +144,8 @@
   do {
     // Drain the overflow stack first, to allow stealing from the marking stack.
     oop obj;
-    while (!overflow_stack()->is_empty()) {
-      overflow_stack()->pop()->follow_contents(this);
+    while (marking_stack()->pop_overflow(obj)) {
+      obj->follow_contents(this);
     }
     while (marking_stack()->pop_local(obj)) {
       obj->follow_contents(this);
@@ -227,11 +153,10 @@
 
     // Process ObjArrays one at a time to avoid marking stack bloat.
     ObjArrayTask task;
-    if (!_objarray_overflow_stack->is_empty()) {
-      task = _objarray_overflow_stack->pop();
+    if (_objarray_stack.pop_overflow(task)) {
       objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
       k->oop_follow_contents(this, task.obj(), task.index());
-    } else if (_objarray_queue.pop_local(task)) {
+    } else if (_objarray_stack.pop_local(task)) {
       objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
       k->oop_follow_contents(this, task.obj(), task.index());
     }
@@ -240,68 +165,18 @@
   assert(marking_stacks_empty(), "Sanity");
 }
 
-void ParCompactionManager::drain_region_overflow_stack() {
-  size_t region_index = (size_t) -1;
-  while(region_stack()->retrieve_from_overflow(region_index)) {
-    PSParallelCompact::fill_and_update_region(this, region_index);
-  }
-}
-
 void ParCompactionManager::drain_region_stacks() {
-#ifdef ASSERT
-  ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
-  MutableSpace* to_space = heap->young_gen()->to_space();
-  MutableSpace* old_space = heap->old_gen()->object_space();
-  MutableSpace* perm_space = heap->perm_gen()->object_space();
-#endif /* ASSERT */
-
-#if 1 // def DO_PARALLEL - the serial code hasn't been updated
   do {
-
-#ifdef USE_RegionTaskQueueWithOverflow
-    // Drain overflow stack first, so other threads can steal from
-    // claimed stack while we work.
-    size_t region_index = (size_t) -1;
-    while(region_stack()->retrieve_from_overflow(region_index)) {
+    // Drain overflow stack first so other threads can steal.
+    size_t region_index;
+    while (region_stack()->pop_overflow(region_index)) {
       PSParallelCompact::fill_and_update_region(this, region_index);
     }
 
-    while (region_stack()->retrieve_from_stealable_queue(region_index)) {
+    while (region_stack()->pop_local(region_index)) {
       PSParallelCompact::fill_and_update_region(this, region_index);
     }
   } while (!region_stack()->is_empty());
-#else
-    // Drain overflow stack first, so other threads can steal from
-    // claimed stack while we work.
-    while(!region_overflow_stack()->is_empty()) {
-      size_t region_index = region_overflow_stack()->pop();
-      PSParallelCompact::fill_and_update_region(this, region_index);
-    }
-
-    size_t region_index = -1;
-    // obj is a reference!!!
-    while (region_stack()->pop_local(region_index)) {
-      // It would be nice to assert about the type of objects we might
-      // pop, but they can come from anywhere, unfortunately.
-      PSParallelCompact::fill_and_update_region(this, region_index);
-    }
-  } while((region_stack()->size() != 0) ||
-          (region_overflow_stack()->length() != 0));
-#endif
-
-#ifdef USE_RegionTaskQueueWithOverflow
-  assert(region_stack()->is_empty(), "Sanity");
-#else
-  assert(region_stack()->size() == 0, "Sanity");
-  assert(region_overflow_stack()->length() == 0, "Sanity");
-#endif
-#else
-  oop obj;
-  while (obj = retrieve_for_scanning()) {
-    obj->follow_contents(this);
-  }
-#endif
 }
 
 #ifdef ASSERT
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,10 +59,10 @@
 
  private:
   // 32-bit:  4K * 8 = 32KiB; 64-bit:  8K * 16 = 128KiB
-  #define OBJARRAY_QUEUE_SIZE (1 << NOT_LP64(12) LP64_ONLY(13))
-  typedef GenericTaskQueue<ObjArrayTask, OBJARRAY_QUEUE_SIZE> ObjArrayTaskQueue;
-  typedef GenericTaskQueueSet<ObjArrayTaskQueue> ObjArrayTaskQueueSet;
-  #undef OBJARRAY_QUEUE_SIZE
+  #define QUEUE_SIZE (1 << NOT_LP64(12) LP64_ONLY(13))
+  typedef OverflowTaskQueue<ObjArrayTask, QUEUE_SIZE> ObjArrayTaskQueue;
+  typedef GenericTaskQueueSet<ObjArrayTaskQueue>      ObjArrayTaskQueueSet;
+  #undef QUEUE_SIZE
 
   static ParCompactionManager** _manager_array;
   static OopTaskQueueSet*       _stack_array;
@@ -72,23 +72,13 @@
   static PSOldGen*              _old_gen;
 
 private:
-  OopTaskQueue                  _marking_stack;
-  GrowableArray<oop>*           _overflow_stack;
-
-  typedef GrowableArray<ObjArrayTask> ObjArrayOverflowStack;
-  ObjArrayTaskQueue             _objarray_queue;
-  ObjArrayOverflowStack*        _objarray_overflow_stack;
+  OverflowTaskQueue<oop>        _marking_stack;
+  ObjArrayTaskQueue             _objarray_stack;
 
   // Is there a way to reuse the _marking_stack for the
   // saving empty regions?  For now just create a different
   // type of TaskQueue.
-
-#ifdef USE_RegionTaskQueueWithOverflow
-  RegionTaskQueueWithOverflow   _region_stack;
-#else
   RegionTaskQueue               _region_stack;
-  GrowableArray<size_t>*        _region_overflow_stack;
-#endif
 
 #if 1  // does this happen enough to need a per thread stack?
   GrowableArray<Klass*>*        _revisit_klass_stack;
@@ -107,16 +97,8 @@
  protected:
   // Array of tasks.  Needed by the ParallelTaskTerminator.
   static RegionTaskQueueSet* region_array()      { return _region_array; }
-  OopTaskQueue*  marking_stack()                 { return &_marking_stack; }
-  GrowableArray<oop>* overflow_stack()           { return _overflow_stack; }
-#ifdef USE_RegionTaskQueueWithOverflow
-  RegionTaskQueueWithOverflow* region_stack()    { return &_region_stack; }
-#else
-  RegionTaskQueue*  region_stack()               { return &_region_stack; }
-  GrowableArray<size_t>* region_overflow_stack() {
-    return _region_overflow_stack;
-  }
-#endif
+  OverflowTaskQueue<oop>*  marking_stack()       { return &_marking_stack; }
+  RegionTaskQueue* region_stack()                { return &_region_stack; }
 
   // Pushes onto the marking stack.  If the marking stack is full,
   // pushes onto the overflow stack.
@@ -124,11 +106,7 @@
   // Do not implement an equivalent stack_pop.  Deal with the
   // marking stack and overflow stack directly.
 
-  // Pushes onto the region stack.  If the region stack is full,
-  // pushes onto the region overflow stack.
-  void region_stack_push(size_t region_index);
-
-public:
+ public:
   Action action() { return _action; }
   void set_action(Action v) { _action = v; }
 
@@ -157,22 +135,15 @@
   GrowableArray<DataLayout*>* revisit_mdo_stack() { return _revisit_mdo_stack; }
 #endif
 
-  // Save oop for later processing.  Must not fail.
-  void save_for_scanning(oop m);
-  // Get a oop for scanning.  If returns null, no oop were found.
-  oop retrieve_for_scanning();
-
-  inline void push_objarray(oop obj, size_t index);
-
-  // Save region for later processing.  Must not fail.
-  void save_for_processing(size_t region_index);
-  // Get a region for processing.  If returns null, no region were found.
-  bool retrieve_for_processing(size_t& region_index);
+  // Save for later processing.  Must not fail.
+  inline void push(oop obj) { _marking_stack.push(obj); }
+  inline void push_objarray(oop objarray, size_t index);
+  inline void push_region(size_t index);
 
   // Access function for compaction managers
   static ParCompactionManager* gc_thread_compaction_manager(int index);
 
-  static bool steal(int queue_num, int* seed, Task& t) {
+  static bool steal(int queue_num, int* seed, oop& t) {
     return stack_array()->steal(queue_num, seed, t);
   }
 
@@ -180,8 +151,8 @@
     return _objarray_queues->steal(queue_num, seed, t);
   }
 
-  static bool steal(int queue_num, int* seed, RegionTask& t) {
-    return region_array()->steal(queue_num, seed, t);
+  static bool steal(int queue_num, int* seed, size_t& region) {
+    return region_array()->steal(queue_num, seed, region);
   }
 
   // Process tasks remaining on any marking stack
@@ -191,9 +162,6 @@
   // Process tasks remaining on any stack
   void drain_region_stacks();
 
-  // Process tasks remaining on any stack
-  void drain_region_overflow_stack();
-
   // Debugging support
 #ifdef ASSERT
   bool stacks_have_been_allocated();
@@ -208,6 +176,5 @@
 }
 
 bool ParCompactionManager::marking_stacks_empty() const {
-  return _marking_stack.size() == 0 && _overflow_stack->is_empty() &&
-    _objarray_queue.size() == 0 && _objarray_overflow_stack->is_empty();
+  return _marking_stack.is_empty() && _objarray_stack.is_empty();
 }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -26,7 +26,16 @@
 {
   ObjArrayTask task(obj, index);
   assert(task.is_valid(), "bad ObjArrayTask");
-  if (!_objarray_queue.push(task)) {
-    _objarray_overflow_stack->push(task);
-  }
+  _objarray_stack.push(task);
 }
+
+void ParCompactionManager::push_region(size_t index)
+{
+#ifdef ASSERT
+  const ParallelCompactData& sd = PSParallelCompact::summary_data();
+  ParallelCompactData::RegionData* const region_ptr = sd.region(index);
+  assert(region_ptr->claimed(), "must be claimed");
+  assert(region_ptr->_pushed++ == 0, "should only be pushed once");
+#endif
+  region_stack()->push(index);
+}
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -2474,7 +2474,7 @@
     for (size_t cur = end_region - 1; cur >= beg_region; --cur) {
       if (sd.region(cur)->claim_unsafe()) {
         ParCompactionManager* cm = ParCompactionManager::manager_array(which);
-        cm->save_for_processing(cur);
+        cm->push_region(cur);
 
         if (TraceParallelOldGCCompactionPhase && Verbose) {
           const size_t count_mod_8 = fillable_regions & 7;
@@ -3138,7 +3138,7 @@
     assert(cur->data_size() > 0, "region must have live data");
     cur->decrement_destination_count();
     if (cur < enqueue_end && cur->available() && cur->claim()) {
-      cm->save_for_processing(sd.region(cur));
+      cm->push_region(sd.region(cur));
     }
   }
 }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1297,11 +1297,8 @@
   T heap_oop = oopDesc::load_heap_oop(p);
   if (!oopDesc::is_null(heap_oop)) {
     oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
-    if (mark_bitmap()->is_unmarked(obj)) {
-      if (mark_obj(obj)) {
-        // This thread marked the object and owns the subsequent processing of it.
-        cm->save_for_scanning(obj);
-      }
+    if (mark_bitmap()->is_unmarked(obj) && mark_obj(obj)) {
+      cm->push(obj);
     }
   }
 }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,45 +94,13 @@
   print_stats();
 #endif // PS_PM_STATS
 
-  for(uint i=0; i<ParallelGCThreads+1; i++) {
+  for (uint i = 0; i < ParallelGCThreads + 1; i++) {
     PSPromotionManager* manager = manager_array(i);
-
-    // the guarantees are a bit gratuitous but, if one fires, we'll
-    // have a better idea of what went wrong
-    if (i < ParallelGCThreads) {
-      guarantee((!UseDepthFirstScavengeOrder ||
-                 manager->overflow_stack_depth()->length() <= 0),
-                "promotion manager overflow stack must be empty");
-      guarantee((UseDepthFirstScavengeOrder ||
-                 manager->overflow_stack_breadth()->length() <= 0),
-                "promotion manager overflow stack must be empty");
-
-      guarantee((!UseDepthFirstScavengeOrder ||
-                 manager->claimed_stack_depth()->size() <= 0),
-                "promotion manager claimed stack must be empty");
-      guarantee((UseDepthFirstScavengeOrder ||
-                 manager->claimed_stack_breadth()->size() <= 0),
-                "promotion manager claimed stack must be empty");
+    if (UseDepthFirstScavengeOrder) {
+      assert(manager->claimed_stack_depth()->is_empty(), "should be empty");
     } else {
-      guarantee((!UseDepthFirstScavengeOrder ||
-                 manager->overflow_stack_depth()->length() <= 0),
-                "VM Thread promotion manager overflow stack "
-                "must be empty");
-      guarantee((UseDepthFirstScavengeOrder ||
-                 manager->overflow_stack_breadth()->length() <= 0),
-                "VM Thread promotion manager overflow stack "
-                "must be empty");
-
-      guarantee((!UseDepthFirstScavengeOrder ||
-                 manager->claimed_stack_depth()->size() <= 0),
-                "VM Thread promotion manager claimed stack "
-                "must be empty");
-      guarantee((UseDepthFirstScavengeOrder ||
-                 manager->claimed_stack_breadth()->size() <= 0),
-                "VM Thread promotion manager claimed stack "
-                "must be empty");
+      assert(manager->claimed_stack_breadth()->is_empty(), "should be empty");
     }
-
     manager->flush_labs();
   }
 }
@@ -181,15 +149,9 @@
   if (depth_first()) {
     claimed_stack_depth()->initialize();
     queue_size = claimed_stack_depth()->max_elems();
-    // We want the overflow stack to be permanent
-    _overflow_stack_depth = new (ResourceObj::C_HEAP) GrowableArray<StarTask>(10, true);
-    _overflow_stack_breadth = NULL;
   } else {
     claimed_stack_breadth()->initialize();
     queue_size = claimed_stack_breadth()->max_elems();
-    // We want the overflow stack to be permanent
-    _overflow_stack_breadth = new (ResourceObj::C_HEAP) GrowableArray<oop>(10, true);
-    _overflow_stack_depth = NULL;
   }
 
   _totally_drain = (ParallelGCThreads == 1) || (GCDrainStackTargetSize == 0);
@@ -209,8 +171,7 @@
 }
 
 void PSPromotionManager::reset() {
-  assert(claimed_stack_empty(), "reset of non-empty claimed stack");
-  assert(overflow_stack_empty(), "reset of non-empty overflow stack");
+  assert(stacks_empty(), "reset of non-empty stack");
 
   // We need to get an assert in here to make sure the labs are always flushed.
 
@@ -243,7 +204,7 @@
 
 void PSPromotionManager::drain_stacks_depth(bool totally_drain) {
   assert(depth_first(), "invariant");
-  assert(overflow_stack_depth() != NULL, "invariant");
+  assert(claimed_stack_depth()->overflow_stack() != NULL, "invariant");
   totally_drain = totally_drain || _totally_drain;
 
 #ifdef ASSERT
@@ -254,41 +215,35 @@
   MutableSpace* perm_space = heap->perm_gen()->object_space();
 #endif /* ASSERT */
 
+  OopStarTaskQueue* const tq = claimed_stack_depth();
   do {
     StarTask p;
 
     // Drain overflow stack first, so other threads can steal from
     // claimed stack while we work.
-    while(!overflow_stack_depth()->is_empty()) {
-      // linux compiler wants different overloaded operator= in taskqueue to
-      // assign to p that the other compilers don't like.
-      StarTask ptr = overflow_stack_depth()->pop();
-      process_popped_location_depth(ptr);
+    while (tq->pop_overflow(p)) {
+      process_popped_location_depth(p);
     }
 
     if (totally_drain) {
-      while (claimed_stack_depth()->pop_local(p)) {
+      while (tq->pop_local(p)) {
         process_popped_location_depth(p);
       }
     } else {
-      while (claimed_stack_depth()->size() > _target_stack_size &&
-             claimed_stack_depth()->pop_local(p)) {
+      while (tq->size() > _target_stack_size && tq->pop_local(p)) {
         process_popped_location_depth(p);
       }
     }
-  } while( (totally_drain && claimed_stack_depth()->size() > 0) ||
-           (overflow_stack_depth()->length() > 0) );
+  } while (totally_drain && !tq->taskqueue_empty() || !tq->overflow_empty());
 
-  assert(!totally_drain || claimed_stack_empty(), "Sanity");
-  assert(totally_drain ||
-         claimed_stack_depth()->size() <= _target_stack_size,
-         "Sanity");
-  assert(overflow_stack_empty(), "Sanity");
+  assert(!totally_drain || tq->taskqueue_empty(), "Sanity");
+  assert(totally_drain || tq->size() <= _target_stack_size, "Sanity");
+  assert(tq->overflow_empty(), "Sanity");
 }
 
 void PSPromotionManager::drain_stacks_breadth(bool totally_drain) {
   assert(!depth_first(), "invariant");
-  assert(overflow_stack_breadth() != NULL, "invariant");
+  assert(claimed_stack_breadth()->overflow_stack() != NULL, "invariant");
   totally_drain = totally_drain || _totally_drain;
 
 #ifdef ASSERT
@@ -299,51 +254,39 @@
   MutableSpace* perm_space = heap->perm_gen()->object_space();
 #endif /* ASSERT */
 
+  OverflowTaskQueue<oop>* const tq = claimed_stack_breadth();
   do {
     oop obj;
 
     // Drain overflow stack first, so other threads can steal from
     // claimed stack while we work.
-    while(!overflow_stack_breadth()->is_empty()) {
-      obj = overflow_stack_breadth()->pop();
+    while (tq->pop_overflow(obj)) {
       obj->copy_contents(this);
     }
 
     if (totally_drain) {
-      // obj is a reference!!!
-      while (claimed_stack_breadth()->pop_local(obj)) {
-        // It would be nice to assert about the type of objects we might
-        // pop, but they can come from anywhere, unfortunately.
+      while (tq->pop_local(obj)) {
         obj->copy_contents(this);
       }
     } else {
-      // obj is a reference!!!
-      while (claimed_stack_breadth()->size() > _target_stack_size &&
-             claimed_stack_breadth()->pop_local(obj)) {
-        // It would be nice to assert about the type of objects we might
-        // pop, but they can come from anywhere, unfortunately.
+      while (tq->size() > _target_stack_size && tq->pop_local(obj)) {
         obj->copy_contents(this);
       }
     }
 
     // If we could not find any other work, flush the prefetch queue
-    if (claimed_stack_breadth()->size() == 0 &&
-        (overflow_stack_breadth()->length() == 0)) {
+    if (tq->is_empty()) {
       flush_prefetch_queue();
     }
-  } while((totally_drain && claimed_stack_breadth()->size() > 0) ||
-          (overflow_stack_breadth()->length() > 0));
+  } while (totally_drain && !tq->taskqueue_empty() || !tq->overflow_empty());
 
-  assert(!totally_drain || claimed_stack_empty(), "Sanity");
-  assert(totally_drain ||
-         claimed_stack_breadth()->size() <= _target_stack_size,
-         "Sanity");
-  assert(overflow_stack_empty(), "Sanity");
+  assert(!totally_drain || tq->taskqueue_empty(), "Sanity");
+  assert(totally_drain || tq->size() <= _target_stack_size, "Sanity");
+  assert(tq->overflow_empty(), "Sanity");
 }
 
 void PSPromotionManager::flush_labs() {
-  assert(claimed_stack_empty(), "Attempt to flush lab with live stack");
-  assert(overflow_stack_empty(), "Attempt to flush lab with live overflow stack");
+  assert(stacks_empty(), "Attempt to flush lab with live stack");
 
   // If either promotion lab fills up, we can flush the
   // lab but not refill it, so check first.
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,9 +78,7 @@
   PrefetchQueue                       _prefetch_queue;
 
   OopStarTaskQueue                    _claimed_stack_depth;
-  GrowableArray<StarTask>*            _overflow_stack_depth;
-  OopTaskQueue                        _claimed_stack_breadth;
-  GrowableArray<oop>*                 _overflow_stack_breadth;
+  OverflowTaskQueue<oop>              _claimed_stack_breadth;
 
   bool                                _depth_first;
   bool                                _totally_drain;
@@ -97,9 +95,6 @@
   template <class T> inline void claim_or_forward_internal_depth(T* p);
   template <class T> inline void claim_or_forward_internal_breadth(T* p);
 
-  GrowableArray<StarTask>* overflow_stack_depth() { return _overflow_stack_depth; }
-  GrowableArray<oop>*  overflow_stack_breadth()   { return _overflow_stack_breadth; }
-
   // On the task queues we push reference locations as well as
   // partially-scanned arrays (in the latter case, we push an oop to
   // the from-space image of the array and the length on the
@@ -151,18 +146,19 @@
 
 #if PS_PM_STATS
     ++_total_pushes;
+    int stack_length = claimed_stack_depth()->overflow_stack()->length();
 #endif // PS_PM_STATS
 
-    if (!claimed_stack_depth()->push(p)) {
-      overflow_stack_depth()->push(p);
+    claimed_stack_depth()->push(p);
+
 #if PS_PM_STATS
+    if (claimed_stack_depth()->overflow_stack()->length() != stack_length) {
       ++_overflow_pushes;
-      uint stack_length = (uint) overflow_stack_depth()->length();
-      if (stack_length > _max_overflow_length) {
-        _max_overflow_length = stack_length;
+      if ((uint)stack_length + 1 > _max_overflow_length) {
+        _max_overflow_length = (uint)stack_length + 1;
       }
+    }
 #endif // PS_PM_STATS
-    }
   }
 
   void push_breadth(oop o) {
@@ -170,18 +166,19 @@
 
 #if PS_PM_STATS
     ++_total_pushes;
+    int stack_length = claimed_stack_breadth()->overflow_stack()->length();
 #endif // PS_PM_STATS
 
-    if(!claimed_stack_breadth()->push(o)) {
-      overflow_stack_breadth()->push(o);
+    claimed_stack_breadth()->push(o);
+
 #if PS_PM_STATS
+    if (claimed_stack_breadth()->overflow_stack()->length() != stack_length) {
       ++_overflow_pushes;
-      uint stack_length = (uint) overflow_stack_breadth()->length();
-      if (stack_length > _max_overflow_length) {
-        _max_overflow_length = stack_length;
+      if ((uint)stack_length + 1 > _max_overflow_length) {
+        _max_overflow_length = (uint)stack_length + 1;
       }
+    }
 #endif // PS_PM_STATS
-    }
   }
 
  protected:
@@ -199,12 +196,10 @@
   static PSPromotionManager* vm_thread_promotion_manager();
 
   static bool steal_depth(int queue_num, int* seed, StarTask& t) {
-    assert(stack_array_depth() != NULL, "invariant");
     return stack_array_depth()->steal(queue_num, seed, t);
   }
 
-  static bool steal_breadth(int queue_num, int* seed, Task& t) {
-    assert(stack_array_breadth() != NULL, "invariant");
+  static bool steal_breadth(int queue_num, int* seed, oop& t) {
     return stack_array_breadth()->steal(queue_num, seed, t);
   }
 
@@ -214,7 +209,7 @@
   OopStarTaskQueue* claimed_stack_depth() {
     return &_claimed_stack_depth;
   }
-  OopTaskQueue* claimed_stack_breadth() {
+  OverflowTaskQueue<oop>* claimed_stack_breadth() {
     return &_claimed_stack_breadth;
   }
 
@@ -246,25 +241,13 @@
   void drain_stacks_depth(bool totally_drain);
   void drain_stacks_breadth(bool totally_drain);
 
-  bool claimed_stack_empty() {
-    if (depth_first()) {
-      return claimed_stack_depth()->size() <= 0;
-    } else {
-      return claimed_stack_breadth()->size() <= 0;
-    }
-  }
-  bool overflow_stack_empty() {
-    if (depth_first()) {
-      return overflow_stack_depth()->length() <= 0;
-    } else {
-      return overflow_stack_breadth()->length() <= 0;
-    }
+  bool depth_first() const {
+    return _depth_first;
   }
   bool stacks_empty() {
-    return claimed_stack_empty() && overflow_stack_empty();
-  }
-  bool depth_first() {
-    return _depth_first;
+    return depth_first() ?
+      claimed_stack_depth()->is_empty() :
+      claimed_stack_breadth()->is_empty();
   }
 
   inline void process_popped_location_depth(StarTask p);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -414,7 +414,6 @@
     }
 
     // Finally, flush the promotion_manager's labs, and deallocate its stacks.
-    assert(promotion_manager->claimed_stack_empty(), "Sanity");
     PSPromotionManager::post_scavenge();
 
     promotion_failure_occurred = promotion_failed();
--- a/hotspot/src/share/vm/includeDB_compiler2	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/includeDB_compiler2	Thu Jul 29 22:02:45 2010 -0700
@@ -89,6 +89,21 @@
 
 allocation.hpp                          c2_globals.hpp
 
+bcEscapeAnalyzer.cpp                    bcEscapeAnalyzer.hpp
+bcEscapeAnalyzer.cpp                    bitMap.inline.hpp
+bcEscapeAnalyzer.cpp                    bytecode.hpp
+bcEscapeAnalyzer.cpp                    ciConstant.hpp
+bcEscapeAnalyzer.cpp                    ciField.hpp
+bcEscapeAnalyzer.cpp                    ciMethodBlocks.hpp
+bcEscapeAnalyzer.cpp                    ciStreams.hpp
+
+bcEscapeAnalyzer.hpp                    allocation.hpp
+bcEscapeAnalyzer.hpp                    ciMethod.hpp
+bcEscapeAnalyzer.hpp                    ciMethodData.hpp
+bcEscapeAnalyzer.hpp                    dependencies.hpp
+bcEscapeAnalyzer.hpp                    growableArray.hpp
+bcEscapeAnalyzer.hpp                    vectset.hpp
+
 block.cpp                               allocation.inline.hpp
 block.cpp                               block.hpp
 block.cpp                               cfgnode.hpp
@@ -239,6 +254,7 @@
 ciEnv.cpp                               compileLog.hpp
 ciEnv.cpp                               runtime.hpp
 
+ciMethod.cpp                            bcEscapeAnalyzer.hpp
 ciMethod.cpp                            ciTypeFlow.hpp
 ciMethod.cpp                            methodOop.hpp
 
--- a/hotspot/src/share/vm/includeDB_core	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/includeDB_core	Thu Jul 29 22:02:45 2010 -0700
@@ -301,20 +301,6 @@
 barrierSet.inline.hpp                   barrierSet.hpp
 barrierSet.inline.hpp                   cardTableModRefBS.hpp
 
-bcEscapeAnalyzer.cpp                    bcEscapeAnalyzer.hpp
-bcEscapeAnalyzer.cpp                    bitMap.inline.hpp
-bcEscapeAnalyzer.cpp                    bytecode.hpp
-bcEscapeAnalyzer.cpp                    ciConstant.hpp
-bcEscapeAnalyzer.cpp                    ciField.hpp
-bcEscapeAnalyzer.cpp                    ciMethodBlocks.hpp
-bcEscapeAnalyzer.cpp                    ciStreams.hpp
-
-bcEscapeAnalyzer.hpp                    allocation.hpp
-bcEscapeAnalyzer.hpp                    ciMethod.hpp
-bcEscapeAnalyzer.hpp                    ciMethodData.hpp
-bcEscapeAnalyzer.hpp                    dependencies.hpp
-bcEscapeAnalyzer.hpp                    growableArray.hpp
-
 biasedLocking.cpp                       biasedLocking.hpp
 biasedLocking.cpp                       klass.inline.hpp
 biasedLocking.cpp                       markOop.hpp
@@ -545,6 +531,7 @@
 
 ciCPCache.hpp                           ciClassList.hpp
 ciCPCache.hpp                           ciObject.hpp
+ciCPCache.hpp                           cpCacheOop.hpp
 
 ciEnv.cpp                               allocation.inline.hpp
 ciEnv.cpp                               ciConstant.hpp
@@ -664,7 +651,6 @@
 
 ciMethod.cpp                            abstractCompiler.hpp
 ciMethod.cpp                            allocation.inline.hpp
-ciMethod.cpp                            bcEscapeAnalyzer.hpp
 ciMethod.cpp                            bitMap.inline.hpp
 ciMethod.cpp                            ciCallProfile.hpp
 ciMethod.cpp                            ciExceptionHandler.hpp
@@ -823,6 +809,7 @@
 
 ciStreams.cpp                           ciCallSite.hpp
 ciStreams.cpp                           ciConstant.hpp
+ciStreams.cpp                           ciCPCache.hpp
 ciStreams.cpp                           ciField.hpp
 ciStreams.cpp                           ciStreams.hpp
 ciStreams.cpp                           ciUtilities.hpp
@@ -962,7 +949,6 @@
 classLoader.cpp                         timer.hpp
 classLoader.cpp                         universe.inline.hpp
 classLoader.cpp                         vmSymbols.hpp
-classLoader.cpp                         vtune.hpp
 
 classLoader.hpp                         classFileParser.hpp
 classLoader.hpp                         perfData.hpp
@@ -1002,7 +988,6 @@
 codeBlob.cpp                            safepoint.hpp
 codeBlob.cpp                            sharedRuntime.hpp
 codeBlob.cpp                            vframe.hpp
-codeBlob.cpp                            vtune.hpp
 
 codeBlob.hpp                            codeBuffer.hpp
 codeBlob.hpp                            frame.hpp
@@ -2165,7 +2150,6 @@
 interpreter.cpp                         stubRoutines.hpp
 interpreter.cpp                         templateTable.hpp
 interpreter.cpp                         timer.hpp
-interpreter.cpp                         vtune.hpp
 
 interpreter.hpp                         cppInterpreter.hpp
 interpreter.hpp                         stubs.hpp
@@ -2321,7 +2305,6 @@
 java.cpp                                vmError.hpp
 java.cpp                                vm_operations.hpp
 java.cpp                                vm_version_<arch>.hpp
-java.cpp                                vtune.hpp
 
 java.hpp                                os.hpp
 
@@ -3048,7 +3031,6 @@
 nmethod.cpp                             scopeDesc.hpp
 nmethod.cpp                             sharedRuntime.hpp
 nmethod.cpp                             sweeper.hpp
-nmethod.cpp                             vtune.hpp
 nmethod.cpp                             xmlstream.hpp
 
 nmethod.hpp                             codeBlob.hpp
@@ -3771,7 +3753,6 @@
 sharedRuntime.cpp                       vmSymbols.hpp
 sharedRuntime.cpp                       vmreg_<arch>.inline.hpp
 sharedRuntime.cpp                       vtableStubs.hpp
-sharedRuntime.cpp                       vtune.hpp
 sharedRuntime.cpp                       xmlstream.hpp
 
 sharedRuntime.hpp                       allocation.hpp
@@ -3935,7 +3916,6 @@
 stubCodeGenerator.cpp                   forte.hpp
 stubCodeGenerator.cpp                   oop.inline.hpp
 stubCodeGenerator.cpp                   stubCodeGenerator.hpp
-stubCodeGenerator.cpp                   vtune.hpp
 
 stubCodeGenerator.hpp                   allocation.hpp
 stubCodeGenerator.hpp                   assembler.hpp
@@ -4456,7 +4436,6 @@
 universe.cpp                            universe.inline.hpp
 universe.cpp                            vmSymbols.hpp
 universe.cpp                            vm_operations.hpp
-universe.cpp                            vtune.hpp
 
 universe.hpp                            growableArray.hpp
 universe.hpp                            handles.hpp
@@ -4719,7 +4698,6 @@
 vtableStubs.cpp                         resourceArea.hpp
 vtableStubs.cpp                         sharedRuntime.hpp
 vtableStubs.cpp                         vtableStubs.hpp
-vtableStubs.cpp                         vtune.hpp
 
 vtableStubs.hpp                         allocation.hpp
 
@@ -4733,11 +4711,6 @@
 vtableStubs_<arch_model>.cpp            vmreg_<arch>.inline.hpp
 vtableStubs_<arch_model>.cpp            vtableStubs.hpp
 
-vtune.hpp                               allocation.hpp
-
-vtune_<os_family>.cpp                   interpreter.hpp
-vtune_<os_family>.cpp                   vtune.hpp
-
 watermark.hpp                           allocation.hpp
 watermark.hpp                           globalDefinitions.hpp
 
--- a/hotspot/src/share/vm/interpreter/bytecode.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/bytecode.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -136,25 +136,24 @@
 // Implementation of Bytecode_invoke
 
 void Bytecode_invoke::verify() const {
-  Bytecodes::Code bc = adjusted_invoke_code();
   assert(is_valid(), "check invoke");
   assert(method()->constants()->cache() != NULL, "do not call this from verifier or rewriter");
 }
 
 
-symbolOop Bytecode_invoke::signature() const {
+symbolOop Bytecode_member_ref::signature() const {
   constantPoolOop constants = method()->constants();
   return constants->signature_ref_at(index());
 }
 
 
-symbolOop Bytecode_invoke::name() const {
+symbolOop Bytecode_member_ref::name() const {
   constantPoolOop constants = method()->constants();
   return constants->name_ref_at(index());
 }
 
 
-BasicType Bytecode_invoke::result_type(Thread *thread) const {
+BasicType Bytecode_member_ref::result_type(Thread *thread) const {
   symbolHandle sh(thread, signature());
   ResultTypeFinder rts(sh);
   rts.iterate();
@@ -167,9 +166,9 @@
   KlassHandle resolved_klass;
   constantPoolHandle constants(THREAD, _method->constants());
 
-  if (adjusted_invoke_code() == Bytecodes::_invokedynamic) {
+  if (java_code() == Bytecodes::_invokedynamic) {
     LinkResolver::resolve_dynamic_method(m, resolved_klass, constants, index(), CHECK_(methodHandle()));
-  } else if (adjusted_invoke_code() != Bytecodes::_invokeinterface) {
+  } else if (java_code() != Bytecodes::_invokeinterface) {
     LinkResolver::resolve_method(m, resolved_klass, constants, index(), CHECK_(methodHandle()));
   } else {
     LinkResolver::resolve_interface_method(m, resolved_klass, constants, index(), CHECK_(methodHandle()));
@@ -178,51 +177,68 @@
 }
 
 
-int Bytecode_invoke::index() const {
+int Bytecode_member_ref::index() const {
   // Note:  Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,
   // at the same time it allocates per-call-site CP cache entries.
-  Bytecodes::Code stdc = Bytecodes::java_code(code());
-  Bytecode* invoke = Bytecode_at(bcp());
-  if (invoke->has_index_u4(stdc))
-    return invoke->get_index_u4(stdc);
+  Bytecodes::Code rawc = code();
+  Bytecode* invoke = bytecode();
+  if (invoke->has_index_u4(rawc))
+    return invoke->get_index_u4(rawc);
   else
-    return invoke->get_index_u2_cpcache(stdc);
+    return invoke->get_index_u2_cpcache(rawc);
 }
 
+int Bytecode_member_ref::pool_index() const {
+  int index = this->index();
+  DEBUG_ONLY({
+      if (!bytecode()->has_index_u4(code()))
+        index -= constantPoolOopDesc::CPCACHE_INDEX_TAG;
+    });
+  return _method->constants()->cache()->entry_at(index)->constant_pool_index();
+}
 
 // Implementation of Bytecode_field
 
 void Bytecode_field::verify() const {
-  Bytecodes::Code stdc = Bytecodes::java_code(code());
-  assert(stdc == Bytecodes::_putstatic || stdc == Bytecodes::_getstatic ||
-         stdc == Bytecodes::_putfield  || stdc == Bytecodes::_getfield, "check field");
-}
-
-
-bool Bytecode_field::is_static() const {
-  Bytecodes::Code stdc = Bytecodes::java_code(code());
-  return stdc == Bytecodes::_putstatic || stdc == Bytecodes::_getstatic;
+  assert(is_valid(), "check field");
 }
 
 
-int Bytecode_field::index() const {
-  Bytecode* invoke = Bytecode_at(bcp());
-  return invoke->get_index_u2_cpcache(Bytecodes::_getfield);
+// Implementation of Bytecode_loadconstant
+
+int Bytecode_loadconstant::raw_index() const {
+  Bytecode* bcp = bytecode();
+  Bytecodes::Code rawc = bcp->code();
+  assert(rawc != Bytecodes::_wide, "verifier prevents this");
+  if (Bytecodes::java_code(rawc) == Bytecodes::_ldc)
+    return bcp->get_index_u1(rawc);
+  else
+    return bcp->get_index_u2(rawc, false);
 }
 
-
-// Implementation of Bytecodes loac constant
+int Bytecode_loadconstant::pool_index() const {
+  int index = raw_index();
+  if (has_cache_index()) {
+    return _method->constants()->cache()->entry_at(index)->constant_pool_index();
+  }
+  return index;
+}
 
-int Bytecode_loadconstant::index() const {
-  Bytecodes::Code stdc = Bytecodes::java_code(code());
-  if (stdc != Bytecodes::_wide) {
-    if (Bytecodes::java_code(stdc) == Bytecodes::_ldc)
-      return get_index_u1(stdc);
-    else
-      return get_index_u2(stdc, false);
+BasicType Bytecode_loadconstant::result_type() const {
+  int index = pool_index();
+  constantTag tag = _method->constants()->tag_at(index);
+  return tag.basic_type();
+}
+
+oop Bytecode_loadconstant::resolve_constant(TRAPS) const {
+  assert(_method.not_null(), "must supply method to resolve constant");
+  int index = raw_index();
+  constantPoolOop constants = _method->constants();
+  if (has_cache_index()) {
+    return constants->resolve_cached_constant_at(index, THREAD);
+  } else {
+    return constants->resolve_constant_at(index, THREAD);
   }
-  stdc = Bytecodes::code_at(addr_at(1));
-  return get_index_u2(stdc, true);
 }
 
 //------------------------------------------------------------------------------
--- a/hotspot/src/share/vm/interpreter/bytecode.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/bytecode.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -76,9 +76,13 @@
           return Bytes::get_native_u2(p);
     else  return Bytes::get_Java_u2(p);
   }
+  int get_index_u1_cpcache(Bytecodes::Code bc) const {
+    assert_same_format_as(bc); assert_index_size(1, bc);
+    return *(jubyte*)addr_at(1) + constantPoolOopDesc::CPCACHE_INDEX_TAG;
+  }
   int get_index_u2_cpcache(Bytecodes::Code bc) const {
     assert_same_format_as(bc); assert_index_size(2, bc); assert_native_index(bc);
-    return Bytes::get_native_u2(addr_at(1)) DEBUG_ONLY(+ constantPoolOopDesc::CPCACHE_INDEX_TAG);
+    return Bytes::get_native_u2(addr_at(1)) + constantPoolOopDesc::CPCACHE_INDEX_TAG;
   }
   int get_index_u4(Bytecodes::Code bc) const {
     assert_same_format_as(bc); assert_index_size(4, bc);
@@ -152,7 +156,7 @@
 
 inline Bytecode_lookupswitch* Bytecode_lookupswitch_at(address bcp) {
   Bytecode_lookupswitch* b = (Bytecode_lookupswitch*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -174,44 +178,56 @@
 
 inline Bytecode_tableswitch* Bytecode_tableswitch_at(address bcp) {
   Bytecode_tableswitch* b = (Bytecode_tableswitch*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
 
-// Abstraction for invoke_{virtual, static, interface, special}
+// Common code for decoding invokes and field references.
 
-class Bytecode_invoke: public ResourceObj {
+class Bytecode_member_ref: public ResourceObj {
  protected:
   methodHandle _method;                          // method containing the bytecode
   int          _bci;                             // position of the bytecode
 
-  Bytecode_invoke(methodHandle method, int bci)  : _method(method), _bci(bci) {}
+  Bytecode_member_ref(methodHandle method, int bci)  : _method(method), _bci(bci) {}
+
+ public:
+  // Attributes
+  methodHandle method() const                    { return _method; }
+  int          bci() const                       { return _bci; }
+  address      bcp() const                       { return _method->bcp_from(bci()); }
+  Bytecode*    bytecode() const                  { return Bytecode_at(bcp()); }
+
+  int          index() const;                    // cache index (loaded from instruction)
+  int          pool_index() const;               // constant pool index
+  symbolOop    name() const;                     // returns the name of the method or field
+  symbolOop    signature() const;                // returns the signature of the method or field
+
+  BasicType    result_type(Thread* thread) const; // returns the result type of the getfield or invoke
+
+  Bytecodes::Code code() const                   { return Bytecodes::code_at(bcp(), _method()); }
+  Bytecodes::Code java_code() const              { return Bytecodes::java_code(code()); }
+};
+
+// Abstraction for invoke_{virtual, static, interface, special}
+
+class Bytecode_invoke: public Bytecode_member_ref {
+ protected:
+  Bytecode_invoke(methodHandle method, int bci)  : Bytecode_member_ref(method, bci) {}
 
  public:
   void verify() const;
 
   // Attributes
-  methodHandle method() const                    { return _method; }
-  int          bci() const                       { return _bci; }
-  address      bcp() const                       { return _method->bcp_from(bci()); }
-
-  int          index() const;                    // the constant pool index for the invoke
-  symbolOop    name() const;                     // returns the name of the invoked method
-  symbolOop    signature() const;                // returns the signature of the invoked method
-  BasicType    result_type(Thread *thread) const; // returns the result type of the invoke
-
-  Bytecodes::Code code() const                   { return Bytecodes::code_at(bcp(), _method()); }
-  Bytecodes::Code adjusted_invoke_code() const   { return Bytecodes::java_code(code()); }
-
   methodHandle static_target(TRAPS);             // "specified" method   (from constant pool)
 
   // Testers
-  bool is_invokeinterface() const                { return adjusted_invoke_code() == Bytecodes::_invokeinterface; }
-  bool is_invokevirtual() const                  { return adjusted_invoke_code() == Bytecodes::_invokevirtual; }
-  bool is_invokestatic() const                   { return adjusted_invoke_code() == Bytecodes::_invokestatic; }
-  bool is_invokespecial() const                  { return adjusted_invoke_code() == Bytecodes::_invokespecial; }
-  bool is_invokedynamic() const                  { return adjusted_invoke_code() == Bytecodes::_invokedynamic; }
+  bool is_invokeinterface() const                { return java_code() == Bytecodes::_invokeinterface; }
+  bool is_invokevirtual() const                  { return java_code() == Bytecodes::_invokevirtual; }
+  bool is_invokestatic() const                   { return java_code() == Bytecodes::_invokestatic; }
+  bool is_invokespecial() const                  { return java_code() == Bytecodes::_invokespecial; }
+  bool is_invokedynamic() const                  { return java_code() == Bytecodes::_invokedynamic; }
 
   bool has_receiver() const                      { return !is_invokestatic() && !is_invokedynamic(); }
 
@@ -230,7 +246,7 @@
 
 inline Bytecode_invoke* Bytecode_invoke_at(methodHandle method, int bci) {
   Bytecode_invoke* b = new Bytecode_invoke(method, bci);
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -240,21 +256,34 @@
 }
 
 
-// Abstraction for all field accesses (put/get field/static_
-class Bytecode_field: public Bytecode {
-public:
+// Abstraction for all field accesses (put/get field/static)
+class Bytecode_field: public Bytecode_member_ref {
+ protected:
+  Bytecode_field(methodHandle method, int bci)  : Bytecode_member_ref(method, bci) {}
+
+ public:
+  // Testers
+  bool is_getfield() const                       { return java_code() == Bytecodes::_getfield; }
+  bool is_putfield() const                       { return java_code() == Bytecodes::_putfield; }
+  bool is_getstatic() const                      { return java_code() == Bytecodes::_getstatic; }
+  bool is_putstatic() const                      { return java_code() == Bytecodes::_putstatic; }
+
+  bool is_getter() const                         { return is_getfield()  || is_getstatic(); }
+  bool is_static() const                         { return is_getstatic() || is_putstatic(); }
+
+  bool is_valid() const                          { return is_getfield()   ||
+                                                          is_putfield()   ||
+                                                          is_getstatic()  ||
+                                                          is_putstatic(); }
   void verify() const;
 
-  int  index() const;
-  bool is_static() const;
-
   // Creation
-  inline friend Bytecode_field* Bytecode_field_at(const methodOop method, address bcp);
+  inline friend Bytecode_field* Bytecode_field_at(methodHandle method, int bci);
 };
 
-inline Bytecode_field* Bytecode_field_at(const methodOop method, address bcp) {
-  Bytecode_field* b = (Bytecode_field*)bcp;
-  debug_only(b->verify());
+inline Bytecode_field* Bytecode_field_at(methodHandle method, int bci) {
+  Bytecode_field* b = new Bytecode_field(method, bci);
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -274,7 +303,7 @@
 
 inline Bytecode_checkcast* Bytecode_checkcast_at(address bcp) {
   Bytecode_checkcast* b = (Bytecode_checkcast*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -294,7 +323,7 @@
 
 inline Bytecode_instanceof* Bytecode_instanceof_at(address bcp) {
   Bytecode_instanceof* b = (Bytecode_instanceof*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -312,7 +341,7 @@
 
 inline Bytecode_new* Bytecode_new_at(address bcp) {
   Bytecode_new* b = (Bytecode_new*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -330,7 +359,7 @@
 
 inline Bytecode_multianewarray* Bytecode_multianewarray_at(address bcp) {
   Bytecode_multianewarray* b = (Bytecode_multianewarray*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
@@ -348,29 +377,57 @@
 
 inline Bytecode_anewarray* Bytecode_anewarray_at(address bcp) {
   Bytecode_anewarray* b = (Bytecode_anewarray*)bcp;
-  debug_only(b->verify());
+  DEBUG_ONLY(b->verify());
   return b;
 }
 
 
 // Abstraction for ldc, ldc_w and ldc2_w
 
-class Bytecode_loadconstant: public Bytecode {
+class Bytecode_loadconstant: public ResourceObj {
+ private:
+  int          _bci;
+  methodHandle _method;
+
+  Bytecodes::Code code() const                   { return bytecode()->code(); }
+
+  int raw_index() const;
+
+  Bytecode_loadconstant(methodHandle method, int bci) : _method(method), _bci(bci) {}
+
  public:
+  // Attributes
+  methodHandle method() const                    { return _method; }
+  int          bci() const                       { return _bci; }
+  address      bcp() const                       { return _method->bcp_from(bci()); }
+  Bytecode*    bytecode() const                  { return Bytecode_at(bcp()); }
+
   void verify() const {
+    assert(_method.not_null(), "must supply method");
     Bytecodes::Code stdc = Bytecodes::java_code(code());
     assert(stdc == Bytecodes::_ldc ||
            stdc == Bytecodes::_ldc_w ||
            stdc == Bytecodes::_ldc2_w, "load constant");
   }
 
-  int index() const;
+  // Only non-standard bytecodes (fast_aldc) have CP cache indexes.
+  bool has_cache_index() const { return code() >= Bytecodes::number_of_java_codes; }
 
-  inline friend Bytecode_loadconstant* Bytecode_loadconstant_at(const methodOop method, address bcp);
+  int pool_index() const;               // index into constant pool
+  int cache_index() const {             // index into CP cache (or -1 if none)
+    return has_cache_index() ? raw_index() : -1;
+  }
+
+  BasicType result_type() const;        // returns the result type of the ldc
+
+  oop resolve_constant(TRAPS) const;
+
+  // Creation
+  inline friend Bytecode_loadconstant* Bytecode_loadconstant_at(methodHandle method, int bci);
 };
 
-inline Bytecode_loadconstant* Bytecode_loadconstant_at(const methodOop method, address bcp) {
-  Bytecode_loadconstant* b = (Bytecode_loadconstant*)bcp;
-  debug_only(b->verify());
+inline Bytecode_loadconstant* Bytecode_loadconstant_at(methodHandle method, int bci) {
+  Bytecode_loadconstant* b = new Bytecode_loadconstant(method, bci);
+  DEBUG_ONLY(b->verify());
   return b;
 }
--- a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -49,6 +49,7 @@
 
   int       get_index_u1()           { return *(address)_next_pc++; }
   int       get_index_u2()           { int i=Bytes::get_Java_u2(_next_pc); _next_pc+=2; return i; }
+  int       get_index_u1_cpcache()   { return get_index_u1() + constantPoolOopDesc::CPCACHE_INDEX_TAG; }
   int       get_index_u2_cpcache()   { int i=Bytes::get_native_u2(_next_pc); _next_pc+=2; return i + constantPoolOopDesc::CPCACHE_INDEX_TAG; }
   int       get_index_u4()           { int i=Bytes::get_native_u4(_next_pc); _next_pc+=4; return i; }
   int       get_index_special()      { return (is_wide()) ? get_index_u2() : get_index_u1(); }
@@ -60,6 +61,7 @@
   bool      check_index(int i, int& cp_index, outputStream* st = tty);
   void      print_constant(int i, outputStream* st = tty);
   void      print_field_or_method(int i, outputStream* st = tty);
+  void      print_field_or_method(int orig_i, int i, outputStream* st = tty);
   void      print_attributes(int bci, outputStream* st = tty);
   void      bytecode_epilog(int bci, outputStream* st = tty);
 
@@ -177,18 +179,29 @@
   _closure->trace(method, bcp, st);
 }
 
+void print_symbol(symbolOop sym, outputStream* st) {
+  char buf[40];
+  int len = sym->utf8_length();
+  if (len >= (int)sizeof(buf)) {
+    st->print_cr(" %s...[%d]", sym->as_C_string(buf, sizeof(buf)), len);
+  } else {
+    st->print(" ");
+    sym->print_on(st); st->cr();
+  }
+}
+
 void print_oop(oop value, outputStream* st) {
   if (value == NULL) {
     st->print_cr(" NULL");
-  } else {
+  } else if (java_lang_String::is_instance(value)) {
     EXCEPTION_MARK;
     Handle h_value (THREAD, value);
     symbolHandle sym = java_lang_String::as_symbol(h_value, CATCH);
-    if (sym->utf8_length() > 32) {
-      st->print_cr(" ....");
-    } else {
-      sym->print_on(st); st->cr();
-    }
+    print_symbol(sym(), st);
+  } else if (value->is_symbol()) {
+    print_symbol(symbolOop(value), st);
+  } else {
+    st->print_cr(" " PTR_FORMAT, (intptr_t) value);
   }
 }
 
@@ -279,16 +292,27 @@
   } else if (tag.is_double()) {
     st->print_cr(" %f", constants->double_at(i));
   } else if (tag.is_string()) {
-    oop string = constants->resolved_string_at(i);
+    oop string = constants->pseudo_string_at(i);
     print_oop(string, st);
   } else if (tag.is_unresolved_string()) {
-    st->print_cr(" <unresolved string at %d>", i);
+    const char* string = constants->string_at_noresolve(i);
+    st->print_cr(" %s", string);
   } else if (tag.is_klass()) {
     st->print_cr(" %s", constants->resolved_klass_at(i)->klass_part()->external_name());
   } else if (tag.is_unresolved_klass()) {
     st->print_cr(" <unresolved klass at %d>", i);
   } else if (tag.is_object()) {
-    st->print_cr(" " PTR_FORMAT, constants->object_at(i));
+    st->print(" <Object>");
+    print_oop(constants->object_at(i), st);
+  } else if (tag.is_method_type()) {
+    int i2 = constants->method_type_index_at(i);
+    st->print(" <MethodType> %d", i2);
+    print_oop(constants->symbol_at(i2), st);
+  } else if (tag.is_method_handle()) {
+    int kind = constants->method_handle_ref_kind_at(i);
+    int i2 = constants->method_handle_index_at(i);
+    st->print(" <MethodHandle of kind %d>", kind, i2);
+    print_field_or_method(-i, i2, st);
   } else {
     st->print_cr(" bad tag=%d at %d", tag.value(), i);
   }
@@ -297,7 +321,10 @@
 void BytecodePrinter::print_field_or_method(int i, outputStream* st) {
   int orig_i = i;
   if (!check_index(orig_i, i, st))  return;
+  print_field_or_method(orig_i, i, st);
+}
 
+void BytecodePrinter::print_field_or_method(int orig_i, int i, outputStream* st) {
   constantPoolOop constants = method()->constants();
   constantTag tag = constants->tag_at(i);
 
@@ -314,9 +341,11 @@
     return;
   }
 
+  symbolOop klass = constants->klass_name_at(constants->uncached_klass_ref_index_at(i));
   symbolOop name = constants->uncached_name_ref_at(i);
   symbolOop signature = constants->uncached_signature_ref_at(i);
-  st->print_cr(" %d <%s> <%s> ", i, name->as_C_string(), signature->as_C_string());
+  const char* sep = (tag.is_field() ? "/" : "");
+  st->print_cr(" %d <%s.%s%s%s> ", i, klass->as_C_string(), name->as_C_string(), sep, signature->as_C_string());
 }
 
 
@@ -340,12 +369,20 @@
       st->print_cr(" " INT32_FORMAT, get_short());
       break;
     case Bytecodes::_ldc:
-      print_constant(get_index_u1(), st);
+      if (Bytecodes::uses_cp_cache(raw_code())) {
+        print_constant(get_index_u1_cpcache(), st);
+      } else {
+        print_constant(get_index_u1(), st);
+      }
       break;
 
     case Bytecodes::_ldc_w:
     case Bytecodes::_ldc2_w:
-      print_constant(get_index_u2(), st);
+      if (Bytecodes::uses_cp_cache(raw_code())) {
+        print_constant(get_index_u2_cpcache(), st);
+      } else {
+        print_constant(get_index_u2(), st);
+      }
       break;
 
     case Bytecodes::_iload:
--- a/hotspot/src/share/vm/interpreter/bytecodes.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -489,6 +489,9 @@
 
   def(_return_register_finalizer , "return_register_finalizer" , "b"    , NULL    , T_VOID   ,  0, true, _return);
 
+  def(_fast_aldc           , "fast_aldc"           , "bj"   , NULL    , T_OBJECT,   1, true,  _ldc   );
+  def(_fast_aldc_w         , "fast_aldc_w"         , "bJJ"  , NULL    , T_OBJECT,   1, true,  _ldc_w );
+
   def(_shouldnotreachhere  , "_shouldnotreachhere" , "b"    , NULL    , T_VOID   ,  0, false);
 
   // platform specific JVM bytecodes
--- a/hotspot/src/share/vm/interpreter/bytecodes.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/bytecodes.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -270,6 +270,10 @@
     _fast_linearswitch    ,
     _fast_binaryswitch    ,
 
+    // special handling of oop constants:
+    _fast_aldc            ,
+    _fast_aldc_w          ,
+
     _return_register_finalizer    ,
 
     _shouldnotreachhere,      // For debugging
--- a/hotspot/src/share/vm/interpreter/interpreter.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/interpreter.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -99,11 +99,6 @@
 #endif // PRODUCT
   // need to hit every safepoint in order to call zapping routine
   // register the interpreter
-  VTune::register_stub(
-    "Interpreter",
-    AbstractInterpreter::code()->code_start(),
-    AbstractInterpreter::code()->code_end()
-  );
   Forte::register_stub(
     "Interpreter",
     AbstractInterpreter::code()->code_start(),
@@ -267,20 +262,6 @@
 }
 #endif // PRODUCT
 
-static BasicType constant_pool_type(methodOop method, int index) {
-  constantTag tag = method->constants()->tag_at(index);
-       if (tag.is_int              ()) return T_INT;
-  else if (tag.is_float            ()) return T_FLOAT;
-  else if (tag.is_long             ()) return T_LONG;
-  else if (tag.is_double           ()) return T_DOUBLE;
-  else if (tag.is_string           ()) return T_OBJECT;
-  else if (tag.is_unresolved_string()) return T_OBJECT;
-  else if (tag.is_klass            ()) return T_OBJECT;
-  else if (tag.is_unresolved_klass ()) return T_OBJECT;
-  ShouldNotReachHere();
-  return T_ILLEGAL;
-}
-
 
 //------------------------------------------------------------------------------------------------------------------------
 // Deoptimization support
@@ -330,13 +311,15 @@
     }
 
     case Bytecodes::_ldc   :
-      type = constant_pool_type( method, *(bcp+1) );
-      break;
-
     case Bytecodes::_ldc_w : // fall through
     case Bytecodes::_ldc2_w:
-      type = constant_pool_type( method, Bytes::get_Java_u2(bcp+1) );
-      break;
+      {
+        Thread *thread = Thread::current();
+        ResourceMark rm(thread);
+        methodHandle mh(thread, method);
+        type = Bytecode_loadconstant_at(mh, bci)->result_type();
+        break;
+      }
 
     default:
       type = Bytecodes::result_type(code);
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -83,6 +83,18 @@
   }
 IRT_END
 
+IRT_ENTRY(void, InterpreterRuntime::resolve_ldc(JavaThread* thread, Bytecodes::Code bytecode)) {
+  assert(bytecode == Bytecodes::_fast_aldc ||
+         bytecode == Bytecodes::_fast_aldc_w, "wrong bc");
+  ResourceMark rm(thread);
+  methodHandle m (thread, method(thread));
+  Bytecode_loadconstant* ldc = Bytecode_loadconstant_at(m, bci(thread));
+  oop result = ldc->resolve_constant(THREAD);
+  DEBUG_ONLY(ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc->cache_index()));
+  assert(result == cpce->f1(), "expected result for assembly code");
+}
+IRT_END
+
 
 //------------------------------------------------------------------------------------------------------------------------
 // Allocation
@@ -328,7 +340,7 @@
   typeArrayHandle    h_extable  (thread, h_method->exception_table());
   bool               should_repeat;
   int                handler_bci;
-  int                current_bci = bcp(thread) - h_method->code_base();
+  int                current_bci = bci(thread);
 
   // Need to do this check first since when _do_not_unlock_if_synchronized
   // is set, we don't want to trigger any classloading which may make calls
@@ -615,8 +627,7 @@
   if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface) {
     ResourceMark rm(thread);
     methodHandle m (thread, method(thread));
-    int bci = m->bci_from(bcp(thread));
-    Bytecode_invoke* call = Bytecode_invoke_at(m, bci);
+    Bytecode_invoke* call = Bytecode_invoke_at(m, bci(thread));
     symbolHandle signature (thread, call->signature());
     receiver = Handle(thread,
                   thread->last_frame().interpreter_callee_receiver(signature));
@@ -1257,7 +1268,7 @@
   Bytecode_invoke* invoke = Bytecode_invoke_at(mh, bci);
   ArgumentSizeComputer asc(invoke->signature());
   int size_of_arguments = (asc.size() + (invoke->has_receiver() ? 1 : 0)); // receiver
-  Copy::conjoint_bytes(src_address, dest_address,
+  Copy::conjoint_jbytes(src_address, dest_address,
                        size_of_arguments * Interpreter::stackElementSize);
 IRT_END
 #endif
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -34,6 +34,7 @@
   static frame     last_frame(JavaThread *thread)    { return thread->last_frame(); }
   static methodOop method(JavaThread *thread)        { return last_frame(thread).interpreter_frame_method(); }
   static address   bcp(JavaThread *thread)           { return last_frame(thread).interpreter_frame_bcp(); }
+  static int       bci(JavaThread *thread)           { return last_frame(thread).interpreter_frame_bci(); }
   static void      set_bcp_and_mdp(address bcp, JavaThread*thread);
   static Bytecodes::Code code(JavaThread *thread)    {
     // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
@@ -59,6 +60,7 @@
  public:
   // Constants
   static void    ldc           (JavaThread* thread, bool wide);
+  static void    resolve_ldc   (JavaThread* thread, Bytecodes::Code bytecode);
 
   // Allocation
   static void    _new          (JavaThread* thread, constantPoolOopDesc* pool, int index);
--- a/hotspot/src/share/vm/interpreter/rewriter.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/rewriter.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -38,6 +38,8 @@
       case JVM_CONSTANT_InterfaceMethodref:
       case JVM_CONSTANT_Fieldref          : // fall through
       case JVM_CONSTANT_Methodref         : // fall through
+      case JVM_CONSTANT_MethodHandle      : // fall through
+      case JVM_CONSTANT_MethodType        : // fall through
         add_cp_cache_entry(i);
         break;
     }
@@ -131,6 +133,27 @@
 }
 
 
+// Rewrite some ldc bytecodes to _fast_aldc
+void Rewriter::maybe_rewrite_ldc(address bcp, int offset, bool is_wide) {
+  assert((*bcp) == (is_wide ? Bytecodes::_ldc_w : Bytecodes::_ldc), "");
+  address p = bcp + offset;
+  int cp_index = is_wide ? Bytes::get_Java_u2(p) : (u1)(*p);
+  constantTag tag = _pool->tag_at(cp_index).value();
+  if (tag.is_method_handle() || tag.is_method_type()) {
+    int cache_index = cp_entry_to_cp_cache(cp_index);
+    if (is_wide) {
+      (*bcp) = Bytecodes::_fast_aldc_w;
+      assert(cache_index == (u2)cache_index, "");
+      Bytes::put_native_u2(p, cache_index);
+    } else {
+      (*bcp) = Bytecodes::_fast_aldc;
+      assert(cache_index == (u1)cache_index, "");
+      (*p) = (u1)cache_index;
+    }
+  }
+}
+
+
 // Rewrites a method given the index_map information
 void Rewriter::scan_method(methodOop method) {
 
@@ -198,6 +221,12 @@
         case Bytecodes::_invokedynamic:
           rewrite_invokedynamic(bcp, prefix_length+1);
           break;
+        case Bytecodes::_ldc:
+          maybe_rewrite_ldc(bcp, prefix_length+1, false);
+          break;
+        case Bytecodes::_ldc_w:
+          maybe_rewrite_ldc(bcp, prefix_length+1, true);
+          break;
         case Bytecodes::_jsr            : // fall through
         case Bytecodes::_jsr_w          : nof_jsrs++;                   break;
         case Bytecodes::_monitorenter   : // fall through
--- a/hotspot/src/share/vm/interpreter/rewriter.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/rewriter.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -66,6 +66,7 @@
   void rewrite_Object_init(methodHandle m, TRAPS);
   void rewrite_member_reference(address bcp, int offset);
   void rewrite_invokedynamic(address bcp, int offset);
+  void maybe_rewrite_ldc(address bcp, int offset, bool is_wide);
 
  public:
   // Driver routine:
--- a/hotspot/src/share/vm/interpreter/templateTable.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/templateTable.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -507,6 +507,9 @@
   def(Bytecodes::_fast_linearswitch   , ubcp|disp|____|____, itos, vtos, fast_linearswitch   ,  _           );
   def(Bytecodes::_fast_binaryswitch   , ubcp|disp|____|____, itos, vtos, fast_binaryswitch   ,  _           );
 
+  def(Bytecodes::_fast_aldc           , ubcp|____|clvm|____, vtos, atos, fast_aldc           ,  false       );
+  def(Bytecodes::_fast_aldc_w         , ubcp|____|clvm|____, vtos, atos, fast_aldc           ,  true        );
+
   def(Bytecodes::_return_register_finalizer , ____|disp|clvm|____, vtos, vtos, _return       ,  vtos        );
 
   def(Bytecodes::_shouldnotreachhere   , ____|____|____|____, vtos, vtos, shouldnotreachhere ,  _           );
--- a/hotspot/src/share/vm/interpreter/templateTable.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/interpreter/templateTable.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -123,6 +123,7 @@
   static void sipush();
   static void ldc(bool wide);
   static void ldc2_w();
+  static void fast_aldc(bool wide);
 
   static void locals_index(Register reg, int offset = 1);
   static void iload();
--- a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -284,12 +284,19 @@
         committed_unique_to_self(ind, MemRegion(new_end_aligned,
                                                 cur_committed.end()));
       if (!uncommit_region.is_empty()) {
-        if (!os::uncommit_memory((char*)uncommit_region.start(),
-                                 uncommit_region.byte_size())) {
-          assert(false, "Card table contraction failed");
-          // The call failed so don't change the end of the
-          // committed region.  This is better than taking the
-          // VM down.
+        // It is not safe to uncommit cards if the boundary between
+        // the generations is moving.  A shrink can uncommit cards
+        // owned by generation A but being used by generation B.
+        if (!UseAdaptiveGCBoundary) {
+          if (!os::uncommit_memory((char*)uncommit_region.start(),
+                                   uncommit_region.byte_size())) {
+            assert(false, "Card table contraction failed");
+            // The call failed so don't change the end of the
+            // committed region.  This is better than taking the
+            // VM down.
+            new_end_aligned = _committed[ind].end();
+          }
+        } else {
           new_end_aligned = _committed[ind].end();
         }
       }
@@ -297,6 +304,19 @@
     // In any case, we can reset the end of the current committed entry.
     _committed[ind].set_end(new_end_aligned);
 
+#ifdef ASSERT
+    // Check that the last card in the new region is committed according
+    // to the tables.
+    bool covered = false;
+    for (int cr = 0; cr < _cur_covered_regions; cr++) {
+      if (_committed[cr].contains(new_end - 1)) {
+        covered = true;
+        break;
+      }
+    }
+    assert(covered, "Card for end of new region not committed");
+#endif
+
     // The default of 0 is not necessarily clean cards.
     jbyte* entry;
     if (old_region.last() < _whole_heap.start()) {
@@ -354,6 +374,9 @@
                   addr_for((jbyte*) _committed[ind].start()),
                   addr_for((jbyte*) _committed[ind].last()));
   }
+  // Touch the last card of the covered region to show that it
+  // is committed (or SEGV).
+  debug_only(*byte_for(_covered[ind].last());)
   debug_only(verify_guard();)
 }
 
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -179,9 +179,14 @@
     }
     n_covered_regions += _gen_specs[i]->n_covered_regions();
   }
-  assert(total_reserved % pageSize == 0, "Gen size");
+  assert(total_reserved % pageSize == 0,
+         err_msg("Gen size; total_reserved=" SIZE_FORMAT ", pageSize="
+                 SIZE_FORMAT, total_reserved, pageSize));
   total_reserved += perm_gen_spec->max_size();
-  assert(total_reserved % pageSize == 0, "Perm Gen size");
+  assert(total_reserved % pageSize == 0,
+         err_msg("Perm size; total_reserved=" SIZE_FORMAT ", pageSize="
+                 SIZE_FORMAT ", perm gen max=" SIZE_FORMAT, total_reserved,
+                 pageSize, perm_gen_spec->max_size()));
 
   if (total_reserved < perm_gen_spec->max_size()) {
     vm_exit_during_initialization(overflow_msg);
--- a/hotspot/src/share/vm/oops/constantPoolKlass.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/oops/constantPoolKlass.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -372,6 +372,13 @@
         entry->print_value_on(st);
         }
         break;
+      case JVM_CONSTANT_MethodHandle :
+        st->print("ref_kind=%d", cp->method_handle_ref_kind_at(index));
+        st->print(" ref_index=%d", cp->method_handle_index_at(index));
+        break;
+      case JVM_CONSTANT_MethodType :
+        st->print("signature_index=%d", cp->method_type_index_at(index));
+        break;
       default:
         ShouldNotReachHere();
         break;
@@ -437,6 +444,7 @@
           // can be non-perm, can be non-instance (array)
         }
       }
+      // FIXME: verify JSR 292 tags JVM_CONSTANT_MethodHandle, etc.
       base++;
     }
     guarantee(cp->tags()->is_perm(),         "should be in permspace");
--- a/hotspot/src/share/vm/oops/constantPoolOop.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/oops/constantPoolOop.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -358,6 +358,11 @@
   return klass_at_noresolve(ref_index);
 }
 
+symbolOop constantPoolOopDesc::uncached_klass_ref_at_noresolve(int which) {
+  jint ref_index = uncached_klass_ref_index_at(which);
+  return klass_at_noresolve(ref_index);
+}
+
 char* constantPoolOopDesc::string_at_noresolve(int which) {
   // Test entry type in case string is resolved while in here.
   oop entry = *(obj_at_addr(which));
@@ -384,6 +389,119 @@
   }
 }
 
+oop constantPoolOopDesc::resolve_constant_at_impl(constantPoolHandle this_oop, int index, int cache_index, TRAPS) {
+  oop result_oop = NULL;
+  if (cache_index >= 0) {
+    assert(index < 0, "only one kind of index at a time");
+    ConstantPoolCacheEntry* cpc_entry = this_oop->cache()->entry_at(cache_index);
+    result_oop = cpc_entry->f1();
+    if (result_oop != NULL) {
+      return result_oop;  // that was easy...
+    }
+    index = cpc_entry->constant_pool_index();
+  }
+
+  int tag_value = this_oop->tag_at(index).value();
+  switch (tag_value) {
+
+  case JVM_CONSTANT_UnresolvedClass:
+  case JVM_CONSTANT_UnresolvedClassInError:
+  case JVM_CONSTANT_Class:
+    {
+      klassOop resolved = klass_at_impl(this_oop, index, CHECK_NULL);
+      // ldc wants the java mirror.
+      result_oop = resolved->klass_part()->java_mirror();
+      break;
+    }
+
+  case JVM_CONSTANT_String:
+  case JVM_CONSTANT_UnresolvedString:
+    if (this_oop->is_pseudo_string_at(index)) {
+      result_oop = this_oop->pseudo_string_at(index);
+      break;
+    }
+    result_oop = string_at_impl(this_oop, index, CHECK_NULL);
+    break;
+
+  case JVM_CONSTANT_Object:
+    result_oop = this_oop->object_at(index);
+    break;
+
+  case JVM_CONSTANT_MethodHandle:
+    {
+      int ref_kind                 = this_oop->method_handle_ref_kind_at(index);
+      int callee_index             = this_oop->method_handle_klass_index_at(index);
+      symbolHandle name(THREAD,      this_oop->method_handle_name_ref_at(index));
+      symbolHandle signature(THREAD, this_oop->method_handle_signature_ref_at(index));
+      if (PrintMiscellaneous)
+        tty->print_cr("resolve JVM_CONSTANT_MethodHandle:%d [%d/%d/%d] %s.%s",
+                      ref_kind, index, this_oop->method_handle_index_at(index),
+                      callee_index, name->as_C_string(), signature->as_C_string());
+      KlassHandle callee;
+      { klassOop k = klass_at_impl(this_oop, callee_index, CHECK_NULL);
+        callee = KlassHandle(THREAD, k);
+      }
+      KlassHandle klass(THREAD, this_oop->pool_holder());
+      Handle value = SystemDictionary::link_method_handle_constant(klass, ref_kind,
+                                                                   callee, name, signature,
+                                                                   CHECK_NULL);
+      result_oop = value();
+      // FIXME: Uniquify errors, using SystemDictionary::find_resolution_error.
+      break;
+    }
+
+  case JVM_CONSTANT_MethodType:
+    {
+      symbolHandle signature(THREAD, this_oop->method_type_signature_at(index));
+      if (PrintMiscellaneous)
+        tty->print_cr("resolve JVM_CONSTANT_MethodType [%d/%d] %s",
+                      index, this_oop->method_type_index_at(index),
+                      signature->as_C_string());
+      KlassHandle klass(THREAD, this_oop->pool_holder());
+      bool ignore_is_on_bcp = false;
+      Handle value = SystemDictionary::find_method_handle_type(signature,
+                                                               klass,
+                                                               ignore_is_on_bcp,
+                                                               CHECK_NULL);
+      result_oop = value();
+      // FIXME: Uniquify errors, using SystemDictionary::find_resolution_error.
+      break;
+    }
+
+    /* maybe some day
+  case JVM_CONSTANT_Integer:
+  case JVM_CONSTANT_Float:
+  case JVM_CONSTANT_Long:
+  case JVM_CONSTANT_Double:
+    result_oop = java_lang_boxing_object::create(...);
+    break;
+    */
+
+  default:
+    DEBUG_ONLY( tty->print_cr("*** %p: tag at CP[%d/%d] = %d",
+                              this_oop(), index, cache_index, tag_value) );
+    assert(false, "unexpected constant tag");
+    break;
+  }
+
+  if (cache_index >= 0) {
+    // Cache the oop here also.
+    Handle result(THREAD, result_oop);
+    result_oop = NULL;  // safety
+    ObjectLocker ol(this_oop, THREAD);
+    ConstantPoolCacheEntry* cpc_entry = this_oop->cache()->entry_at(cache_index);
+    oop result_oop2 = cpc_entry->f1();
+    if (result_oop2 != NULL) {
+      // Race condition:  May already be filled in while we were trying to lock.
+      return result_oop2;
+    }
+    cpc_entry->set_f1(result());
+    return result();
+  } else {
+    return result_oop;
+  }
+}
+
 oop constantPoolOopDesc::string_at_impl(constantPoolHandle this_oop, int which, TRAPS) {
   oop entry = *(this_oop->obj_at_addr(which));
   if (entry->is_symbol()) {
@@ -690,6 +808,28 @@
     }
   } break;
 
+  case JVM_CONSTANT_MethodType:
+  {
+    int k1 = method_type_index_at(index1);
+    int k2 = cp2->method_type_index_at(index2);
+    if (k1 == k2) {
+      return true;
+    }
+  } break;
+
+  case JVM_CONSTANT_MethodHandle:
+  {
+    int k1 = method_handle_ref_kind_at(index1);
+    int k2 = cp2->method_handle_ref_kind_at(index2);
+    if (k1 == k2) {
+      int i1 = method_handle_index_at(index1);
+      int i2 = cp2->method_handle_index_at(index2);
+      if (i1 == i2) {
+        return true;
+      }
+    }
+  } break;
+
   case JVM_CONSTANT_UnresolvedString:
   {
     symbolOop s1 = unresolved_string_at(index1);
@@ -863,6 +1003,19 @@
     to_cp->symbol_at_put(to_i, s);
   } break;
 
+  case JVM_CONSTANT_MethodType:
+  {
+    jint k = method_type_index_at(from_i);
+    to_cp->method_type_index_at_put(to_i, k);
+  } break;
+
+  case JVM_CONSTANT_MethodHandle:
+  {
+    int k1 = method_handle_ref_kind_at(from_i);
+    int k2 = method_handle_index_at(from_i);
+    to_cp->method_handle_index_at_put(to_i, k1, k2);
+  } break;
+
   // Invalid is used as the tag for the second constant pool entry
   // occupied by JVM_CONSTANT_Double or JVM_CONSTANT_Long. It should
   // not be seen by itself.
@@ -1066,8 +1219,12 @@
     case JVM_CONSTANT_UnresolvedClassInError:
     case JVM_CONSTANT_StringIndex:
     case JVM_CONSTANT_UnresolvedString:
+    case JVM_CONSTANT_MethodType:
       return 3;
 
+    case JVM_CONSTANT_MethodHandle:
+      return 4; //tag, ref_kind, ref_index
+
     case JVM_CONSTANT_Integer:
     case JVM_CONSTANT_Float:
     case JVM_CONSTANT_Fieldref:
@@ -1271,6 +1428,22 @@
         DBG(printf("JVM_CONSTANT_StringIndex: %hd", idx1));
         break;
       }
+      case JVM_CONSTANT_MethodHandle: {
+        *bytes = JVM_CONSTANT_MethodHandle;
+        int kind = method_handle_ref_kind_at(idx);
+        idx1 = method_handle_index_at(idx);
+        *(bytes+1) = (unsigned char) kind;
+        Bytes::put_Java_u2((address) (bytes+2), idx1);
+        DBG(printf("JVM_CONSTANT_MethodHandle: %d %hd", kind, idx1));
+        break;
+      }
+      case JVM_CONSTANT_MethodType: {
+        *bytes = JVM_CONSTANT_MethodType;
+        idx1 = method_type_index_at(idx);
+        Bytes::put_Java_u2((address) (bytes+1), idx1);
+        DBG(printf("JVM_CONSTANT_MethodType: %hd", idx1));
+        break;
+      }
     }
     DBG(printf("\n"));
     bytes += ent_size;
--- a/hotspot/src/share/vm/oops/constantPoolOop.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/oops/constantPoolOop.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -146,6 +146,16 @@
     oop_store_without_check(obj_at_addr(which), oop(s));
   }
 
+  void method_handle_index_at_put(int which, int ref_kind, int ref_index) {
+    tag_at_put(which, JVM_CONSTANT_MethodHandle);
+    *int_at_addr(which) = ((jint) ref_index<<16) | ref_kind;
+  }
+
+  void method_type_index_at_put(int which, int ref_index) {
+    tag_at_put(which, JVM_CONSTANT_MethodType);
+    *int_at_addr(which) = ref_index;
+  }
+
   // Temporary until actual use
   void unresolved_string_at_put(int which, symbolOop s) {
     *obj_at_addr(which) = NULL;
@@ -357,6 +367,36 @@
     return *int_at_addr(which);
   }
 
+  int method_handle_ref_kind_at(int which) {
+    assert(tag_at(which).is_method_handle(), "Corrupted constant pool");
+    return extract_low_short_from_int(*int_at_addr(which));  // mask out unwanted ref_index bits
+  }
+  int method_handle_index_at(int which) {
+    assert(tag_at(which).is_method_handle(), "Corrupted constant pool");
+    return extract_high_short_from_int(*int_at_addr(which));  // shift out unwanted ref_kind bits
+  }
+  int method_type_index_at(int which) {
+    assert(tag_at(which).is_method_type(), "Corrupted constant pool");
+    return *int_at_addr(which);
+  }
+  // Derived queries:
+  symbolOop method_handle_name_ref_at(int which) {
+    int member = method_handle_index_at(which);
+    return impl_name_ref_at(member, true);
+  }
+  symbolOop method_handle_signature_ref_at(int which) {
+    int member = method_handle_index_at(which);
+    return impl_signature_ref_at(member, true);
+  }
+  int method_handle_klass_index_at(int which) {
+    int member = method_handle_index_at(which);
+    return impl_klass_ref_index_at(member, true);
+  }
+  symbolOop method_type_signature_at(int which) {
+    int sym = method_type_index_at(which);
+    return symbol_at(sym);
+  }
+
   // The following methods (name/signature/klass_ref_at, klass_ref_at_noresolve,
   // name_and_type_ref_index_at) all expect to be passed indices obtained
   // directly from the bytecode, and extracted according to java byte order.
@@ -388,6 +428,17 @@
     resolve_string_constants_impl(h_this, CHECK);
   }
 
+  // Resolve late bound constants.
+  oop resolve_constant_at(int index, TRAPS) {
+    constantPoolHandle h_this(THREAD, this);
+    return resolve_constant_at_impl(h_this, index, -1, THREAD);
+  }
+
+  oop resolve_cached_constant_at(int cache_index, TRAPS) {
+    constantPoolHandle h_this(THREAD, this);
+    return resolve_constant_at_impl(h_this, -1, cache_index, THREAD);
+  }
+
   // Klass name matches name at offset
   bool klass_name_at_matches(instanceKlassHandle k, int which);
 
@@ -420,6 +471,7 @@
   // Routines currently used for annotations (only called by jvm.cpp) but which might be used in the
   // future by other Java code. These take constant pool indices rather than possibly-byte-swapped
   // constant pool cache indices as do the peer methods above.
+  symbolOop uncached_klass_ref_at_noresolve(int which);
   symbolOop uncached_name_ref_at(int which)                 { return impl_name_ref_at(which, true); }
   symbolOop uncached_signature_ref_at(int which)            { return impl_signature_ref_at(which, true); }
   int       uncached_klass_ref_index_at(int which)          { return impl_klass_ref_index_at(which, true); }
@@ -436,6 +488,8 @@
 
 #ifdef ASSERT
   enum { CPCACHE_INDEX_TAG = 0x10000 };  // helps keep CP cache indices distinct from CP indices
+#else
+  enum { CPCACHE_INDEX_TAG = 0 };        // in product mode, this zero value is a no-op
 #endif //ASSERT
 
  private:
@@ -469,6 +523,8 @@
   // Resolve string constants (to prevent allocation during compilation)
   static void resolve_string_constants_impl(constantPoolHandle this_oop, TRAPS);
 
+  static oop resolve_constant_at_impl(constantPoolHandle this_oop, int index, int cache_index, TRAPS);
+
  public:
   // Merging constantPoolOop support:
   bool compare_entry_to(int index1, constantPoolHandle cp2, int index2, TRAPS);
--- a/hotspot/src/share/vm/oops/cpCacheOop.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/oops/cpCacheOop.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -110,6 +110,7 @@
 class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
   friend class VMStructs;
   friend class constantPoolCacheKlass;
+  friend class constantPoolOopDesc;  //resolve_constant_at_impl => set_f1
 
  private:
   volatile intx     _indices;  // constant pool index & rewrite bytecodes
--- a/hotspot/src/share/vm/opto/callnode.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/callnode.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1524,7 +1524,7 @@
     ConnectionGraph *cgr = phase->C->congraph();
     PointsToNode::EscapeState es = PointsToNode::GlobalEscape;
     if (cgr != NULL)
-      es = cgr->escape_state(obj_node(), phase);
+      es = cgr->escape_state(obj_node());
     if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) {
       // Mark it eliminated to update any counters
       this->set_eliminated();
@@ -1627,7 +1627,7 @@
     ConnectionGraph *cgr = phase->C->congraph();
     PointsToNode::EscapeState es = PointsToNode::GlobalEscape;
     if (cgr != NULL)
-      es = cgr->escape_state(obj_node(), phase);
+      es = cgr->escape_state(obj_node());
     if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) {
       // Mark it eliminated to update any counters
       this->set_eliminated();
--- a/hotspot/src/share/vm/opto/cfgnode.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -472,9 +472,7 @@
             assert( n->req() == 2 &&  n->in(1) != NULL, "Only one data input expected" );
             // Break dead loop data path.
             // Eagerly replace phis with top to avoid phis copies generation.
-            igvn->add_users_to_worklist(n);
-            igvn->hash_delete(n); // Yank from hash before hacking edges
-            igvn->subsume_node(n, top);
+            igvn->replace_node(n, top);
             if( max != outcnt() ) {
               progress = true;
               j = refresh_out_pos(j);
@@ -518,18 +516,17 @@
         igvn->hash_delete(n); // Remove from worklist before modifying edges
         if( n->is_Phi() ) {   // Collapse all Phis
           // Eagerly replace phis to avoid copies generation.
-          igvn->add_users_to_worklist(n);
-          igvn->hash_delete(n); // Yank from hash before hacking edges
+          Node* in;
           if( cnt == 0 ) {
             assert( n->req() == 1, "No data inputs expected" );
-            igvn->subsume_node(n, parent_ctrl); // replaced by top
+            in = parent_ctrl; // replaced by top
           } else {
             assert( n->req() == 2 &&  n->in(1) != NULL, "Only one data input expected" );
-            Node* in1 = n->in(1);               // replaced by unique input
-            if( n->as_Phi()->is_unsafe_data_reference(in1) )
-              in1 = phase->C->top();            // replaced by top
-            igvn->subsume_node(n, in1);
+            in = n->in(1);               // replaced by unique input
+            if( n->as_Phi()->is_unsafe_data_reference(in) )
+              in = phase->C->top();      // replaced by top
           }
+          igvn->replace_node(n, in);
         }
         else if( n->is_Region() ) { // Update all incoming edges
           assert( !igvn->eqv(n, this), "Must be removed from DefUse edges");
@@ -2127,7 +2124,7 @@
     // if it's not there, there's nothing to do.
     Node* fallthru = proj_out(0);
     if (fallthru != NULL) {
-      phase->is_IterGVN()->subsume_node(fallthru, in(0));
+      phase->is_IterGVN()->replace_node(fallthru, in(0));
     }
     return phase->C->top();
   }
--- a/hotspot/src/share/vm/opto/compile.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/compile.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -637,34 +637,6 @@
   if (failing())  return;
   NOT_PRODUCT( verify_graph_edges(); )
 
-  // Perform escape analysis
-  if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) {
-    TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true);
-    // Add ConP#NULL and ConN#NULL nodes before ConnectionGraph construction.
-    PhaseGVN* igvn = initial_gvn();
-    Node* oop_null = igvn->zerocon(T_OBJECT);
-    Node* noop_null = igvn->zerocon(T_NARROWOOP);
-
-    _congraph = new(comp_arena()) ConnectionGraph(this);
-    bool has_non_escaping_obj = _congraph->compute_escape();
-
-#ifndef PRODUCT
-    if (PrintEscapeAnalysis) {
-      _congraph->dump();
-    }
-#endif
-    // Cleanup.
-    if (oop_null->outcnt() == 0)
-      igvn->hash_delete(oop_null);
-    if (noop_null->outcnt() == 0)
-      igvn->hash_delete(noop_null);
-
-    if (!has_non_escaping_obj) {
-      _congraph = NULL;
-    }
-
-    if (failing())  return;
-  }
   // Now optimize
   Optimize();
   if (failing())  return;
@@ -1601,6 +1573,20 @@
 
   if (failing())  return;
 
+  // Perform escape analysis
+  if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) {
+    TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true);
+    ConnectionGraph::do_analysis(this, &igvn);
+
+    if (failing())  return;
+
+    igvn.optimize();
+    print_method("Iter GVN 3", 2);
+
+    if (failing())  return;
+
+  }
+
   // Loop transforms on the ideal graph.  Range Check Elimination,
   // peeling, unrolling, etc.
 
@@ -2000,6 +1986,17 @@
     }
   }
 
+#ifdef ASSERT
+  if( n->is_Mem() ) {
+    Compile* C = Compile::current();
+    int alias_idx = C->get_alias_index(n->as_Mem()->adr_type());
+    assert( n->in(0) != NULL || alias_idx != Compile::AliasIdxRaw ||
+            // oop will be recorded in oop map if load crosses safepoint
+            n->is_Load() && (n->as_Load()->bottom_type()->isa_oopptr() ||
+                             LoadNode::is_immutable_value(n->in(MemNode::Address))),
+            "raw memory operations should have control edge");
+  }
+#endif
   // Count FPU ops and common calls, implements item (3)
   switch( nop ) {
   // Count all float operations that may use FPU
--- a/hotspot/src/share/vm/opto/compile.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/compile.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -362,6 +362,7 @@
   Node*         macro_node(int idx)             { return _macro_nodes->at(idx); }
   Node*         predicate_opaque1_node(int idx) { return _predicate_opaqs->at(idx);}
   ConnectionGraph* congraph()                   { return _congraph;}
+  void set_congraph(ConnectionGraph* congraph)  { _congraph = congraph;}
   void add_macro_node(Node * n) {
     //assert(n->is_macro(), "must be a macro node");
     assert(!_macro_nodes->contains(n), " duplicate entry in expand list");
--- a/hotspot/src/share/vm/opto/doCall.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/doCall.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -343,7 +343,8 @@
   // being initialized.  Uncommon-trap for not-initialized static or
   // v-calls.  Let interface calls happen.
   ciInstanceKlass* holder_klass = dest_method->holder();
-  if (!holder_klass->is_initialized() &&
+  if (!holder_klass->is_being_initialized() &&
+      !holder_klass->is_initialized() &&
       !holder_klass->is_interface()) {
     uncommon_trap(Deoptimization::Reason_uninitialized,
                   Deoptimization::Action_reinterpret,
--- a/hotspot/src/share/vm/opto/escape.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/escape.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -81,18 +81,18 @@
 }
 #endif
 
-ConnectionGraph::ConnectionGraph(Compile * C) :
+ConnectionGraph::ConnectionGraph(Compile * C, PhaseIterGVN *igvn) :
   _nodes(C->comp_arena(), C->unique(), C->unique(), PointsToNode()),
   _processed(C->comp_arena()),
   _collecting(true),
   _compile(C),
+  _igvn(igvn),
   _node_map(C->comp_arena()) {
 
   _phantom_object = C->top()->_idx,
   add_node(C->top(), PointsToNode::JavaObject, PointsToNode::GlobalEscape,true);
 
   // Add ConP(#NULL) and ConN(#NULL) nodes.
-  PhaseGVN* igvn = C->initial_gvn();
   Node* oop_null = igvn->zerocon(T_OBJECT);
   _oop_null = oop_null->_idx;
   assert(_oop_null < C->unique(), "should be created already");
@@ -182,7 +182,7 @@
     _processed.set(n->_idx);
 }
 
-PointsToNode::EscapeState ConnectionGraph::escape_state(Node *n, PhaseTransform *phase) {
+PointsToNode::EscapeState ConnectionGraph::escape_state(Node *n) {
   uint idx = n->_idx;
   PointsToNode::EscapeState es;
 
@@ -207,22 +207,26 @@
   if (n->uncast()->_idx >= nodes_size())
     return PointsToNode::UnknownEscape;
 
+  PointsToNode::EscapeState orig_es = es;
+
   // compute max escape state of anything this node could point to
   VectorSet ptset(Thread::current()->resource_area());
-  PointsTo(ptset, n, phase);
+  PointsTo(ptset, n);
   for(VectorSetI i(&ptset); i.test() && es != PointsToNode::GlobalEscape; ++i) {
     uint pt = i.elem;
     PointsToNode::EscapeState pes = ptnode_adr(pt)->escape_state();
     if (pes > es)
       es = pes;
   }
-  // cache the computed escape state
-  assert(es != PointsToNode::UnknownEscape, "should have computed an escape state");
-  ptnode_adr(idx)->set_escape_state(es);
+  if (orig_es != es) {
+    // cache the computed escape state
+    assert(es != PointsToNode::UnknownEscape, "should have computed an escape state");
+    ptnode_adr(idx)->set_escape_state(es);
+  } // orig_es could be PointsToNode::UnknownEscape
   return es;
 }
 
-void ConnectionGraph::PointsTo(VectorSet &ptset, Node * n, PhaseTransform *phase) {
+void ConnectionGraph::PointsTo(VectorSet &ptset, Node * n) {
   VectorSet visited(Thread::current()->resource_area());
   GrowableArray<uint>  worklist;
 
@@ -990,7 +994,7 @@
   GrowableArray<Node *>  memnode_worklist;
   GrowableArray<PhiNode *>  orig_phis;
 
-  PhaseGVN  *igvn = _compile->initial_gvn();
+  PhaseGVN  *igvn = _igvn;
   uint new_index_start = (uint) _compile->num_alias_types();
   Arena* arena = Thread::current()->resource_area();
   VectorSet visited(arena);
@@ -1012,7 +1016,7 @@
       CallNode *alloc = n->as_Call();
       // copy escape information to call node
       PointsToNode* ptn = ptnode_adr(alloc->_idx);
-      PointsToNode::EscapeState es = escape_state(alloc, igvn);
+      PointsToNode::EscapeState es = escape_state(alloc);
       // We have an allocation or call which returns a Java object,
       // see if it is unescaped.
       if (es != PointsToNode::NoEscape || !ptn->_scalar_replaceable)
@@ -1123,7 +1127,7 @@
       }
     } else if (n->is_AddP()) {
       ptset.Clear();
-      PointsTo(ptset, get_addp_base(n), igvn);
+      PointsTo(ptset, get_addp_base(n));
       assert(ptset.Size() == 1, "AddP address is unique");
       uint elem = ptset.getelem(); // Allocation node's index
       if (elem == _phantom_object) {
@@ -1143,7 +1147,7 @@
         continue;  // already processed
       }
       ptset.Clear();
-      PointsTo(ptset, n, igvn);
+      PointsTo(ptset, n);
       if (ptset.Size() == 1) {
         uint elem = ptset.getelem(); // Allocation node's index
         if (elem == _phantom_object) {
@@ -1478,6 +1482,26 @@
   return false;
 }
 
+void ConnectionGraph::do_analysis(Compile *C, PhaseIterGVN *igvn) {
+  // Add ConP#NULL and ConN#NULL nodes before ConnectionGraph construction
+  // to create space for them in ConnectionGraph::_nodes[].
+  Node* oop_null = igvn->zerocon(T_OBJECT);
+  Node* noop_null = igvn->zerocon(T_NARROWOOP);
+
+  ConnectionGraph* congraph = new(C->comp_arena()) ConnectionGraph(C, igvn);
+  // Perform escape analysis
+  if (congraph->compute_escape()) {
+    // There are non escaping objects.
+    C->set_congraph(congraph);
+  }
+
+  // Cleanup.
+  if (oop_null->outcnt() == 0)
+    igvn->hash_delete(oop_null);
+  if (noop_null->outcnt() == 0)
+    igvn->hash_delete(noop_null);
+}
+
 bool ConnectionGraph::compute_escape() {
   Compile* C = _compile;
 
@@ -1492,7 +1516,7 @@
   }
 
   GrowableArray<int> cg_worklist;
-  PhaseGVN* igvn = C->initial_gvn();
+  PhaseGVN* igvn = _igvn;
   bool has_allocations = false;
 
   // Push all useful nodes onto CG list and set their type.
@@ -1661,6 +1685,12 @@
   _collecting = false;
   assert(C->unique() == nodes_size(), "there should be no new ideal nodes during ConnectionGraph build");
 
+#ifndef PRODUCT
+  if (PrintEscapeAnalysis) {
+    dump(); // Dump ConnectionGraph
+  }
+#endif
+
   bool has_scalar_replaceable_candidates = alloc_worklist.length() > 0;
   if ( has_scalar_replaceable_candidates &&
        C->AliasLevel() >= 3 && EliminateAllocations ) {
@@ -1671,10 +1701,6 @@
 
     if (C->failing())  return false;
 
-    // Clean up after split unique types.
-    ResourceMark rm;
-    PhaseRemoveUseless pru(C->initial_gvn(), C->for_igvn());
-
     C->print_method("After Escape Analysis", 2);
 
 #ifdef ASSERT
@@ -1711,7 +1737,7 @@
   int offset = ptn->offset();
   Node* base = get_addp_base(n);
   ptset.Clear();
-  PointsTo(ptset, base, phase);
+  PointsTo(ptset, base);
   int ptset_size = ptset.Size();
 
   // Check if a oop field's initializing value is recorded and add
@@ -1889,7 +1915,7 @@
             arg = get_addp_base(arg);
           }
           ptset.Clear();
-          PointsTo(ptset, arg, phase);
+          PointsTo(ptset, arg);
           for( VectorSetI j(&ptset); j.test(); ++j ) {
             uint pt = j.elem;
             set_escape_state(pt, PointsToNode::ArgEscape);
@@ -1934,7 +1960,7 @@
             }
 
             ptset.Clear();
-            PointsTo(ptset, arg, phase);
+            PointsTo(ptset, arg);
             for( VectorSetI j(&ptset); j.test(); ++j ) {
               uint pt = j.elem;
               if (global_escapes) {
@@ -1970,7 +1996,7 @@
           Node *arg = call->in(i)->uncast();
           set_escape_state(arg->_idx, PointsToNode::GlobalEscape);
           ptset.Clear();
-          PointsTo(ptset, arg, phase);
+          PointsTo(ptset, arg);
           for( VectorSetI j(&ptset); j.test(); ++j ) {
             uint pt = j.elem;
             set_escape_state(pt, PointsToNode::GlobalEscape);
@@ -2433,7 +2459,7 @@
       Node *base = get_addp_base(n);
       // Create a field edge to this node from everything base could point to.
       VectorSet ptset(Thread::current()->resource_area());
-      PointsTo(ptset, base, phase);
+      PointsTo(ptset, base);
       for( VectorSetI i(&ptset); i.test(); ++i ) {
         uint pt = i.elem;
         add_field_edge(pt, n_idx, address_offset(n, phase));
@@ -2501,7 +2527,7 @@
       // For everything "adr_base" could point to, create a deferred edge from
       // this node to each field with the same offset.
       VectorSet ptset(Thread::current()->resource_area());
-      PointsTo(ptset, adr_base, phase);
+      PointsTo(ptset, adr_base);
       int offset = address_offset(adr, phase);
       for( VectorSetI i(&ptset); i.test(); ++i ) {
         uint pt = i.elem;
@@ -2594,7 +2620,7 @@
       // For everything "adr_base" could point to, create a deferred edge
       // to "val" from each field with the same offset.
       VectorSet ptset(Thread::current()->resource_area());
-      PointsTo(ptset, adr_base, phase);
+      PointsTo(ptset, adr_base);
       for( VectorSetI i(&ptset); i.test(); ++i ) {
         uint pt = i.elem;
         add_edge_from_fields(pt, val->_idx, address_offset(adr, phase));
@@ -2638,7 +2664,6 @@
 
 #ifndef PRODUCT
 void ConnectionGraph::dump() {
-  PhaseGVN  *igvn = _compile->initial_gvn();
   bool first = true;
 
   uint size = nodes_size();
@@ -2648,7 +2673,7 @@
 
     if (ptn_type != PointsToNode::JavaObject || ptn->_node == NULL)
       continue;
-    PointsToNode::EscapeState es = escape_state(ptn->_node, igvn);
+    PointsToNode::EscapeState es = escape_state(ptn->_node);
     if (ptn->_node->is_Allocate() && (es == PointsToNode::NoEscape || Verbose)) {
       if (first) {
         tty->cr();
--- a/hotspot/src/share/vm/opto/escape.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/escape.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -227,6 +227,7 @@
   uint                     _noop_null; // ConN(#NULL)
 
   Compile *                  _compile; // Compile object for current compilation
+  PhaseIterGVN *                _igvn; // Value numbering
 
   // Address of an element in _nodes.  Used when the element is to be modified
   PointsToNode *ptnode_adr(uint idx) const {
@@ -257,7 +258,7 @@
   // walk the connection graph starting at the node corresponding to "n" and
   // add the index of everything it could point to, to "ptset".  This may cause
   // Phi's encountered to get (re)processed  (which requires "phase".)
-  void PointsTo(VectorSet &ptset, Node * n, PhaseTransform *phase);
+  void PointsTo(VectorSet &ptset, Node * n);
 
   //  Edge manipulation.  The "from_i" and "to_i" arguments are the
   //  node indices of the source and destination of the edge
@@ -310,7 +311,7 @@
   // Node:  This assumes that escape analysis is run before
   //        PhaseIterGVN creation
   void record_for_optimizer(Node *n) {
-    _compile->record_for_igvn(n);
+    _igvn->_worklist.push(n);
   }
 
   // Set the escape state of a node
@@ -320,16 +321,20 @@
   void verify_escape_state(int nidx, VectorSet& ptset, PhaseTransform* phase);
 
 public:
-  ConnectionGraph(Compile *C);
+  ConnectionGraph(Compile *C, PhaseIterGVN *igvn);
 
   // Check for non-escaping candidates
   static bool has_candidates(Compile *C);
 
+  // Perform escape analysis
+  static void do_analysis(Compile *C, PhaseIterGVN *igvn);
+
   // Compute the escape information
   bool compute_escape();
 
   // escape state of a node
-  PointsToNode::EscapeState escape_state(Node *n, PhaseTransform *phase);
+  PointsToNode::EscapeState escape_state(Node *n);
+
   // other information we have collected
   bool is_scalar_replaceable(Node *n) {
     if (_collecting || (n->_idx >= nodes_size()))
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1789,9 +1789,10 @@
 
 void GraphKit::increment_counter(Node* counter_addr) {
   int adr_type = Compile::AliasIdxRaw;
-  Node* cnt  = make_load(NULL, counter_addr, TypeInt::INT, T_INT, adr_type);
+  Node* ctrl = control();
+  Node* cnt  = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type);
   Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1)));
-  store_to_memory( NULL, counter_addr, incr, T_INT, adr_type );
+  store_to_memory( ctrl, counter_addr, incr, T_INT, adr_type );
 }
 
 
@@ -2771,11 +2772,7 @@
     // Update the counter for this lock.  Don't bother using an atomic
     // operation since we don't require absolute accuracy.
     lock->create_lock_counter(map()->jvms());
-    int adr_type = Compile::AliasIdxRaw;
-    Node* counter_addr = makecon(TypeRawPtr::make(lock->counter()->addr()));
-    Node* cnt  = make_load(NULL, counter_addr, TypeInt::INT, T_INT, adr_type);
-    Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1)));
-    store_to_memory(control(), counter_addr, incr, T_INT, adr_type);
+    increment_counter(lock->counter()->addr());
   }
 #endif
 
--- a/hotspot/src/share/vm/opto/ifnode.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/ifnode.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1081,11 +1081,9 @@
 
   igvn->register_new_node_with_optimizer(new_if_f);
   igvn->register_new_node_with_optimizer(new_if_t);
-  igvn->hash_delete(old_if_f);
-  igvn->hash_delete(old_if_t);
   // Flip test, so flip trailing control
-  igvn->subsume_node(old_if_f, new_if_t);
-  igvn->subsume_node(old_if_t, new_if_f);
+  igvn->replace_node(old_if_f, new_if_t);
+  igvn->replace_node(old_if_t, new_if_f);
 
   // Progress
   return iff;
--- a/hotspot/src/share/vm/opto/library_call.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -3512,8 +3512,7 @@
 
   // Get the header out of the object, use LoadMarkNode when available
   Node* header_addr = basic_plus_adr(obj, oopDesc::mark_offset_in_bytes());
-  Node* header = make_load(NULL, header_addr, TypeRawPtr::BOTTOM, T_ADDRESS);
-  header = _gvn.transform( new (C, 2) CastP2XNode(NULL, header) );
+  Node* header = make_load(control(), header_addr, TypeX_X, TypeX_X->basic_type());
 
   // Test the header to see if it is unlocked.
   Node *lock_mask      = _gvn.MakeConX(markOopDesc::biased_lock_mask_in_place);
@@ -5202,7 +5201,7 @@
   // super_check_offset, for the desired klass.
   int sco_offset = Klass::super_check_offset_offset_in_bytes() + sizeof(oopDesc);
   Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset);
-  Node* n3 = new(C, 3) LoadINode(NULL, immutable_memory(), p3, TypeRawPtr::BOTTOM);
+  Node* n3 = new(C, 3) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr());
   Node* check_offset = _gvn.transform(n3);
   Node* check_value  = dest_elem_klass;
 
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -194,8 +194,7 @@
     addx = new (phase->C, 3) AddINode(x, inv);
   }
   phase->register_new_node(addx, phase->get_ctrl(x));
-  phase->_igvn.hash_delete(n1);
-  phase->_igvn.subsume_node(n1, addx);
+  phase->_igvn.replace_node(n1, addx);
   return addx;
 }
 
@@ -1586,8 +1585,7 @@
   Node *phi = cl->phi();
   Node *final = new (phase->C, 3) SubINode( cl->limit(), cl->stride() );
   phase->register_new_node(final,cl->in(LoopNode::EntryControl));
-  phase->_igvn.hash_delete(phi);
-  phase->_igvn.subsume_node(phi,final);
+  phase->_igvn.replace_node(phi,final);
   phase->C->set_major_progress();
   return true;
 }
--- a/hotspot/src/share/vm/opto/loopnode.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/loopnode.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -400,7 +400,7 @@
     nphi->set_req(LoopNode::LoopBackControl, phi->in(LoopNode::LoopBackControl));
     nphi = _igvn.register_new_node_with_optimizer(nphi);
     set_ctrl(nphi, get_ctrl(phi));
-    _igvn.subsume_node(phi, nphi);
+    _igvn.replace_node(phi, nphi);
     phi = nphi->as_Phi();
   }
   cmp = cmp->clone();
@@ -760,7 +760,7 @@
       // which in turn prevents removing an empty loop.
       Node *id_old_phi = old_phi->Identity( &igvn );
       if( id_old_phi != old_phi ) { // Found a simple identity?
-        // Note that I cannot call 'subsume_node' here, because
+        // Note that I cannot call 'replace_node' here, because
         // that will yank the edge from old_phi to the Region and
         // I'm mid-iteration over the Region's uses.
         for (DUIterator_Last imin, i = old_phi->last_outs(imin); i >= imin; ) {
@@ -1065,11 +1065,9 @@
     l = igvn.register_new_node_with_optimizer(l, _head);
     phase->set_created_loop_node();
     // Go ahead and replace _head
-    phase->_igvn.subsume_node( _head, l );
+    phase->_igvn.replace_node( _head, l );
     _head = l;
     phase->set_loop(_head, this);
-    for (DUIterator_Fast imax, i = l->fast_outs(imax); i < imax; i++)
-      phase->_igvn.add_users_to_worklist(l->fast_out(i));
   }
 
   // Now recursively beautify nested loops
@@ -1329,8 +1327,7 @@
         Node* add  = new (C, 3) AddINode(ratio_idx, diff);
         phase->_igvn.register_new_node_with_optimizer(add);
         phase->set_ctrl(add, cl);
-        phase->_igvn.hash_delete( phi2 );
-        phase->_igvn.subsume_node( phi2, add );
+        phase->_igvn.replace_node( phi2, add );
         // Sometimes an induction variable is unused
         if (add->outcnt() == 0) {
           phase->_igvn.remove_dead_node(add);
--- a/hotspot/src/share/vm/opto/loopnode.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/loopnode.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -626,8 +626,7 @@
     _nodes.map( old_node->_idx, (Node*)((intptr_t)new_node + 1) );
   }
   void lazy_replace( Node *old_node, Node *new_node ) {
-    _igvn.hash_delete(old_node);
-    _igvn.subsume_node( old_node, new_node );
+    _igvn.replace_node( old_node, new_node );
     lazy_update( old_node, new_node );
   }
   void lazy_replace_proj( Node *old_node, Node *new_node ) {
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -354,8 +354,7 @@
     register_new_node( var_scale, n_ctrl );
     Node *var_add = new (C, 3) AddINode( var_scale, inv_scale );
     register_new_node( var_add, n_ctrl );
-    _igvn.hash_delete( n );
-    _igvn.subsume_node( n, var_add );
+    _igvn.replace_node( n, var_add );
     return var_add;
   }
 
@@ -390,8 +389,7 @@
           register_new_node( add1, n_loop->_head->in(LoopNode::EntryControl) );
           Node *add2 = new (C, 4) AddPNode( n->in(1), add1, n->in(2)->in(3) );
           register_new_node( add2, n_ctrl );
-          _igvn.hash_delete( n );
-          _igvn.subsume_node( n, add2 );
+          _igvn.replace_node( n, add2 );
           return add2;
         }
       }
@@ -412,8 +410,7 @@
           register_new_node( add1, n_loop->_head->in(LoopNode::EntryControl) );
           Node *add2 = new (C, 4) AddPNode( n->in(1), add1, V );
           register_new_node( add2, n_ctrl );
-          _igvn.hash_delete( n );
-          _igvn.subsume_node( n, add2 );
+          _igvn.replace_node( n, add2 );
           return add2;
         }
       }
@@ -555,8 +552,7 @@
     }
     Node *cmov = CMoveNode::make( C, cmov_ctrl, iff->in(1), phi->in(1+flip), phi->in(2-flip), _igvn.type(phi) );
     register_new_node( cmov, cmov_ctrl );
-    _igvn.hash_delete(phi);
-    _igvn.subsume_node( phi, cmov );
+    _igvn.replace_node( phi, cmov );
 #ifndef PRODUCT
     if( VerifyLoopOptimizations ) verify();
 #endif
@@ -642,8 +638,7 @@
 
   // Found a Phi to split thru!
   // Replace 'n' with the new phi
-  _igvn.hash_delete(n);
-  _igvn.subsume_node( n, phi );
+  _igvn.replace_node( n, phi );
   // Moved a load around the loop, 'en-registering' something.
   if( n_blk->Opcode() == Op_Loop && n->is_Load() &&
       !phi->in(LoopNode::LoopBackControl)->is_Load() )
@@ -789,13 +784,11 @@
 
     // Found a Phi to split thru!
     // Replace 'n' with the new phi
-    _igvn.hash_delete(n);
-    _igvn.subsume_node( n, phi );
+    _igvn.replace_node( n, phi );
 
     // Now split the bool up thru the phi
     Node *bolphi = split_thru_phi( bol, n_ctrl, -1 );
-    _igvn.hash_delete(bol);
-    _igvn.subsume_node( bol, bolphi );
+    _igvn.replace_node( bol, bolphi );
     assert( iff->in(1) == bolphi, "" );
     if( bolphi->Value(&_igvn)->singleton() )
       return;
@@ -803,8 +796,7 @@
     // Conditional-move?  Must split up now
     if( !iff->is_If() ) {
       Node *cmovphi = split_thru_phi( iff, n_ctrl, -1 );
-      _igvn.hash_delete(iff);
-      _igvn.subsume_node( iff, cmovphi );
+      _igvn.replace_node( iff, cmovphi );
       return;
     }
 
@@ -950,9 +942,7 @@
   if( n_op == Op_Opaque2 &&
       n->in(1) != NULL &&
       get_loop(get_ctrl(n)) == get_loop(get_ctrl(n->in(1))) ) {
-    _igvn.add_users_to_worklist(n);
-    _igvn.hash_delete(n);
-    _igvn.subsume_node( n, n->in(1) );
+    _igvn.replace_node( n, n->in(1) );
   }
 }
 
@@ -1425,7 +1415,7 @@
           // IGVN does CSE).
           Node *hit = _igvn.hash_find_insert(use);
           if( hit )             // Go ahead and re-hash for hits.
-            _igvn.subsume_node( use, hit );
+            _igvn.replace_node( use, hit );
         }
 
         // If 'use' was in the loop-exit block, it now needs to be sunk
--- a/hotspot/src/share/vm/opto/macro.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/macro.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -135,8 +135,7 @@
   if (parm1 != NULL)  call->init_req(TypeFunc::Parms+1, parm1);
   copy_call_debug_info(oldcall, call);
   call->set_cnt(PROB_UNLIKELY_MAG(4));  // Same effect as RC_UNCOMMON.
-  _igvn.hash_delete(oldcall);
-  _igvn.subsume_node(oldcall, call);
+  _igvn.replace_node(oldcall, call);
   transform_later(call);
 
   return call;
@@ -523,8 +522,7 @@
         // Kill all new Phis
         while(value_phis.is_nonempty()) {
           Node* n = value_phis.node();
-          _igvn.hash_delete(n);
-          _igvn.subsume_node(n, C->top());
+          _igvn.replace_node(n, C->top());
           value_phis.pop();
         }
       }
@@ -1311,8 +1309,7 @@
   if (!always_slow) {
     call->set_cnt(PROB_UNLIKELY_MAG(4));  // Same effect as RC_UNCOMMON.
   }
-  _igvn.hash_delete(alloc);
-  _igvn.subsume_node(alloc, call);
+  _igvn.replace_node(alloc, call);
   transform_later(call);
 
   // Identify the output projections from the allocate node and
@@ -1431,7 +1428,7 @@
   Node* mark_node = NULL;
   // For now only enable fast locking for non-array types
   if (UseBiasedLocking && (length == NULL)) {
-    mark_node = make_load(NULL, rawmem, klass_node, Klass::prototype_header_offset_in_bytes() + sizeof(oopDesc), TypeRawPtr::BOTTOM, T_ADDRESS);
+    mark_node = make_load(control, rawmem, klass_node, Klass::prototype_header_offset_in_bytes() + sizeof(oopDesc), TypeRawPtr::BOTTOM, T_ADDRESS);
   } else {
     mark_node = makecon(TypeRawPtr::make((address)markOopDesc::prototype()));
   }
--- a/hotspot/src/share/vm/opto/memnode.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -815,6 +815,16 @@
 }
 #endif
 
+#ifdef ASSERT
+//----------------------------is_immutable_value-------------------------------
+// Helper function to allow a raw load without control edge for some cases
+bool LoadNode::is_immutable_value(Node* adr) {
+  return (adr->is_AddP() && adr->in(AddPNode::Base)->is_top() &&
+          adr->in(AddPNode::Address)->Opcode() == Op_ThreadLocal &&
+          (adr->in(AddPNode::Offset)->find_intptr_t_con(-1) ==
+           in_bytes(JavaThread::osthread_offset())));
+}
+#endif
 
 //----------------------------LoadNode::make-----------------------------------
 // Polymorphic factory method:
@@ -828,6 +838,11 @@
   assert(!(adr_type->isa_aryptr() &&
            adr_type->offset() == arrayOopDesc::length_offset_in_bytes()),
          "use LoadRangeNode instead");
+  // Check control edge of raw loads
+  assert( ctl != NULL || C->get_alias_index(adr_type) != Compile::AliasIdxRaw ||
+          // oop will be recorded in oop map if load crosses safepoint
+          rt->isa_oopptr() || is_immutable_value(adr),
+          "raw memory operations should have control edge");
   switch (bt) {
   case T_BOOLEAN: return new (C, 3) LoadUBNode(ctl, mem, adr, adr_type, rt->is_int()    );
   case T_BYTE:    return new (C, 3) LoadBNode (ctl, mem, adr, adr_type, rt->is_int()    );
@@ -2064,6 +2079,8 @@
 // Polymorphic factory method:
 StoreNode* StoreNode::make( PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, BasicType bt ) {
   Compile* C = gvn.C;
+  assert( C->get_alias_index(adr_type) != Compile::AliasIdxRaw ||
+          ctl != NULL, "raw memory operations should have control edge");
 
   switch (bt) {
   case T_BOOLEAN:
--- a/hotspot/src/share/vm/opto/memnode.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/memnode.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -189,6 +189,10 @@
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
 #endif
+#ifdef ASSERT
+  // Helper function to allow a raw load without control edge for some cases
+  static bool is_immutable_value(Node* adr);
+#endif
 protected:
   const Type* load_array_final_field(const TypeKlassPtr *tkls,
                                      ciKlass* klass) const;
--- a/hotspot/src/share/vm/opto/parse.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/parse.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -480,6 +480,7 @@
   bool push_constant(ciConstant con, bool require_constant = false);
 
   // implementation of object creation bytecodes
+  void emit_guard_for_new(ciInstanceKlass* klass);
   void do_new();
   void do_newarray(BasicType elemtype);
   void do_anewarray();
--- a/hotspot/src/share/vm/opto/parse1.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/parse1.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -88,15 +88,16 @@
                                      Node *local_addrs_base) {
   Node *mem = memory(Compile::AliasIdxRaw);
   Node *adr = basic_plus_adr( local_addrs_base, local_addrs, -index*wordSize );
+  Node *ctl = control();
 
   // Very similar to LoadNode::make, except we handle un-aligned longs and
   // doubles on Sparc.  Intel can handle them just fine directly.
   Node *l;
   switch( bt ) {                // Signature is flattened
-  case T_INT:     l = new (C, 3) LoadINode( 0, mem, adr, TypeRawPtr::BOTTOM ); break;
-  case T_FLOAT:   l = new (C, 3) LoadFNode( 0, mem, adr, TypeRawPtr::BOTTOM ); break;
-  case T_ADDRESS: l = new (C, 3) LoadPNode( 0, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM  ); break;
-  case T_OBJECT:  l = new (C, 3) LoadPNode( 0, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break;
+  case T_INT:     l = new (C, 3) LoadINode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
+  case T_FLOAT:   l = new (C, 3) LoadFNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
+  case T_ADDRESS: l = new (C, 3) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM  ); break;
+  case T_OBJECT:  l = new (C, 3) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break;
   case T_LONG:
   case T_DOUBLE: {
     // Since arguments are in reverse order, the argument address 'adr'
@@ -104,12 +105,12 @@
     adr = basic_plus_adr( local_addrs_base, local_addrs, -(index+1)*wordSize );
     if( Matcher::misaligned_doubles_ok ) {
       l = (bt == T_DOUBLE)
-        ? (Node*)new (C, 3) LoadDNode( 0, mem, adr, TypeRawPtr::BOTTOM )
-        : (Node*)new (C, 3) LoadLNode( 0, mem, adr, TypeRawPtr::BOTTOM );
+        ? (Node*)new (C, 3) LoadDNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
+        : (Node*)new (C, 3) LoadLNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
     } else {
       l = (bt == T_DOUBLE)
-        ? (Node*)new (C, 3) LoadD_unalignedNode( 0, mem, adr, TypeRawPtr::BOTTOM )
-        : (Node*)new (C, 3) LoadL_unalignedNode( 0, mem, adr, TypeRawPtr::BOTTOM );
+        ? (Node*)new (C, 3) LoadD_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
+        : (Node*)new (C, 3) LoadL_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
     }
     break;
   }
--- a/hotspot/src/share/vm/opto/parse2.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/parse2.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1324,33 +1324,21 @@
   case Bytecodes::_ldc_w:
   case Bytecodes::_ldc2_w:
     // If the constant is unresolved, run this BC once in the interpreter.
-    if (iter().is_unresolved_string()) {
-      uncommon_trap(Deoptimization::make_trap_request
-                    (Deoptimization::Reason_unloaded,
-                     Deoptimization::Action_reinterpret,
-                     iter().get_constant_index()),
-                    NULL, "unresolved_string");
-      break;
-    } else {
+    {
       ciConstant constant = iter().get_constant();
-      if (constant.basic_type() == T_OBJECT) {
-        ciObject* c = constant.as_object();
-        if (c->is_klass()) {
-          // The constant returned for a klass is the ciKlass for the
-          // entry.  We want the java_mirror so get it.
-          ciKlass* klass = c->as_klass();
-          if (klass->is_loaded()) {
-            constant = ciConstant(T_OBJECT, klass->java_mirror());
-          } else {
-            uncommon_trap(Deoptimization::make_trap_request
-                          (Deoptimization::Reason_unloaded,
-                           Deoptimization::Action_reinterpret,
-                           iter().get_constant_index()),
-                          NULL, "unresolved_klass");
-            break;
-          }
-        }
+      if (constant.basic_type() == T_OBJECT &&
+          !constant.as_object()->is_loaded()) {
+        int index = iter().get_constant_pool_index();
+        constantTag tag = iter().get_constant_pool_tag(index);
+        uncommon_trap(Deoptimization::make_trap_request
+                      (Deoptimization::Reason_unloaded,
+                       Deoptimization::Action_reinterpret,
+                       index),
+                      NULL, tag.internal_name());
+        break;
       }
+      assert(constant.basic_type() != T_OBJECT || !constant.as_object()->is_klass(),
+             "must be java_mirror of klass");
       bool pushed = push_constant(constant, true);
       guarantee(pushed, "must be possible to push this constant");
     }
--- a/hotspot/src/share/vm/opto/parseHelper.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/parseHelper.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -197,6 +197,43 @@
 }
 
 
+void Parse::emit_guard_for_new(ciInstanceKlass* klass) {
+  // Emit guarded new
+  //   if (klass->_init_thread != current_thread ||
+  //       klass->_init_state != being_initialized)
+  //      uncommon_trap
+  Node* cur_thread = _gvn.transform( new (C, 1) ThreadLocalNode() );
+  Node* merge = new (C, 3) RegionNode(3);
+  _gvn.set_type(merge, Type::CONTROL);
+  Node* kls = makecon(TypeKlassPtr::make(klass));
+
+  Node* init_thread_offset = _gvn.MakeConX(instanceKlass::init_thread_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes());
+  Node* adr_node = basic_plus_adr(kls, kls, init_thread_offset);
+  Node* init_thread = make_load(NULL, adr_node, TypeRawPtr::BOTTOM, T_ADDRESS);
+  Node *tst   = Bool( CmpP( init_thread, cur_thread), BoolTest::eq);
+  IfNode* iff = create_and_map_if(control(), tst, PROB_ALWAYS, COUNT_UNKNOWN);
+  set_control(IfTrue(iff));
+  merge->set_req(1, IfFalse(iff));
+
+  Node* init_state_offset = _gvn.MakeConX(instanceKlass::init_state_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes());
+  adr_node = basic_plus_adr(kls, kls, init_state_offset);
+  Node* init_state = make_load(NULL, adr_node, TypeInt::INT, T_INT);
+  Node* being_init = _gvn.intcon(instanceKlass::being_initialized);
+  tst   = Bool( CmpI( init_state, being_init), BoolTest::eq);
+  iff = create_and_map_if(control(), tst, PROB_ALWAYS, COUNT_UNKNOWN);
+  set_control(IfTrue(iff));
+  merge->set_req(2, IfFalse(iff));
+
+  PreserveJVMState pjvms(this);
+  record_for_igvn(merge);
+  set_control(merge);
+
+  uncommon_trap(Deoptimization::Reason_uninitialized,
+                Deoptimization::Action_reinterpret,
+                klass);
+}
+
+
 //------------------------------do_new-----------------------------------------
 void Parse::do_new() {
   kill_dead_locals();
@@ -206,7 +243,7 @@
   assert(will_link, "_new: typeflow responsibility");
 
   // Should initialize, or throw an InstantiationError?
-  if (!klass->is_initialized() ||
+  if (!klass->is_initialized() && !klass->is_being_initialized() ||
       klass->is_abstract() || klass->is_interface() ||
       klass->name() == ciSymbol::java_lang_Class() ||
       iter().is_unresolved_klass()) {
@@ -215,6 +252,9 @@
                   klass);
     return;
   }
+  if (klass->is_being_initialized()) {
+    emit_guard_for_new(klass);
+  }
 
   Node* kls = makecon(TypeKlassPtr::make(klass));
   Node* obj = new_instance(kls);
--- a/hotspot/src/share/vm/opto/phaseX.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/phaseX.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1447,16 +1447,12 @@
           Node* m = n->out(i);
           if( m->is_Phi() ) {
             assert(type(m) == Type::TOP, "Unreachable region should not have live phis.");
-            add_users_to_worklist(m);
-            hash_delete(m); // Yank from hash before hacking edges
-            subsume_node(m, nn);
+            replace_node(m, nn);
             --i; // deleted this phi; rescan starting with next position
           }
         }
       }
-      add_users_to_worklist(n); // Users of about-to-be-constant 'n'
-      hash_delete(n);           // Removed 'n' from table before subsuming it
-      subsume_node(n,nn);       // Update DefUse edges for new constant
+      replace_node(n,nn);       // Update DefUse edges for new constant
     }
     return nn;
   }
--- a/hotspot/src/share/vm/opto/phaseX.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/phaseX.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -393,6 +393,10 @@
 
   // Idealize old Node 'n' with respect to its inputs and its value
   virtual Node *transform_old( Node *a_node );
+
+  // Subsume users of node 'old' into node 'nn'
+  void subsume_node( Node *old, Node *nn );
+
 protected:
 
   // Idealize new Node 'n' with respect to its inputs and its value
@@ -439,10 +443,6 @@
     remove_globally_dead_node(dead);
   }
 
-  // Subsume users of node 'old' into node 'nn'
-  // If no Def-Use info existed for 'nn' it will after call.
-  void subsume_node( Node *old, Node *nn );
-
   // Add users of 'n' to worklist
   void add_users_to_worklist0( Node *n );
   void add_users_to_worklist ( Node *n );
@@ -450,7 +450,7 @@
   // Replace old node with new one.
   void replace_node( Node *old, Node *nn ) {
     add_users_to_worklist(old);
-    hash_delete(old);
+    hash_delete(old); // Yank from hash before hacking edges
     subsume_node(old, nn);
   }
 
--- a/hotspot/src/share/vm/opto/split_if.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/split_if.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -217,8 +217,7 @@
   register_new_node(phi, blk1);
 
   // Remove cloned-up value from optimizer; use phi instead
-  _igvn.hash_delete(n);
-  _igvn.subsume_node( n, phi );
+  _igvn.replace_node( n, phi );
 
   // (There used to be a self-recursive call to split_up() here,
   // but it is not needed.  All necessary forward walking is done
@@ -352,8 +351,7 @@
   }
 
   if (use_blk == NULL) {        // He's dead, Jim
-    _igvn.hash_delete(use);
-    _igvn.subsume_node(use, C->top());
+    _igvn.replace_node(use, C->top());
   }
 
   return use_blk;
--- a/hotspot/src/share/vm/opto/superword.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/superword.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1172,8 +1172,7 @@
       _phase->set_ctrl(vn, _phase->get_ctrl(p->at(0)));
       for (uint j = 0; j < p->size(); j++) {
         Node* pm = p->at(j);
-        _igvn.hash_delete(pm);
-        _igvn.subsume_node(pm, vn);
+        _igvn.replace_node(pm, vn);
       }
       _igvn._worklist.push(vn);
     }
--- a/hotspot/src/share/vm/opto/type.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/opto/type.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -182,6 +182,8 @@
   return t->hash();
 }
 
+#define SMALLINT ((juint)3)  // a value too insignificant to consider widening
+
 //--------------------------Initialize_shared----------------------------------
 void Type::Initialize_shared(Compile* current) {
   // This method does not need to be locked because the first system
@@ -240,6 +242,7 @@
   assert( TypeInt::CC_GT == TypeInt::ONE,     "types must match for CmpL to work" );
   assert( TypeInt::CC_EQ == TypeInt::ZERO,    "types must match for CmpL to work" );
   assert( TypeInt::CC_GE == TypeInt::BOOL,    "types must match for CmpL to work" );
+  assert( (juint)(TypeInt::CC->_hi - TypeInt::CC->_lo) <= SMALLINT, "CC is truly small");
 
   TypeLong::MINUS_1 = TypeLong::make(-1);        // -1
   TypeLong::ZERO    = TypeLong::make( 0);        //  0
@@ -1054,16 +1057,21 @@
   return (TypeInt*)(new TypeInt(lo,lo,WidenMin))->hashcons();
 }
 
-#define SMALLINT ((juint)3)  // a value too insignificant to consider widening
-
-const TypeInt *TypeInt::make( jint lo, jint hi, int w ) {
+static int normalize_int_widen( jint lo, jint hi, int w ) {
   // Certain normalizations keep us sane when comparing types.
   // The 'SMALLINT' covers constants and also CC and its relatives.
-  assert(CC == NULL || (juint)(CC->_hi - CC->_lo) <= SMALLINT, "CC is truly small");
   if (lo <= hi) {
-    if ((juint)(hi - lo) <= SMALLINT)   w = Type::WidenMin;
-    if ((juint)(hi - lo) >= max_juint)  w = Type::WidenMax; // plain int
+    if ((juint)(hi - lo) <= SMALLINT)  w = Type::WidenMin;
+    if ((juint)(hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT
+  } else {
+    if ((juint)(lo - hi) <= SMALLINT)  w = Type::WidenMin;
+    if ((juint)(lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT
   }
+  return w;
+}
+
+const TypeInt *TypeInt::make( jint lo, jint hi, int w ) {
+  w = normalize_int_widen(lo, hi, w);
   return (TypeInt*)(new TypeInt(lo,hi,w))->hashcons();
 }
 
@@ -1103,14 +1111,14 @@
 
   // Expand covered set
   const TypeInt *r = t->is_int();
-  // (Avoid TypeInt::make, to avoid the argument normalizations it enforces.)
-  return (new TypeInt( MIN2(_lo,r->_lo), MAX2(_hi,r->_hi), MAX2(_widen,r->_widen) ))->hashcons();
+  return make( MIN2(_lo,r->_lo), MAX2(_hi,r->_hi), MAX2(_widen,r->_widen) );
 }
 
 //------------------------------xdual------------------------------------------
 // Dual: reverse hi & lo; flip widen
 const Type *TypeInt::xdual() const {
-  return new TypeInt(_hi,_lo,WidenMax-_widen);
+  int w = normalize_int_widen(_hi,_lo, WidenMax-_widen);
+  return new TypeInt(_hi,_lo,w);
 }
 
 //------------------------------widen------------------------------------------
@@ -1202,7 +1210,7 @@
 //-----------------------------filter------------------------------------------
 const Type *TypeInt::filter( const Type *kills ) const {
   const TypeInt* ft = join(kills)->isa_int();
-  if (ft == NULL || ft->_lo > ft->_hi)
+  if (ft == NULL || ft->empty())
     return Type::TOP;           // Canonical empty value
   if (ft->_widen < this->_widen) {
     // Do not allow the value of kill->_widen to affect the outcome.
@@ -1304,13 +1312,21 @@
   return (TypeLong*)(new TypeLong(lo,lo,WidenMin))->hashcons();
 }
 
-const TypeLong *TypeLong::make( jlong lo, jlong hi, int w ) {
+static int normalize_long_widen( jlong lo, jlong hi, int w ) {
   // Certain normalizations keep us sane when comparing types.
-  // The '1' covers constants.
+  // The 'SMALLINT' covers constants.
   if (lo <= hi) {
-    if ((julong)(hi - lo) <= SMALLINT)    w = Type::WidenMin;
-    if ((julong)(hi - lo) >= max_julong)  w = Type::WidenMax; // plain long
+    if ((julong)(hi - lo) <= SMALLINT)   w = Type::WidenMin;
+    if ((julong)(hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG
+  } else {
+    if ((julong)(lo - hi) <= SMALLINT)   w = Type::WidenMin;
+    if ((julong)(lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG
   }
+  return w;
+}
+
+const TypeLong *TypeLong::make( jlong lo, jlong hi, int w ) {
+  w = normalize_long_widen(lo, hi, w);
   return (TypeLong*)(new TypeLong(lo,hi,w))->hashcons();
 }
 
@@ -1351,14 +1367,14 @@
 
   // Expand covered set
   const TypeLong *r = t->is_long(); // Turn into a TypeLong
-  // (Avoid TypeLong::make, to avoid the argument normalizations it enforces.)
-  return (new TypeLong( MIN2(_lo,r->_lo), MAX2(_hi,r->_hi), MAX2(_widen,r->_widen) ))->hashcons();
+  return make( MIN2(_lo,r->_lo), MAX2(_hi,r->_hi), MAX2(_widen,r->_widen) );
 }
 
 //------------------------------xdual------------------------------------------
 // Dual: reverse hi & lo; flip widen
 const Type *TypeLong::xdual() const {
-  return new TypeLong(_hi,_lo,WidenMax-_widen);
+  int w = normalize_long_widen(_hi,_lo, WidenMax-_widen);
+  return new TypeLong(_hi,_lo,w);
 }
 
 //------------------------------widen------------------------------------------
@@ -1453,7 +1469,7 @@
 //-----------------------------filter------------------------------------------
 const Type *TypeLong::filter( const Type *kills ) const {
   const TypeLong* ft = join(kills)->isa_long();
-  if (ft == NULL || ft->_lo > ft->_hi)
+  if (ft == NULL || ft->empty())
     return Type::TOP;           // Canonical empty value
   if (ft->_widen < this->_widen) {
     // Do not allow the value of kill->_widen to affect the outcome.
--- a/hotspot/src/share/vm/prims/jvm.h	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/prims/jvm.h	Thu Jul 29 22:02:45 2010 -0700
@@ -1044,7 +1044,22 @@
     JVM_CONSTANT_Fieldref,
     JVM_CONSTANT_Methodref,
     JVM_CONSTANT_InterfaceMethodref,
-    JVM_CONSTANT_NameAndType
+    JVM_CONSTANT_NameAndType,
+    JVM_CONSTANT_MethodHandle           = 15,  // JSR 292
+    JVM_CONSTANT_MethodType             = 16   // JSR 292
+};
+
+/* JVM_CONSTANT_MethodHandle subtypes */
+enum {
+    JVM_REF_getField                = 1,
+    JVM_REF_getStatic               = 2,
+    JVM_REF_putField                = 3,
+    JVM_REF_putStatic               = 4,
+    JVM_REF_invokeVirtual           = 5,
+    JVM_REF_invokeStatic            = 6,
+    JVM_REF_invokeSpecial           = 7,
+    JVM_REF_newInvokeSpecial        = 8,
+    JVM_REF_invokeInterface         = 9
 };
 
 /* Used in the newarray instruction. */
--- a/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -122,30 +122,8 @@
     }
   }
 
-  // we must name the CodeBlob - some CodeBlobs already have names :-
-  // - stubs used by compiled code to call a (static) C++ runtime routine
-  // - non-relocatable machine code such as the interpreter, stubroutines, etc.
-  // - various singleton blobs
-  //
-  // others are unnamed so we create a name :-
-  // - OSR adapter (interpreter frame that has been on-stack replaced)
-  // - I2C and C2I adapters
-  const char* name = NULL;
-  if (cb->is_runtime_stub()) {
-    name = ((RuntimeStub*)cb)->name();
-  }
-  if (cb->is_buffer_blob()) {
-    name = ((BufferBlob*)cb)->name();
-  }
-  if (cb->is_deoptimization_stub() || cb->is_safepoint_stub()) {
-    name = ((SingletonBlob*)cb)->name();
-  }
-  if (cb->is_uncommon_trap_stub() || cb->is_exception_stub()) {
-    name = ((SingletonBlob*)cb)->name();
-  }
-
   // record the CodeBlob details as a JvmtiCodeBlobDesc
-  JvmtiCodeBlobDesc* scb = new JvmtiCodeBlobDesc(name, cb->instructions_begin(),
+  JvmtiCodeBlobDesc* scb = new JvmtiCodeBlobDesc(cb->name(), cb->instructions_begin(),
                                                  cb->instructions_end());
   _global_code_blobs->append(scb);
 }
@@ -197,7 +175,10 @@
 jvmtiError JvmtiCodeBlobEvents::generate_dynamic_code_events(JvmtiEnv* env) {
   CodeBlobCollector collector;
 
-  // first collect all the code blobs
+  // First collect all the code blobs.  This has to be done in a
+  // single pass over the code cache with CodeCache_lock held because
+  // there isn't any safe way to iterate over regular CodeBlobs since
+  // they can be freed at any point.
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     collector.collect();
@@ -213,168 +194,28 @@
 }
 
 
-// Support class to describe a nmethod in the CodeCache
-
-class nmethodDesc: public CHeapObj {
- private:
-  methodHandle _method;
-  address _code_begin;
-  address _code_end;
-  jvmtiAddrLocationMap* _map;
-  jint _map_length;
- public:
-  nmethodDesc(methodHandle method, address code_begin, address code_end,
-              jvmtiAddrLocationMap* map, jint map_length) {
-    _method = method;
-    _code_begin = code_begin;
-    _code_end = code_end;
-    _map = map;
-    _map_length = map_length;
-  }
-  methodHandle method() const           { return _method; }
-  address code_begin() const            { return _code_begin; }
-  address code_end() const              { return _code_end; }
-  jvmtiAddrLocationMap* map() const     { return _map; }
-  jint map_length() const               { return _map_length; }
-};
-
-
-// Support class to collect a list of the nmethod CodeBlobs in
-// the CodeCache.
-//
-// Usage :-
-//
-// nmethodCollector collector;
-//
-// collector.collect();
-// JvmtiCodeBlobDesc* blob = collector.first();
-// while (blob != NULL) {
-//   :
-//   blob = collector.next();
-// }
-//
-class nmethodCollector : StackObj {
- private:
-  GrowableArray<nmethodDesc*>* _nmethods;           // collect nmethods
-  int _pos;                                         // iteration support
-
-  // used during a collection
-  static GrowableArray<nmethodDesc*>* _global_nmethods;
-  static void do_nmethod(nmethod* nm);
- public:
-  nmethodCollector() {
-    _nmethods = NULL;
-    _pos = -1;
-  }
-  ~nmethodCollector() {
-    if (_nmethods != NULL) {
-      for (int i=0; i<_nmethods->length(); i++) {
-        nmethodDesc* blob = _nmethods->at(i);
-        if (blob->map()!= NULL) {
-          FREE_C_HEAP_ARRAY(jvmtiAddrLocationMap, blob->map());
-        }
-      }
-      delete _nmethods;
-    }
-  }
-
-  // collect list of nmethods in the cache
-  void collect();
-
-  // iteration support - return first code blob
-  nmethodDesc* first() {
-    assert(_nmethods != NULL, "not collected");
-    if (_nmethods->length() == 0) {
-      return NULL;
-    }
-    _pos = 0;
-    return _nmethods->at(0);
-  }
-
-  // iteration support - return next code blob
-  nmethodDesc* next() {
-    assert(_pos >= 0, "iteration not started");
-    if (_pos+1 >= _nmethods->length()) {
-      return NULL;
-    }
-    return _nmethods->at(++_pos);
-  }
-};
-
-// used during collection
-GrowableArray<nmethodDesc*>* nmethodCollector::_global_nmethods;
-
-
-// called for each nmethod in the CodeCache
-//
-// This function simply adds a descriptor for each nmethod to the global list.
-
-void nmethodCollector::do_nmethod(nmethod* nm) {
-  // ignore zombies
-  if (!nm->is_alive()) {
-    return;
-  }
-
-  assert(nm->method() != NULL, "checking");
-
-  // create the location map for the nmethod.
-  jvmtiAddrLocationMap* map;
-  jint map_length;
-  JvmtiCodeBlobEvents::build_jvmti_addr_location_map(nm, &map, &map_length);
-
-  // record the nmethod details
-  methodHandle mh(nm->method());
-  nmethodDesc* snm = new nmethodDesc(mh,
-                                     nm->code_begin(),
-                                     nm->code_end(),
-                                     map,
-                                     map_length);
-  _global_nmethods->append(snm);
-}
-
-// collects a list of nmethod in the CodeCache.
-//
-// The created list is growable array of nmethodDesc - each one describes
-// a nmethod and includs its JVMTI address location map.
-
-void nmethodCollector::collect() {
-  assert_locked_or_safepoint(CodeCache_lock);
-  assert(_global_nmethods == NULL, "checking");
-
-  // create the list
-  _global_nmethods = new (ResourceObj::C_HEAP) GrowableArray<nmethodDesc*>(100,true);
-
-  // any a descriptor for each nmethod to the list.
-  CodeCache::nmethods_do(do_nmethod);
-
-  // make the list the instance list
-  _nmethods = _global_nmethods;
-  _global_nmethods = NULL;
-}
-
 // Generate a COMPILED_METHOD_LOAD event for each nnmethod
-
 jvmtiError JvmtiCodeBlobEvents::generate_compiled_method_load_events(JvmtiEnv* env) {
   HandleMark hm;
-  nmethodCollector collector;
-
-  // first collect all nmethods
-  {
-    MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
-    collector.collect();
-  }
 
-  // iterate over the  list and post an event for each nmethod
-  nmethodDesc* nm_desc = collector.first();
-  while (nm_desc != NULL) {
-    methodOop method = nm_desc->method()();
-    jmethodID mid = method->jmethod_id();
-    assert(mid != NULL, "checking");
-    JvmtiExport::post_compiled_method_load(env, mid,
-                                           (jint)(nm_desc->code_end() - nm_desc->code_begin()),
-                                           nm_desc->code_begin(), nm_desc->map_length(),
-                                           nm_desc->map());
-    nm_desc = collector.next();
+  // Walk the CodeCache notifying for live nmethods.  The code cache
+  // may be changing while this is happening which is ok since newly
+  // created nmethod will notify normally and nmethods which are freed
+  // can be safely skipped.
+  MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
+  nmethod* current = CodeCache::first_nmethod();
+  while (current != NULL) {
+    // Only notify for live nmethods
+    if (current->is_alive()) {
+      // Lock the nmethod so it can't be freed
+      nmethodLocker nml(current);
+
+      // Don't hold the lock over the notify or jmethodID creation
+      MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
+      current->get_and_cache_jmethod_id();
+      JvmtiExport::post_compiled_method_load(current);
+    }
+    current = CodeCache::next_nmethod(current);
   }
   return JVMTI_ERROR_NONE;
 }
--- a/hotspot/src/share/vm/prims/methodComparator.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/prims/methodComparator.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -163,10 +163,10 @@
 
   case Bytecodes::_ldc   : // fall through
   case Bytecodes::_ldc_w : {
-    Bytecode_loadconstant* ldc_old = Bytecode_loadconstant_at(_s_old->method()(), _s_old->bcp());
-    Bytecode_loadconstant* ldc_new = Bytecode_loadconstant_at(_s_new->method()(), _s_new->bcp());
-    int cpi_old = ldc_old->index();
-    int cpi_new = ldc_new->index();
+    Bytecode_loadconstant* ldc_old = Bytecode_loadconstant_at(_s_old->method(), _s_old->bci());
+    Bytecode_loadconstant* ldc_new = Bytecode_loadconstant_at(_s_new->method(), _s_new->bci());
+    int cpi_old = ldc_old->pool_index();
+    int cpi_new = ldc_new->pool_index();
     constantTag tag_old = _old_cp->tag_at(cpi_old);
     constantTag tag_new = _new_cp->tag_at(cpi_new);
     if (tag_old.is_int() || tag_old.is_float()) {
@@ -187,12 +187,30 @@
       if (strcmp(_old_cp->string_at_noresolve(cpi_old),
                  _new_cp->string_at_noresolve(cpi_new)) != 0)
         return false;
-    } else { // tag_old should be klass - 4881222
+    } else if (tag_old.is_klass() || tag_old.is_unresolved_klass()) {
+      // tag_old should be klass - 4881222
       if (! (tag_new.is_unresolved_klass() || tag_new.is_klass()))
         return false;
       if (_old_cp->klass_at_noresolve(cpi_old) !=
           _new_cp->klass_at_noresolve(cpi_new))
         return false;
+    } else if (tag_old.is_method_type() && tag_new.is_method_type()) {
+      int mti_old = _old_cp->method_type_index_at(cpi_old);
+      int mti_new = _new_cp->method_type_index_at(cpi_new);
+      if ((_old_cp->symbol_at(mti_old) != _new_cp->symbol_at(mti_new)))
+        return false;
+    } else if (tag_old.is_method_handle() && tag_new.is_method_handle()) {
+      if (_old_cp->method_handle_ref_kind_at(cpi_old) !=
+          _new_cp->method_handle_ref_kind_at(cpi_new))
+        return false;
+      int mhi_old = _old_cp->method_handle_index_at(cpi_old);
+      int mhi_new = _new_cp->method_handle_index_at(cpi_new);
+      if ((_old_cp->uncached_klass_ref_at_noresolve(mhi_old) != _new_cp->uncached_klass_ref_at_noresolve(mhi_new)) ||
+          (_old_cp->uncached_name_ref_at(mhi_old) != _new_cp->uncached_name_ref_at(mhi_new)) ||
+          (_old_cp->uncached_signature_ref_at(mhi_old) != _new_cp->uncached_signature_ref_at(mhi_new)))
+        return false;
+    } else {
+      return false;  // unknown tag
     }
     break;
   }
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1376,11 +1376,6 @@
   }
   no_shared_spaces();
 
-  // Set the maximum pause time goal to be a reasonable default.
-  if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
-    FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
-  }
-
   if (FLAG_IS_DEFAULT(MarkStackSize)) {
     FLAG_SET_DEFAULT(MarkStackSize, 128 * TASKQUEUE_SIZE);
   }
@@ -1513,6 +1508,9 @@
   if (AggressiveOpts && FLAG_IS_DEFAULT(BiasedLockingStartupDelay)) {
     FLAG_SET_DEFAULT(BiasedLockingStartupDelay, 500);
   }
+  if (AggressiveOpts && FLAG_IS_DEFAULT(OptimizeStringConcat)) {
+    FLAG_SET_DEFAULT(OptimizeStringConcat, true);
+  }
 #endif
 
   if (AggressiveOpts) {
@@ -1697,20 +1695,21 @@
 
   status = status && verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
 
-  // Check user specified sharing option conflict with Parallel GC
-  bool cannot_share = ((UseConcMarkSweepGC || CMSIncrementalMode) || UseG1GC || UseParNewGC ||
-                       UseParallelGC || UseParallelOldGC ||
-                       SOLARIS_ONLY(UseISM) NOT_SOLARIS(UseLargePages));
-
+  // Check whether user-specified sharing option conflicts with GC or page size.
+  // Both sharing and large pages are enabled by default on some platforms;
+  // large pages override sharing only if explicitly set on the command line.
+  const bool cannot_share = UseConcMarkSweepGC || CMSIncrementalMode ||
+          UseG1GC || UseParNewGC || UseParallelGC || UseParallelOldGC ||
+          UseLargePages && FLAG_IS_CMDLINE(UseLargePages);
   if (cannot_share) {
     // Either force sharing on by forcing the other options off, or
     // force sharing off.
     if (DumpSharedSpaces || ForceSharedSpaces) {
       jio_fprintf(defaultStream::error_stream(),
-                  "Reverting to Serial GC because of %s\n",
-                  ForceSharedSpaces ? " -Xshare:on" : "-Xshare:dump");
+                  "Using Serial GC and default page size because of %s\n",
+                  ForceSharedSpaces ? "-Xshare:on" : "-Xshare:dump");
       force_serial_gc();
-      FLAG_SET_DEFAULT(SOLARIS_ONLY(UseISM) NOT_SOLARIS(UseLargePages), false);
+      FLAG_SET_DEFAULT(UseLargePages, false);
     } else {
       if (UseSharedSpaces && Verbose) {
         jio_fprintf(defaultStream::error_stream(),
@@ -1719,6 +1718,8 @@
       }
       no_shared_spaces();
     }
+  } else if (UseLargePages && (UseSharedSpaces || DumpSharedSpaces)) {
+    FLAG_SET_DEFAULT(UseLargePages, false);
   }
 
   status = status && check_gc_consistency();
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1975,7 +1975,7 @@
           "Adaptive size policy maximum GC pause time goal in msec, "       \
           "or (G1 Only) the max. GC time per MMU time slice")               \
                                                                             \
-  product(intx, GCPauseIntervalMillis, 500,                                 \
+  product(uintx, GCPauseIntervalMillis, 0,                                  \
           "Time slice for MMU specification")                               \
                                                                             \
   product(uintx, MaxGCMinorPauseMillis, max_uintx,                          \
@@ -2541,9 +2541,6 @@
           "Enable String cache capabilities on String.java")                \
                                                                             \
   /* statistics */                                                          \
-  develop(bool, UseVTune, false,                                            \
-          "enable support for Intel's VTune profiler")                      \
-                                                                            \
   develop(bool, CountCompiledCalls, false,                                  \
           "counts method invocations")                                      \
                                                                             \
--- a/hotspot/src/share/vm/runtime/init.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/init.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -34,7 +34,6 @@
 
 // Initialization done by Java thread in init_globals()
 void management_init();
-void vtune_init();
 void bytecodes_init();
 void classLoader_init();
 void codeCache_init();
@@ -82,7 +81,6 @@
 jint init_globals() {
   HandleMark hm;
   management_init();
-  vtune_init();
   bytecodes_init();
   classLoader_init();
   codeCache_init();
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/java.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -432,8 +432,6 @@
   print_statistics();
   Universe::heap()->print_tracing_info();
 
-  VTune::exit();
-
   { MutexLocker ml(BeforeExit_lock);
     _before_exit_status = BEFORE_EXIT_DONE;
     BeforeExit_lock->notify_all();
--- a/hotspot/src/share/vm/runtime/jniHandles.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/jniHandles.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -66,6 +66,7 @@
 
 
 jobject JNIHandles::make_global(Handle obj) {
+  assert(!Universe::heap()->is_gc_active(), "can't extend the root set during GC");
   jobject res = NULL;
   if (!obj.is_null()) {
     // ignore null handles
@@ -81,6 +82,7 @@
 
 
 jobject JNIHandles::make_weak_global(Handle obj) {
+  assert(!Universe::heap()->is_gc_active(), "can't extend the root set during GC");
   jobject res = NULL;
   if (!obj.is_null()) {
     // ignore null handles
--- a/hotspot/src/share/vm/runtime/os.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/os.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -886,6 +886,11 @@
         "%/lib/jsse.jar:"
         "%/lib/jce.jar:"
         "%/lib/charsets.jar:"
+
+        // ## TEMPORARY hack to keep the legacy launcher working when
+        // ## only the boot module is installed (cf. j.l.ClassLoader)
+        "%/lib/modules/jdk.boot.jar:"
+
         "%/classes";
     char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep);
     if (sysclasspath == NULL) return false;
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -779,7 +779,7 @@
 
   // Find bytecode
   Bytecode_invoke* bytecode = Bytecode_invoke_at(caller, bci);
-  bc = bytecode->adjusted_invoke_code();
+  bc = bytecode->java_code();
   int bytecode_index = bytecode->index();
 
   // Find receiver for non-static call
@@ -2251,7 +2251,6 @@
                  B->name(),
                  fingerprint->as_string(),
                  B->instructions_begin());
-    VTune::register_stub(blob_id, B->instructions_begin(), B->instructions_end());
     Forte::register_stub(blob_id, B->instructions_begin(), B->instructions_end());
 
     if (JvmtiExport::should_post_dynamic_code_generated()) {
--- a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,7 +132,6 @@
   _cdesc->set_end(_cgen->assembler()->pc());
   assert(StubCodeDesc::_list == _cdesc, "expected order on list");
   _cgen->stub_epilog(_cdesc);
-  VTune::register_stub(_cdesc->name(), _cdesc->begin(), _cdesc->end());
   Forte::register_stub(_cdesc->name(), _cdesc->begin(), _cdesc->end());
 
   if (JvmtiExport::should_post_dynamic_code_generated()) {
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -135,28 +135,32 @@
 static void test_arraycopy_func(address func, int alignment) {
   int v = 0xcc;
   int v2 = 0x11;
-  jlong lbuffer[2];
-  jlong lbuffer2[2];
-  address buffer  = (address) lbuffer;
-  address buffer2 = (address) lbuffer2;
+  jlong lbuffer[8];
+  jlong lbuffer2[8];
+  address fbuffer  = (address) lbuffer;
+  address fbuffer2 = (address) lbuffer2;
   unsigned int i;
   for (i = 0; i < sizeof(lbuffer); i++) {
-    buffer[i] = v; buffer2[i] = v2;
+    fbuffer[i] = v; fbuffer2[i] = v2;
   }
+  // C++ does not guarantee jlong[] array alignment to 8 bytes.
+  // Use middle of array to check that memory before it is not modified.
+  address buffer  = (address) round_to((intptr_t)&lbuffer[4], BytesPerLong);
+  address buffer2 = (address) round_to((intptr_t)&lbuffer2[4], BytesPerLong);
   // do an aligned copy
   ((arraycopy_fn)func)(buffer, buffer2, 0);
   for (i = 0; i < sizeof(lbuffer); i++) {
-    assert(buffer[i] == v && buffer2[i] == v2, "shouldn't have copied anything");
+    assert(fbuffer[i] == v && fbuffer2[i] == v2, "shouldn't have copied anything");
   }
   // adjust destination alignment
   ((arraycopy_fn)func)(buffer, buffer2 + alignment, 0);
   for (i = 0; i < sizeof(lbuffer); i++) {
-    assert(buffer[i] == v && buffer2[i] == v2, "shouldn't have copied anything");
+    assert(fbuffer[i] == v && fbuffer2[i] == v2, "shouldn't have copied anything");
   }
   // adjust source alignment
   ((arraycopy_fn)func)(buffer + alignment, buffer2, 0);
   for (i = 0; i < sizeof(lbuffer); i++) {
-    assert(buffer[i] == v && buffer2[i] == v2, "shouldn't have copied anything");
+    assert(fbuffer[i] == v && fbuffer2[i] == v2, "shouldn't have copied anything");
   }
 }
 #endif
@@ -183,7 +187,7 @@
   test_arraycopy_func(arrayof_##type##_arraycopy(),          sizeof(HeapWord)); \
   test_arraycopy_func(arrayof_##type##_disjoint_arraycopy(), sizeof(HeapWord))
 
-  // Make sure all the arraycopy stubs properly handle zeros
+  // Make sure all the arraycopy stubs properly handle zero count
   TEST_ARRAYCOPY(jbyte);
   TEST_ARRAYCOPY(jshort);
   TEST_ARRAYCOPY(jint);
@@ -191,6 +195,25 @@
 
 #undef TEST_ARRAYCOPY
 
+#define TEST_COPYRTN(type) \
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::conjoint_##type##s_atomic),  sizeof(type)); \
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::arrayof_conjoint_##type##s), (int)MAX2(sizeof(HeapWord), sizeof(type)))
+
+  // Make sure all the copy runtime routines properly handle zero count
+  TEST_COPYRTN(jbyte);
+  TEST_COPYRTN(jshort);
+  TEST_COPYRTN(jint);
+  TEST_COPYRTN(jlong);
+
+#undef TEST_COPYRTN
+
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::conjoint_words), sizeof(HeapWord));
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::disjoint_words), sizeof(HeapWord));
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::disjoint_words_atomic), sizeof(HeapWord));
+  // Aligned to BytesPerLong
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::aligned_conjoint_words), sizeof(jlong));
+  test_arraycopy_func(CAST_FROM_FN_PTR(address, Copy::aligned_disjoint_words), sizeof(jlong));
+
 #endif
 }
 
@@ -221,15 +244,13 @@
 #ifndef PRODUCT
   SharedRuntime::_jbyte_array_copy_ctr++;      // Slow-path byte array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
-  Copy::conjoint_bytes_atomic(src, dest, count);
+  Copy::conjoint_jbytes_atomic(src, dest, count);
 JRT_END
 
 JRT_LEAF(void, StubRoutines::jshort_copy(jshort* src, jshort* dest, size_t count))
 #ifndef PRODUCT
   SharedRuntime::_jshort_array_copy_ctr++;     // Slow-path short/char array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
   Copy::conjoint_jshorts_atomic(src, dest, count);
 JRT_END
 
@@ -237,7 +258,6 @@
 #ifndef PRODUCT
   SharedRuntime::_jint_array_copy_ctr++;       // Slow-path int/float array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
   Copy::conjoint_jints_atomic(src, dest, count);
 JRT_END
 
@@ -245,7 +265,6 @@
 #ifndef PRODUCT
   SharedRuntime::_jlong_array_copy_ctr++;      // Slow-path long/double array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
   Copy::conjoint_jlongs_atomic(src, dest, count);
 JRT_END
 
@@ -263,15 +282,13 @@
 #ifndef PRODUCT
   SharedRuntime::_jbyte_array_copy_ctr++;      // Slow-path byte array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
-  Copy::arrayof_conjoint_bytes(src, dest, count);
+  Copy::arrayof_conjoint_jbytes(src, dest, count);
 JRT_END
 
 JRT_LEAF(void, StubRoutines::arrayof_jshort_copy(HeapWord* src, HeapWord* dest, size_t count))
 #ifndef PRODUCT
   SharedRuntime::_jshort_array_copy_ctr++;     // Slow-path short/char array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
   Copy::arrayof_conjoint_jshorts(src, dest, count);
 JRT_END
 
@@ -279,7 +296,6 @@
 #ifndef PRODUCT
   SharedRuntime::_jint_array_copy_ctr++;       // Slow-path int/float array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
   Copy::arrayof_conjoint_jints(src, dest, count);
 JRT_END
 
@@ -287,7 +303,6 @@
 #ifndef PRODUCT
   SharedRuntime::_jlong_array_copy_ctr++;       // Slow-path int/float array copy
 #endif // !PRODUCT
-  assert(count != 0, "count should be non-zero");
   Copy::arrayof_conjoint_jlongs(src, dest, count);
 JRT_END
 
--- a/hotspot/src/share/vm/runtime/sweeper.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,16 @@
 # include "incls/_sweeper.cpp.incl"
 
 long      NMethodSweeper::_traversals = 0;   // No. of stack traversals performed
-CodeBlob* NMethodSweeper::_current = NULL;   // Current nmethod
-int       NMethodSweeper::_seen = 0 ;        // No. of blobs we have currently processed in current pass of CodeCache
-int       NMethodSweeper::_invocations = 0;  // No. of invocations left until we are completed with this pass
+nmethod*  NMethodSweeper::_current = NULL;   // Current nmethod
+int       NMethodSweeper::_seen = 0 ;        // No. of nmethods we have currently processed in current pass of CodeCache
+
+volatile int NMethodSweeper::_invocations = 0;   // No. of invocations left until we are completed with this pass
+volatile int NMethodSweeper::_sweep_started = 0; // Whether a sweep is in progress.
 
 jint      NMethodSweeper::_locked_seen = 0;
 jint      NMethodSweeper::_not_entrant_seen_on_stack = 0;
 bool      NMethodSweeper::_rescan = false;
 bool      NMethodSweeper::_do_sweep = false;
-jint      NMethodSweeper::_sweep_started = 0;
 bool      NMethodSweeper::_was_full = false;
 jint      NMethodSweeper::_advise_to_sweep = 0;
 jlong     NMethodSweeper::_last_was_full = 0;
@@ -108,23 +109,14 @@
         // code cache is filling up
         _last_was_full = os::javaTimeMillis();
 
-        if (PrintMethodFlushing) {
-          tty->print_cr("### sweeper: Live blobs:" UINT32_FORMAT "/Free code cache:" SIZE_FORMAT " bytes, restarting compiler",
-            CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-        }
-        if (LogCompilation && (xtty != NULL)) {
-          ttyLocker ttyl;
-          xtty->begin_elem("restart_compiler live_blobs='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
-                           CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-          xtty->stamp();
-          xtty->end_elem();
-        }
+        log_sweep("restart_compiler");
       }
     }
   }
 }
 
 void NMethodSweeper::possibly_sweep() {
+  assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
   if ((!MethodFlushing) || (!_do_sweep)) return;
 
   if (_invocations > 0) {
@@ -133,32 +125,31 @@
     if (old != 0) {
       return;
     }
-    sweep_code_cache();
+    if (_invocations > 0) {
+      sweep_code_cache();
+      _invocations--;
+    }
+    _sweep_started = 0;
   }
-  _sweep_started = 0;
 }
 
 void NMethodSweeper::sweep_code_cache() {
 #ifdef ASSERT
   jlong sweep_start;
-  if(PrintMethodFlushing) {
+  if (PrintMethodFlushing) {
     sweep_start = os::javaTimeMillis();
   }
 #endif
   if (PrintMethodFlushing && Verbose) {
-    tty->print_cr("### Sweep at %d out of %d. Invocations left: %d", _seen, CodeCache::nof_blobs(), _invocations);
+    tty->print_cr("### Sweep at %d out of %d. Invocations left: %d", _seen, CodeCache::nof_nmethods(), _invocations);
   }
 
-  // We want to visit all nmethods after NmethodSweepFraction invocations.
-  // If invocation is 1 we do the rest
-  int todo = CodeCache::nof_blobs();
-  if (_invocations > 1) {
-    todo = (CodeCache::nof_blobs() - _seen) / _invocations;
-  }
-
-  // Compilers may check to sweep more often than stack scans happen,
-  // don't keep trying once it is all scanned
-  _invocations--;
+  // We want to visit all nmethods after NmethodSweepFraction
+  // invocations so divide the remaining number of nmethods by the
+  // remaining number of invocations.  This is only an estimate since
+  // the number of nmethods changes during the sweep so the final
+  // stage must iterate until it there are no more nmethods.
+  int todo = (CodeCache::nof_nmethods() - _seen) / _invocations;
 
   assert(!SafepointSynchronize::is_at_safepoint(), "should not be in safepoint when we get here");
   assert(!CodeCache_lock->owned_by_self(), "just checking");
@@ -166,26 +157,25 @@
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 
-    for(int i = 0; i < todo && _current != NULL; i++) {
+    // The last invocation iterates until there are no more nmethods
+    for (int i = 0; (i < todo || _invocations == 1) && _current != NULL; i++) {
 
-      // Since we will give up the CodeCache_lock, always skip ahead to an nmethod.
-      // Other blobs can be deleted by other threads
-      // Read next before we potentially delete current
-      CodeBlob* next = CodeCache::next_nmethod(_current);
+      // Since we will give up the CodeCache_lock, always skip ahead
+      // to the next nmethod.  Other blobs can be deleted by other
+      // threads but nmethods are only reclaimed by the sweeper.
+      nmethod* next = CodeCache::next_nmethod(_current);
 
       // Now ready to process nmethod and give up CodeCache_lock
       {
         MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
-        process_nmethod((nmethod *)_current);
+        process_nmethod(_current);
       }
       _seen++;
       _current = next;
     }
+  }
 
-    // Skip forward to the next nmethod (if any). Code blobs other than nmethods
-    // can be freed async to us and make _current invalid while we sleep.
-    _current = CodeCache::next_nmethod(_current);
-  }
+  assert(_invocations > 1 || _current == NULL, "must have scanned the whole cache");
 
   if (_current == NULL && !_rescan && (_locked_seen || _not_entrant_seen_on_stack)) {
     // we've completed a scan without making progress but there were
@@ -205,6 +195,10 @@
     tty->print_cr("### sweeper:      sweep time(%d): " INT64_FORMAT, _invocations, sweep_end - sweep_start);
   }
 #endif
+
+  if (_invocations == 1) {
+    log_sweep("finished");
+  }
 }
 
 
@@ -227,7 +221,7 @@
   if (nm->is_zombie()) {
     // If it is first time, we see nmethod then we mark it. Otherwise,
     // we reclame it. When we have seen a zombie method twice, we know that
-    // there are no inline caches that referes to it.
+    // there are no inline caches that refer to it.
     if (nm->is_marked_for_reclamation()) {
       assert(!nm->is_locked_by_vm(), "must not flush locked nmethods");
       if (PrintMethodFlushing && Verbose) {
@@ -324,16 +318,8 @@
     jlong curr_interval = now - _last_was_full;
     if (curr_interval < max_interval) {
       _rescan = true;
-      if (PrintMethodFlushing) {
-        tty->print_cr("### handle full too often, turning off compiler");
-      }
-      if (LogCompilation && (xtty != NULL)) {
-        ttyLocker ttyl;
-        xtty->begin_elem("disable_compiler flushing_interval='" UINT64_FORMAT "' live_blobs='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
-                         curr_interval/1000, CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-        xtty->stamp();
-        xtty->end_elem();
-      }
+      log_sweep("disable_compiler", "flushing_interval='" UINT64_FORMAT "'",
+                           curr_interval/1000);
       return;
     }
   }
@@ -353,17 +339,7 @@
 
   if ((!was_full()) && (is_full)) {
     if (!CodeCache::needs_flushing()) {
-      if (PrintMethodFlushing) {
-        tty->print_cr("### sweeper: Live blobs:" UINT32_FORMAT "/Free code cache:" SIZE_FORMAT " bytes, restarting compiler",
-          CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-      }
-      if (LogCompilation && (xtty != NULL)) {
-        ttyLocker ttyl;
-        xtty->begin_elem("restart_compiler live_blobs='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
-                         CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-        xtty->stamp();
-        xtty->end_elem();
-      }
+      log_sweep("restart_compiler");
       CompileBroker::set_should_compile_new_jobs(CompileBroker::run_compilation);
       return;
     }
@@ -372,17 +348,7 @@
   // Traverse the code cache trying to dump the oldest nmethods
   uint curr_max_comp_id = CompileBroker::get_compilation_id();
   uint flush_target = ((curr_max_comp_id - _highest_marked) >> 1) + _highest_marked;
-  if (PrintMethodFlushing && Verbose) {
-    tty->print_cr("### Cleaning code cache: Live blobs:" UINT32_FORMAT "/Free code cache:" SIZE_FORMAT " bytes",
-        CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-  }
-  if (LogCompilation && (xtty != NULL)) {
-    ttyLocker ttyl;
-    xtty->begin_elem("start_cleaning_code_cache live_blobs='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
-                      CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-    xtty->stamp();
-    xtty->end_elem();
-  }
+  log_sweep("start_cleaning");
 
   nmethod* nm = CodeCache::alive_nmethod(CodeCache::first());
   jint disconnected = 0;
@@ -415,13 +381,9 @@
     nm = CodeCache::alive_nmethod(CodeCache::next(nm));
   }
 
-  if (LogCompilation && (xtty != NULL)) {
-    ttyLocker ttyl;
-    xtty->begin_elem("stop_cleaning_code_cache disconnected='" UINT32_FORMAT "' made_not_entrant='" UINT32_FORMAT "' live_blobs='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
-                      disconnected, made_not_entrant, CodeCache::nof_blobs(), CodeCache::unallocated_capacity());
-    xtty->stamp();
-    xtty->end_elem();
-  }
+  log_sweep("stop_cleaning",
+                       "disconnected='" UINT32_FORMAT "' made_not_entrant='" UINT32_FORMAT "'",
+                       disconnected, made_not_entrant);
 
   // Shut off compiler. Sweeper will start over with a new stack scan and
   // traversal cycle and turn it back on if it clears enough space.
@@ -439,3 +401,38 @@
   }
 #endif
 }
+
+
+// Print out some state information about the current sweep and the
+// state of the code cache if it's requested.
+void NMethodSweeper::log_sweep(const char* msg, const char* format, ...) {
+  if (PrintMethodFlushing) {
+    ttyLocker ttyl;
+    tty->print("### sweeper: %s ", msg);
+    if (format != NULL) {
+      va_list ap;
+      va_start(ap, format);
+      tty->vprint(format, ap);
+      va_end(ap);
+    }
+    tty->print_cr(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
+                  " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
+                  CodeCache::nof_blobs(), CodeCache::nof_nmethods(), CodeCache::nof_adapters(), CodeCache::unallocated_capacity());
+  }
+
+  if (LogCompilation && (xtty != NULL)) {
+    ttyLocker ttyl;
+    xtty->begin_elem("sweeper state='%s' traversals='" INTX_FORMAT "' ", msg, (intx)traversal_count());
+    if (format != NULL) {
+      va_list ap;
+      va_start(ap, format);
+      xtty->vprint(format, ap);
+      va_end(ap);
+    }
+    xtty->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
+                " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
+                CodeCache::nof_blobs(), CodeCache::nof_nmethods(), CodeCache::nof_adapters(), CodeCache::unallocated_capacity());
+    xtty->stamp();
+    xtty->end_elem();
+  }
+}
--- a/hotspot/src/share/vm/runtime/sweeper.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/sweeper.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,14 +29,15 @@
 
 class NMethodSweeper : public AllStatic {
   static long      _traversals;   // Stack traversal count
-  static CodeBlob* _current;      // Current nmethod
+  static nmethod*  _current;      // Current nmethod
   static int       _seen;         // Nof. nmethod we have currently processed in current pass of CodeCache
-  static int       _invocations;  // No. of invocations left until we are completed with this pass
+
+  static volatile int      _invocations;   // No. of invocations left until we are completed with this pass
+  static volatile int      _sweep_started; // Flag to control conc sweeper
 
   static bool      _rescan;          // Indicates that we should do a full rescan of the
                                      // of the code cache looking for work to do.
   static bool      _do_sweep;        // Flag to skip the conc sweep if no stack scan happened
-  static jint      _sweep_started;   // Flag to control conc sweeper
   static int       _locked_seen;     // Number of locked nmethods encountered during the scan
   static int       _not_entrant_seen_on_stack; // Number of not entrant nmethod were are still on stack
 
@@ -47,6 +48,9 @@
   static long      _was_full_traversal;   // trav number at last emergency unloading
 
   static void process_nmethod(nmethod *nm);
+
+  static void log_sweep(const char* msg, const char* format = NULL, ...);
+
  public:
   static long traversal_count() { return _traversals; }
 
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -747,6 +747,8 @@
 
 ObjectMonitor * ObjectSynchronizer::gBlockList = NULL ;
 ObjectMonitor * volatile ObjectSynchronizer::gFreeList  = NULL ;
+ObjectMonitor * volatile ObjectSynchronizer::gOmInUseList  = NULL ;
+int ObjectSynchronizer::gOmInUseCount = 0;
 static volatile intptr_t ListLock = 0 ;      // protects global monitor free-list cache
 static volatile int MonitorFreeCount  = 0 ;      // # on gFreeList
 static volatile int MonitorPopulation = 0 ;      // # Extant -- in circulation
@@ -826,6 +828,22 @@
     }
   }
 }
+/* Too slow for general assert or debug
+void ObjectSynchronizer::verifyInUse (Thread *Self) {
+   ObjectMonitor* mid;
+   int inusetally = 0;
+   for (mid = Self->omInUseList; mid != NULL; mid = mid->FreeNext) {
+     inusetally ++;
+   }
+   assert(inusetally == Self->omInUseCount, "inuse count off");
+
+   int freetally = 0;
+   for (mid = Self->omFreeList; mid != NULL; mid = mid->FreeNext) {
+     freetally ++;
+   }
+   assert(freetally == Self->omFreeCount, "free count off");
+}
+*/
 
 ObjectMonitor * ATTR ObjectSynchronizer::omAlloc (Thread * Self) {
     // A large MAXPRIVATE value reduces both list lock contention
@@ -853,6 +871,9 @@
              m->FreeNext = Self->omInUseList;
              Self->omInUseList = m;
              Self->omInUseCount ++;
+             // verifyInUse(Self);
+           } else {
+             m->FreeNext = NULL;
            }
            return m ;
         }
@@ -874,13 +895,12 @@
                 guarantee (take->object() == NULL, "invariant") ;
                 guarantee (!take->is_busy(), "invariant") ;
                 take->Recycle() ;
-                omRelease (Self, take) ;
+                omRelease (Self, take, false) ;
             }
             Thread::muxRelease (&ListLock) ;
             Self->omFreeProvision += 1 + (Self->omFreeProvision/2) ;
             if (Self->omFreeProvision > MAXPRIVATE ) Self->omFreeProvision = MAXPRIVATE ;
             TEVENT (omFirst - reprovision) ;
-            continue ;
 
             const int mx = MonitorBound ;
             if (mx > 0 && (MonitorPopulation-MonitorFreeCount) > mx) {
@@ -961,11 +981,34 @@
 // That is, *not* one-at-a-time.
 
 
-void ObjectSynchronizer::omRelease (Thread * Self, ObjectMonitor * m) {
+void ObjectSynchronizer::omRelease (Thread * Self, ObjectMonitor * m, bool fromPerThreadAlloc) {
     guarantee (m->object() == NULL, "invariant") ;
-    m->FreeNext = Self->omFreeList ;
-    Self->omFreeList = m ;
-    Self->omFreeCount ++ ;
+
+    // Remove from omInUseList
+    if (MonitorInUseLists && fromPerThreadAlloc) {
+      ObjectMonitor* curmidinuse = NULL;
+      for (ObjectMonitor* mid = Self->omInUseList; mid != NULL; ) {
+       if (m == mid) {
+         // extract from per-thread in-use-list
+         if (mid == Self->omInUseList) {
+           Self->omInUseList = mid->FreeNext;
+         } else if (curmidinuse != NULL) {
+           curmidinuse->FreeNext = mid->FreeNext; // maintain the current thread inuselist
+         }
+         Self->omInUseCount --;
+         // verifyInUse(Self);
+         break;
+       } else {
+         curmidinuse = mid;
+         mid = mid->FreeNext;
+      }
+    }
+  }
+
+  // FreeNext is used for both onInUseList and omFreeList, so clear old before setting new
+  m->FreeNext = Self->omFreeList ;
+  Self->omFreeList = m ;
+  Self->omFreeCount ++ ;
 }
 
 // Return the monitors of a moribund thread's local free list to
@@ -975,6 +1018,10 @@
 // consecutive STW safepoints.  Relatedly, we might decay
 // omFreeProvision at STW safepoints.
 //
+// Also return the monitors of a moribund thread"s omInUseList to
+// a global gOmInUseList under the global list lock so these
+// will continue to be scanned.
+//
 // We currently call omFlush() from the Thread:: dtor _after the thread
 // has been excised from the thread list and is no longer a mutator.
 // That means that omFlush() can run concurrently with a safepoint and
@@ -987,24 +1034,50 @@
 void ObjectSynchronizer::omFlush (Thread * Self) {
     ObjectMonitor * List = Self->omFreeList ;  // Null-terminated SLL
     Self->omFreeList = NULL ;
-    if (List == NULL) return ;
     ObjectMonitor * Tail = NULL ;
-    ObjectMonitor * s ;
     int Tally = 0;
-    for (s = List ; s != NULL ; s = s->FreeNext) {
-        Tally ++ ;
-        Tail = s ;
-        guarantee (s->object() == NULL, "invariant") ;
-        guarantee (!s->is_busy(), "invariant") ;
-        s->set_owner (NULL) ;   // redundant but good hygiene
-        TEVENT (omFlush - Move one) ;
+    if (List != NULL) {
+      ObjectMonitor * s ;
+      for (s = List ; s != NULL ; s = s->FreeNext) {
+          Tally ++ ;
+          Tail = s ;
+          guarantee (s->object() == NULL, "invariant") ;
+          guarantee (!s->is_busy(), "invariant") ;
+          s->set_owner (NULL) ;   // redundant but good hygiene
+          TEVENT (omFlush - Move one) ;
+      }
+      guarantee (Tail != NULL && List != NULL, "invariant") ;
     }
 
-    guarantee (Tail != NULL && List != NULL, "invariant") ;
+    ObjectMonitor * InUseList = Self->omInUseList;
+    ObjectMonitor * InUseTail = NULL ;
+    int InUseTally = 0;
+    if (InUseList != NULL) {
+      Self->omInUseList = NULL;
+      ObjectMonitor *curom;
+      for (curom = InUseList; curom != NULL; curom = curom->FreeNext) {
+        InUseTail = curom;
+        InUseTally++;
+      }
+// TODO debug
+      assert(Self->omInUseCount == InUseTally, "inuse count off");
+      Self->omInUseCount = 0;
+      guarantee (InUseTail != NULL && InUseList != NULL, "invariant");
+    }
+
     Thread::muxAcquire (&ListLock, "omFlush") ;
-    Tail->FreeNext = gFreeList ;
-    gFreeList = List ;
-    MonitorFreeCount += Tally;
+    if (Tail != NULL) {
+      Tail->FreeNext = gFreeList ;
+      gFreeList = List ;
+      MonitorFreeCount += Tally;
+    }
+
+    if (InUseTail != NULL) {
+      InUseTail->FreeNext = gOmInUseList;
+      gOmInUseList = InUseList;
+      gOmInUseCount += InUseTally;
+    }
+
     Thread::muxRelease (&ListLock) ;
     TEVENT (omFlush) ;
 }
@@ -1166,7 +1239,6 @@
           // We do this before the CAS in order to minimize the length of time
           // in which INFLATING appears in the mark.
           m->Recycle();
-          m->FreeNext      = NULL ;
           m->_Responsible  = NULL ;
           m->OwnerIsThread = 0 ;
           m->_recursions   = 0 ;
@@ -1174,7 +1246,7 @@
 
           markOop cmp = (markOop) Atomic::cmpxchg_ptr (markOopDesc::INFLATING(), object->mark_addr(), mark) ;
           if (cmp != mark) {
-             omRelease (Self, m) ;
+             omRelease (Self, m, true) ;
              continue ;       // Interference -- just retry
           }
 
@@ -1262,7 +1334,6 @@
       m->set_object(object);
       m->OwnerIsThread = 1 ;
       m->_recursions   = 0 ;
-      m->FreeNext      = NULL ;
       m->_Responsible  = NULL ;
       m->_SpinDuration = Knob_SpinLimit ;       // consider: keep metastats by type/class
 
@@ -1271,7 +1342,7 @@
           m->set_owner  (NULL) ;
           m->OwnerIsThread = 0 ;
           m->Recycle() ;
-          omRelease (Self, m) ;
+          omRelease (Self, m, true) ;
           m = NULL ;
           continue ;
           // interference - the markword changed - just retry.
@@ -1852,6 +1923,10 @@
 // only scans the per-thread inuse lists. omAlloc() puts all
 // assigned monitors on the per-thread list. deflate_idle_monitors()
 // returns the non-busy monitors to the global free list.
+// When a thread dies, omFlush() adds the list of active monitors for
+// that thread to a global gOmInUseList acquiring the
+// global list lock. deflate_idle_monitors() acquires the global
+// list lock to scan for non-busy monitors to the global free list.
 // An alternative could have used a single global inuse list. The
 // downside would have been the additional cost of acquiring the global list lock
 // for every omAlloc().
@@ -1904,6 +1979,7 @@
      if (*FreeHeadp == NULL) *FreeHeadp = mid;
      if (*FreeTailp != NULL) {
        ObjectMonitor * prevtail = *FreeTailp;
+       assert(prevtail->FreeNext == NULL, "cleaned up deflated?"); // TODO KK
        prevtail->FreeNext = mid;
       }
      *FreeTailp = mid;
@@ -1912,6 +1988,39 @@
   return deflated;
 }
 
+// Caller acquires ListLock
+int ObjectSynchronizer::walk_monitor_list(ObjectMonitor** listheadp,
+                                          ObjectMonitor** FreeHeadp, ObjectMonitor** FreeTailp) {
+  ObjectMonitor* mid;
+  ObjectMonitor* next;
+  ObjectMonitor* curmidinuse = NULL;
+  int deflatedcount = 0;
+
+  for (mid = *listheadp; mid != NULL; ) {
+     oop obj = (oop) mid->object();
+     bool deflated = false;
+     if (obj != NULL) {
+       deflated = deflate_monitor(mid, obj, FreeHeadp, FreeTailp);
+     }
+     if (deflated) {
+       // extract from per-thread in-use-list
+       if (mid == *listheadp) {
+         *listheadp = mid->FreeNext;
+       } else if (curmidinuse != NULL) {
+         curmidinuse->FreeNext = mid->FreeNext; // maintain the current thread inuselist
+       }
+       next = mid->FreeNext;
+       mid->FreeNext = NULL;  // This mid is current tail in the FreeHead list
+       mid = next;
+       deflatedcount++;
+     } else {
+       curmidinuse = mid;
+       mid = mid->FreeNext;
+    }
+  }
+  return deflatedcount;
+}
+
 void ObjectSynchronizer::deflate_idle_monitors() {
   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
   int nInuse = 0 ;              // currently associated with objects
@@ -1929,36 +2038,25 @@
   Thread::muxAcquire (&ListLock, "scavenge - return") ;
 
   if (MonitorInUseLists) {
-    ObjectMonitor* mid;
-    ObjectMonitor* next;
-    ObjectMonitor* curmidinuse;
+    int inUse = 0;
     for (JavaThread* cur = Threads::first(); cur != NULL; cur = cur->next()) {
-      curmidinuse = NULL;
-      for (mid = cur->omInUseList; mid != NULL; ) {
-        oop obj = (oop) mid->object();
-        deflated = false;
-        if (obj != NULL) {
-          deflated = deflate_monitor(mid, obj, &FreeHead, &FreeTail);
-        }
-        if (deflated) {
-          // extract from per-thread in-use-list
-          if (mid == cur->omInUseList) {
-            cur->omInUseList = mid->FreeNext;
-          } else if (curmidinuse != NULL) {
-            curmidinuse->FreeNext = mid->FreeNext; // maintain the current thread inuselist
-          }
-          next = mid->FreeNext;
-          mid->FreeNext = NULL;  // This mid is current tail in the FreeHead list
-          mid = next;
-          cur->omInUseCount--;
-          nScavenged ++ ;
-        } else {
-          curmidinuse = mid;
-          mid = mid->FreeNext;
-          nInuse ++;
-        }
+      nInCirculation+= cur->omInUseCount;
+      int deflatedcount = walk_monitor_list(cur->omInUseList_addr(), &FreeHead, &FreeTail);
+      cur->omInUseCount-= deflatedcount;
+      // verifyInUse(cur);
+      nScavenged += deflatedcount;
+      nInuse += cur->omInUseCount;
      }
-   }
+
+   // For moribund threads, scan gOmInUseList
+   if (gOmInUseList) {
+     nInCirculation += gOmInUseCount;
+     int deflatedcount = walk_monitor_list((ObjectMonitor **)&gOmInUseList, &FreeHead, &FreeTail);
+     gOmInUseCount-= deflatedcount;
+     nScavenged += deflatedcount;
+     nInuse += gOmInUseCount;
+    }
+
   } else for (ObjectMonitor* block = gBlockList; block != NULL; block = next(block)) {
   // Iterate over all extant monitors - Scavenge all idle monitors.
     assert(block->object() == CHAINMARKER, "must be a block header");
--- a/hotspot/src/share/vm/runtime/synchronizer.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/synchronizer.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -122,8 +122,9 @@
   static void reenter            (Handle obj, intptr_t recursion, TRAPS);
 
   // thread-specific and global objectMonitor free list accessors
+//  static void verifyInUse (Thread * Self) ; too slow for general assert/debug
   static ObjectMonitor * omAlloc (Thread * Self) ;
-  static void omRelease (Thread * Self, ObjectMonitor * m) ;
+  static void omRelease (Thread * Self, ObjectMonitor * m, bool FromPerThreadAlloc) ;
   static void omFlush   (Thread * Self) ;
 
   // Inflate light weight monitor to heavy weight monitor
@@ -150,6 +151,9 @@
   // Basically we deflate all monitors that are not busy.
   // An adaptive profile-based deflation policy could be used if needed
   static void deflate_idle_monitors();
+  static int walk_monitor_list(ObjectMonitor** listheadp,
+                               ObjectMonitor** FreeHeadp,
+                               ObjectMonitor** FreeTailp);
   static bool deflate_monitor(ObjectMonitor* mid, oop obj, ObjectMonitor** FreeHeadp,
                               ObjectMonitor** FreeTailp);
   static void oops_do(OopClosure* f);
@@ -163,6 +167,8 @@
   enum { _BLOCKSIZE = 128 };
   static ObjectMonitor* gBlockList;
   static ObjectMonitor * volatile gFreeList;
+  static ObjectMonitor * volatile gOmInUseList; // for moribund thread, so monitors they inflated still get scanned
+  static int gOmInUseCount;
 
  public:
   static void Initialize () ;
--- a/hotspot/src/share/vm/runtime/thread.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -2700,7 +2700,7 @@
   if (in_bytes(size_in_bytes) != 0) {
     _popframe_preserved_args = NEW_C_HEAP_ARRAY(char, in_bytes(size_in_bytes));
     _popframe_preserved_args_size = in_bytes(size_in_bytes);
-    Copy::conjoint_bytes(start, _popframe_preserved_args, _popframe_preserved_args_size);
+    Copy::conjoint_jbytes(start, _popframe_preserved_args, _popframe_preserved_args_size);
   }
 }
 
--- a/hotspot/src/share/vm/runtime/thread.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -270,6 +270,7 @@
   static void interrupt(Thread* thr);
   static bool is_interrupted(Thread* thr, bool clear_interrupted);
 
+  ObjectMonitor** omInUseList_addr()             { return (ObjectMonitor **)&omInUseList; }
   Monitor* SR_lock() const                       { return _SR_lock; }
 
   bool has_async_exception() const { return (_suspend_flags & _has_async_exception) != 0; }
--- a/hotspot/src/share/vm/runtime/vframeArray.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/vframeArray.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -355,9 +355,9 @@
       } else {
         base = iframe()->interpreter_frame_expression_stack();
       }
-      Copy::conjoint_bytes(saved_args,
-                           base,
-                           popframe_preserved_args_size_in_bytes);
+      Copy::conjoint_jbytes(saved_args,
+                            base,
+                            popframe_preserved_args_size_in_bytes);
       thread->popframe_free_preserved_args();
     }
   }
--- a/hotspot/src/share/vm/runtime/virtualspace.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/virtualspace.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -111,6 +111,35 @@
   return result;
 }
 
+// Helper method.
+static bool failed_to_reserve_as_requested(char* base, char* requested_address,
+                                           const size_t size, bool special)
+{
+  if (base == requested_address || requested_address == NULL)
+    return false; // did not fail
+
+  if (base != NULL) {
+    // Different reserve address may be acceptable in other cases
+    // but for compressed oops heap should be at requested address.
+    assert(UseCompressedOops, "currently requested address used only for compressed oops");
+    if (PrintCompressedOopsMode) {
+      tty->cr();
+      tty->print_cr("Reserved memory at not requested address: " PTR_FORMAT " vs " PTR_FORMAT, base, requested_address);
+    }
+    // OS ignored requested address. Try different address.
+    if (special) {
+      if (!os::release_memory_special(base, size)) {
+        fatal("os::release_memory_special failed");
+      }
+    } else {
+      if (!os::release_memory(base, size)) {
+        fatal("os::release_memory failed");
+      }
+    }
+  }
+  return true;
+}
+
 ReservedSpace::ReservedSpace(const size_t prefix_size,
                              const size_t prefix_align,
                              const size_t suffix_size,
@@ -129,6 +158,10 @@
   assert((suffix_align & prefix_align - 1) == 0,
     "suffix_align not divisible by prefix_align");
 
+  // Assert that if noaccess_prefix is used, it is the same as prefix_align.
+  assert(noaccess_prefix == 0 ||
+         noaccess_prefix == prefix_align, "noaccess prefix wrong");
+
   // Add in noaccess_prefix to prefix_size;
   const size_t adjusted_prefix_size = prefix_size + noaccess_prefix;
   const size_t size = adjusted_prefix_size + suffix_size;
@@ -150,15 +183,16 @@
   _noaccess_prefix = 0;
   _executable = false;
 
-  // Assert that if noaccess_prefix is used, it is the same as prefix_align.
-  assert(noaccess_prefix == 0 ||
-         noaccess_prefix == prefix_align, "noaccess prefix wrong");
-
   // Optimistically try to reserve the exact size needed.
   char* addr;
   if (requested_address != 0) {
-    addr = os::attempt_reserve_memory_at(size,
-                                         requested_address-noaccess_prefix);
+    requested_address -= noaccess_prefix; // adjust address
+    assert(requested_address != NULL, "huge noaccess prefix?");
+    addr = os::attempt_reserve_memory_at(size, requested_address);
+    if (failed_to_reserve_as_requested(addr, requested_address, size, false)) {
+      // OS ignored requested address. Try different address.
+      addr = NULL;
+    }
   } else {
     addr = os::reserve_memory(size, NULL, prefix_align);
   }
@@ -222,11 +256,20 @@
   bool special = large && !os::can_commit_large_page_memory();
   char* base = NULL;
 
+  if (requested_address != 0) {
+    requested_address -= noaccess_prefix; // adjust requested address
+    assert(requested_address != NULL, "huge noaccess prefix?");
+  }
+
   if (special) {
 
     base = os::reserve_memory_special(size, requested_address, executable);
 
     if (base != NULL) {
+      if (failed_to_reserve_as_requested(base, requested_address, size, true)) {
+        // OS ignored requested address. Try different address.
+        return;
+      }
       // Check alignment constraints
       if (alignment > 0) {
         assert((uintptr_t) base % alignment == 0,
@@ -235,6 +278,13 @@
       _special = true;
     } else {
       // failed; try to reserve regular memory below
+      if (UseLargePages && (!FLAG_IS_DEFAULT(UseLargePages) ||
+                            !FLAG_IS_DEFAULT(LargePageSizeInBytes))) {
+        if (PrintCompressedOopsMode) {
+          tty->cr();
+          tty->print_cr("Reserve regular memory without large pages.");
+        }
+      }
     }
   }
 
@@ -248,8 +298,11 @@
     // important.  If available space is not detected, return NULL.
 
     if (requested_address != 0) {
-      base = os::attempt_reserve_memory_at(size,
-                                           requested_address-noaccess_prefix);
+      base = os::attempt_reserve_memory_at(size, requested_address);
+      if (failed_to_reserve_as_requested(base, requested_address, size, false)) {
+        // OS ignored requested address. Try different address.
+        base = NULL;
+      }
     } else {
       base = os::reserve_memory(size, NULL, alignment);
     }
@@ -365,7 +418,12 @@
 }
 
 void ReservedSpace::protect_noaccess_prefix(const size_t size) {
-  // If there is noaccess prefix, return.
+  assert( (_noaccess_prefix != 0) == (UseCompressedOops && _base != NULL &&
+                                      (size_t(_base + _size) > OopEncodingHeapMax) &&
+                                      Universe::narrow_oop_use_implicit_null_checks()),
+         "noaccess_prefix should be used only with non zero based compressed oops");
+
+  // If there is no noaccess prefix, return.
   if (_noaccess_prefix == 0) return;
 
   assert(_noaccess_prefix >= (size_t)os::vm_page_size(),
@@ -377,6 +435,10 @@
                           _special)) {
     fatal("cannot protect protection page");
   }
+  if (PrintCompressedOopsMode) {
+    tty->cr();
+    tty->print_cr("Protected page at the reserved heap base: " PTR_FORMAT " / " INTX_FORMAT " bytes", _base, _noaccess_prefix);
+  }
 
   _base += _noaccess_prefix;
   _size -= _noaccess_prefix;
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -614,7 +614,6 @@
   /* NMethods (NOTE: incomplete, but only a little) */                                                                               \
   /**************************************************/                                                                               \
                                                                                                                                      \
-     static_field(nmethod,             _zombie_instruction_size,                      int)                                   \
   nonstatic_field(nmethod,             _method,                                       methodOop)                             \
   nonstatic_field(nmethod,             _entry_bci,                                    int)                                   \
   nonstatic_field(nmethod,             _osr_link,                                     nmethod*)                              \
--- a/hotspot/src/share/vm/runtime/vtune.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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.
- *
- */
-
-// Interface to Intel's VTune profiler.
-
-class VTune : AllStatic {
- public:
-   static void create_nmethod(nmethod* nm);      // register newly created nmethod
-   static void delete_nmethod(nmethod* nm);      // unregister nmethod before discarding it
-
-   static void register_stub(const char* name, address start, address end);
-                                                 // register internal VM stub
-   static void start_GC();                       // start/end of GC or scavenge
-   static void end_GC();
-
-   static void start_class_load();               // start/end of class loading
-   static void end_class_load();
-
-   static void exit();                           // VM exit
-};
-
-
-// helper objects
-class VTuneGCMarker : StackObj {
- public:
-   VTuneGCMarker() { VTune::start_GC(); }
-  ~VTuneGCMarker() { VTune::end_GC(); }
-};
-
-class VTuneClassLoadMarker : StackObj {
- public:
-   VTuneClassLoadMarker() { VTune::start_class_load(); }
-  ~VTuneClassLoadMarker() { VTune::end_class_load(); }
-};
--- a/hotspot/src/share/vm/utilities/constantTag.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/utilities/constantTag.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -28,56 +28,85 @@
 #ifndef PRODUCT
 
 void constantTag::print_on(outputStream* st) const {
+  st->print(internal_name());
+}
+
+#endif // PRODUCT
+
+BasicType constantTag::basic_type() const {
   switch (_tag) {
-    case JVM_CONSTANT_Class :
-      st->print("Class");
-      break;
-    case JVM_CONSTANT_Fieldref :
-      st->print("Field");
-      break;
-    case JVM_CONSTANT_Methodref :
-      st->print("Method");
-      break;
-    case JVM_CONSTANT_InterfaceMethodref :
-      st->print("InterfaceMethod");
-      break;
-    case JVM_CONSTANT_String :
-      st->print("String");
-      break;
     case JVM_CONSTANT_Integer :
-      st->print("Integer");
-      break;
+      return T_INT;
     case JVM_CONSTANT_Float :
-      st->print("Float");
-      break;
+      return T_FLOAT;
     case JVM_CONSTANT_Long :
-      st->print("Long");
-      break;
+      return T_LONG;
     case JVM_CONSTANT_Double :
-      st->print("Double");
-      break;
-    case JVM_CONSTANT_NameAndType :
-      st->print("NameAndType");
-      break;
-    case JVM_CONSTANT_Utf8 :
-      st->print("Utf8");
-      break;
+      return T_DOUBLE;
+
+    case JVM_CONSTANT_Class :
+    case JVM_CONSTANT_String :
     case JVM_CONSTANT_UnresolvedClass :
-      st->print("Unresolved class");
-      break;
+    case JVM_CONSTANT_UnresolvedClassInError :
     case JVM_CONSTANT_ClassIndex :
-      st->print("Unresolved class index");
-      break;
     case JVM_CONSTANT_UnresolvedString :
-      st->print("Unresolved string");
-      break;
     case JVM_CONSTANT_StringIndex :
-      st->print("Unresolved string index");
-      break;
+    case JVM_CONSTANT_MethodHandle :
+    case JVM_CONSTANT_MethodType :
+    case JVM_CONSTANT_Object :
+      return T_OBJECT;
     default:
       ShouldNotReachHere();
-      break;
+      return T_ILLEGAL;
   }
 }
 
-#endif // PRODUCT
+
+
+const char* constantTag::internal_name() const {
+  switch (_tag) {
+    case JVM_CONSTANT_Invalid :
+      return "Invalid index";
+    case JVM_CONSTANT_Class :
+      return "Class";
+    case JVM_CONSTANT_Fieldref :
+      return "Field";
+    case JVM_CONSTANT_Methodref :
+      return "Method";
+    case JVM_CONSTANT_InterfaceMethodref :
+      return "InterfaceMethod";
+    case JVM_CONSTANT_String :
+      return "String";
+    case JVM_CONSTANT_Integer :
+      return "Integer";
+    case JVM_CONSTANT_Float :
+      return "Float";
+    case JVM_CONSTANT_Long :
+      return "Long";
+    case JVM_CONSTANT_Double :
+      return "Double";
+    case JVM_CONSTANT_NameAndType :
+      return "NameAndType";
+    case JVM_CONSTANT_MethodHandle :
+      return "MethodHandle";
+    case JVM_CONSTANT_MethodType :
+      return "MethodType";
+    case JVM_CONSTANT_Object :
+      return "Object";
+    case JVM_CONSTANT_Utf8 :
+      return "Utf8";
+    case JVM_CONSTANT_UnresolvedClass :
+      return "Unresolved Class";
+    case JVM_CONSTANT_UnresolvedClassInError :
+      return "Unresolved Class Error";
+    case JVM_CONSTANT_ClassIndex :
+      return "Unresolved Class Index";
+    case JVM_CONSTANT_UnresolvedString :
+      return "Unresolved String";
+    case JVM_CONSTANT_StringIndex :
+      return "Unresolved String Index";
+    default:
+      ShouldNotReachHere();
+      return "Illegal";
+  }
+}
--- a/hotspot/src/share/vm/utilities/constantTag.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/utilities/constantTag.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -78,13 +78,24 @@
   bool is_field_or_method() const   { return is_field() || is_method() || is_interface_method(); }
   bool is_symbol() const            { return is_utf8(); }
 
+  bool is_method_type() const              { return _tag == JVM_CONSTANT_MethodType; }
+  bool is_method_handle() const            { return _tag == JVM_CONSTANT_MethodHandle; }
+
+  constantTag() {
+    _tag = JVM_CONSTANT_Invalid;
+  }
   constantTag(jbyte tag) {
     assert((tag >= 0 && tag <= JVM_CONSTANT_NameAndType) ||
+           (tag >= JVM_CONSTANT_MethodHandle && tag <= JVM_CONSTANT_MethodType) ||
            (tag >= JVM_CONSTANT_InternalMin && tag <= JVM_CONSTANT_InternalMax), "Invalid constant tag");
     _tag = tag;
   }
 
   jbyte value()                      { return _tag; }
 
+  BasicType basic_type() const;        // if used with ldc, what kind of value gets pushed?
+
+  const char* internal_name() const;  // for error reporting
+
   void print_on(outputStream* st) const PRODUCT_RETURN;
 };
--- a/hotspot/src/share/vm/utilities/copy.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/utilities/copy.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -48,7 +48,7 @@
     Copy::conjoint_jshorts_atomic((jshort*) src, (jshort*) dst, size / sizeof(jshort));
   } else {
     // Not aligned, so no need to be atomic.
-    Copy::conjoint_bytes((void*) src, (void*) dst, size);
+    Copy::conjoint_jbytes((void*) src, (void*) dst, size);
   }
 }
 
--- a/hotspot/src/share/vm/utilities/copy.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/utilities/copy.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -73,6 +73,9 @@
   // whole alignment units.  E.g., if BytesPerLong is 2x word alignment, an odd
   // count may copy an extra word.  In the arrayof case, we are allowed to copy
   // only the number of copy units specified.
+  //
+  // All callees check count for 0.
+  //
 
   // HeapWords
 
@@ -99,7 +102,6 @@
   // Object-aligned words,  conjoint, not atomic on each word
   static void aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
     assert_params_aligned(from, to);
-    assert_non_zero(count);
     pd_aligned_conjoint_words(from, to, count);
   }
 
@@ -107,49 +109,42 @@
   static void aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
     assert_params_aligned(from, to);
     assert_disjoint(from, to, count);
-    assert_non_zero(count);
     pd_aligned_disjoint_words(from, to, count);
   }
 
   // bytes, jshorts, jints, jlongs, oops
 
   // bytes,                 conjoint, not atomic on each byte (not that it matters)
-  static void conjoint_bytes(void* from, void* to, size_t count) {
-    assert_non_zero(count);
+  static void conjoint_jbytes(void* from, void* to, size_t count) {
     pd_conjoint_bytes(from, to, count);
   }
 
   // bytes,                 conjoint, atomic on each byte (not that it matters)
-  static void conjoint_bytes_atomic(void* from, void* to, size_t count) {
-    assert_non_zero(count);
+  static void conjoint_jbytes_atomic(void* from, void* to, size_t count) {
     pd_conjoint_bytes(from, to, count);
   }
 
   // jshorts,               conjoint, atomic on each jshort
   static void conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerShort);
-    assert_non_zero(count);
     pd_conjoint_jshorts_atomic(from, to, count);
   }
 
   // jints,                 conjoint, atomic on each jint
   static void conjoint_jints_atomic(jint* from, jint* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerInt);
-    assert_non_zero(count);
     pd_conjoint_jints_atomic(from, to, count);
   }
 
   // jlongs,                conjoint, atomic on each jlong
   static void conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerLong);
-    assert_non_zero(count);
     pd_conjoint_jlongs_atomic(from, to, count);
   }
 
   // oops,                  conjoint, atomic on each oop
   static void conjoint_oops_atomic(oop* from, oop* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerHeapOop);
-    assert_non_zero(count);
     pd_conjoint_oops_atomic(from, to, count);
   }
 
@@ -157,7 +152,6 @@
   static void conjoint_oops_atomic(narrowOop* from, narrowOop* to, size_t count) {
     assert(sizeof(narrowOop) == sizeof(jint), "this cast is wrong");
     assert_params_ok(from, to, LogBytesPerInt);
-    assert_non_zero(count);
     pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
   }
 
@@ -168,36 +162,31 @@
   static void conjoint_memory_atomic(void* from, void* to, size_t size);
 
   // bytes,                 conjoint array, atomic on each byte (not that it matters)
-  static void arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
-    assert_non_zero(count);
+  static void arrayof_conjoint_jbytes(HeapWord* from, HeapWord* to, size_t count) {
     pd_arrayof_conjoint_bytes(from, to, count);
   }
 
   // jshorts,               conjoint array, atomic on each jshort
   static void arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerShort);
-    assert_non_zero(count);
     pd_arrayof_conjoint_jshorts(from, to, count);
   }
 
   // jints,                 conjoint array, atomic on each jint
   static void arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerInt);
-    assert_non_zero(count);
     pd_arrayof_conjoint_jints(from, to, count);
   }
 
   // jlongs,                conjoint array, atomic on each jlong
   static void arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerLong);
-    assert_non_zero(count);
     pd_arrayof_conjoint_jlongs(from, to, count);
   }
 
   // oops,                  conjoint array, atomic on each oop
   static void arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerHeapOop);
-    assert_non_zero(count);
     pd_arrayof_conjoint_oops(from, to, count);
   }
 
@@ -319,14 +308,6 @@
 #endif
   }
 
-  static void assert_non_zero(size_t count) {
-#ifdef ASSERT
-    if (count == 0) {
-      basic_fatal("count must be non-zero");
-    }
-#endif
-  }
-
   static void assert_byte_count_ok(size_t byte_count, size_t unit_size) {
 #ifdef ASSERT
     if ((size_t)round_to(byte_count, unit_size) != byte_count) {
--- a/hotspot/src/share/vm/utilities/taskqueue.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/utilities/taskqueue.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -182,73 +182,3 @@
     _index < objArrayOop(_obj)->length();
 }
 #endif // ASSERT
-
-bool RegionTaskQueueWithOverflow::is_empty() {
-  return (_region_queue.size() == 0) &&
-         (_overflow_stack->length() == 0);
-}
-
-bool RegionTaskQueueWithOverflow::stealable_is_empty() {
-  return _region_queue.size() == 0;
-}
-
-bool RegionTaskQueueWithOverflow::overflow_is_empty() {
-  return _overflow_stack->length() == 0;
-}
-
-void RegionTaskQueueWithOverflow::initialize() {
-  _region_queue.initialize();
-  assert(_overflow_stack == 0, "Creating memory leak");
-  _overflow_stack =
-    new (ResourceObj::C_HEAP) GrowableArray<RegionTask>(10, true);
-}
-
-void RegionTaskQueueWithOverflow::save(RegionTask t) {
-  if (TraceRegionTasksQueuing && Verbose) {
-    gclog_or_tty->print_cr("CTQ: save " PTR_FORMAT, t);
-  }
-  if(!_region_queue.push(t)) {
-    _overflow_stack->push(t);
-  }
-}
-
-// Note that using this method will retrieve all regions
-// that have been saved but that it will always check
-// the overflow stack.  It may be more efficient to
-// check the stealable queue and the overflow stack
-// separately.
-bool RegionTaskQueueWithOverflow::retrieve(RegionTask& region_task) {
-  bool result = retrieve_from_overflow(region_task);
-  if (!result) {
-    result = retrieve_from_stealable_queue(region_task);
-  }
-  if (TraceRegionTasksQueuing && Verbose && result) {
-    gclog_or_tty->print_cr("  CTQ: retrieve " PTR_FORMAT, result);
-  }
-  return result;
-}
-
-bool RegionTaskQueueWithOverflow::retrieve_from_stealable_queue(
-                                   RegionTask& region_task) {
-  bool result = _region_queue.pop_local(region_task);
-  if (TraceRegionTasksQueuing && Verbose) {
-    gclog_or_tty->print_cr("CTQ: retrieve_stealable " PTR_FORMAT, region_task);
-  }
-  return result;
-}
-
-bool
-RegionTaskQueueWithOverflow::retrieve_from_overflow(RegionTask& region_task) {
-  bool result;
-  if (!_overflow_stack->is_empty()) {
-    region_task = _overflow_stack->pop();
-    result = true;
-  } else {
-    region_task = (RegionTask) NULL;
-    result = false;
-  }
-  if (TraceRegionTasksQueuing && Verbose) {
-    gclog_or_tty->print_cr("CTQ: retrieve_stealable " PTR_FORMAT, region_task);
-  }
-  return result;
-}
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -109,8 +109,9 @@
 public:
   TaskQueueSuper() : _bottom(0), _age() {}
 
-  // Return true if the TaskQueue contains any tasks.
-  bool peek() { return _bottom != _age.top(); }
+  // Return true if the TaskQueue contains/does not contain any tasks.
+  bool peek()     const { return _bottom != _age.top(); }
+  bool is_empty() const { return size() == 0; }
 
   // Return an estimate of the number of elements in the queue.
   // The "careful" version admits the possibility of pop_local/pop_global
@@ -165,18 +166,16 @@
 
   void initialize();
 
-  // Push the task "t" on the queue.  Returns "false" iff the queue is
-  // full.
+  // Push the task "t" on the queue.  Returns "false" iff the queue is full.
   inline bool push(E t);
 
-  // If succeeds in claiming a task (from the 'local' end, that is, the
-  // most recently pushed task), returns "true" and sets "t" to that task.
-  // Otherwise, the queue is empty and returns false.
+  // Attempts to claim a task from the "local" end of the queue (the most
+  // recently pushed).  If successful, returns true and sets t to the task;
+  // otherwise, returns false (the queue is empty).
   inline bool pop_local(E& t);
 
-  // If succeeds in claiming a task (from the 'global' end, that is, the
-  // least recently pushed task), returns "true" and sets "t" to that task.
-  // Otherwise, the queue is empty and returns false.
+  // Like pop_local(), but uses the "global" end of the queue (the least
+  // recently pushed).
   bool pop_global(E& t);
 
   // Delete any resource associated with the queue.
@@ -198,7 +197,6 @@
 template<class E, unsigned int N>
 void GenericTaskQueue<E, N>::initialize() {
   _elems = NEW_C_HEAP_ARRAY(E, N);
-  guarantee(_elems != NULL, "Allocation failed.");
 }
 
 template<class E, unsigned int N>
@@ -289,7 +287,87 @@
   FREE_C_HEAP_ARRAY(E, _elems);
 }
 
-// Inherits the typedef of "Task" from above.
+// OverflowTaskQueue is a TaskQueue that also includes an overflow stack for
+// elements that do not fit in the TaskQueue.
+//
+// Three methods from super classes are overridden:
+//
+// initialize() - initialize the super classes and create the overflow stack
+// push() - push onto the task queue or, if that fails, onto the overflow stack
+// is_empty() - return true if both the TaskQueue and overflow stack are empty
+//
+// Note that size() is not overridden--it returns the number of elements in the
+// TaskQueue, and does not include the size of the overflow stack.  This
+// simplifies replacement of GenericTaskQueues with OverflowTaskQueues.
+template<class E, unsigned int N = TASKQUEUE_SIZE>
+class OverflowTaskQueue: public GenericTaskQueue<E, N>
+{
+public:
+  typedef GrowableArray<E>       overflow_t;
+  typedef GenericTaskQueue<E, N> taskqueue_t;
+
+  OverflowTaskQueue();
+  ~OverflowTaskQueue();
+  void initialize();
+
+  inline overflow_t* overflow_stack() const { return _overflow_stack; }
+
+  // Push task t onto the queue or onto the overflow stack.  Return true.
+  inline bool push(E t);
+
+  // Attempt to pop from the overflow stack; return true if anything was popped.
+  inline bool pop_overflow(E& t);
+
+  inline bool taskqueue_empty() const { return taskqueue_t::is_empty(); }
+  inline bool overflow_empty()  const { return overflow_stack()->is_empty(); }
+  inline bool is_empty()        const {
+    return taskqueue_empty() && overflow_empty();
+  }
+
+private:
+  overflow_t* _overflow_stack;
+};
+
+template <class E, unsigned int N>
+OverflowTaskQueue<E, N>::OverflowTaskQueue()
+{
+  _overflow_stack = NULL;
+}
+
+template <class E, unsigned int N>
+OverflowTaskQueue<E, N>::~OverflowTaskQueue()
+{
+  if (_overflow_stack != NULL) {
+    delete _overflow_stack;
+    _overflow_stack = NULL;
+  }
+}
+
+template <class E, unsigned int N>
+void OverflowTaskQueue<E, N>::initialize()
+{
+  taskqueue_t::initialize();
+  assert(_overflow_stack == NULL, "memory leak");
+  _overflow_stack = new (ResourceObj::C_HEAP) GrowableArray<E>(10, true);
+}
+
+template <class E, unsigned int N>
+bool OverflowTaskQueue<E, N>::push(E t)
+{
+  if (!taskqueue_t::push(t)) {
+    overflow_stack()->push(t);
+  }
+  return true;
+}
+
+template <class E, unsigned int N>
+bool OverflowTaskQueue<E, N>::pop_overflow(E& t)
+{
+  if (overflow_empty()) return false;
+  t = overflow_stack()->pop();
+  return true;
+}
+
 class TaskQueueSetSuper: public CHeapObj {
 protected:
   static int randomParkAndMiller(int* seed0);
@@ -323,11 +401,11 @@
 
   T* queue(uint n);
 
-  // The thread with queue number "queue_num" (and whose random number seed
-  // is at "seed") is trying to steal a task from some other queue.  (It
-  // may try several queues, according to some configuration parameter.)
-  // If some steal succeeds, returns "true" and sets "t" the stolen task,
-  // otherwise returns false.
+  // The thread with queue number "queue_num" (and whose random number seed is
+  // at "seed") is trying to steal a task from some other queue.  (It may try
+  // several queues, according to some configuration parameter.)  If some steal
+  // succeeds, returns "true" and sets "t" to the stolen task, otherwise returns
+  // false.
   bool steal(uint queue_num, int* seed, E& t);
 
   bool peek();
@@ -507,7 +585,7 @@
   uint localBot = _bottom;
   // This value cannot be N-1.  That can only occur as a result of
   // the assignment to bottom in this method.  If it does, this method
-  // resets the size( to 0 before the next call (which is sequential,
+  // resets the size to 0 before the next call (which is sequential,
   // since this is pop_local.)
   uint dirty_n_elems = dirty_size(localBot, _age.top());
   assert(dirty_n_elems != N - 1, "Shouldn't be possible...");
@@ -533,8 +611,7 @@
   }
 }
 
-typedef oop Task;
-typedef GenericTaskQueue<Task>            OopTaskQueue;
+typedef GenericTaskQueue<oop>             OopTaskQueue;
 typedef GenericTaskQueueSet<OopTaskQueue> OopTaskQueueSet;
 
 #ifdef _MSC_VER
@@ -615,35 +692,8 @@
 #pragma warning(pop)
 #endif
 
-typedef GenericTaskQueue<StarTask>            OopStarTaskQueue;
+typedef OverflowTaskQueue<StarTask>           OopStarTaskQueue;
 typedef GenericTaskQueueSet<OopStarTaskQueue> OopStarTaskQueueSet;
 
-typedef size_t RegionTask;  // index for region
-typedef GenericTaskQueue<RegionTask>         RegionTaskQueue;
-typedef GenericTaskQueueSet<RegionTaskQueue> RegionTaskQueueSet;
-
-class RegionTaskQueueWithOverflow: public CHeapObj {
- protected:
-  RegionTaskQueue              _region_queue;
-  GrowableArray<RegionTask>*   _overflow_stack;
-
- public:
-  RegionTaskQueueWithOverflow() : _overflow_stack(NULL) {}
-  // Initialize both stealable queue and overflow
-  void initialize();
-  // Save first to stealable queue and then to overflow
-  void save(RegionTask t);
-  // Retrieve first from overflow and then from stealable queue
-  bool retrieve(RegionTask& region_index);
-  // Retrieve from stealable queue
-  bool retrieve_from_stealable_queue(RegionTask& region_index);
-  // Retrieve from overflow
-  bool retrieve_from_overflow(RegionTask& region_index);
-  bool is_empty();
-  bool stealable_is_empty();
-  bool overflow_is_empty();
-  uint stealable_size() { return _region_queue.size(); }
-  RegionTaskQueue* task_queue() { return &_region_queue; }
-};
-
-#define USE_RegionTaskQueueWithOverflow
+typedef OverflowTaskQueue<size_t>             RegionTaskQueue;
+typedef GenericTaskQueueSet<RegionTaskQueue>  RegionTaskQueueSet;
--- a/jaxp/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -73,3 +73,7 @@
 9510ed0e1c7ab46a8b6659234e1dc7786407a72b jdk7-b96
 ca01ec32561fee1855630b68a2fcd0042257a8ef jdk7-b97
 d4adf4f2d14c7b79df0a81de884b6b57c6850802 jdk7-b98
+7ef8469021fbc824ac49d57c83a14b1bb08f1766 jdk7-b99
+d524be5ef62e8b8cb890c59a5d2c19ef0ab50d45 jdk7-b100
+17f62a566a2020fd908e77106ed885e0c4e7c14d jdk7-b101
+15573625af97d01c4e24549041cba7584da7fe88 jdk7-b102
--- a/jaxp/build-defs.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/build-defs.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -55,9 +55,29 @@
     <drop-import name="jaxp_src"/>
     <!-- <drop-import name="jaxp_tests"/> -->
 
+    <!-- Fail and print helpful messages if source does not exist. -->
+    <target name="-src-help">
+      <fail message="${failed.url.src.message}">
+	<condition>
+	    <and>
+                <not>
+	            <available file="${jaxp_src.src.dir}" type="dir"/>
+	        </not>
+	        <istrue value="${allow.downloads}"/>
+	    </and>
+	</condition>
+      </fail>
+      <fail message="${failed.nourl.src.message}">
+	<condition>
+            <not>
+	        <available file="${jaxp_src.src.dir}" type="dir"/>
+	    </not>
+	</condition>
+      </fail>
+    </target>
 
-    <!-- Special build area preparation. -->
-    <target name="-drop-build-prep" depends="init, -init-src-dirs">
+    <!-- Special build area setup. -->
+    <target name="-drop-build-setup" depends="init, -init-src-dirs">
         <mkdir dir="${build.classes.dir}"/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${primary.src.dir}"
@@ -84,7 +104,7 @@
 
     <!-- Source directory selection. -->
     <target name="-init-src-dirs"
-	    depends="init, -use-drop">
+	    depends="init, -use-drop,-src-help">
         <echo message="Using primary.src.dir=${primary.src.dir}"/>
         <pathconvert property="src.list.id" refid="src.dir.id"/>
         <echo message="Using src.dir.id=${src.list.id}"/>
--- a/jaxp/build-drop-template.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/build-drop-template.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -75,6 +75,7 @@
     <target name="-@DROP@-url-should-be-used" unless="@DROP@.url.should.be.used">
         <condition property="@DROP@.url.should.be.used">
             <and>
+                <istrue value="${allow.downloads}"/>
                 <not>
                     <isset property="@DROP@.master.bundle.copy.exists"/>
                 </not>
--- a/jaxp/build.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/build.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -104,4 +104,24 @@
   drops.dir=${drops.dir}${line.separator}\
 ${line.separator}
 
+# Failure messages when source cannot be found on the file system
+failed.nourl.src.message=\
+ERROR: Cannot find source for project ${ant.project.name}.\
+${line.separator}${line.separator}\
+HINT: Try setting drops.dir to indicate where the bundles can be found, \
+or try setting the ant property allow.downloads=true to download the bundle from the URL.\
+${line.separator}\
+e.g. ant -Dallow.downloads=true -OR- ant -Ddrops.dir=some_directory \
+${line.separator}
+
+# Failure message when source cannot be downloaded
+failed.url.src.message=\
+ERROR: Cannot find source for project ${ant.project.name}.\
+${line.separator}${line.separator}\
+HINT: Try setting drops.dir to indicate where the bundles can be found, \
+or try checking the URL with your browser.\
+${line.separator}\
+e.g. ant -Ddrops.dir=some_directory \
+${line.separator}
+
 #------------------------------------------------------------
--- a/jaxp/build.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/build.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -36,6 +36,11 @@
       javac.debug          - true or false for debug classfiles
       javac.target         - classfile version target
       javac.source         - source version
+      drops.dir            - directory that holds source drop bundles
+      allow.download       - permit downloads from public url (default is false)
+                             (used if bundles not found in drops.dir)
+
+      Run 'make help' for help using the Makefile.
     </description>
 
     <!-- Mac is special, need to downgrade these before build.properties. -->
@@ -106,16 +111,20 @@
         <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
     </target>
 
-    <target name="-build-prep"
-	    depends="init, -init-src-dirs, -drop-build-prep">
+    <target name="-build-setup"
+	    depends="init, -init-src-dirs, -drop-build-setup">
     </target>
 
     <!-- Build (compilation) of sources to class files. -->
     <target name="build"
-	    depends="init, -init-src-dirs, -build-prep">
+	    depends="compile, -build-setup">
+    </target>
+    <target name="compile"
+	    depends="init, -init-src-dirs">
+        <mkdir dir="${build.classes.dir}"/>
         <javac 
-	     includeAntRuntime="false"
-	     classpath="${build.classes.dir}"
+	     includeAntRuntime="false" 
+	     classpath="${build.classes.dir}:${tools.jar}"
 	     fork="true"
              destdir="${build.classes.dir}"
              memoryInitialSize="${javac.memoryInitialSize}"
--- a/jaxp/jaxp.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/jaxp.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 #
 
 drops.master.copy.base=${drops.dir}
-drops.master.url.base=https://jaxp.dev.java.net/files/documents/913/147490
 
-jaxp_src.bundle.name=jdk7-jaxp-m6.zip
-jaxp_src.bundle.md5.checksum=080827d779c114365f8504bd79b34604
+jaxp_src.bundle.name=jdk7-jaxp-m7.zip
+jaxp_src.bundle.md5.checksum=22e95fbdb9fb7d8b6b6fc0a1d76d1fbd
 jaxp_src.master.bundle.dir=${drops.master.copy.base}
-jaxp_src.master.bundle.url.base=${drops.master.url.base}
+jaxp_src.master.bundle.url.base=https://jaxp.dev.java.net/files/documents/913/150785
 
-jaxp_tests.bundle.name=jdk7-jaxp-tests-2009_08_28.zip
-jaxp_tests.master.bundle.dir=${drops.master.copy.base}
-jaxp_tests.master.bundle.url.base=${drops.master.url.base}
+#jaxp_tests.bundle.name=jdk7-jaxp-tests-2009_08_28.zip
+#jaxp_tests.master.bundle.dir=${drops.master.copy.base}
+#jaxp_tests.master.bundle.url.base=https://jaxp.dev.java.net/files/documents/913/147490
+
--- a/jaxp/make/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxp/make/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -65,6 +65,11 @@
   endif
 endif 
 
+# If downloads are allowed
+ifeq ($(ALLOW_DOWNLOADS),true)
+  ANT_OPTIONS += -Dallow.downloads=true
+endif
+
 # Figure out the platform we are using
 _SYSTEM_UNAME := $(shell uname)
 _PLATFORM_KIND = unix
@@ -159,6 +164,8 @@
 	@echo "    $(ANT_TARGETS)"
 	@echo " "
 	@echo "  Environment or command line variables (all optional):"
+	$(call helpenvline, ALT_DROPS_DIR,\
+	       "Directory that contains the drop source bundles i.e. drops.dir")
 	$(call helpenvline, ALT_BOOTDIR,\
 	       "JAVA_HOME to use when running ant")
 	$(call helpenvline, ALT_LANGTOOLS_DIST,\
--- a/jaxws/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -73,3 +73,7 @@
 208fd4451232f7a522ddb20334c598656844ccb7 jdk7-b96
 dac23846092ad4956ed41b5278f8686476ae46ef jdk7-b97
 4571098071094e705e680db5324bfa15a57b1290 jdk7-b98
+818366ce23d8919cafaa4db4c51605ee2a7c8eaf jdk7-b99
+bd26d0ce0c3cb43e58a8e2770cc03f26d96ffe5c jdk7-b100
+b55ce274490082712f5e002b38d2eed505ca863d jdk7-b101
+d8580443d1815d68e0035a0560634e50fa899288 jdk7-b102
--- a/jaxws/build-defs.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/build-defs.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -55,9 +55,36 @@
     <drop-import name="jaxws_src"/>
     <drop-import name="jaf_src"/>
     <!-- <drop-import name="jaxws_tests"/> -->
+    
+    <!-- Fail and print helpful messages if source does not exist. -->
+    <target name="-src-help">
+      <fail message="${failed.url.src.message}">
+	<condition>
+	    <and>
+                <not>
+                    <and>
+	                <available file="${jaxws_src.src.dir}" type="dir"/>
+                        <available file="${jaf_src.src.dir}" type="dir"/>
+	            </and>
+	        </not>
+	        <istrue value="${allow.downloads}"/>
+	    </and>
+	</condition>
+      </fail>
+      <fail message="${failed.nourl.src.message}">
+	<condition>
+            <not>
+                <and>
+	            <available file="${jaxws_src.src.dir}" type="dir"/>
+                    <available file="${jaf_src.src.dir}" type="dir"/>
+	        </and>
+	    </not>
+	</condition>
+      </fail>
+    </target>
 
-    <!-- Special build area preparation. -->
-    <target name="-drop-build-prep" depends="init, -init-src-dirs">
+    <!-- Special build area setup. -->
+    <target name="-drop-build-setup" depends="init, -init-src-dirs">
         <mkdir dir="${build.classes.dir}"/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${primary.src.dir}"
@@ -99,7 +126,7 @@
 
     <!-- Source directory selection. -->
     <target name="-init-src-dirs"
-	    depends="init, -use-drop">
+	    depends="init, -use-drop,-src-help">
         <echo message="Using primary.src.dir=${primary.src.dir}"/>
         <pathconvert property="src.list.id" refid="src.dir.id"/>
         <echo message="Using src.dir.id=${src.list.id}"/>
--- a/jaxws/build-drop-template.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/build-drop-template.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -75,6 +75,7 @@
     <target name="-@DROP@-url-should-be-used" unless="@DROP@.url.should.be.used">
         <condition property="@DROP@.url.should.be.used">
             <and>
+                <istrue value="${allow.downloads}"/>
                 <not>
                     <isset property="@DROP@.master.bundle.copy.exists"/>
                 </not>
--- a/jaxws/build.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/build.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -104,4 +104,24 @@
   drops.dir=${drops.dir}${line.separator}\
 ${line.separator}
 
+# Failure messages when source cannot be found on the file system
+failed.nourl.src.message=\
+ERROR: Cannot find source for project ${ant.project.name}.\
+${line.separator}${line.separator}\
+HINT: Try setting drops.dir to indicate where the bundles can be found, \
+or try setting the ant property allow.downloads=true to download the bundle from the URL.\
+${line.separator}\
+e.g. ant -Dallow.downloads=true -OR- ant -Ddrops.dir=some_directory \
+${line.separator}
+
+# Failure message when source cannot be downloaded
+failed.url.src.message=\
+ERROR: Cannot find source for project ${ant.project.name}.\
+${line.separator}${line.separator}\
+HINT: Try setting drops.dir to indicate where the bundles can be found, \
+or try checking the URL with your browser.\
+${line.separator}\
+e.g. ant -Ddrops.dir=some_directory \
+${line.separator}
+
 #------------------------------------------------------------
--- a/jaxws/build.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/build.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -36,6 +36,11 @@
       javac.debug          - true or false for debug classfiles
       javac.target         - classfile version target
       javac.source         - source version
+      drops.dir            - directory that holds source drop bundles
+      allow.download       - permit downloads from public url (default is false)
+                             (used if bundles not found in drops.dir)
+
+      Run 'make help' for help using the Makefile.
     </description>
 
     <!-- Mac is special, need to downgrade these before build.properties. -->
@@ -106,13 +111,17 @@
         <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
     </target>
 
-    <target name="-build-prep"
-	    depends="init, -init-src-dirs, -drop-build-prep">
+    <target name="-build-setup"
+	    depends="init, -init-src-dirs, -drop-build-setup">
     </target>
 
     <!-- Build (compilation) of sources to class files. -->
     <target name="build"
-	    depends="init, -init-src-dirs, -build-prep">
+	    depends="compile, -build-setup">
+    </target>
+    <target name="compile"
+	    depends="init, -init-src-dirs">
+        <mkdir dir="${build.classes.dir}"/>
         <javac 
 	     includeAntRuntime="false" 
 	     classpath="${build.classes.dir}:${tools.jar}"
--- a/jaxws/jaxws.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/jaxws.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -24,19 +24,18 @@
 #
 
 drops.master.copy.base=${drops.dir}
-drops.master.url.base=http://kenai.com/projects/jdk7-drops/downloads/download
 
-jaxws_src.bundle.name=jdk7-jaxws-2009_09_28.zip
-jaxws_src.bundle.md5.checksum=f5010ebf636db9f465a61a7a74944543
+jaxws_src.bundle.name=jdk7-jaxws-b100.zip
+jaxws_src.bundle.md5.checksum=e4fea255c6222b118bb1d0d3054d36e1
 jaxws_src.master.bundle.dir=${drops.master.copy.base}
-#jaxws_src.bundle.url.base=https://jaxws.dev.java.net/files/documents/913/142147
-jaxws_src.master.bundle.url.base=${drops.master.url.base}
+jaxws_src.master.bundle.url.base=https://jax-ws.dev.java.net/files/documents/4202/150896
 
 jaf_src.bundle.name=jdk7-jaf-2009_08_28.zip
 jaf_src.bundle.md5.checksum=eb8cb7a4a7f14e211fbe2354878a2472
 jaf_src.master.bundle.dir=${drops.master.copy.base}
-jaf_src.master.bundle.url.base=${drops.master.url.base}
+jaf_src.master.bundle.url.base=http://kenai.com/projects/jdk7-drops/downloads/download
 
-jaxws_tests.bundle.name=jdk7-jaxws-tests-2009_08_28.zip
-jaxws_tests.master.bundle.dir=${drops.master.copy.base}
-jaxws_tests.master.bundle.url.base=${drops.master.url.base}
+#jaxws_tests.bundle.name=jdk7-jaxws-tests-2009_08_28.zip
+#jaxws_tests.master.bundle.dir=${drops.master.copy.base}
+#jaxws_tests.master.bundle.url.base=http://kenai.com/projects/jdk7-drops/downloads/download
+
--- a/jaxws/make/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/jaxws/make/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -65,6 +65,11 @@
   endif
 endif 
 
+# If downloads are allowed
+ifeq ($(ALLOW_DOWNLOADS),true)
+  ANT_OPTIONS += -Dallow.downloads=true
+endif
+
 # Figure out the platform we are using
 _SYSTEM_UNAME := $(shell uname)
 _PLATFORM_KIND = unix
@@ -159,6 +164,8 @@
 	@echo "    $(ANT_TARGETS)"
 	@echo " "
 	@echo "  Environment or command line variables (all optional):"
+	$(call helpenvline, ALT_DROPS_DIR,\
+	       "Directory that contains the drop source bundles i.e. drops.dir")
 	$(call helpenvline, ALT_BOOTDIR,\
 	       "JAVA_HOME to use when running ant")
 	$(call helpenvline, ALT_LANGTOOLS_DIST,\
--- a/jdk/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -74,3 +74,6 @@
 b1903d7528d33b521df42bc9291bdcdd2f444a29 jdk7-b97
 82593186fa54ab12f17af31f86a7bf364efaf4df jdk7-b98
 2587c9f0b60dc3146b4247b8674ada456a643d6f jdk7-b99
+820b4e843d5168370a3bf166d19751a3271d8575 jdk7-b100
+d58354a69011f3d3354765fa3167567c4c4a9612 jdk7-b101
+13029a61b16bec06535d4f0aa98229b358684128 jdk7-b102
--- a/jdk/make/common/shared/Defs-windows.gmk	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/make/common/shared/Defs-windows.gmk	Thu Jul 29 22:02:45 2010 -0700
@@ -230,7 +230,8 @@
 
 # Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
 ifeq ($(ARCH_DATA_MODEL), 32)
-  # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
+  # Try looking in MSVCDIR or MSVCDir area first 
+  # (set by vcvars32.bat for VC .NET, not defined in the VC 2008/2010)
   ifdef MSVCDIR
     xMSVCDIR  :="$(subst \,/,$(MSVCDIR))"
     _msvc_dir :=$(call FullPath,$(xMSVCDIR))
@@ -238,11 +239,6 @@
     ifdef MSVCDir
       xMSVCDIR  :="$(subst \,/,$(MSVCDir))"
       _msvc_dir :=$(call FullPath,$(xMSVCDIR))
-    else
-      ifneq ($(_program_files),)
-        xMSVCDIR  :="$(_program_files)/Microsoft Visual Studio .NET 2003/Vc7"
-        _msvc_dir :=$(call FullPath,$(xMSVCDIR))
-      endif
     endif
   endif
   # If we still don't have it, look for VSnnCOMNTOOLS (newest first),
--- a/jdk/make/mkdemo/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/make/mkdemo/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -46,11 +46,11 @@
 	$(RM) -r $(DEMODIR)/nbproject
 	$(MKDIR) -p $(DEMODIR)
 	( $(CD) $(SHARE_SRC)/demo && $(TAR) -cf - \
-	  `find nbproject $(SCM_DIRS_prune) -o -type f -print` ) | \
+	  `$(FIND) nbproject $(SCM_DIRS_prune) -o -type f -print` ) | \
 	  ( $(CD) $(DEMODIR) && $(TAR) -xf - )
 ifndef OPENJDK
 	( $(CD) $(CLOSED_SHARE_SRC)/demo && $(TAR) -cf - \
-	  `find nbproject $(SCM_DIRS_prune) -o -type f -print` ) | \
+	  `$(FIND) nbproject $(SCM_DIRS_prune) -o -type f -print` ) | \
 	  ( $(CD) $(DEMODIR) && $(TAR) -xf - )
 endif
 
--- a/jdk/make/sun/pisces/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/make/sun/pisces/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -52,5 +52,11 @@
 
 copy-files: $(FILES_copy)
 
-$(SERVICEDIR)/%: $(SHARE_SRC)/classes/sun/java2d/pisces/META-INF/services/%
+ifneq ($(PLATFORM), windows)
+ SERVICE_SRC = $(PLATFORM_SRC)
+else
+ SERVICE_SRC = $(SHARE_SRC)
+endif
+
+$(SERVICEDIR)/%: $(SERVICE_SRC)/classes/sun/java2d/pisces/META-INF/services/%
 	$(install-file)
--- a/jdk/make/sun/security/mscapi/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/make/sun/security/mscapi/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -150,6 +150,7 @@
 # Rules
 #
 CLASSDESTDIR = $(TEMPDIR)/classes
+JAVAHFLAGS += -classpath $(CLASSDESTDIR)
 
 include $(BUILDDIR)/common/Mapfile-vers.gmk
 
--- a/jdk/make/sun/security/pkcs11/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/make/sun/security/pkcs11/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -148,6 +148,7 @@
 # Rules
 #
 CLASSDESTDIR = $(TEMPDIR)/classes
+JAVAHFLAGS += -classpath $(CLASSDESTDIR)
 
 include $(BUILDDIR)/common/Mapfile-vers.gmk
 
--- a/jdk/src/linux/doc/man/appletviewer.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/appletviewer.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,12 +19,11 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH appletviewer 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH appletviewer 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
-appletviewer \- The Java Applet Viewer
+appletviewer \- The Java Applet Viewer.
 .LP
 .RS 3
 
@@ -74,6 +73,4 @@
 .LP
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/apt.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/apt.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH apt 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH apt 1 "02 Jun 2010"
 
 .LP
 .SH "NAME"
@@ -124,6 +123,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/extcheck.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/extcheck.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH extcheck 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH extcheck 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -83,6 +82,4 @@
 .LP
 jar(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/idlj.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/idlj.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH idlj 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH idlj 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -508,6 +507,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/appletviewer.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/appletviewer.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH appletviewer 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH appletviewer 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -74,6 +73,4 @@
 .LP
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/apt.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/apt.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH apt 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH apt 1 "02 Jun 2010"
 
 .LP
 .SH "NAME"
--- a/jdk/src/linux/doc/man/ja/extcheck.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/extcheck.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH extcheck 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH extcheck 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -83,6 +82,4 @@
 .LP
 jar(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/idlj.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/idlj.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH idlj 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH idlj 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -507,6 +506,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jar.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jar.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jar 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jar 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -205,7 +204,7 @@
 
 .LP
 .LP
-Java 2 SDK ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.3 以é™ã‹ã‚‰ã€\f2jar\fP ユーティリティー㧠
+JDK ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.3 以é™ã‹ã‚‰ã€\f2jar\fP ユーティリティー㧠
 .na
 \f2JarIndex\fP @
 .fi
@@ -717,6 +716,4 @@
 .br
 
 .LP
-pack200(1) 
-.LP
- 
+pack200(1)  
--- a/jdk/src/linux/doc/man/ja/jarsigner.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jarsigner.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jarsigner 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jarsigner 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -504,7 +503,7 @@
 .nr 44 \n(83+(3*\n(38)
 .nr 84 +\n(44
 .nr TW \n(84
-.if t .if \n(TW>\n(.li .tm Table at line 186 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 185 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1616,6 +1615,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/java.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/java.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH java 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH java 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -315,19 +314,19 @@
 ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ‘イルを無効ã«ã—ã¾ã™ã€‚通常ã€VM ã§ã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ‘イルãŒçµ‚了ã™ã‚‹ã¾ã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã¨ã—ã¦ã‚³ãƒ³ãƒ‘イルã—ã€ã‚¤ãƒ³ã‚¿ãƒ—リタモードã§ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã—ã¾ã™ã€‚\f2\-Xbatch\fP フラグを指定ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ‘イルãŒç„¡åŠ¹ã«ãªã‚Šã€ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ‘イルãŒå®Œäº†ã™ã‚‹ã¾ã§ãƒ•ã‚©ã‚¢ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ 
 .TP 3
 \-Xbootclasspath:bootclasspath 
-ブートクラスファイルを探ã™ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブをコロンã§åŒºåˆ‡ã£ãŸãƒªã‚¹ãƒˆã§æŒ‡å®šã—ã¾ã™ã€‚指定ã—ãŸãƒ‘スã«å­˜åœ¨ã™ã‚‹ãƒ–ートクラスファイルãŒã€Java 2 SDK ã«å«ã¾ã‚Œã‚‹ãƒ–ートクラスファイルã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚\f2注: rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java 2 Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
+ブートクラスファイルを探ã™ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブをコロンã§åŒºåˆ‡ã£ãŸãƒªã‚¹ãƒˆã§æŒ‡å®šã—ã¾ã™ã€‚指定ã—ãŸãƒ‘スã«å­˜åœ¨ã™ã‚‹ãƒ–ートクラスファイルãŒã€JDK ã«å«ã¾ã‚Œã‚‹ãƒ–ートクラスファイルã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚\f2注: rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
 .TP 3
 \-Xbootclasspath/a:path 
 ディレクトリã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブã®ãƒ‘スをコロンã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ パスã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ–ートストラップクラスパスã®ã‚ã¨ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ 
 .TP 3
 \-Xbootclasspath/p:path 
-ディレクトリã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブã®ãƒ‘スをコロンã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ パスã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ–ートストラップクラスパスã®å‰ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚\f2注 rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java 2 Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
+ディレクトリã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブã®ãƒ‘スをコロンã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ パスã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ–ートストラップクラスパスã®å‰ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚\f2注 rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
 .TP 3
 \-Xcheck:jni 
 Java Native Interface (JNI) 機能ã«å¯¾ã—ã¦è¿½åŠ ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã„ã¾ã™ã€‚具体的ã«ã¯ã€Java 仮想マシン㯠JNI è¦æ±‚を処ç†ã™ã‚‹å‰ã«ã€JNI 関数ã«æ¸¡ã•ã‚Œã‚‹ãƒ‘ラメータã¨ã€å®Ÿè¡Œç’°å¢ƒã®ãƒ‡ãƒ¼ã‚¿ã‚’検証ã—ã¾ã™ã€‚無効ãªãƒ‡ãƒ¼ã‚¿ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–コードã«å•é¡ŒãŒã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã‚‹ãŸã‚ã€Java 仮想マシンã¯è‡´å‘½çš„エラーを発生ã—ã¦çµ‚了ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã¨ã€ãƒ‘フォーマンス低下ãŒäºˆæƒ³ã•ã‚Œã¾ã™ã€‚ 
 .TP 3
 \-Xfuture 
-クラスã¨ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ã‚’厳密ã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚下ä½äº’æ›æ€§ã‚’ä¿ã¤ãŸã‚ã€Java 2 SDK ã®ä»®æƒ³ãƒžã‚·ãƒ³ãŒå®Ÿè¡Œã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å½¢å¼ãƒã‚§ãƒƒã‚¯ã¯ã€JDK ソフトウェアã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.1.x ãŒå®Ÿè¡Œã™ã‚‹ãƒã‚§ãƒƒã‚¯ã¨åŒç¨‹åº¦ã®åŽ³å¯†ã•ã«ãªã£ã¦ã„ã¾ã™ã€‚\f3\-Xfuture\fP フラグを指定ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã®ä»•æ§˜ã¸ã®æº–拠を強化ã™ã‚‹ãŸã‚ã®ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚Java アプリケーション起動ツールã®å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«ãªã‚‹ãŸã‚ã€æ–°ã—ã„コードを開発ã™ã‚‹ã¨ãã«ã¯ã“ã®ãƒ•ãƒ©ã‚°ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ 
+クラスã¨ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ã‚’厳密ã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚下ä½äº’æ›æ€§ã‚’ä¿ã¤ãŸã‚ã€JDK ã®ä»®æƒ³ãƒžã‚·ãƒ³ãŒå®Ÿè¡Œã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å½¢å¼ãƒã‚§ãƒƒã‚¯ã¯ã€JDK ソフトウェアã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.1.x ãŒå®Ÿè¡Œã™ã‚‹ãƒã‚§ãƒƒã‚¯ã¨åŒç¨‹åº¦ã®åŽ³å¯†ã•ã«ãªã£ã¦ã„ã¾ã™ã€‚\f3\-Xfuture\fP フラグを指定ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã®ä»•æ§˜ã¸ã®æº–拠を強化ã™ã‚‹ãŸã‚ã®ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚Java アプリケーション起動ツールã®å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«ãªã‚‹ãŸã‚ã€æ–°ã—ã„コードを開発ã™ã‚‹ã¨ãã«ã¯ã“ã®ãƒ•ãƒ©ã‚°ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ 
 .TP 3
 \-Xnoclassgc 
 クラスã®ã‚¬ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’無効ã«ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã¨ã€ãƒ­ãƒ¼ãƒ‰æ¸ˆã¿ã‚¯ãƒ©ã‚¹ã‹ã‚‰ãƒ¡ãƒ¢ãƒªãƒ¼ãŒå›žå¾©ã•ã‚Œã‚‹ã“ã¨ãŒãªããªã‚‹ãŸã‚ã€å…¨ä½“çš„ãªãƒ¡ãƒ¢ãƒªãƒ¼ä½¿ç”¨é‡ãŒå¢—大ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¢ãƒ—リケーションã«ã‚ˆã£ã¦ã¯ OutOfMemoryError ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ 
@@ -503,6 +502,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/javac.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/javac.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javac 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javac 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -960,6 +959,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/javadoc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/javadoc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javadoc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javadoc 1 "02 Jun 2010"
 .SH "åå‰"
 javadoc \- Java API ドキュメントジェãƒãƒ¬ãƒ¼ã‚¿
 .RS 3
@@ -395,7 +394,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 353 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 352 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -529,7 +528,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 406 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 405 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1374,7 +1373,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 1125 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1124 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2309,7 +2308,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1861 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1860 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2677,7 +2676,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 1959 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1958 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3180,7 +3179,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2280 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2279 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3301,7 +3300,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2316 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2315 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3440,7 +3439,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2356 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2355 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3619,7 +3618,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2437 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2436 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3785,7 +3784,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2504 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2503 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4102,7 +4101,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 2681 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2680 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4365,7 +4364,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 2791 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2790 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5831,5 +5830,4 @@
 .RE
 
 .LP
-.LP
-javadoc ã¯ã€Sun Microsystems, Inc ã®å•†æ¨™ã§ã™ (\f2javadoc\fP コマンド自体ã«ã¯å•†æ¨™ã‚·ãƒ³ãƒœãƒ«ã¯ä¸è¦)。 
+ 
--- a/jdk/src/linux/doc/man/ja/javah.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/javah.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javah 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javah 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -156,6 +155,4 @@
 .LP
 javac(1)ã€java(1)ã€jdb(1)ã€javap(1)ã€javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/javap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/javap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javap 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -359,6 +358,4 @@
 .LP
 javac(1)〠java(1)ã€jdb(1)ã€javah(1)ã€javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/javaws.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/javaws.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,17 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javaws 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
-
-.LP
+.TH javaws 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
 \f2javaws\fP コマンド行
 .LP
-
-.LP
 .LP
 \ 
 .LP
--- a/jdk/src/linux/doc/man/ja/jconsole.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jconsole.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jconsole 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jconsole 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -160,6 +159,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jdb.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jdb.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jdb 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jdb 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -364,6 +363,4 @@
 .LP
 javac(1)ã€java(1)ã€javah(1)ã€javap(1)ã€javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jhat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jhat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jhat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jhat 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/linux/doc/man/ja/jinfo.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jinfo.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jinfo 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jinfo 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -164,6 +163,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jmap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jmap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jmap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jmap 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -196,6 +195,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jps.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jps.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jps 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jps 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -292,6 +291,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jrunscript.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jrunscript.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jrunscript 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jrunscript 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -220,6 +219,4 @@
 .LP
 JavaScript ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€jrunscript ã¯ã€æœ€åˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã‚¹ã‚¯ãƒªãƒ—トを評価ã™ã‚‹å‰ã«ã€ã„ãã¤ã‹ã®çµ„ã¿è¾¼ã¿é–¢æ•°ã‚„組ã¿è¾¼ã¿ã‚ªãƒ–ジェクトをåˆæœŸåŒ–ã—ã¾ã™ã€‚ã“れら㮠JavaScript 組ã¿è¾¼ã¿æ©Ÿèƒ½ã«ã¤ã„ã¦ã¯ã€jsdocs ã‚’å‚ç…§ã—ã¦ãã ã•ã„。
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jsadebugd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jsadebugd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jsadebugd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jsadebugd 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -147,6 +146,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jstack.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jstack.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstack 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstack 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -189,6 +188,4 @@
 .LP
 æ··åˆãƒ¢ãƒ¼ãƒ‰ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ (\-m オプション使用) ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒãƒƒã‚°ã‚µãƒ¼ãƒãƒ¼ã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jstat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jstat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstat 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -487,7 +486,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 260 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 259 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -887,7 +886,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 314 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 313 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1170,7 +1169,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 350 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 349 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1634,7 +1633,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 420 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 419 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2258,7 +2257,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 494 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 493 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2638,7 +2637,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 517 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 516 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2954,7 +2953,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 571 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 570 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3409,7 +3408,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 627 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 626 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3805,7 +3804,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 669 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 668 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4150,7 +4149,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 711 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 710 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4495,7 +4494,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 753 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 752 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4880,7 +4879,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 803 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 802 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5179,7 +5178,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 829 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 828 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5462,6 +5461,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/jstatd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/jstatd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstatd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstatd 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -298,6 +297,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/keytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/keytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH keytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH keytool 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -1643,6 +1642,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/kinit.1	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-'\" t
-.\"
-.\" Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
-.\" 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.
-.\"
-.\"
-.\" 
-.TH kinit 1 "2004 ǯ 6 ·î 22 Æü"
-.SH "̾Á°"
-kinit \- kinit ¤Ï Kerberos ¥Á¥±¥Ã¥Èµö²Ä¥Á¥±¥Ã¥È¤ò¼èÆÀ¤ª¤è¤Ó¥­¥ã¥Ã¥·¥å
-¤¹¤ë¤È¤­¤Ë»ÈÍѤ·¤Þ¤¹¡£¤³¤Î¥Ä¡¼¥ë¤Ï¤Û¤«¤Î°ìÈÌŪ¤Ê Kerberos ¼ÂÁõ 
-(SEAM ¤ä MIT ¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¼ÂÁõ¤Ê¤É) ¤Î kinit ¥Ä¡¼¥ë¤Èµ¡Ç½Åª¤Ë»÷¤Æ¤¤¤Þ¤¹¡£
-.LP
-kinit ¤ò»ÈÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢kinit ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë Key Distribution Center 
-(KDC) ¤ò»ÈÍѤ·¤Æ¥×¥ê¥ó¥·¥Ñ¥ë¤È¤·¤ÆÅÐÏ¿¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-.SH "·Á¼°"
-.B kinit
-[
-.IR commands " ]" 
-<principal name>
-.SH "µ¡Ç½ÀâÌÀ"
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢UNIX ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¡¢/tmp/krb5cc_<uid> ¤È¤¤¤¦
-̾Á°¤Î¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤¬À¸À®¤µ¤ì¤Þ¤¹¡£<uid> ¤Ï¡¢¥·¥¹¥Æ¥à¤Ë¥í¥°¥¤¥ó
-¤·¤¿¥æ¡¼¥¶¤Î¥æ¡¼¥¶¼±ÊÌÈÖ¹æ¤Ç¤¹¡£¤½¤Î¾¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¡¢
-<USER_HOME>/krb5cc_<USER_NAME> ¤È¤¤¤¦Ì¾Á°¤Î¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë
-¤¬À¸À®¤µ¤ì¤Þ¤¹¡£
-.LP
-<USER_HOME> ¤Ï 
-.BR java.lang.System 
-¥×¥í¥Ñ¥Æ¥£¤Î 
-.BR user.home
-¤«¤é¼èÆÀ¤µ¤ì¤Þ¤¹¡£<USER_NAME> ¤Ï 
-.BR java.lang.System 
-¥×¥í¥Ñ¥Æ¥£¤Î 
-.BR user.name
-¤«¤é¼èÆÀ¤µ¤ì¤Þ¤¹¡£<USER_HOME> ¤¬ null ¤Ç¤¢¤ë¾ì¹ç¡¢
-¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤Ï¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤¿¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë³ÊǼ¤µ¤ì
-¤Þ¤¹¡£<USER_NAME> ¤Ï¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Î¥í¥°¥¤¥ó¥æ¡¼¥¶Ì¾
-¤Ç¤¹¡£¤³¤Î¥æ¡¼¥¶Ì¾¤Ï¥æ¡¼¥¶¤Î¥×¥ê¥ó¥·¥Ñ¥ë̾¤È¤Ï°Û¤Ê¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
-¤¿¤È¤¨¤Ð Solaris ¤Ç¤Ï¡¢<USER_NAME> ¤¬ duke ¤Ç¤¢¤ê¡¢<USER_HOME> 
-¤¬ /home/duke ¤Ç¤¢¤ë¾ì¹ç¡¢¥æ¡¼¥¶¤Î¥×¥ê¥ó¥·¥Ñ¥ë̾¤Ï /home/duke/krb5cc_duke 
-¤Ë¤Ê¤ê¤Þ¤¹¡£
-.LP
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥­¡¼¥¿¥Ö̾¤Ï Kerberos ¹½À®¥Õ¥¡¥¤¥ë¤«¤é¼èÆÀ¤µ¤ì¤Þ¤¹¡£
-¥­¡¼¥¿¥Ö̾¤¬ Kerberos ¹½À®¥Õ¥¡¥¤¥ë¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥­¡¼¥¿¥Ö̾¤Ï <USER_HOME>/krb5.keytab ¤Ë¤Ê¤ê¤Þ¤¹¡£
-.LP
-¥³¥Þ¥ó¥É¹Ô¤Î password ¥ª¥×¥·¥ç¥ó¤Ç¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¢
-kinit ¤Ï¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤòµá¤á¤Þ¤¹¡£
-.LP
-.B Ãí:
-¥³¥Þ¥ó¥É¹Ô¤Î password ¥ª¥×¥·¥ç¥ó¤Ï¥Æ¥¹¥È¤ÎÌÜŪ¤À¤±¤ËÄ󶡤µ¤ì¤Þ¤¹¡£
-¥Ñ¥¹¥ï¡¼¥É¤ò¥¹¥¯¥ê¥×¥ÈÆâ¤Ë»ØÄꤷ¤¿¤ê¡¢¥³¥Þ¥ó¥É¹Ô¤Ë»ØÄꤷ¤¿¤ê¤·¤Ê¤¤¤Ç
-¤¯¤À¤µ¤¤¡£¤½¤¦¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¥Ñ¥¹¥ï¡¼¥É¤¬Ï³¤ì¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£
-.LP
-¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢kinit ´ØÏ¢¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.SH "¥³¥Þ¥ó¥É"
-.B kinit \-fp
-[
-\-c <cache_name> ]
-[
-\-k ]
-[
-\-t <keytab_filename> ]
-[
-<principal> ]
-[
-<password> ]
-[
-\-help ]
-.TP
-.BI \-f
-žÁ÷²Äǽ¤Ê¥Á¥±¥Ã¥È¤òȯ¹Ô¤·¤Þ¤¹¡£
-.TP
-.BI \-p
-¥×¥í¥­¥·²Äǽ¤Ê¥Á¥±¥Ã¥È¤òȯ¹Ô¤·¤Þ¤¹¡£
-.TP
-.BI \-c 
-<cache_name>
-¥­¥ã¥Ã¥·¥å̾ (¤¿¤È¤¨¤Ð¡¢FILE:/temp/mykrb5cc)¡£
-.TP
-.BI \-k
-¥­¡¼¥¿¥Ö¤ò»ÈÍѤ·¤Þ¤¹¡£
-.TP
-.BI \-t 
-<keytab_filename>
-¥­¡¼¥¿¥Ö̾ (¤¿¤È¤¨¤Ð¡¢/home/duke/krb5.keytab)¡£
-.TP
-.BI <principal>
-¥×¥ê¥ó¥·¥Ñ¥ë̾ (¤¿¤È¤¨¤Ð¡¢duke@java.sun.com)¡£
-.TP
-.BI <password>
-¥×¥ê¥ó¥·¥Ñ¥ë¤Î Kerberos ¥Ñ¥¹¥ï¡¼¥É (¥³¥Þ¥ó¥É¹Ô¤ä¥¹¥¯¥ê¥×¥È¤Ë¥Ñ¥¹¥ï¡¼¥É
-¤ò»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤)¡£
-.TP
-.BI \-help
-¥Ø¥ë¥×¤òɽ¼¨¤·¤Þ¤¹¡£
-.SH "»ÈÍÑÎã"
-ǧ¾Ú¤ËÍ­¸ú¤Ê»ñ³Ê¤ò¸½ºß¤Î¥¯¥é¥¤¥¢¥ó¥È¥Û¥¹¥È¤«¤éÍ׵ᤷ¤Æ¡¢
-¥Ç¥Õ¥©¥ë¥È¥µ¡¼¥Ó¥¹¤Î¤¿¤á¤Ë»ñ³Ê¤Î¥­¥ã¥Ã¥·¥å¤ò¥Ç¥Õ¥©¥ë¥È¤Î¾ì½ê 
-(/home/duke/krb5cc_duke) ¤Ë³ÊǼ¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-kinit duke@JAVA.SUN.COM
-.fi
-.ft 1
-.LP
-°Û¤Ê¤ë¥×¥ê¥ó¥·¥Ñ¥ë¤Î¤¿¤á¤Ë¥×¥í¥­¥·²Äǽ¤Ê»ñ³Ê¤òÍ׵ᤷ¤Æ¡¢¤³¤ì¤é¤Î»ñ³Ê¤ò
-»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¥­¥ã¥Ã¥·¥å¤Ë³ÊǼ¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-kinit \-p \-c FILE:/home/duke/credentials/krb5cc_cafebeef cafebeef@JAVA.SUN.COM
-.fi
-.ft 1
-.LP
-°Û¤Ê¤ë¥×¥ê¥ó¥·¥Ñ¥ë¤Î¤¿¤á¤Ë¥×¥í¥­¥·²Äǽ¤ÇžÁ÷²Äǽ¤Ê»ñ³Ê¤òÍ׵ᤷ¤Æ¡¢
-¤³¤ì¤é¤Î»ñ³Ê¤ò»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¥­¥ã¥Ã¥·¥å¤Ë³ÊǼ¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-kinit \-f \-p \-c
-FILE:/home/duke/credentials/krb5cc_cafebeef cafebeef@JAVA.SUN.COM
-.fi
-.ft 1
-.LP
-kinit ¤Î¥Ø¥ë¥×¥á¥Ë¥å¡¼¤òɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-kinit \-help
-.fi
-.ft 1
-.LP
-.SH "¥»¥­¥å¥ê¥Æ¥£¤Ë´Ø¤¹¤ë·Ù¹ð"
-¥³¥Þ¥ó¥É¹Ô¤Î 
-.BR password
-¥ª¥×¥·¥ç¥ó¤Ï¥Æ¥¹¥È¤ÎÌÜŪ¤À¤±¤ËÄ󶡤µ¤ì¤Þ¤¹¡£¥Ñ¥¹¥ï¡¼¥É¤ò¥³¥Þ¥ó¥É¹Ô¤Ë»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
-¤³¤ì¤Ï¥»¥­¥å¥ê¥Æ¥£¥Û¡¼¥ë¤Ë¤Ê¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢UNIX ¤Î 
-.BR ps
-¥³¥Þ¥ó¥É¤Î¼Â¹ÔÃæ¤Ë¡¢¹¶·â¼Ô¤Ï¥Ñ¥¹¥ï¡¼¥É¤ò¸¡½Ð¤¹¤ë¤³¤È¤¬¤Ç¤­¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
--- a/jdk/src/linux/doc/man/ja/klist.1	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-'\" t
-.\"
-.\" Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
-.\" 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.
-.\"
-.\" 
-.TH klist 1 "2004 ǯ 6 ·î 22 Æü"
-.SH "̾Á°"
-klist \- Kerberos ¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤È¥­¡¼¥¿¥ÖÆâ¤Î¥¨¥ó¥È¥ê¤òɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.BR klist 
-¤ò»ÈÍѤ¹¤ë¤È¡¢¥æ¡¼¥¶¤Ï¥í¡¼¥«¥ë¤Ë¤¢¤ë¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤È
-¥­¡¼¥Æ¡¼¥Ö¥ëÆâ¤Î¥¨¥ó¥È¥ê¤òɽ¼¨¤Ç¤­¤Þ¤¹¡£
-.SH "·Á¼°"
-.B klist
-[
-.IR commands " ]" 
-.SH "µ¡Ç½ÀâÌÀ"
-.BR klist
-¤Ï¥í¡¼¥«¥ë¤Ë¤¢¤ë¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤È¥­¡¼¥Æ¡¼¥Ö¥ëÆâ¤Î¥¨¥ó¥È¥ê¤òɽ¼¨¤·¤Þ¤¹¡£
-¥æ¡¼¥¶¤¬
-.BR kinit 
-¤ò»ÈÍѤ·¤Æ¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤òÊѹ¹¤·¤¿¤ê¡¢
-.BR ktab
-¤ò»ÈÍѤ·¤Æ¥­¡¼¥¿¥Ö¤òÊѹ¹¤·¤¿¸å¡¢Êѹ¹¤ò³Îǧ¤¹¤ëÍ£°ì¤ÎÊýË¡¤Ï¡¢
-.BR klist
-¤ò»ÈÍѤ·¤Æ¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤Þ¤¿¤Ï¥­¡¼¥¿¥Ö¤ÎÆâÍƤòɽ¼¨¤¹¤ë¤³¤È¤Ç¤¹¡£
-.BR klist
-¤Ï Kerberos ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÊѹ¹¤·¤Þ¤»¤ó¡£
-
-.SH "¥³¥Þ¥ó¥É"
-.B klist 
-[
-\-c [\-fe]]
-[
-\-k [\-tK]]
-[
-<name>]
-[
-\-help ]
-.TP
-.BI \-c
-ɽ¼¨¤·¤¿¤¤¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤Î¥¨¥ó¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£
-.TP
-.BI \-k
-ɽ¼¨¤·¤¿¤¤¥­¡¼¥¿¥Ö¤Î¥¨¥ó¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£
-.TP
-.BI <cache_name>
-¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å̾¤Þ¤¿¤Ï¥­¡¼¥¿¥Ö̾¤ò»ØÄꤷ¤Þ¤¹¡£Ì¾Á°¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¢
-¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å̾¤Þ¤¿¤Ï¥­¡¼¥¿¥Ö¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤ¬»ÈÍѤµ¤ì¤Þ¤¹¡£
-¥­¥ã¥Ã¥·¥å¤È¥­¡¼¥¿¥Ö¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤˤĤ¤¤Æ¤Ï¡¢
-.BR kinit
-¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.LP
-\-c ¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¡¢¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥åÍѤΥª¥×¥·¥ç¥ó¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£
-.TP
-.BI \-f
-¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥Õ¥é¥°¤òɽ¼¨¤·¤Þ¤¹¡£
-.TP
-.BI \-e
-°Å¹æ²½¥¿¥¤¥×¤òɽ¼¨¤·¤Þ¤¹¡£
-.LP
-\-k ¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¡¢¥­¡¼¥¿¥ÖÍѤΥª¥×¥·¥ç¥ó¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£
-.TP
-.BI \-t
-¥­¡¼¥¿¥Ö¥¨¥ó¥È¥ê¤Î¥¿¥¤¥à¥¹¥¿¥ó¥×¤òɽ¼¨¤·¤Þ¤¹¡£
-.TP
-.BI \-K
-¥­¡¼¥¿¥Ö¥¨¥ó¥È¥ê¤Î DES ¥­¡¼¤òɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.TP
-.BI \-help
-¥Ø¥ë¥×¤òɽ¼¨¤·¤Þ¤¹¡£
-.SH "»ÈÍÑÎã"
-»ØÄꤷ¤¿¥­¡¼¥Æ¡¼¥Ö¥ë¤Î¥¨¥ó¥È¥ê¤È¡¢¤½¤Î¥¿¥¤¥à¥¹¥¿¥ó¥×¤È DES ¥­¡¼
-¤òɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-klist \-k \-t \-K FILE:/temp/mykrb5cc
-.fi
-.ft 1
-.LP
-»ØÄꤷ¤¿¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥­¥ã¥Ã¥·¥å¤Î¥¨¥ó¥È¥ê¤È¡¢¤½¤Î¥¯¥ì¥Ç¥ó¥·¥ã¥ë¥Õ¥é¥°¤È¥¢¥É¥ì¥¹¥ê¥¹¥È¤ò
-ɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-klist \-c \-f FILE:/temp/mykrb5cc
-.fi
-.ft 1
-.LP
--- a/jdk/src/linux/doc/man/ja/ktab.1	Thu Jul 29 17:04:07 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-'\" t
-.\"
-.\" Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
-.\" 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.
-.\"
-.\" 
-.TH ktab 1 "2004 ǯ 6 ·î 22 Æü"
-.SH "̾Á°"
-ktab \- Kerberos ¥­¡¼¥Æ¡¼¥Ö¥ë¥Þ¥Í¡¼¥¸¥ã
-.LP
-.BR ktab
-¤ò»ÈÍѤ¹¤ë¤È¡¢¥æ¡¼¥¶¤Ï¥í¡¼¥«¥ë¤Ë¤¢¤ë¥­¡¼¥Æ¡¼¥Ö¥ë¤Ë³ÊǼ¤µ¤ì¤¿
-¥×¥ê¥ó¥·¥Ñ¥ë̾¤È¥µ¡¼¥Ó¥¹¥­¡¼¤ò´ÉÍý¤Ç¤­¤Þ¤¹¡£¥­¡¼¥¿¥ÖÆâ¤Î¥×¥ê¥ó¥·¥Ñ¥ë
-¤È¥­¡¼¥Ú¥¢¤Ï¡¢¥Û¥¹¥È¾å¤ÇÆ°ºî¤·¤Æ¤¤¤ë¥µ¡¼¥Ó¥¹¤Ë¡¢¤½¤ì¤é¼«¿È¤ò 
-Key Distribution Center (KDC) ¤Ëǧ¾Ú¤µ¤»¤Þ¤¹¡£¥µ¡¼¥Ð¤¬ Kerberos ¤ò
-»ÈÍѤǤ­¤ë¤è¤¦¤ËÀßÄꤹ¤ë¤Ë¤Ï¡¢¤½¤ÎÁ°¤Ë¥æ¡¼¥¶¤Ï¥µ¡¼¥Ð¤¬Æ°ºî¤·¤Æ¤¤¤ë
-¥Û¥¹¥È¾å¤Ç¥­¡¼¥¿¥Ö¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ktab ¤ò»ÈÍѤ·¤Æ¥­¡¼¥¿¥Ö
-¤òÊѹ¹¤·¤Æ¤â¡¢Kerberos ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ï±Æ¶Á¤·¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ
-¤¤¡£¥­¡¼¥¿¥ÖÆâ¤Î¥­¡¼¤òÊѹ¹¤·¤¿¾ì¹ç¡¢Kerberos ¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ÎÂбþ¤¹¤ë
-²Õ½ê¤âÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-.SH "·Á¼°"
-.B ktab
-[
-.IR commands " ]" 
-.SH "µ¡Ç½ÀâÌÀ"
-.BR ktab
-¤Ï¡¢¥­¡¼¥Æ¡¼¥Ö¥ëÆâ¤Î¥×¥ê¥ó¥·¥Ñ¥ë̾¤È¥­¡¼¥Ú¥¢¤ò´ÉÍý¤·¤Þ¤¹¡£
-.BR ktab
-¤ò»ÈÍѤ¹¤ë¤È¡¢¥æ¡¼¥¶¤Ï¥­¡¼¥Æ¡¼¥Ö¥ëÆâ¤Î¥×¥ê¥ó¥·¥Ñ¥ë̾¤È¥­¡¼¥Ú¥¢¤ò
-°ìÍ÷ɽ¼¨¡¢Äɲᢹ¹¿·¡¢¤Þ¤¿¤Ïºï½ü¤Ç¤­¤Þ¤¹¡£¤³¤ì¤é¤ÎÁàºî¤Ï¤¹¤Ù¤Æ¡¢
-Kerberos ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ï±Æ¶Á¤·¤Þ¤»¤ó¡£
-.LP
-.ft 3
-.B ¥­¡¼¥¿¥Ö
-.LP
-¥­¡¼¥¿¥Ö¤È¤Ï¡¢¥Û¥¹¥È¤¬»ý¤Ä¼«Ê¬¼«¿È¤Î¥­¡¼¥ê¥¹¥È¤Î¥³¥Ô¡¼¤Ç¤¢¤ê¡¢¥æ¡¼¥¶
-¤Î¥Ñ¥¹¥ï¡¼¥É¤È»÷¤Æ¤¤¤Þ¤¹¡£¼«Ê¬¼«¿È¤ò Key Distribution Center (KDC) 
-¤Ëǧ¾Ú¤µ¤»¤ëɬÍפ¬¤¢¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥µ¡¼¥Ð¤Ï¡¢¤½¤ì¼«¿È¤Î¥×¥ê¥ó¥·¥Ñ¥ë
-¤È¥­¡¼¤ò´Þ¤à¥­¡¼¥¿¥Ö¤ò»ý¤Ã¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥æ¡¼¥¶¤¬¼«Ê¬¤Î
-¥Ñ¥¹¥ï¡¼¥É¤òÊݸ¤ë¤³¤È¤¬ÂçÀڤǤ¢¤ë¤Î¤ÈƱÍͤˡ¢¥Û¥¹¥È¤Ï¼«Ê¬¤Î¥­¡¼¥¿¥Ö
-¤òÊݸ¤ë¤³¤È¤¬ÂçÀڤǤ¹¡£¥­¡¼¥¿¥Ö¥Õ¥¡¥¤¥ë¤Ï¾ï¤Ë¥í¡¼¥«¥ë¥Ç¥£¥¹¥¯¤Ë
-³ÊǼ¤·¤Æ¡¢root °Ê³°¤Î¥æ¡¼¥¶¤¬Æɤá¤Ê¤¤¤è¤¦¤ËÀßÄꤷ¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
-¥­¡¼¥¿¥Ö¥Õ¥¡¥¤¥ë¤Ï°Å¹æ²½¤»¤º¤Ë¥Í¥Ã¥È¥ï¡¼¥¯¤ØÁ÷¿®¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
-.SH "¥³¥Þ¥ó¥É"
-»ÈÍÑË¡: ¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤Ç¤ÏÂçʸ»ú¤È¾®Ê¸»ú¤Ï¶èÊ̤·¤Þ¤»¤ó¡£
-.LP
-.B ktab
-\-help
-.LP
-.B ktab
-\-l [\-k <keytab_name>]
-.LP
-.B ktab
-[\-a <principal_name> <password>] [\-k <keytab_name>]
-.LP
-.B ktab
-[\-d <principal_name>] [\-k <keytab_name>]
-.LP
-.TP
-.BI \-l
-¥­¡¼¥¿¥Ö̾¤È¥¨¥ó¥È¥ê¤ò°ìÍ÷ɽ¼¨¤·¤Þ¤¹¡£
-.TP
-.BI \-a
-<principal_name> <password>
-¥¨¥ó¥È¥ê¤ò¥­¡¼¥¿¥Ö¤ËÄɲä·¤Þ¤¹¡£Kerberos ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÊѹ¹¤·¤Þ¤»¤ó 
-(¥³¥Þ¥ó¥É¹Ô¤ä¥¹¥¯¥ê¥×¥È¤Ë¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤)¡£
-.TP
-.BI \-d 
-<principal_name>
-¥­¡¼¥¿¥Ö¤«¤é¥¨¥ó¥È¥ê¤òºï½ü¤·¤Þ¤¹¡£Kerberos ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÊѹ¹¤·¤Þ¤»¤ó¡£
-.TP
-.BI \-k
-<keytab_name>
-¥­¡¼¥¿¥Ö̾¤È¡¢ÀÜƬ¼­ FILE: ¤Ç»Ï¤Þ¤ë¥Ñ¥¹¤ò»ØÄꤷ¤Þ¤¹¡£
-.TP
-.BI \-help
-¥Ø¥ë¥×¤òɽ¼¨¤·¤Þ¤¹¡£
-.SH "»ÈÍÑÎã"
-¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥Æ¡¼¥Ö¥ëÆâ¤Î¥¨¥ó¥È¥ê¤ò¤¹¤Ù¤Æɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-ktab \-l
-.fi
-.ft 1
-.LP
-¿·¤·¤¤¥×¥ê¥ó¥·¥Ñ¥ë¤ò¥­¡¼¥Æ¡¼¥Ö¥ë¤ËÄɲä·¤Þ¤¹¡£¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤ¬µá¤á¤é¤ì¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-ktab \-a duke@java.sun.com
-.fi
-.ft 1
-.LP
-¥­¡¼¥Æ¡¼¥Ö¥ë¤«¤é¥×¥ê¥ó¥·¥Ñ¥ë¤òºï½ü¤·¤Þ¤¹¡£
-.LP
-.ft 3
-.nf
-ktab \-d duke@java.sun.com
-.fi
-.ft 1
-.LP
-.SH "¥»¥­¥å¥ê¥Æ¥£¤Ë´Ø¤¹¤ë·Ù¹ð"
-¥Ñ¥¹¥ï¡¼¥É¤ò¥³¥Þ¥ó¥É¹Ô¤Ë»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£¤³¤ì¤Ï¥»¥­¥å¥ê¥Æ¥£¥Û¡¼¥ë
-¤Ë¤Ê¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢UNIX ¤Î
-.BI ps
-¥³¥Þ¥ó¥É¤Î¼Â¹ÔÃæ¤Ë¡¢¹¶·â¼Ô¤Ï¥Ñ¥¹¥ï¡¼¥É¤ò¸¡½Ð¤¹¤ë¤³¤È¤¬¤Ç¤­¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
--- a/jdk/src/linux/doc/man/ja/native2ascii.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/native2ascii.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH native2ascii 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH native2ascii 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -78,6 +77,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/orbd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/orbd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH orbd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH orbd 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -374,6 +373,4 @@
 .br
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/pack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/pack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH pack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH pack200 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/linux/doc/man/ja/policytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/policytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH policytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH policytool 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -105,6 +104,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/rmic.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/rmic.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmic 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmic 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -265,6 +264,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/rmid.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/rmid.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmid 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmid 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -354,6 +353,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpathã€java(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/rmiregistry.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/rmiregistry.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmiregistry 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmiregistry 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -94,6 +93,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/rmi/Naming.html
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/schemagen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/schemagen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH schemagen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH schemagen 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/linux/doc/man/ja/serialver.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/serialver.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH serialver 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH serialver 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -121,6 +120,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/io/ObjectStreamClass.html
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/servertool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/servertool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH servertool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH servertool 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -125,6 +124,4 @@
 .LP
 
 .LP
-orbd(1) 
-.LP
- 
+orbd(1)  
--- a/jdk/src/linux/doc/man/ja/tnameserv.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/tnameserv.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH tnameserv 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH tnameserv 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
 Java IDL:一時ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“ス \- \f2tnameserv\fP
 .LP
-
-.LP
 .LP
 ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€Java IDL 一時ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“ス \f2tnameserv\fP ã®ä½¿ç”¨æ–¹æ³•ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚Java IDL ã«ã¯ã€Object Request Broker Daemon (ORBD) ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ORBD ã¯ã€ãƒ–ートストラップサービスã€ä¸€æ™‚ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“スã€\f3æŒç¶š\fPãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“スã€ãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’å«ã‚€ãƒ‡ãƒ¼ãƒ¢ãƒ³ãƒ—ロセスã§ã™ã€‚Java IDL ã®ã™ã¹ã¦ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ ORBD を使用ã—ã¦ã„ã¾ã™ãŒã€ä¸€æ™‚ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“スを使用ã™ã‚‹ä¾‹ã§ã¯ã€\f2orbd\fP ã®ä»£ã‚ã‚Šã« \f2tnameserv\fP を使用ã§ãã¾ã™ã€‚\f2orbd\fP ツールã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€\f2orbd\fP ã® orbd(1)ã¾ãŸã¯
 .na
@@ -499,6 +496,4 @@
 .fi
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/ja/unpack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/unpack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH unpack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH unpack200 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/linux/doc/man/ja/wsgen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/wsgen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsgen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsgen 1 "02 Jun 2010"
 .SH "åå‰"
 wsgen \- XML Web Services (JAX\-WS) 2.0 ã®ãŸã‚ã® Java(TM) API
 .RS 3
@@ -387,7 +386,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 144 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 143 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/linux/doc/man/ja/wsimport.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/wsimport.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsimport 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsimport 1 "02 Jun 2010"
 .SH "åå‰"
 wsimport \- XML Web Services (JAX\-WS) 2.0 ã®ãŸã‚ã® Java(TM) API
 .LP
@@ -467,7 +466,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 164 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 163 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/linux/doc/man/ja/xjc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/ja/xjc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH xjc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH xjc 1 "02 Jun 2010"
 
 .LP
 .ad c
--- a/jdk/src/linux/doc/man/jar.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jar.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jar 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jar 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -183,7 +182,7 @@
 
 .LP
 .LP
-Beginning with version 1.3 of the Java 2 SDK, the \f2jar\fP utility supports 
+Beginning with version 1.3 of the JDK, the \f2jar\fP utility supports 
 .na
 \f2JarIndex\fP @
 .fi
@@ -695,6 +694,4 @@
 .br
 
 .LP
-pack200(1) 
-.LP
- 
+pack200(1)  
--- a/jdk/src/linux/doc/man/jarsigner.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jarsigner.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jarsigner 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jarsigner 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -246,12 +245,12 @@
 DSA (Digital Signature Algorithm) with the SHA\-1 digest algorithm, or 
 .TP 2
 o
-the RSA algorithm with the SHA\-1 digest algorithm. 
+the RSA algorithm with the SHA\-256 digest algorithm. 
 .RE
 
 .LP
 .LP
-That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA1withRSA" algorithm.
+That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm.
 .LP
 .LP
 These default signature algorithms can be overridden using the \f2\-sigalg\fP option.
@@ -541,7 +540,7 @@
 .na
 \f2Appendix A\fP @
 .fi
-http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA or SHA1withRSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
+http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA or SHA256withRSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
 .LP
 .RE
 .TP 3
@@ -553,7 +552,7 @@
 .na
 \f2Appendix A\fP @
 .fi
-http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA\-1 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
+http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA\-256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
 .LP
 .RE
 .TP 3
@@ -1391,7 +1390,7 @@
 .nr 44 \n(83+(3*\n(38)
 .nr 84 +\n(44
 .nr TW \n(84
-.if t .if \n(TW>\n(.li .tm Table at line 1129 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1128 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1615,7 +1614,5 @@
 .RE
 
 .LP
-
-.LP
 .RE
  
--- a/jdk/src/linux/doc/man/java.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/java.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH java 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH java 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -299,19 +298,19 @@
 Disable background compilation. Normally the VM will compile the method as a background task, running the method in interpreter mode until the background compilation is finished. The \f2\-Xbatch\fP flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed. 
 .TP 3
 \-Xbootclasspath:bootclasspath 
-Specify a colon\-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.\fP 
+Specify a colon\-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java platform JDK. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java Runtime Environment binary code license.\fP 
 .TP 3
 \-Xbootclasspath/a:path 
 Specify a colon\-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path. 
 .TP 3
 \-Xbootclasspath/p:path 
-Specify a colon\-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.\fP 
+Specify a colon\-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java Runtime Environment binary code license.\fP 
 .TP 3
 \-Xcheck:jni 
 Perform additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used. 
 .TP 3
 \-Xfuture 
-Perform strict class\-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The \f3\-Xfuture\fP flag turns on stricter class\-file format checks that enforce closer conformance to the class\-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher. 
+Perform strict class\-file format checks. For purposes of backwards compatibility, the default format checks performed by the JDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The \f3\-Xfuture\fP flag turns on stricter class\-file format checks that enforce closer conformance to the class\-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher. 
 .TP 3
 \-Xnoclassgc 
 Disable class garbage collection. Use of this option will prevent memory recovery from loaded classes thus increasing overall memory usage. This could cause OutOfMemoryError to be thrown in some applications. 
@@ -487,6 +486,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/javac.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/javac.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javac 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javac 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -938,6 +937,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/javadoc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/javadoc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javadoc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javadoc 1 "02 Jun 2010"
 .SH "Name"
 javadoc \- The Java API Documentation Generator
 .RS 3
@@ -395,7 +394,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 353 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 352 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -529,7 +528,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 406 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 405 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1351,7 +1350,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 1123 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1122 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2080,7 +2079,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1666 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1665 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2426,7 +2425,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 1742 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1741 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2829,7 +2828,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1963 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1962 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2946,7 +2945,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1995 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1994 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3065,7 +3064,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2029 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2028 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3225,7 +3224,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2104 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2103 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3369,7 +3368,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2163 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2162 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3674,7 +3673,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 2341 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2340 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3937,7 +3936,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 2451 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2450 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5422,9 +5421,53 @@
 .RE
 
 .LP
+.LP
+.TS
+.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
+.de 35
+.ps \n(.s
+.vs \n(.vu
+.in \n(.iu
+.if \n(.u .fi
+.if \n(.j .ad
+.if \n(.j=0 .na
+..
+.nf
+.nr #~ 0
+.if n .nr #~ 0.6n
+.ds #d .d
+.if \(ts\n(.z\(ts\(ts .ds #d nl
+.fc
+.nr 33 \n(.s
+.rm 80
+.nr 80 0
+.80
+.rm 80
+.nr 38 1n
+.nr 79 0
+.nr 40 \n(79+(0*\n(38)
+.nr 80 +\n(40
+.nr TW \n(80
+.if t .if \n(TW>\n(.li .tm Table at line 3869 file Input is too wide - \n(TW units
+.fc  
+.nr #T 0-1
+.nr #a 0-1
+.eo
+.de T#
+.ds #d .d
+.if \(ts\n(.z\(ts\(ts .ds #d nl
+.mk ##
+.nr ## -1v
+.ls 1
+.ls
+..
+.ec
+.fc
+.nr T. 1
+.T# 1
+.35
+.TE
+.if \n-(b.=0 .nr c. \n(.c-\n(d.-3
 
 .LP
-.LP
-Javadoc is a trademark of Sun Microsystems, Inc. (The \f2javadoc\fP command itself does not require the trademark symbol.)
-.LP
  
--- a/jdk/src/linux/doc/man/javah.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/javah.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javah 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javah 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -156,6 +155,4 @@
 .LP
 javac(1), java(1), jdb(1), javap(1), javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/javap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/javap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javap 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -356,6 +355,4 @@
 .LP
 javac(1), java(1), jdb(1), javah(1), javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/javaws.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/javaws.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,17 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javaws 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
-
-.LP
+.TH javaws 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
 \f2javaws\fP Command Line
 .LP
-
-.LP
 .LP
 \ 
 .LP
@@ -360,6 +355,4 @@
 .LP
 .RE
 .RE
-
-.LP
  
--- a/jdk/src/linux/doc/man/jconsole.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jconsole.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jconsole 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jconsole 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -141,6 +140,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jdb.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jdb.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jdb 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jdb 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -364,6 +363,4 @@
 .LP
 javac(1), java(1), javah(1), javap(1), javadoc(1).
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jhat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jhat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jhat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jhat 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
--- a/jdk/src/linux/doc/man/jinfo.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jinfo.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jinfo 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jinfo 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -148,6 +147,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jmap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jmap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jmap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jmap 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -168,6 +167,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jps.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jps.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jps 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jps 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -264,6 +263,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jrunscript.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jrunscript.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jrunscript 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jrunscript 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -195,6 +194,4 @@
 .LP
 If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in jsdocs.
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jsadebugd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jsadebugd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jsadebugd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jsadebugd 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -134,6 +133,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jstack.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jstack.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstack 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstack 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -160,6 +159,4 @@
 .LP
 Mixed mode stack trace, the \-m option, does not work with the remote debug server.
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jstat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jstat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstat 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -458,7 +457,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 231 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 230 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -826,7 +825,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 281 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 280 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1083,7 +1082,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 317 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 316 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1547,7 +1546,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 387 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 386 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2171,7 +2170,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 461 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 460 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2551,7 +2550,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 484 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 483 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2867,7 +2866,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 538 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 537 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3322,7 +3321,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 594 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 593 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3718,7 +3717,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 636 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 635 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4063,7 +4062,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 678 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 677 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4408,7 +4407,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 720 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 719 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4793,7 +4792,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 770 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 769 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5092,7 +5091,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 796 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 795 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5375,6 +5374,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/jstatd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/jstatd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstatd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstatd 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -269,6 +268,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/keytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/keytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH keytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH keytool 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -150,7 +149,9 @@
 .fl
 \-keysize
 .fl
-    1024 (when using \fP\f3\-genkeypair\fP\f3)
+    2048 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "RSA")
+.fl
+    1024 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "DSA")
 .fl
     56 (when using \fP\f3\-genseckey\fP\f3 and \-keyalg is "DES")
 .fl
@@ -186,7 +187,7 @@
 .fi
 
 .LP
-In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", \f2\-sigalg\fP defaults to "SHA1withRSA". Please consult the 
+In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", \f2\-sigalg\fP defaults to "SHA256withRSA". Please consult the 
 .na
 \f2Java Cryptography Architecture API Specification & Reference\fP @
 .fi
@@ -477,7 +478,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 288 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 289 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -664,6 +665,9 @@
 .LP
 The subjectKeyIdentifier extension is always created. For non self\-signed certificates, the authorityKeyIdentifier is always created.
 .LP
+.LP
+\f3Note:\fP Users should be aware that some combinations of extensions (and other certificate fields) may not conform to the Internet standard. See Warning Regarding Certificate Conformance for details.
+.LP
 .RE
 .RE
 .RE
@@ -679,12 +683,14 @@
 .LP
 .RS 3
 .TP 3
-\-gencert {\-infile infile} {\-outfile outfile} {\-ext ext}* {\-rfc} {\-alias alias} {\-sigalg sigalg} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] [\-keypass keypass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
+\-gencert {\-infile infile} {\-outfile outfile} {\-dname dname} {\-ext ext}* {\-rfc} {\-alias alias} {\-sigalg sigalg} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] [\-keypass keypass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
 .LP
 Generates a certificate as a response to a certificate request file (which can be created by the \f2keytool \-certreq\fP command). The command reads the request from infile (if omitted, from the standard input), signs it using alias's private key, and output the X.509 certificate into outfile (if omitted, to the standard output). If \f2\-rfc\fP is specified, output format is BASE64\-encoded PEM; otherwise, a binary DER is created. 
 .LP
 \f2sigalg\fP specifies the algorithm that should be used to sign the certificate. valDays tells the number of days for which the certificate should be considered valid. 
 .LP
+If \f2dname\fP is provided, it's used as the subject of the generated certificate. Otherwise, the one from the certificate request is used. 
+.LP
 \f2ext\fP shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of \f2\-ext\fP.  
 .TP 3
 \-genkeypair {\-alias alias} {\-keyalg keyalg} {\-keysize keysize} {\-sigalg sigalg} [\-dname dname] [\-keypass keypass] {\-startdate value} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
@@ -845,13 +851,13 @@
 .LP
 .RS 3
 .TP 3
-\-certreq {\-alias alias} {\-sigalg sigalg} {\-file certreq_file} [\-keypass keypass] {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerName provider_name} {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
+\-certreq {\-alias alias} {\-dname dname} {\-sigalg sigalg} {\-file certreq_file} [\-keypass keypass] {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerName provider_name} {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
 .LP
 Generates a Certificate Signing Request (CSR), using the PKCS#10 format. 
 .LP
 A CSR is intended to be sent to a certificate authority (CA). The CA will authenticate the certificate requestor (usually off\-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self\-signed certificate) in the keystore. 
 .LP
-The private key and X.500 Distinguished Name associated with \f2alias\fP are used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If \f2keypass\fP is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. 
+The private key associated with \f2alias\fP is used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If \f2keypass\fP is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. If dname is provided, it's used as the subject in the CSR. Otherwise, the X.500 Distinguished Name associated with alias is used. 
 .LP
 \f2sigalg\fP specifies the algorithm that should be used to sign the CSR. 
 .LP
@@ -2069,6 +2075,10 @@
 .fl
          SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
 .fl
+         SHA256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
+.fl
+                 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4
+.fl
 \fP
 .fi
 
@@ -2094,6 +2104,20 @@
 If you don't specify a required password option on a command line, you will be prompted for it.
 .LP
 .RE
+.SS 
+Warning Regarding Certificate Conformance
+.LP
+.RS 3
+
+.LP
+.LP
+The Internet standard 
+.na
+\f2RFC 5280\fP @
+.fi
+http://tools.ietf.org/rfc/rfc5280.txt has defined a profile on conforming X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. \f3keytool\fP has not enforced all these rules so it can generate certificates which do not conform to the standard, and these certificates might be rejected by JRE or other applications. Users should make sure that they provide the correct options for \f2\-dname\fP, \f2\-ext\fP, etc.
+.LP
+.RE
 .SH "SEE ALSO"
 .LP
 
@@ -2176,6 +2200,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/native2ascii.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/native2ascii.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH native2ascii 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH native2ascii 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -78,6 +77,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/orbd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/orbd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH orbd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH orbd 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -374,6 +373,4 @@
 .br
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/pack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/pack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH pack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH pack200 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -422,6 +421,4 @@
 .LP
 The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/policytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/policytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH policytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH policytool 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -89,6 +88,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/rmic.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/rmic.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmic 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmic 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -266,6 +265,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/rmid.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/rmid.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmid 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmid 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -348,6 +347,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath, java(1)
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/rmiregistry.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/rmiregistry.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmiregistry 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmiregistry 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -94,6 +93,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/rmi/Naming.html
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/schemagen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/schemagen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH schemagen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH schemagen 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -129,6 +128,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/serialver.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/serialver.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH serialver 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH serialver 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -121,6 +120,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/io/ObjectStreamClass.html
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/servertool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/servertool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH servertool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH servertool 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -125,6 +124,4 @@
 .LP
 
 .LP
-orbd(1) 
-.LP
- 
+orbd(1)  
--- a/jdk/src/linux/doc/man/tnameserv.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/tnameserv.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH tnameserv 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH tnameserv 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
 Java IDL: Transient Naming Service \- \f2tnameserv\fP
 .LP
-
-.LP
 .LP
 This document discusses using the Java IDL Transient Naming Service, \f2tnameserv\fP. Java IDL also includes the Object Request Broker Daemon (ORBD). ORBD is a daemon process containing a Bootstrap Service, a Transient Naming Service, a \f3Persistent\fP Naming Service, and a Server Manager. The Java IDL tutorials all use ORBD, however, you can substitute \f2tnameserv\fP for \f2orbd\fP in any of the examples that use a Transient Naming Service. For documentation on the \f2orbd\fP tool, link to its orbd(1) or the 
 .na
@@ -499,6 +496,4 @@
 .fi
 
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/unpack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/unpack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH unpack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH unpack200 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -190,6 +189,4 @@
 .LP
 The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
 .LP
-
-.LP
  
--- a/jdk/src/linux/doc/man/wsgen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/wsgen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsgen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsgen 1 "02 Jun 2010"
 .SH "Name"
 wsgen \- Java(TM) API for XML Web Services (JAX\-WS) 2.0
 .RS 3
@@ -355,7 +354,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 140 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 139 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/linux/doc/man/wsimport.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/wsimport.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsimport 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsimport 1 "02 Jun 2010"
 .SH "Name"
 wsimport \- Java(TM) API for XML Web Services (JAX\-WS) 2.0
 .LP
@@ -419,7 +418,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 158 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 157 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/linux/doc/man/xjc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/linux/doc/man/xjc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH xjc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH xjc 1 "02 Jun 2010"
 
 .LP
 .ad c
@@ -285,6 +284,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,7 @@
     private final Class<? extends T> type;
     private final boolean allow;
     private final String suffix;
-    private String[] packages;
+    private volatile String[] packages;
 
     InstanceFinder(Class<? extends T> type, boolean allow, String suffix, String... packages) {
         this.type = type;
@@ -49,9 +49,7 @@
     }
 
     public String[] getPackages() {
-        return (this.packages.length > 0)
-                ? this.packages.clone()
-                : this.packages;
+        return this.packages.clone();
     }
 
     public void setPackages(String... packages) {
--- a/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -118,7 +118,7 @@
      * @throws NoSuchMethodException if method is not accessible or is not found
      *                               in specified superclass or interface
      */
-    private static Method findAccessibleMethod(Method method) throws NoSuchMethodException {
+    public static Method findAccessibleMethod(Method method) throws NoSuchMethodException {
         Class<?> type = method.getDeclaringClass();
         if (Modifier.isPublic(type.getModifiers())) {
             return method;
--- a/jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,17 +47,22 @@
     }
 
     public void register(Class<?> type, PersistenceDelegate delegate) {
-        if (delegate != null) {
-            this.registry.put(type, delegate);
-        }
-        else {
-            this.registry.remove(type);
+        synchronized (this.registry) {
+            if (delegate != null) {
+                this.registry.put(type, delegate);
+            }
+            else {
+                this.registry.remove(type);
+            }
         }
     }
 
     @Override
     public PersistenceDelegate find(Class<?> type) {
-        PersistenceDelegate delegate = this.registry.get(type);
+        PersistenceDelegate delegate;
+        synchronized (this.registry) {
+            delegate = this.registry.get(type);
+        }
         return (delegate != null) ? delegate : super.find(type);
     }
 }
--- a/jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,12 +64,18 @@
     }
 
     public void register(Class<?> type, Class<?> editor) {
-        this.registry.put(type, editor);
+        synchronized (this.registry) {
+            this.registry.put(type, editor);
+        }
     }
 
     @Override
     public PropertyEditor find(Class<?> type) {
-        PropertyEditor editor = instantiate(this.registry.get(type), null);
+        Class<?> predefined;
+        synchronized (this.registry) {
+            predefined = this.registry.get(type);
+        }
+        PropertyEditor editor = instantiate(predefined, null);
         if (editor == null) {
             editor = super.find(type);
             if ((editor == null) && (null != type.getEnumConstants())) {
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1440,10 +1440,6 @@
             }
         }
 
-        public Insets getBorderInsets(Component c) {
-            return getBorderInsets(c, null);
-        }
-
         public Insets getBorderInsets(Component c, Insets i) {
             SynthContext context = getContext(c);
 
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -271,7 +271,9 @@
     }
 
     public void uninstallUI(JComponent c) {
-        getFileChooser().removeAll();
+        c.removePropertyChangeListener(filterComboBoxModel);
+        approveButton.removeActionListener(getApproveSelectionAction());
+        filenameTextField.removeActionListener(getApproveSelectionAction());
         super.uninstallUI(c);
     }
 
@@ -515,6 +517,7 @@
 
     public void uninstallComponents(JFileChooser fc) {
         fc.removeAll();
+        bottomPanel = null;
         if (filterComboBoxModel != null) {
             fc.removePropertyChangeListener(filterComboBoxModel);
         }
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -424,7 +424,7 @@
             State rv;
             rv = super.getState();
             if (rv != State.DISABLED
-                && ! comboBox.isEditable()
+                && comboBox != null && ! comboBox.isEditable()
                 && XPStyle.getXP().isSkinDefined(comboBox,
                                                  Part.CP_DROPDOWNBUTTONRIGHT)) {
                 /*
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,7 +41,7 @@
  * @author Raul Benito(Of the xerces copy, and little adaptations).
  * @author Anli Shundi
  * @author Christian Geuer-Pollmann
- * @see <A HREF="ftp://ftp.isi.edu/in-notes/rfc2045.txt">RFC 2045</A>
+ * @see <A HREF="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</A>
  * @see com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode
  */
 public class Base64 {
--- a/jdk/src/share/classes/com/sun/security/auth/LdapPrincipal.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/auth/LdapPrincipal.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,7 +31,7 @@
 
 /**
  * A principal identified by a distinguished name as specified by
- * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>.
+ * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
  *
  * <p>
  * After successful authentication, a user {@link java.security.Principal}
@@ -122,7 +122,7 @@
 
     /**
      * Creates a string representation of this principal's name in the format
-     * defined by <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
+     * defined by <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
      * If the name has zero components an empty string is returned.
      *
      * @return The principal's string name.
--- a/jdk/src/share/classes/com/sun/security/sasl/CramMD5Client.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/sasl/CramMD5Client.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,7 +33,7 @@
 
 /**
   * Implements the CRAM-MD5 SASL client-side mechanism.
-  * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2195.txt">RFC 2195</A>).
+  * (<A HREF="http://www.ietf.org/rfc/rfc2195.txt">RFC 2195</A>).
   * CRAM-MD5 has no initial response. It receives bytes from
   * the server as a challenge, which it hashes by using MD5 and the password.
   * It concatenates the authentication ID with this result and returns it
--- a/jdk/src/share/classes/com/sun/security/sasl/CramMD5Server.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/sasl/CramMD5Server.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,7 +38,7 @@
 
 /**
   * Implements the CRAM-MD5 SASL server-side mechanism.
-  * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2195.txt">RFC 2195</A>).
+  * (<A HREF="http://www.ietf.org/rfc/rfc2195.txt">RFC 2195</A>).
   * CRAM-MD5 has no initial response.
   *
   * client <---- M={random, timestamp, server-fqdn} ------- server
--- a/jdk/src/share/classes/com/sun/security/sasl/ExternalClient.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/sasl/ExternalClient.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,7 @@
 
 /**
   * Implements the EXTERNAL SASL client mechanism.
-  * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2222.txt">RFC 2222</A>).
+  * (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>).
   * The EXTERNAL mechanism returns the optional authorization ID as
   * the initial response. It processes no challenges.
   *
--- a/jdk/src/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Client.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Client.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,10 +39,10 @@
 
 /**
   * Implements the GSSAPI SASL client mechanism for Kerberos V5.
-  * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2222.txt">RFC 2222</A>,
+  * (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>,
   * <a HREF="http://www.ietf.org/internet-drafts/draft-ietf-cat-sasl-gssapi-04.txt">draft-ietf-cat-sasl-gssapi-04.txt</a>).
   * It uses the Java Bindings for GSSAPI
-  * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2853.txt">RFC 2853</A>)
+  * (<A HREF="http://www.ietf.org/rfc/rfc2853.txt">RFC 2853</A>)
   * for getting GSSAPI/Kerberos V5 support.
   *
   * The client/server interactions are:
--- a/jdk/src/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Server.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Server.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,7 +39,7 @@
 
 /**
   * Implements the GSSAPI SASL server mechanism for Kerberos V5.
-  * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2222.txt">RFC 2222</A>,
+  * (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>,
   * <a HREF="http://www.ietf.org/internet-drafts/draft-ietf-cat-sasl-gssapi-00.txt">draft-ietf-cat-sasl-gssapi-00.txt</a>).
   *
   * Expects thread's Subject to contain server's Kerberos credentials
--- a/jdk/src/share/classes/java/awt/EventDispatchThread.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/awt/EventDispatchThread.java	Thu Jul 29 22:02:45 2010 -0700
@@ -61,85 +61,43 @@
  * @since 1.1
  */
 class EventDispatchThread extends Thread {
+
     private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
 
     private EventQueue theQueue;
     private boolean doDispatch = true;
+    private boolean threadDeathCaught = false;
+
     private static final int ANY_EVENT = -1;
 
     private Vector<EventFilter> eventFilters = new Vector<EventFilter>();
-    // used in handleException
-    private int modalFiltersCount = 0;
 
     EventDispatchThread(ThreadGroup group, String name, EventQueue queue) {
         super(group, name);
-        theQueue = queue;
+        setEventQueue(queue);
     }
 
-    void stopDispatchingImpl(boolean wait) {
-        // Note: We stop dispatching via a flag rather than using
-        // Thread.interrupt() because we can't guarantee that the wait()
-        // we interrupt will be EventQueue.getNextEvent()'s.  -fredx 8-11-98
-
-        StopDispatchEvent stopEvent = new StopDispatchEvent();
-
-        // wait for the dispatcher to complete
-        if (Thread.currentThread() != this) {
-
-            // fix 4122683, 4128923
-            // Post an empty event to ensure getNextEvent is unblocked
-            //
-            // We have to use postEventPrivate instead of postEvent because
-            // EventQueue.pop calls EventDispatchThread.stopDispatching.
-            // Calling SunToolkit.flushPendingEvents in this case could
-            // lead to deadlock.
-            theQueue.postEventPrivate(stopEvent);
-
-            if (wait) {
-                try {
-                    join();
-                } catch(InterruptedException e) {
-                }
-            }
-        } else {
-            stopEvent.dispatch();
-        }
-
-        theQueue.detachDispatchThread(this, false);
-    }
-
+    /*
+     * Must be called on EDT only, that's why no synchronization
+     */
     public void stopDispatching() {
-        stopDispatchingImpl(true);
-    }
-
-    public void stopDispatchingLater() {
-        stopDispatchingImpl(false);
-    }
-
-    class StopDispatchEvent extends AWTEvent implements ActiveEvent {
-        /*
-         * serialVersionUID
-         */
-        static final long serialVersionUID = -3692158172100730735L;
-
-        public StopDispatchEvent() {
-            super(EventDispatchThread.this,0);
-        }
-
-        public void dispatch() {
-            doDispatch = false;
-        }
+        doDispatch = false;
     }
 
     public void run() {
-        try {
-            pumpEvents(new Conditional() {
-                public boolean evaluate() {
-                    return true;
+        while (true) {
+            try {
+                pumpEvents(new Conditional() {
+                    public boolean evaluate() {
+                        return true;
+                    }
+                });
+            } finally {
+                EventQueue eq = getEventQueue();
+                if (eq.detachDispatchThread(this) || threadDeathCaught) {
+                    break;
                 }
-            });
-        } finally {
-            theQueue.detachDispatchThread(this, true);
+            }
         }
     }
 
@@ -190,7 +148,6 @@
                         }
                     }
                     eventFilters.add(k, filter);
-                    modalFiltersCount++;
                 } else {
                     eventFilters.add(filter);
                 }
@@ -200,28 +157,25 @@
 
     void removeEventFilter(EventFilter filter) {
         synchronized (eventFilters) {
-            if (eventFilters.contains(filter)) {
-                if (filter instanceof ModalEventFilter) {
-                    modalFiltersCount--;
-                }
-                eventFilters.remove(filter);
-            }
+            eventFilters.remove(filter);
         }
     }
 
     boolean pumpOneEventForFilters(int id) {
+        AWTEvent event = null;
+        boolean eventOK = false;
         try {
-            AWTEvent event;
-            boolean eventOK;
-            EventQueueDelegate.Delegate delegate =
-                EventQueueDelegate.getDelegate();
+            EventQueue eq = null;
+            EventQueueDelegate.Delegate delegate = null;
             do {
+                // EventQueue may change during the dispatching
+                eq = getEventQueue();
+                delegate = EventQueueDelegate.getDelegate();
+
                 if (delegate != null && id == ANY_EVENT) {
-                    event = delegate.getNextEvent(theQueue);
+                    event = delegate.getNextEvent(eq);
                 } else {
-                    event = (id == ANY_EVENT)
-                        ? theQueue.getNextEvent()
-                        : theQueue.getNextEvent(id);
+                    event = (id == ANY_EVENT) ? eq.getNextEvent() : eq.getNextEvent(id);
                 }
 
                 eventOK = true;
@@ -252,13 +206,15 @@
             if (delegate != null) {
                 handle = delegate.beforeDispatch(event);
             }
-            theQueue.dispatchEvent(event);
+            eq.dispatchEvent(event);
             if (delegate != null) {
                 delegate.afterDispatch(event, handle);
             }
+
             return true;
         }
         catch (ThreadDeath death) {
+            threadDeathCaught = true;
             return false;
 
         }
@@ -267,12 +223,10 @@
                           // Threads in the AppContext
 
         }
-        // Can get and throw only unchecked exceptions
-        catch (RuntimeException e) {
-            processException(e);
-        } catch (Error e) {
+        catch (Throwable e) {
             processException(e);
         }
+
         return true;
     }
 
@@ -281,14 +235,14 @@
             eventLog.fine("Processing exception: " + e);
         }
         getUncaughtExceptionHandler().uncaughtException(this, e);
-        // don't rethrow the exception to avoid EDT recreation
     }
 
-    boolean isDispatching(EventQueue eq) {
-        return theQueue.equals(eq);
+    public synchronized EventQueue getEventQueue() {
+        return theQueue;
     }
-
-    EventQueue getEventQueue() { return theQueue; }
+    public synchronized void setEventQueue(EventQueue eq) {
+        theQueue = eq;
+    }
 
     private static class HierarchyEventFilter implements EventFilter {
         private Component modalComponent;
--- a/jdk/src/share/classes/java/awt/EventQueue.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/awt/EventQueue.java	Thu Jul 29 22:02:45 2010 -0700
@@ -138,6 +138,15 @@
     private final Lock pushPopLock;
     private final Condition pushPopCond;
 
+    /*
+     * Dummy runnable to wake up EDT from getNextEvent() after
+     push/pop is performed
+     */
+    private final static Runnable dummyRunnable = new Runnable() {
+        public void run() {
+        }
+    };
+
     private EventDispatchThread dispatchThread;
 
     private final ThreadGroup threadGroup =
@@ -219,22 +228,22 @@
      * @param theEvent an instance of <code>java.awt.AWTEvent</code>,
      *          or a subclass of it
      */
-    final void postEventPrivate(AWTEvent theEvent) {
+    private final void postEventPrivate(AWTEvent theEvent) {
         theEvent.isPosted = true;
         pushPopLock.lock();
         try {
-            if (dispatchThread == null && nextQueue == null) {
+            if (nextQueue != null) {
+                // Forward the event to the top of EventQueue stack
+                nextQueue.postEventPrivate(theEvent);
+                return;
+            }
+            if (dispatchThread == null) {
                 if (theEvent.getSource() == AWTAutoShutdown.getInstance()) {
                     return;
                 } else {
                     initDispatchThread();
                 }
             }
-            if (nextQueue != null) {
-                // Forward event to top of EventQueue stack.
-                nextQueue.postEventPrivate(theEvent);
-                return;
-            }
             postEvent(theEvent, getPriority(theEvent));
         } finally {
             pushPopLock.unlock();
@@ -242,29 +251,20 @@
     }
 
     private static int getPriority(AWTEvent theEvent) {
-        if (theEvent instanceof PeerEvent &&
-            (((PeerEvent)theEvent).getFlags() &
-                PeerEvent.ULTIMATE_PRIORITY_EVENT) != 0)
-        {
-            return ULTIMATE_PRIORITY;
+        if (theEvent instanceof PeerEvent) {
+            PeerEvent peerEvent = (PeerEvent)theEvent;
+            if ((peerEvent.getFlags() & PeerEvent.ULTIMATE_PRIORITY_EVENT) != 0) {
+                return ULTIMATE_PRIORITY;
+            }
+            if ((peerEvent.getFlags() & PeerEvent.PRIORITY_EVENT) != 0) {
+                return HIGH_PRIORITY;
+            }
+            if ((peerEvent.getFlags() & PeerEvent.LOW_PRIORITY_EVENT) != 0) {
+                return LOW_PRIORITY;
+            }
         }
-
-        if (theEvent instanceof PeerEvent &&
-            (((PeerEvent)theEvent).getFlags() &
-                PeerEvent.PRIORITY_EVENT) != 0)
-        {
-            return HIGH_PRIORITY;
-        }
-
-        if (theEvent instanceof PeerEvent &&
-            (((PeerEvent)theEvent).getFlags() &
-                PeerEvent.LOW_PRIORITY_EVENT) != 0)
-        {
-            return LOW_PRIORITY;
-        }
-
         int id = theEvent.getID();
-        if (id == PaintEvent.PAINT || id == PaintEvent.UPDATE) {
+        if ((id >= PaintEvent.PAINT_FIRST) && (id <= PaintEvent.PAINT_LAST)) {
             return LOW_PRIORITY;
         }
         return NORM_PRIORITY;
@@ -501,16 +501,9 @@
             SunToolkit.flushPendingEvents();
             pushPopLock.lock();
             try {
-                for (int i = NUM_PRIORITIES - 1; i >= 0; i--) {
-                    if (queues[i].head != null) {
-                        EventQueueItem entry = queues[i].head;
-                        queues[i].head = entry.next;
-                        if (entry.next == null) {
-                            queues[i].tail = null;
-                        }
-                        uncacheEQItem(entry);
-                        return entry.event;
-                    }
+                AWTEvent event = getNextEventPrivate();
+                if (event != null) {
+                    return event;
                 }
                 AWTAutoShutdown.getInstance().notifyThreadFree(dispatchThread);
                 pushPopCond.await();
@@ -520,6 +513,24 @@
         } while(true);
     }
 
+    /*
+     * Must be called under the lock. Doesn't call flushPendingEvents()
+     */
+    AWTEvent getNextEventPrivate() throws InterruptedException {
+        for (int i = NUM_PRIORITIES - 1; i >= 0; i--) {
+            if (queues[i].head != null) {
+                EventQueueItem entry = queues[i].head;
+                queues[i].head = entry.next;
+                if (entry.next == null) {
+                    queues[i].tail = null;
+                }
+                uncacheEQItem(entry);
+                return entry.event;
+            }
+        }
+        return null;
+    }
+
     AWTEvent getNextEvent(int id) throws InterruptedException {
         do {
             /*
@@ -659,7 +670,9 @@
                 dispatchThread.stopDispatching();
             }
         } else {
-            System.err.println("unable to dispatch event: " + event);
+            if (eventLog.isLoggable(PlatformLogger.FINE)) {
+                eventLog.fine("Unable to dispatch event: " + event);
+            }
         }
     }
 
@@ -761,15 +774,23 @@
 
         pushPopLock.lock();
         try {
-            EventQueue toPush = this;
-            while (toPush.nextQueue != null) {
-                toPush = toPush.nextQueue;
+            EventQueue topQueue = this;
+            while (topQueue.nextQueue != null) {
+                topQueue = topQueue.nextQueue;
+            }
+
+            if ((topQueue.dispatchThread != null) &&
+                (topQueue.dispatchThread.getEventQueue() == this))
+            {
+                newEventQueue.dispatchThread = topQueue.dispatchThread;
+                topQueue.dispatchThread.setEventQueue(newEventQueue);
             }
 
             // Transfer all events forward to new EventQueue.
-            while (toPush.peekEvent() != null) {
+            while (topQueue.peekEvent() != null) {
                 try {
-                    newEventQueue.postEventPrivate(toPush.getNextEvent());
+                    // Use getNextEventPrivate() as it doesn't call flushPendingEvents()
+                    newEventQueue.postEventPrivate(topQueue.getNextEventPrivate());
                 } catch (InterruptedException ie) {
                     if (eventLog.isLoggable(PlatformLogger.FINE)) {
                         eventLog.fine("Interrupted push", ie);
@@ -777,28 +798,21 @@
                 }
             }
 
-            newEventQueue.previousQueue = toPush;
+            // Wake up EDT waiting in getNextEvent(), so it can
+            // pick up a new EventQueue. Post the waking event before
+            // topQueue.nextQueue is assigned, otherwise the event would
+            // go newEventQueue
+            topQueue.postEventPrivate(new InvocationEvent(topQueue, dummyRunnable));
 
-            /*
-             * Stop the event dispatch thread associated with the currently
-             * active event queue, so that after the new queue is pushed
-             * on the top this event dispatch thread won't prevent AWT from
-             * being automatically shut down.
-             * Use stopDispatchingLater() to avoid deadlock: stopDispatching()
-             * waits for the dispatch thread to exit, which in turn waits
-             * for the lock in EQ.detachDispatchThread(), which is hold by
-             * this method.
-             */
-            if (toPush.dispatchThread != null) {
-                toPush.dispatchThread.stopDispatchingLater();
+            newEventQueue.previousQueue = topQueue;
+            topQueue.nextQueue = newEventQueue;
+
+            AppContext appContext = AppContext.getAppContext();
+            if (appContext.get(AppContext.EVENT_QUEUE_KEY) == topQueue) {
+                appContext.put(AppContext.EVENT_QUEUE_KEY, newEventQueue);
             }
 
-            toPush.nextQueue = newEventQueue;
-
-            AppContext appContext = AppContext.getAppContext();
-            if (appContext.get(AppContext.EVENT_QUEUE_KEY) == toPush) {
-                appContext.put(AppContext.EVENT_QUEUE_KEY, newEventQueue);
-            }
+            pushPopCond.signalAll();
         } finally {
             pushPopLock.unlock();
         }
@@ -822,44 +836,51 @@
             eventLog.fine("EventQueue.pop(" + this + ")");
         }
 
-        EventDispatchThread dt = null;
         pushPopLock.lock();
         try {
-            EventQueue toPop = this;
-            while (toPop.nextQueue != null) {
-                toPop = toPop.nextQueue;
+            EventQueue topQueue = this;
+            while (topQueue.nextQueue != null) {
+                topQueue = topQueue.nextQueue;
             }
-            EventQueue prev = toPop.previousQueue;
-            if (prev == null) {
+            EventQueue prevQueue = topQueue.previousQueue;
+            if (prevQueue == null) {
                 throw new EmptyStackException();
             }
-            toPop.previousQueue = null;
+
+            topQueue.previousQueue = null;
+            prevQueue.nextQueue = null;
 
             // Transfer all events back to previous EventQueue.
-            prev.nextQueue = null;
-            while (toPop.peekEvent() != null) {
+            while (topQueue.peekEvent() != null) {
                 try {
-                    prev.postEventPrivate(toPop.getNextEvent());
+                    prevQueue.postEventPrivate(topQueue.getNextEventPrivate());
                 } catch (InterruptedException ie) {
                     if (eventLog.isLoggable(PlatformLogger.FINE)) {
                         eventLog.fine("Interrupted pop", ie);
                     }
                 }
             }
-            AppContext appContext = AppContext.getAppContext();
-            if (appContext.get(AppContext.EVENT_QUEUE_KEY) == this) {
-                appContext.put(AppContext.EVENT_QUEUE_KEY, prev);
+
+            if ((topQueue.dispatchThread != null) &&
+                (topQueue.dispatchThread.getEventQueue() == this))
+            {
+                prevQueue.dispatchThread = topQueue.dispatchThread;
+                topQueue.dispatchThread.setEventQueue(prevQueue);
             }
 
-            dt = toPop.dispatchThread;
+            AppContext appContext = AppContext.getAppContext();
+            if (appContext.get(AppContext.EVENT_QUEUE_KEY) == this) {
+                appContext.put(AppContext.EVENT_QUEUE_KEY, prevQueue);
+            }
+
+            // Wake up EDT waiting in getNextEvent(), so it can
+            // pick up a new EventQueue
+            topQueue.postEventPrivate(new InvocationEvent(topQueue, dummyRunnable));
+
+            pushPopCond.signalAll();
         } finally {
             pushPopLock.unlock();
         }
-
-        if (dt != null) {
-            dt.stopDispatching(); // Must be done outside synchronized
-                                  // block to avoid possible deadlock
-        }
     }
 
     /**
@@ -907,9 +928,9 @@
         try {
             AppContext appContext = AppContext.getAppContext();
             if (dispatchThread == null && !threadGroup.isDestroyed() && !appContext.isDisposed()) {
-                dispatchThread = (EventDispatchThread)
-                    AccessController.doPrivileged(new PrivilegedAction() {
-                        public Object run() {
+                dispatchThread = AccessController.doPrivileged(
+                    new PrivilegedAction<EventDispatchThread>() {
+                        public EventDispatchThread run() {
                             EventDispatchThread t =
                                 new EventDispatchThread(threadGroup,
                                                         name,
@@ -919,7 +940,8 @@
                             t.setDaemon(false);
                             return t;
                         }
-                    });
+                    }
+                );
                 AWTAutoShutdown.getInstance().notifyThreadBusy(dispatchThread);
                 dispatchThread.start();
             }
@@ -928,7 +950,7 @@
         }
     }
 
-    final void detachDispatchThread(EventDispatchThread edt, boolean restart) {
+    final boolean detachDispatchThread(EventDispatchThread edt) {
         /*
          * This synchronized block is to secure that the event dispatch
          * thread won't die in the middle of posting a new event to the
@@ -939,26 +961,21 @@
          */
         pushPopLock.lock();
         try {
-            EventDispatchThread oldDispatchThread = dispatchThread;
-            if (dispatchThread == edt) {
-                dispatchThread = null;
-            }
-            if (restart) {
+            if (edt == dispatchThread) {
                 /*
-                 * Event dispatch thread dies in case of an uncaught exception.
-                 * A new event dispatch thread for this queue will be started
-                 * only if a new event is posted to it. In case if no more
-                 * events are posted after this thread died all events that
-                 * currently are in the queue will never be dispatched.
+                 * Don't detach the thread if any events are pending. Not
+                 * sure if it's a possible scenario, though.
                  *
                  * Fix for 4648733. Check both the associated java event
                  * queue and the PostEventQueue.
                  */
                 if ((peekEvent() != null) || !SunToolkit.isPostEventQueueEmpty()) {
-                    initDispatchThread();
+                    return false;
                 }
-                AWTAutoShutdown.getInstance().notifyThreadFree(oldDispatchThread);
+                dispatchThread = null;
             }
+            AWTAutoShutdown.getInstance().notifyThreadFree(edt);
+            return true;
         } finally {
             pushPopLock.unlock();
         }
--- a/jdk/src/share/classes/java/beans/Encoder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/Encoder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -194,13 +194,8 @@
      * @see java.beans.BeanInfo#getBeanDescriptor
      */
     public PersistenceDelegate getPersistenceDelegate(Class<?> type) {
-        synchronized (this.finder) {
-            PersistenceDelegate pd = this.finder.find(type);
-            if (pd != null) {
-                return pd;
-            }
-        }
-        return MetaData.getPersistenceDelegate(type);
+        PersistenceDelegate pd = this.finder.find(type);
+        return (pd != null) ? pd : MetaData.getPersistenceDelegate(type);
     }
 
     /**
@@ -214,9 +209,7 @@
      * @see java.beans.BeanInfo#getBeanDescriptor
      */
     public void setPersistenceDelegate(Class<?> type, PersistenceDelegate delegate) {
-        synchronized (this.finder) {
-            this.finder.register(type, delegate);
-        }
+        this.finder.register(type, delegate);
     }
 
     /**
--- a/jdk/src/share/classes/java/beans/EventSetDescriptor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/EventSetDescriptor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,6 +27,7 @@
 
 import java.lang.ref.Reference;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 
 /**
  * An EventSetDescriptor describes a group of events that a given Java
@@ -175,10 +176,8 @@
         setRemoveListenerMethod(getMethod(sourceClass, removeListenerMethodName, 1));
 
         // Be more forgiving of not finding the getListener method.
-        Method method = Introspector.findMethod(sourceClass,
-                                                getListenerMethodName, 0);
-        if (method != null) {
-            setGetListenerMethod(method);
+        if (getListenerMethodName != null) {
+            setGetListenerMethod(Introspector.findInstanceMethod(sourceClass, getListenerMethodName));
         }
     }
 
@@ -188,7 +187,7 @@
             return null;
         }
         Method method = Introspector.findMethod(cls, name, args);
-        if (method == null) {
+        if ((method == null) || Modifier.isStatic(method.getModifiers())) {
             throw new IntrospectionException("Method not found: " + name +
                                              " on class " + cls.getName());
         }
--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -189,16 +189,11 @@
                     indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
                 }
             }
-
-            Class[] args = { int.class };
-
-            indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName,
-                                                        1, args);
+            indexedReadMethod = Introspector.findInstanceMethod(cls, indexedReadMethodName, int.class);
             if (indexedReadMethod == null) {
                 // no "is" method, so look for a "get" method.
                 indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
-                indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName,
-                                                            1, args);
+                indexedReadMethod = Introspector.findInstanceMethod(cls, indexedReadMethodName, int.class);
             }
             setIndexedReadMethod0(indexedReadMethod);
         }
@@ -270,8 +265,7 @@
             if (indexedWriteMethodName == null) {
                 indexedWriteMethodName = Introspector.SET_PREFIX + getBaseName();
             }
-            indexedWriteMethod = Introspector.findMethod(cls, indexedWriteMethodName,
-                         2, (type == null) ? null : new Class[] { int.class, type });
+            indexedWriteMethod = Introspector.findInstanceMethod(cls, indexedWriteMethodName, int.class, type);
             if (indexedWriteMethod != null) {
                 if (!indexedWriteMethod.getReturnType().equals(void.class)) {
                     indexedWriteMethod = null;
--- a/jdk/src/share/classes/java/beans/Introspector.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/Introspector.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,6 +28,7 @@
 import com.sun.beans.WeakCache;
 import com.sun.beans.finder.BeanInfoFinder;
 import com.sun.beans.finder.ClassFinder;
+import com.sun.beans.finder.MethodFinder;
 
 import java.lang.ref.Reference;
 import java.lang.ref.SoftReference;
@@ -157,21 +158,23 @@
         if (!ReflectUtil.isPackageAccessible(beanClass)) {
             return (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
         }
+        Map<Class<?>, BeanInfo> beanInfoCache;
+        BeanInfo beanInfo;
         synchronized (BEANINFO_CACHE) {
-            Map<Class<?>, BeanInfo> beanInfoCache =
-                    (Map<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE);
-
+            beanInfoCache = (Map<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE);
             if (beanInfoCache == null) {
                 beanInfoCache = new WeakHashMap<Class<?>, BeanInfo>();
                 AppContext.getAppContext().put(BEANINFO_CACHE, beanInfoCache);
             }
-            BeanInfo beanInfo = beanInfoCache.get(beanClass);
-            if (beanInfo == null) {
-                beanInfo = (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
+            beanInfo = beanInfoCache.get(beanClass);
+        }
+        if (beanInfo == null) {
+            beanInfo = new Introspector(beanClass, null, USE_ALL_BEANINFO).getBeanInfo();
+            synchronized (BEANINFO_CACHE) {
                 beanInfoCache.put(beanClass, beanInfo);
             }
-            return beanInfo;
         }
+        return beanInfo;
     }
 
     /**
@@ -301,10 +304,7 @@
      */
 
     public static String[] getBeanInfoSearchPath() {
-        BeanInfoFinder finder = getFinder();
-        synchronized (finder) {
-            return finder.getPackages();
-        }
+        return getFinder().getPackages();
     }
 
     /**
@@ -328,10 +328,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        BeanInfoFinder finder = getFinder();
-        synchronized (finder) {
-            finder.setPackages(path);
-        }
+        getFinder().setPackages(path);
     }
 
 
@@ -453,10 +450,7 @@
      * @return Instance of an explicit BeanInfo class or null if one isn't found.
      */
     private static BeanInfo findExplicitBeanInfo(Class beanClass) {
-        BeanInfoFinder finder = getFinder();
-        synchronized (finder) {
-            return finder.find(beanClass);
-        }
+        return getFinder().find(beanClass);
     }
 
     /**
@@ -849,8 +843,8 @@
                 Method read = result.getReadMethod();
 
                 if (read == null && write != null) {
-                    read = findMethod(result.getClass0(),
-                                      GET_PREFIX + NameGenerator.capitalize(result.getName()), 0);
+                    read = findInstanceMethod(result.getClass0(),
+                                              GET_PREFIX + NameGenerator.capitalize(result.getName()));
                     if (read != null) {
                         try {
                             result.setReadMethod(read);
@@ -860,9 +854,9 @@
                     }
                 }
                 if (write == null && read != null) {
-                    write = findMethod(result.getClass0(),
-                                       SET_PREFIX + NameGenerator.capitalize(result.getName()), 1,
-                                       new Class[] { FeatureDescriptor.getReturnType(result.getClass0(), read) });
+                    write = findInstanceMethod(result.getClass0(),
+                                               SET_PREFIX + NameGenerator.capitalize(result.getName()),
+                                               FeatureDescriptor.getReturnType(result.getClass0(), read));
                     if (write != null) {
                         try {
                             result.setWriteMethod(write);
@@ -1286,90 +1280,27 @@
     // Package private support methods.
     //======================================================================
 
-    /**
-     * Internal support for finding a target methodName with a given
-     * parameter list on a given class.
-     */
-    private static Method internalFindMethod(Class start, String methodName,
-                                                 int argCount, Class args[]) {
-        // For overriden methods we need to find the most derived version.
-        // So we start with the given class and walk up the superclass chain.
-
-        Method method = null;
-
-        for (Class cl = start; cl != null; cl = cl.getSuperclass()) {
-            Method methods[] = getPublicDeclaredMethods(cl);
-            for (int i = 0; i < methods.length; i++) {
-                method = methods[i];
-                if (method == null) {
-                    continue;
+    static Method findMethod(Class<?> type, String name, int args) {
+        for (Method method : type.getMethods()) {
+            if (method.getName().equals(name) && (args == method.getParameterTypes().length)) {
+                try {
+                    return MethodFinder.findAccessibleMethod(method);
                 }
-
-                // make sure method signature matches.
-                Class params[] = FeatureDescriptor.getParameterTypes(start, method);
-                if (method.getName().equals(methodName) &&
-                    params.length == argCount) {
-                    if (args != null) {
-                        boolean different = false;
-                        if (argCount > 0) {
-                            for (int j = 0; j < argCount; j++) {
-                                if (params[j] != args[j]) {
-                                    different = true;
-                                    continue;
-                                }
-                            }
-                            if (different) {
-                                continue;
-                            }
-                        }
-                    }
-                    return method;
+                catch (NoSuchMethodException exception) {
+                    // continue search for a method with the specified count of parameters
                 }
             }
         }
-        method = null;
-
-        // Now check any inherited interfaces.  This is necessary both when
-        // the argument class is itself an interface, and when the argument
-        // class is an abstract class.
-        Class ifcs[] = start.getInterfaces();
-        for (int i = 0 ; i < ifcs.length; i++) {
-            // Note: The original implementation had both methods calling
-            // the 3 arg method. This is preserved but perhaps it should
-            // pass the args array instead of null.
-            method = internalFindMethod(ifcs[i], methodName, argCount, null);
-            if (method != null) {
-                break;
-            }
-        }
-        return method;
+        return null;
     }
 
-    /**
-     * Find a target methodName on a given class.
-     */
-    static Method findMethod(Class cls, String methodName, int argCount) {
-        return findMethod(cls, methodName, argCount, null);
-    }
-
-    /**
-     * Find a target methodName with specific parameter list on a given class.
-     * <p>
-     * Used in the contructors of the EventSetDescriptor,
-     * PropertyDescriptor and the IndexedPropertyDescriptor.
-     * <p>
-     * @param cls The Class object on which to retrieve the method.
-     * @param methodName Name of the method.
-     * @param argCount Number of arguments for the desired method.
-     * @param args Array of argument types for the method.
-     * @return the method or null if not found
-     */
-    static Method findMethod(Class cls, String methodName, int argCount,
-                             Class args[]) {
-        if (methodName == null) {
+    static Method findInstanceMethod(Class<?> type, String name, Class<?>... args) {
+        try {
+            return MethodFinder.findInstanceMethod(type, name, args);
+        }
+        catch (NoSuchMethodException exception) {
             return null;
         }
-        return internalFindMethod(cls, methodName, argCount, args);
     }
 
     /**
--- a/jdk/src/share/classes/java/beans/MethodDescriptor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/MethodDescriptor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -82,21 +82,21 @@
         Method method = getMethod0();
         if (method == null) {
             Class cls = getClass0();
-            if (cls != null) {
+            String name = getName();
+            if ((cls != null) && (name != null)) {
                 Class[] params = getParams();
                 if (params == null) {
                     for (int i = 0; i < 3; i++) {
                         // Find methods for up to 2 params. We are guessing here.
                         // This block should never execute unless the classloader
                         // that loaded the argument classes disappears.
-                        method = Introspector.findMethod(cls, getName(), i, null);
+                        method = Introspector.findMethod(cls, name, i);
                         if (method != null) {
                             break;
                         }
                     }
                 } else {
-                    method = Introspector.findMethod(cls, getName(),
-                                                     params.length, params);
+                    method = Statement.getMethod(cls, name, params);
                 }
                 setMethod(method);
             }
--- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -112,9 +112,7 @@
         // If this class or one of its base classes allow PropertyChangeListener,
         // then we assume that any properties we discover are "bound".
         // See Introspector.getTargetPropertyInfo() method.
-        String name = "addPropertyChangeListener";
-        Class[] args = {PropertyChangeListener.class};
-        this.bound = (null != Introspector.findMethod(beanClass, name, args.length, args));
+        this.bound = null != Introspector.findInstanceMethod(beanClass, "addPropertyChangeListener", PropertyChangeListener.class);
     }
 
     /**
@@ -225,10 +223,10 @@
             // property type is.  For booleans, there can be "is" and "get"
             // methods.  If an "is" method exists, this is the official
             // reader method so look for this one first.
-            readMethod = Introspector.findMethod(cls, readMethodName, 0);
+            readMethod = Introspector.findInstanceMethod(cls, readMethodName);
             if (readMethod == null) {
                 readMethodName = Introspector.GET_PREFIX + getBaseName();
-                readMethod = Introspector.findMethod(cls, readMethodName, 0);
+                readMethod = Introspector.findInstanceMethod(cls, readMethodName);
             }
             try {
                 setReadMethod(readMethod);
@@ -293,8 +291,7 @@
                 writeMethodName = Introspector.SET_PREFIX + getBaseName();
             }
 
-            writeMethod = Introspector.findMethod(cls, writeMethodName, 1,
-                          (type == null) ? null : new Class[] { type });
+            writeMethod = Introspector.findInstanceMethod(cls, writeMethodName, type);
             if (writeMethod != null) {
                 if (!writeMethod.getReturnType().equals(void.class)) {
                     writeMethod = null;
--- a/jdk/src/share/classes/java/beans/PropertyEditorManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/beans/PropertyEditorManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,10 +81,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        PropertyEditorFinder finder = getFinder();
-        synchronized (finder) {
-            finder.register(targetType, editorClass);
-        }
+        getFinder().register(targetType, editorClass);
     }
 
     /**
@@ -95,10 +92,7 @@
      * The result is null if no suitable editor can be found.
      */
     public static PropertyEditor findEditor(Class<?> targetType) {
-        PropertyEditorFinder finder = getFinder();
-        synchronized (finder) {
-            return finder.find(targetType);
-        }
+        return getFinder().find(targetType);
     }
 
     /**
@@ -110,10 +104,7 @@
      *         e.g. Sun implementation initially sets to  {"sun.beans.editors"}.
      */
     public static String[] getEditorSearchPath() {
-        PropertyEditorFinder finder = getFinder();
-        synchronized (finder) {
-            return finder.getPackages();
-        }
+        return getFinder().getPackages();
     }
 
     /**
@@ -134,10 +125,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        PropertyEditorFinder finder = getFinder();
-        synchronized (finder) {
-            finder.setPackages(path);
-        }
+        getFinder().setPackages(path);
     }
 
     private static PropertyEditorFinder getFinder() {
--- a/jdk/src/share/classes/java/net/URI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/net/URI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -457,7 +457,7 @@
  * @author Mark Reinhold
  * @since 1.4
  *
- * @see <a href="http://ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279: UTF-8, a
+ * @see <a href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279: UTF-8, a
  * transformation format of ISO 10646</i></a>, <br><a
  * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC&nbsp;2373: IPv6 Addressing
  * Architecture</i></a>, <br><a
--- a/jdk/src/share/classes/java/nio/charset/package.html	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/java/nio/charset/package.html	Thu Jul 29 22:02:45 2010 -0700
@@ -48,7 +48,7 @@
 
 <p> A <i>charset</i> is named mapping between sequences of sixteen-bit Unicode
 characters and sequences of bytes, in the sense defined in <a
-href="http://ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>.  A
+href="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>.  A
 <i>decoder</i> is an engine which transforms bytes in a specific charset into
 characters, and an <i>encoder</i> is an engine which transforms characters into
 bytes.  Encoders and decoders operate on byte and character buffers.  They are
--- a/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java	Thu Jul 29 22:02:45 2010 -0700
@@ -107,10 +107,10 @@
  * significant in the <code><em>url-path</em></code>.</p>
  *
  * @see <a
- * href="ftp://ftp.rfc-editor.org/in-notes/rfc2609.txt">RFC 2609,
+ * href="http://www.ietf.org/rfc/rfc2609.txt">RFC 2609,
  * "Service Templates and <code>Service:</code> Schemes"</a>
  * @see <a
- * href="ftp://ftp.rfc-editor.org/in-notes/rfc3111.txt">RFC 3111,
+ * href="http://www.ietf.org/rfc/rfc3111.txt">RFC 3111,
  * "Service Location Protocol Modifications for IPv6"</a>
  *
  * @since 1.5
--- a/jdk/src/share/classes/javax/naming/ldap/LdapName.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/naming/ldap/LdapName.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,7 +42,7 @@
 
 /**
  * This class represents a distinguished name as specified by
- * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>.
+ * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
  * A distinguished name, or DN, is composed of an ordered list of
  * components called <em>relative distinguished name</em>s, or RDNs.
  * Details of a DN's syntax are described in RFC 2253.
@@ -115,7 +115,7 @@
      *
      * @param name  This is a non-null distinguished name formatted
      * according to the rules defined in
-     * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
      *
      * @throws InvalidNameException if a syntax violation is detected.
      * @see Rdn#escapeValue(Object value)
@@ -614,7 +614,7 @@
 
     /**
      * Returns a string representation of this LDAP name in a format
-     * defined by <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>
+     * defined by <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * and described in the class description. If the name has zero
      * components an empty string is returned.
      *
--- a/jdk/src/share/classes/javax/naming/ldap/Rdn.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/naming/ldap/Rdn.java	Thu Jul 29 22:02:45 2010 -0700
@@ -45,7 +45,7 @@
 /**
  * This class represents a relative distinguished name, or RDN, which is a
  * component of a distinguished name as specified by
- * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
+ * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
  * An example of an RDN is "OU=Sales+CN=J.Smith". In this example,
  * the RDN consist of multiple attribute type/value pairs. The
  * RDN is parsed as described in the class description for
@@ -117,7 +117,7 @@
      * {@link javax.naming.directory.Attributes Attributes}.
      * <p>
      * The string attribute values are not interpretted as
-     * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * formatted RDN strings. That is, the values are used
      * literally (not parsed) and assumed to be unescaped.
      *
@@ -152,7 +152,7 @@
     /**
      * Constructs an Rdn from the given string.
      * This constructor takes a string formatted according to the rules
-     * defined in <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>
+     * defined in <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * and described in the class description for
      * {@link javax.naming.ldap.LdapName}.
      *
@@ -180,7 +180,7 @@
      * Constructs an Rdn from the given attribute type and
      * value.
      * The string attribute values are not interpretted as
-     * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * formatted RDN strings. That is, the values are used
      * literally (not parsed) and assumed to be unescaped.
      *
@@ -216,7 +216,7 @@
     /*
      * Adds the given attribute type and value to this Rdn.
      * The string attribute values are not interpretted as
-     * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * formatted RDN strings. That is the values are used
      * literally (not parsed) and assumed to be unescaped.
      *
@@ -280,7 +280,7 @@
 
     /**
      * Returns this Rdn as a string represented in a format defined by
-     * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a> and described
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> and described
      * in the class description for {@link javax.naming.ldap.LdapName LdapName}.
      *
      * @return The string representation of the Rdn.
@@ -503,7 +503,7 @@
     /**
      * Given the value of an attribute, returns a string escaped according
      * to the rules specified in
-     * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.
      * <p>
      * For example, if the val is "Sue, Grabbit and Runn", the escaped
      * value returned by this method is "Sue\, Grabbit and Runn".
@@ -582,7 +582,7 @@
     /**
      * Given an attribute value string formated according to the rules
      * specified in
-     * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>,
+     * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>,
      * returns the unformated value.  Escapes and quotes are
      * stripped away, and hex-encoded UTF-8 is converted to equivalent
      * UTF-16 characters. Returns a string value as a String, and a
--- a/jdk/src/share/classes/javax/net/ssl/SSLContext.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/net/ssl/SSLContext.java	Thu Jul 29 22:02:45 2010 -0700
@@ -160,7 +160,7 @@
      *
      * @param protocol the standard name of the requested protocol.
      *          See Appendix A in the <a href=
-     *  "{@docRoot}/../technotes/guides//security/jsse/JSSERefGuide.html#AppA">
+     *  "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html#AppA">
      *          Java Secure Socket Extension Reference Guide </a>
      *          for information about standard protocol names.
      *
--- a/jdk/src/share/classes/javax/print/DocFlavor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -450,7 +450,7 @@
     /**
      * A String representing the host operating system encoding.
      * This will follow the conventions documented in
-     * <a href="http://ietf.org/rfc/rfc2278.txt">
+     * <a href="http://www.ietf.org/rfc/rfc2278.txt">
      * <i>RFC&nbsp;2278:&nbsp;IANA Charset Registration Procedures</i></a>
      * except where historical names are returned for compatibility with
      * previous versions of the Java platform.
--- a/jdk/src/share/classes/javax/swing/BorderFactory.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/BorderFactory.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 
 import java.awt.Color;
 import java.awt.Font;
-import javax.swing.JComponent;
 import javax.swing.border.*;
 
 /**
@@ -74,10 +73,20 @@
         return new LineBorder(color, thickness);
     }
 
-//    public static Border createLineBorder(Color color, int thickness,
-//                                      boolean drawRounded)  {
-//        return new JLineBorder(color, thickness, drawRounded);
-//    }
+    /**
+     * Creates a line border with the specified color, thickness, and corner shape.
+     *
+     * @param color      the color of the border
+     * @param thickness  the thickness of the border
+     * @param rounded    whether or not border corners should be round
+     * @return the {@code Border} object
+     *
+     * @see LineBorder#LineBorder(Color, int, boolean)
+     * @since 1.7
+     */
+    public static Border createLineBorder(Color color, int thickness, boolean rounded) {
+        return new LineBorder(color, thickness, rounded);
+    }
 
 //// BevelBorder /////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
@@ -180,7 +189,115 @@
         }
         return null;
     }
+
+//// SoftBevelBorder ///////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+    private static Border sharedSoftRaisedBevel;
+    private static Border sharedSoftLoweredBevel;
+
+    /**
+     * Creates a beveled border with a raised edge and softened corners,
+     * using brighter shades of the component's current background color
+     * for highlighting, and darker shading for shadows.
+     * In a raised border, highlights are on top and shadows are underneath.
+     *
+     * @return the {@code Border} object
+     *
+     * @since 1.7
+     */
+    public static Border createRaisedSoftBevelBorder() {
+        if (sharedSoftRaisedBevel == null) {
+            sharedSoftRaisedBevel = new SoftBevelBorder(BevelBorder.RAISED);
+        }
+        return sharedSoftRaisedBevel;
+    }
+
+    /**
+     * Creates a beveled border with a lowered edge and softened corners,
+     * using brighter shades of the component's current background color
+     * for highlighting, and darker shading for shadows.
+     * In a lowered border, shadows are on top and highlights are underneath.
+     *
+     * @return the {@code Border} object
+     *
+     * @since 1.7
+     */
+    public static Border createLoweredSoftBevelBorder() {
+        if (sharedSoftLoweredBevel == null) {
+            sharedSoftLoweredBevel = new SoftBevelBorder(BevelBorder.LOWERED);
+        }
+        return sharedSoftLoweredBevel;
+    }
+
+    /**
+     * Creates a beveled border of the specified type with softened corners,
+     * using brighter shades of the component's current background color
+     * for highlighting, and darker shading for shadows.
+     * The type is either {@link BevelBorder#RAISED} or {@link BevelBorder#LOWERED}.
+     *
+     * @param type  a type of a bevel
+     * @return the {@code Border} object or {@code null}
+     *         if the specified type is not valid
+     *
+     * @see BevelBorder#BevelBorder(int)
+     * @since 1.7
+     */
+    public static Border createSoftBevelBorder(int type) {
+        if (type == BevelBorder.RAISED) {
+            return createRaisedSoftBevelBorder();
+        }
+        if (type == BevelBorder.LOWERED) {
+            return createLoweredSoftBevelBorder();
+        }
+        return null;
+    }
+
+    /**
+     * Creates a beveled border of the specified type with softened corners,
+     * using the specified highlighting and shadowing.
+     * The type is either {@link BevelBorder#RAISED} or {@link BevelBorder#LOWERED}.
+     * The outer edge of the highlight area uses
+     * a brighter shade of the {@code highlight} color.
+     * The inner edge of the shadow area uses
+     * a brighter shade of the {@code shadow} color.
+     *
+     * @param type       a type of a bevel
+     * @param highlight  a basic color of the highlight area
+     * @param shadow     a basic color of the shadow area
+     * @return the {@code Border} object
+     *
+     * @see BevelBorder#BevelBorder(int, Color, Color)
+     * @since 1.7
+     */
+    public static Border createSoftBevelBorder(int type, Color highlight, Color shadow) {
+        return new BevelBorder(type, highlight, shadow);
+    }
+
+    /**
+     * Creates a beveled border of the specified type with softened corners,
+     * using the specified colors for the inner and outer edges
+     * of the highlight and the shadow areas.
+     * The type is either {@link BevelBorder#RAISED} or {@link BevelBorder#LOWERED}.
+     * Note: The shadow inner and outer colors are switched
+     * for a lowered bevel border.
+     *
+     * @param type            a type of a bevel
+     * @param highlightOuter  a color of the outer edge of the highlight area
+     * @param highlightInner  a color of the inner edge of the highlight area
+     * @param shadowOuter     a color of the outer edge of the shadow area
+     * @param shadowInner     a color of the inner edge of the shadow area
+     * @return the {@code Border} object
+     *
+     * @see BevelBorder#BevelBorder(int, Color, Color, Color, Color)
+     * @since 1.7
+     */
+    public static Border createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) {
+        return new BevelBorder(type, highlightOuter, highlightInner, shadowOuter, shadowInner);
+    }
+
 //// EtchedBorder ///////////////////////////////////////////////////////////
+
     static final Border sharedEtchedBorder = new EtchedBorder();
     private static Border sharedRaisedEtchedBorder;
 
--- a/jdk/src/share/classes/javax/swing/JSplitPane.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/JSplitPane.java	Thu Jul 29 22:02:45 2010 -0700
@@ -242,19 +242,19 @@
 
     /**
      * Creates a new <code>JSplitPane</code> configured to arrange the child
-     * components side-by-side horizontally with no continuous
-     * layout, using two buttons for the components.
+     * components side-by-side horizontally, using two buttons for the components.
      */
     public JSplitPane() {
-        this(JSplitPane.HORIZONTAL_SPLIT, false,
-            new JButton(UIManager.getString("SplitPane.leftButtonText")),
-            new JButton(UIManager.getString("SplitPane.rightButtonText")));
+        this(JSplitPane.HORIZONTAL_SPLIT,
+                UIManager.getBoolean("SplitPane.continuousLayout"),
+                new JButton(UIManager.getString("SplitPane.leftButtonText")),
+                new JButton(UIManager.getString("SplitPane.rightButtonText")));
     }
 
 
     /**
      * Creates a new <code>JSplitPane</code> configured with the
-     * specified orientation and no continuous layout.
+     * specified orientation.
      *
      * @param newOrientation  <code>JSplitPane.HORIZONTAL_SPLIT</code> or
      *                        <code>JSplitPane.VERTICAL_SPLIT</code>
@@ -263,7 +263,8 @@
      */
     @ConstructorProperties({"orientation"})
     public JSplitPane(int newOrientation) {
-        this(newOrientation, false);
+        this(newOrientation,
+                UIManager.getBoolean("SplitPane.continuousLayout"));
     }
 
 
@@ -287,9 +288,7 @@
 
     /**
      * Creates a new <code>JSplitPane</code> with the specified
-     * orientation and
-     * with the specified components that do not do continuous
-     * redrawing.
+     * orientation and the specified components.
      *
      * @param newOrientation  <code>JSplitPane.HORIZONTAL_SPLIT</code> or
      *                        <code>JSplitPane.VERTICAL_SPLIT</code>
@@ -307,7 +306,9 @@
     public JSplitPane(int newOrientation,
                       Component newLeftComponent,
                       Component newRightComponent){
-        this(newOrientation, false, newLeftComponent, newRightComponent);
+        this(newOrientation,
+                UIManager.getBoolean("SplitPane.continuousLayout"),
+                newLeftComponent, newRightComponent);
     }
 
 
--- a/jdk/src/share/classes/javax/swing/JTable.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/JTable.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1048,7 +1048,7 @@
 
     /**
      * Returns the horizontal and vertical space between cells.
-     * The default spacing is (1, 1), which provides room to draw the grid.
+     * The default spacing is look and feel dependent.
      *
      * @return  the horizontal and vertical spacing between cells
      * @see     #setIntercellSpacing
@@ -1155,7 +1155,7 @@
 
     /**
      * Returns true if the table draws horizontal lines between cells, false if it
-     * doesn't. The default is true.
+     * doesn't. The default value is look and feel dependent.
      *
      * @return  true if the table draws horizontal lines between cells, false if it
      *          doesn't
@@ -1167,7 +1167,7 @@
 
     /**
      * Returns true if the table draws vertical lines between cells, false if it
-     * doesn't. The default is true.
+     * doesn't. The default value is look and feel dependent.
      *
      * @return  true if the table draws vertical lines between cells, false if it
      *          doesn't
--- a/jdk/src/share/classes/javax/swing/JTree.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/JTree.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1986,20 +1986,17 @@
      *               true if all nodes in the path are expanded
      */
     public boolean isExpanded(TreePath path) {
+
         if(path == null)
             return false;
-
-        // Is this node expanded?
-        Boolean value = expandedState.get(path);
-
-        if(value == null || !value.booleanValue())
-            return false;
-
-        // It is, make sure its parent is also expanded.
-        TreePath        parentPath = path.getParentPath();
-
-        if(parentPath != null)
-            return isExpanded(parentPath);
+        Object  value;
+
+        do{
+            value = expandedState.get(path);
+            if(value == null || !((Boolean)value).booleanValue())
+                return false;
+        } while( (path=path.getParentPath())!=null );
+
         return true;
     }
 
--- a/jdk/src/share/classes/javax/swing/border/TitledBorder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/border/TitledBorder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,22 +24,20 @@
  */
 package javax.swing.border;
 
-import sun.swing.SwingUtilities2;
-
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
 import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.awt.Insets;
 import java.awt.Rectangle;
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Point;
-import java.awt.Toolkit;
-import java.awt.Component;
-import java.awt.Dimension;
+import java.awt.geom.Path2D;
 import java.beans.ConstructorProperties;
-
 import javax.swing.JComponent;
+import javax.swing.JLabel;
 import javax.swing.UIManager;
+import javax.swing.plaf.basic.BasicHTML;
 
 /**
  * A class which implements an arbitrary border
@@ -73,40 +71,40 @@
 {
     protected String title;
     protected Border border;
-    protected int    titlePosition;
-    protected int    titleJustification;
-    protected Font   titleFont;
-    protected Color  titleColor;
+    protected int titlePosition;
+    protected int titleJustification;
+    protected Font titleFont;
+    protected Color titleColor;
 
-    private Point textLoc = new Point();
+    private final JLabel label;
 
     /**
      * Use the default vertical orientation for the title text.
      */
     static public final int     DEFAULT_POSITION        = 0;
     /** Position the title above the border's top line. */
-    static public final int     ABOVE_TOP       = 1;
+    static public final int     ABOVE_TOP               = 1;
     /** Position the title in the middle of the border's top line. */
-    static public final int     TOP             = 2;
+    static public final int     TOP                     = 2;
     /** Position the title below the border's top line. */
-    static public final int     BELOW_TOP       = 3;
+    static public final int     BELOW_TOP               = 3;
     /** Position the title above the border's bottom line. */
-    static public final int     ABOVE_BOTTOM    = 4;
+    static public final int     ABOVE_BOTTOM            = 4;
     /** Position the title in the middle of the border's bottom line. */
-    static public final int     BOTTOM          = 5;
+    static public final int     BOTTOM                  = 5;
     /** Position the title below the border's bottom line. */
-    static public final int     BELOW_BOTTOM    = 6;
+    static public final int     BELOW_BOTTOM            = 6;
 
     /**
      * Use the default justification for the title text.
      */
     static public final int     DEFAULT_JUSTIFICATION   = 0;
     /** Position title text at the left side of the border line. */
-    static public final int     LEFT    = 1;
+    static public final int     LEFT                    = 1;
     /** Position title text in the center of the border line. */
-    static public final int     CENTER  = 2;
+    static public final int     CENTER                  = 2;
     /** Position title text at the right side of the border line. */
-    static public final int     RIGHT   = 3;
+    static public final int     RIGHT                   = 3;
     /** Position title text at the left side of the border line
      *  for left to right orientation, at the right side of the
      *  border line for right to left orientation.
@@ -132,7 +130,7 @@
      *
      * @param title  the title the border should display
      */
-    public TitledBorder(String title)     {
+    public TitledBorder(String title) {
         this(null, title, LEADING, DEFAULT_POSITION, null, null);
     }
 
@@ -142,7 +140,7 @@
      *
      * @param border  the border
      */
-    public TitledBorder(Border border)       {
+    public TitledBorder(Border border) {
         this(border, "", LEADING, DEFAULT_POSITION, null, null);
     }
 
@@ -167,9 +165,9 @@
      * @param titlePosition the position for the title
      */
     public TitledBorder(Border border,
-                        String title,
-                        int titleJustification,
-                        int titlePosition)      {
+                         String title,
+                         int titleJustification,
+                         int titlePosition) {
         this(border, title, titleJustification,
                         titlePosition, null, null);
     }
@@ -185,10 +183,10 @@
      * @param titleFont the font for rendering the title
      */
     public TitledBorder(Border border,
-                        String title,
-                        int titleJustification,
-                        int titlePosition,
-                        Font titleFont) {
+                         String title,
+                         int titleJustification,
+                         int titlePosition,
+                         Font titleFont) {
         this(border, title, titleJustification,
                         titlePosition, titleFont, null);
     }
@@ -207,11 +205,11 @@
      */
     @ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"})
     public TitledBorder(Border border,
-                        String title,
-                        int titleJustification,
-                        int titlePosition,
-                        Font titleFont,
-                        Color titleColor)       {
+                         String title,
+                         int titleJustification,
+                         int titlePosition,
+                         Font titleFont,
+                         Color titleColor) {
         this.title = title;
         this.border = border;
         this.titleFont = titleFont;
@@ -219,6 +217,10 @@
 
         setTitleJustification(titleJustification);
         setTitlePosition(titlePosition);
+
+        this.label = new JLabel();
+        this.label.setOpaque(false);
+        this.label.putClientProperty(BasicHTML.propertyKey, null);
     }
 
     /**
@@ -232,178 +234,111 @@
      * @param height the height of the painted border
      */
     public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-
-        Border border = getBorder();
-
-        if (getTitle() == null || getTitle().equals("")) {
-            if (border != null) {
-                border.paintBorder(c, g, x, y, width, height);
-            }
-            return;
-        }
-
-        Rectangle grooveRect = new Rectangle(x + EDGE_SPACING, y + EDGE_SPACING,
-                                             width - (EDGE_SPACING * 2),
-                                             height - (EDGE_SPACING * 2));
-        Font font = g.getFont();
-        Color color = g.getColor();
+        Border border = getBorderUI();
+        String title = getTitle();
+        if ((title != null) && !title.isEmpty()) {
+            int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
+            JLabel label = getLabel(c);
+            Dimension size = label.getPreferredSize();
+            Insets insets = (border != null)
+                    ? border.getBorderInsets(c)
+                    : new Insets(0, 0, 0, 0);
 
-        g.setFont(getFont(c));
-
-        JComponent jc = (c instanceof JComponent) ? (JComponent)c : null;
-        FontMetrics fm = SwingUtilities2.getFontMetrics(jc, g);
-        int         fontHeight = fm.getHeight();
-        int         descent = fm.getDescent();
-        int         ascent = fm.getAscent();
-        int         diff;
-        int         stringWidth = SwingUtilities2.stringWidth(jc, fm,
-                                                              getTitle());
-        Insets      insets;
-
-        if (border != null) {
-            insets = border.getBorderInsets(c);
-        } else {
-            insets = new Insets(0, 0, 0, 0);
-        }
+            int borderX = x + edge;
+            int borderY = y + edge;
+            int borderW = width - edge - edge;
+            int borderH = height - edge - edge;
 
-        int titlePos = getTitlePosition();
-        switch (titlePos) {
-            case ABOVE_TOP:
-                diff = ascent + descent + (Math.max(EDGE_SPACING,
-                                 TEXT_SPACING*2) - EDGE_SPACING);
-                grooveRect.y += diff;
-                grooveRect.height -= diff;
-                textLoc.y = grooveRect.y - (descent + TEXT_SPACING);
-                break;
-            case TOP:
-            case DEFAULT_POSITION:
-                diff = Math.max(0, ((ascent/2) + TEXT_SPACING) - EDGE_SPACING);
-                grooveRect.y += diff;
-                grooveRect.height -= diff;
-                textLoc.y = (grooveRect.y - descent) +
-                (insets.top + ascent + descent)/2;
-                break;
-            case BELOW_TOP:
-                textLoc.y = grooveRect.y + insets.top + ascent + TEXT_SPACING;
-                break;
-            case ABOVE_BOTTOM:
-                textLoc.y = (grooveRect.y + grooveRect.height) -
-                (insets.bottom + descent + TEXT_SPACING);
-                break;
-            case BOTTOM:
-                grooveRect.height -= fontHeight/2;
-                textLoc.y = ((grooveRect.y + grooveRect.height) - descent) +
-                        ((ascent + descent) - insets.bottom)/2;
-                break;
-            case BELOW_BOTTOM:
-                grooveRect.height -= fontHeight;
-                textLoc.y = grooveRect.y + grooveRect.height + ascent +
-                        TEXT_SPACING;
-                break;
-        }
-
-        int justification = getTitleJustification();
-        if(isLeftToRight(c)) {
-            if(justification==LEADING ||
-               justification==DEFAULT_JUSTIFICATION) {
-                justification = LEFT;
-            }
-            else if(justification==TRAILING) {
-                justification = RIGHT;
-            }
-        }
-        else {
-            if(justification==LEADING ||
-               justification==DEFAULT_JUSTIFICATION) {
-                justification = RIGHT;
+            int labelY = y;
+            int labelH = size.height;
+            int position = getPosition();
+            switch (position) {
+                case ABOVE_TOP:
+                    insets.left = 0;
+                    insets.right = 0;
+                    borderY += labelH - edge;
+                    borderH -= labelH - edge;
+                    break;
+                case TOP:
+                    insets.top = edge + insets.top/2 - labelH/2;
+                    if (insets.top < edge) {
+                        borderY -= insets.top;
+                        borderH += insets.top;
+                    }
+                    else {
+                        labelY += insets.top;
+                    }
+                    break;
+                case BELOW_TOP:
+                    labelY += insets.top + edge;
+                    break;
+                case ABOVE_BOTTOM:
+                    labelY += height - labelH - insets.bottom - edge;
+                    break;
+                case BOTTOM:
+                    labelY += height - labelH;
+                    insets.bottom = edge + (insets.bottom - labelH) / 2;
+                    if (insets.bottom < edge) {
+                        borderH += insets.bottom;
+                    }
+                    else {
+                        labelY -= insets.bottom;
+                    }
+                    break;
+                case BELOW_BOTTOM:
+                    insets.left = 0;
+                    insets.right = 0;
+                    labelY += height - labelH;
+                    borderH -= labelH - edge;
+                    break;
             }
-            else if(justification==TRAILING) {
-                justification = LEFT;
-            }
-        }
-
-        switch (justification) {
-            case LEFT:
-                textLoc.x = grooveRect.x + TEXT_INSET_H + insets.left;
-                break;
-            case RIGHT:
-                textLoc.x = (grooveRect.x + grooveRect.width) -
-                        (stringWidth + TEXT_INSET_H + insets.right);
-                break;
-            case CENTER:
-                textLoc.x = grooveRect.x +
-                        ((grooveRect.width - stringWidth) / 2);
-                break;
-        }
+            insets.left += edge + TEXT_INSET_H;
+            insets.right += edge + TEXT_INSET_H;
 
-        // If title is positioned in middle of border AND its fontsize
-        // is greater than the border's thickness, we'll need to paint
-        // the border in sections to leave space for the component's background
-        // to show through the title.
-        //
-        if (border != null) {
-            if (((titlePos == TOP || titlePos == DEFAULT_POSITION) &&
-                  (grooveRect.y > textLoc.y - ascent)) ||
-                 (titlePos == BOTTOM &&
-                  (grooveRect.y + grooveRect.height < textLoc.y + descent))) {
-
-                Rectangle clipRect = new Rectangle();
-
-                // save original clip
-                Rectangle saveClip = g.getClipBounds();
-
-                // paint strip left of text
-                clipRect.setBounds(saveClip);
-                if (computeIntersection(clipRect, x, y, textLoc.x-1-x, height)) {
-                    g.setClip(clipRect);
-                    border.paintBorder(c, g, grooveRect.x, grooveRect.y,
-                                  grooveRect.width, grooveRect.height);
-                }
+            int labelX = x;
+            int labelW = width - insets.left - insets.right;
+            if (labelW > size.width) {
+                labelW = size.width;
+            }
+            switch (getJustification(c)) {
+                case LEFT:
+                    labelX += insets.left;
+                    break;
+                case RIGHT:
+                    labelX += width - insets.right - labelW;
+                    break;
+                case CENTER:
+                    labelX += (width - labelW) / 2;
+                    break;
+            }
 
-                // paint strip right of text
-                clipRect.setBounds(saveClip);
-                if (computeIntersection(clipRect, textLoc.x+stringWidth+1, y,
-                               x+width-(textLoc.x+stringWidth+1), height)) {
-                    g.setClip(clipRect);
-                    border.paintBorder(c, g, grooveRect.x, grooveRect.y,
-                                  grooveRect.width, grooveRect.height);
+            if (border != null) {
+                if ((position != TOP) && (position != BOTTOM)) {
+                    border.paintBorder(c, g, borderX, borderY, borderW, borderH);
                 }
-
-                if (titlePos == TOP || titlePos == DEFAULT_POSITION) {
-                    // paint strip below text
-                    clipRect.setBounds(saveClip);
-                    if (computeIntersection(clipRect, textLoc.x-1, textLoc.y+descent,
-                                        stringWidth+2, y+height-textLoc.y-descent)) {
-                        g.setClip(clipRect);
-                        border.paintBorder(c, g, grooveRect.x, grooveRect.y,
-                                  grooveRect.width, grooveRect.height);
+                else {
+                    Graphics g2 = g.create();
+                    if (g2 instanceof Graphics2D) {
+                        Graphics2D g2d = (Graphics2D) g2;
+                        Path2D path = new Path2D.Float();
+                        path.append(new Rectangle(borderX, borderY, borderW, labelY - borderY), false);
+                        path.append(new Rectangle(borderX, labelY, labelX - borderX - TEXT_SPACING, labelH), false);
+                        path.append(new Rectangle(labelX + labelW + TEXT_SPACING, labelY, borderX - labelX + borderW - labelW - TEXT_SPACING, labelH), false);
+                        path.append(new Rectangle(borderX, labelY + labelH, borderW, borderY - labelY + borderH - labelH), false);
+                        g2d.clip(path);
                     }
-
-                } else { // titlePos == BOTTOM
-                  // paint strip above text
-                    clipRect.setBounds(saveClip);
-                    if (computeIntersection(clipRect, textLoc.x-1, y,
-                          stringWidth+2, textLoc.y - ascent - y)) {
-                        g.setClip(clipRect);
-                        border.paintBorder(c, g, grooveRect.x, grooveRect.y,
-                                  grooveRect.width, grooveRect.height);
-                    }
+                    border.paintBorder(c, g2, borderX, borderY, borderW, borderH);
+                    g2.dispose();
                 }
-
-                // restore clip
-                g.setClip(saveClip);
-
-            } else {
-                border.paintBorder(c, g, grooveRect.x, grooveRect.y,
-                                  grooveRect.width, grooveRect.height);
             }
+            g.translate(labelX, labelY);
+            label.setSize(labelW, labelH);
+            label.paint(g);
+            g.translate(-labelX, -labelY);
         }
-
-        g.setColor(getTitleColor());
-        SwingUtilities2.drawString(jc, g, getTitle(), textLoc.x, textLoc.y);
-
-        g.setFont(font);
-        g.setColor(color);
+        else if (border != null) {
+            border.paintBorder(c, g, x, y, width, height);
+        }
     }
 
     /**
@@ -412,69 +347,54 @@
      * @param insets the object to be reinitialized
      */
     public Insets getBorderInsets(Component c, Insets insets) {
-        FontMetrics fm;
-        int         descent = 0;
-        int         ascent = 16;
-        int         height = 16;
-
-        Border border = getBorder();
-        if (border != null) {
-            if (border instanceof AbstractBorder) {
-                ((AbstractBorder)border).getBorderInsets(c, insets);
-            } else {
-                // Can't reuse border insets because the Border interface
-                // can't be enhanced.
-                Insets i = border.getBorderInsets(c);
-                insets.top = i.top;
-                insets.right = i.right;
-                insets.bottom = i.bottom;
-                insets.left = i.left;
-            }
-        } else {
-            insets.left = insets.top = insets.right = insets.bottom = 0;
+        Border border = getBorderUI();
+        if (border == null) {
+            insets.set(0, 0, 0, 0);
+        }
+        else if (border instanceof AbstractBorder) {
+            AbstractBorder ab = (AbstractBorder) border;
+            insets = ab.getBorderInsets(c, insets);
         }
-
-        insets.left += EDGE_SPACING + TEXT_SPACING;
-        insets.right += EDGE_SPACING + TEXT_SPACING;
-        insets.top += EDGE_SPACING + TEXT_SPACING;
-        insets.bottom += EDGE_SPACING + TEXT_SPACING;
-
-        if(c == null || getTitle() == null || getTitle().equals(""))    {
-            return insets;
+        else {
+            Insets i = border.getBorderInsets(c);
+            insets.set(i.top, i.left, i.bottom, i.right);
         }
+        String title = getTitle();
+        if ((title != null) && !title.isEmpty()) {
+            int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
+            JLabel label = getLabel(c);
+            Dimension size = label.getPreferredSize();
 
-        Font font = getFont(c);
-
-        fm = c.getFontMetrics(font);
-
-        if(fm != null) {
-           descent = fm.getDescent();
-           ascent = fm.getAscent();
-           height = fm.getHeight();
-        }
-
-        switch (getTitlePosition()) {
-          case ABOVE_TOP:
-              insets.top += ascent + descent
-                            + (Math.max(EDGE_SPACING, TEXT_SPACING*2)
-                            - EDGE_SPACING);
-              break;
-          case TOP:
-          case DEFAULT_POSITION:
-              insets.top += ascent + descent;
-              break;
-          case BELOW_TOP:
-              insets.top += ascent + descent + TEXT_SPACING;
-              break;
-          case ABOVE_BOTTOM:
-              insets.bottom += ascent + descent + TEXT_SPACING;
-              break;
-          case BOTTOM:
-              insets.bottom += ascent + descent;
-              break;
-          case BELOW_BOTTOM:
-              insets.bottom += height;
-              break;
+            switch (getPosition()) {
+                case ABOVE_TOP:
+                    insets.top += size.height - edge;
+                    break;
+                case TOP: {
+                    if (insets.top < size.height) {
+                        insets.top = size.height - edge;
+                    }
+                    break;
+                }
+                case BELOW_TOP:
+                    insets.top += size.height;
+                    break;
+                case ABOVE_BOTTOM:
+                    insets.bottom += size.height;
+                    break;
+                case BOTTOM: {
+                    if (insets.bottom < size.height) {
+                        insets.bottom = size.height - edge;
+                    }
+                    break;
+                }
+                case BELOW_BOTTOM:
+                    insets.bottom += size.height - edge;
+                    break;
+            }
+            insets.top += edge + TEXT_SPACING;
+            insets.left += edge + TEXT_SPACING;
+            insets.right += edge + TEXT_SPACING;
+            insets.bottom += edge + TEXT_SPACING;
         }
         return insets;
     }
@@ -492,41 +412,14 @@
     /**
      * Returns the border of the titled border.
      */
-    public Border getBorder()       {
-        Border b = border;
-        if (b == null)
-            b = UIManager.getBorder("TitledBorder.border");
-        return b;
+    public Border getBorder() {
+        return border;
     }
 
     /**
      * Returns the title-position of the titled border.
      */
     public int getTitlePosition() {
-        if (titlePosition == DEFAULT_POSITION) {
-            Object value = UIManager.get("TitledBorder.position");
-            if (value instanceof String) {
-                String s = (String)value;
-                if ("ABOVE_TOP".equalsIgnoreCase(s)) {
-                    return ABOVE_TOP;
-                } else if ("TOP".equalsIgnoreCase(s)) {
-                    return TOP;
-                } else if ("BELOW_TOP".equalsIgnoreCase(s)) {
-                    return BELOW_TOP;
-                } else if ("ABOVE_BOTTOM".equalsIgnoreCase(s)) {
-                    return ABOVE_BOTTOM;
-                } else if ("BOTTOM".equalsIgnoreCase(s)) {
-                    return BOTTOM;
-                } else if ("BELOW_BOTTOM".equalsIgnoreCase(s)) {
-                    return BELOW_BOTTOM;
-                }
-            } else if (value instanceof Integer) {
-                int i = (Integer)value;
-                if (i >= 0 && i <= 6) {
-                    return i;
-                }
-            }
-        }
         return titlePosition;
     }
 
@@ -539,20 +432,14 @@
      * Returns the title-font of the titled border.
      */
     public Font getTitleFont()      {
-        Font f = titleFont;
-        if (f == null)
-            f = UIManager.getFont("TitledBorder.font");
-        return f;
+        return titleFont;
     }
 
     /**
      * Returns the title-color of the titled border.
      */
     public Color getTitleColor()    {
-        Color c = titleColor;
-        if (c == null)
-            c = UIManager.getColor("TitledBorder.titleColor");
-        return c;
+        return titleColor;
     }
 
 
@@ -576,18 +463,18 @@
      */
     public void setTitlePosition(int titlePosition) {
         switch (titlePosition) {
-          case ABOVE_TOP:
-          case TOP:
-          case BELOW_TOP:
-          case ABOVE_BOTTOM:
-          case BOTTOM:
-          case BELOW_BOTTOM:
-          case DEFAULT_POSITION:
+            case ABOVE_TOP:
+            case TOP:
+            case BELOW_TOP:
+            case ABOVE_BOTTOM:
+            case BOTTOM:
+            case BELOW_BOTTOM:
+            case DEFAULT_POSITION:
                 this.titlePosition = titlePosition;
                 break;
-          default:
-            throw new IllegalArgumentException(titlePosition +
-                                        " is not a valid title position.");
+            default:
+                throw new IllegalArgumentException(titlePosition +
+                        " is not a valid title position.");
         }
     }
 
@@ -624,7 +511,7 @@
      * @param titleColor the color for the border title
      */
     public void setTitleColor(Color titleColor) {
-      this.titleColor = titleColor;
+        this.titleColor = titleColor;
     }
 
     /**
@@ -636,22 +523,18 @@
         Insets insets = getBorderInsets(c);
         Dimension minSize = new Dimension(insets.right+insets.left,
                                           insets.top+insets.bottom);
-        Font font = getFont(c);
-        FontMetrics fm = c.getFontMetrics(font);
-        JComponent jc = (c instanceof JComponent) ? (JComponent)c : null;
-        switch (getTitlePosition()) {
-          case ABOVE_TOP:
-          case BELOW_BOTTOM:
-              minSize.width = Math.max(SwingUtilities2.stringWidth(jc, fm,
-                                       getTitle()), minSize.width);
-              break;
-          case BELOW_TOP:
-          case ABOVE_BOTTOM:
-          case TOP:
-          case BOTTOM:
-          case DEFAULT_POSITION:
-          default:
-              minSize.width += SwingUtilities2.stringWidth(jc, fm, getTitle());
+        String title = getTitle();
+        if ((title != null) && !title.isEmpty()) {
+            JLabel label = getLabel(c);
+            Dimension size = label.getPreferredSize();
+
+            int position = getPosition();
+            if ((position != ABOVE_TOP) && (position != BELOW_BOTTOM)) {
+                minSize.width += size.width;
+            }
+            else if (minSize.width < size.width) {
+                minSize.width += size.width;
+            }
         }
         return minSize;
     }
@@ -674,48 +557,36 @@
         if (height < 0) {
             throw new IllegalArgumentException("Height must be >= 0");
         }
+        Border border = getBorderUI();
         String title = getTitle();
-        if (title != null && !"".equals(title)) {
-            Font font = getFont(c);
-            Border border2 = getBorder();
-            Insets borderInsets;
-            if (border2 != null) {
-                borderInsets = border2.getBorderInsets(c);
-            }
-            else {
-                borderInsets = new Insets(0, 0, 0, 0);
-            }
-            FontMetrics fm = c.getFontMetrics(font);
-            int fontHeight = fm.getHeight();
-            int descent = fm.getDescent();
-            int ascent = fm.getAscent();
-            int y = EDGE_SPACING;
-            int h = height - EDGE_SPACING * 2;
-            int diff;
-            switch (getTitlePosition()) {
-            case ABOVE_TOP:
-                diff = ascent + descent + (Math.max(EDGE_SPACING,
-                                                    TEXT_SPACING * 2) -
-                                           EDGE_SPACING);
-                return y + diff - (descent + TEXT_SPACING);
-            case TOP:
-            case DEFAULT_POSITION:
-                diff = Math.max(0, ((ascent/2) + TEXT_SPACING) -
-                                EDGE_SPACING);
-                return (y + diff - descent) +
-                    (borderInsets.top + ascent + descent)/2;
-            case BELOW_TOP:
-                return y + borderInsets.top + ascent + TEXT_SPACING;
-            case ABOVE_BOTTOM:
-                return (y + h) - (borderInsets.bottom + descent +
-                                  TEXT_SPACING);
-            case BOTTOM:
-                h -= fontHeight / 2;
-                return ((y + h) - descent) +
-                        ((ascent + descent) - borderInsets.bottom)/2;
-            case BELOW_BOTTOM:
-                h -= fontHeight;
-                return y + h + ascent + TEXT_SPACING;
+        if ((title != null) && !title.isEmpty()) {
+            int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
+            JLabel label = getLabel(c);
+            Dimension size = label.getPreferredSize();
+            Insets insets = (border != null)
+                    ? border.getBorderInsets(c)
+                    : new Insets(0, 0, 0, 0);
+
+            int baseline = label.getBaseline(size.width, size.height);
+            switch (getPosition()) {
+                case ABOVE_TOP:
+                    return baseline;
+                case TOP:
+                    insets.top = edge + (insets.top - size.height) / 2;
+                    return (insets.top < edge)
+                            ? baseline
+                            : baseline + insets.top;
+                case BELOW_TOP:
+                    return baseline + insets.top + edge;
+                case ABOVE_BOTTOM:
+                    return baseline + height - size.height - insets.bottom - edge;
+                case BOTTOM:
+                    insets.bottom = edge + (insets.bottom - size.height) / 2;
+                    return (insets.bottom < edge)
+                            ? baseline + height - size.height
+                            : baseline + height - size.height + insets.bottom;
+                case BELOW_BOTTOM:
+                    return baseline + height - size.height;
             }
         }
         return -1;
@@ -732,44 +603,111 @@
     public Component.BaselineResizeBehavior getBaselineResizeBehavior(
             Component c) {
         super.getBaselineResizeBehavior(c);
-        switch(getTitlePosition()) {
-        case TitledBorder.ABOVE_TOP:
-        case TitledBorder.TOP:
-        case TitledBorder.DEFAULT_POSITION:
-        case TitledBorder.BELOW_TOP:
-            return Component.BaselineResizeBehavior.CONSTANT_ASCENT;
-        case TitledBorder.ABOVE_BOTTOM:
-        case TitledBorder.BOTTOM:
-        case TitledBorder.BELOW_BOTTOM:
-            return JComponent.BaselineResizeBehavior.CONSTANT_DESCENT;
+        switch (getPosition()) {
+            case TitledBorder.ABOVE_TOP:
+            case TitledBorder.TOP:
+            case TitledBorder.BELOW_TOP:
+                return Component.BaselineResizeBehavior.CONSTANT_ASCENT;
+            case TitledBorder.ABOVE_BOTTOM:
+            case TitledBorder.BOTTOM:
+            case TitledBorder.BELOW_BOTTOM:
+                return JComponent.BaselineResizeBehavior.CONSTANT_DESCENT;
         }
         return Component.BaselineResizeBehavior.OTHER;
     }
 
+    private Border getBorderUI() {
+        Border border = getBorder();
+        return border != null
+                ? border
+                : UIManager.getBorder("TitledBorder.border");
+    }
+
+    private int getPosition() {
+        int position = getTitlePosition();
+        if (position != DEFAULT_POSITION) {
+            return position;
+        }
+        Object value = UIManager.get("TitledBorder.position");
+        if (value instanceof Integer) {
+            int i = (Integer) value;
+            if ((0 < i) && (i <= 6)) {
+                return i;
+            }
+        }
+        else if (value instanceof String) {
+            String s = (String) value;
+            if (s.equalsIgnoreCase("ABOVE_TOP")) {
+                return ABOVE_TOP;
+            }
+            if (s.equalsIgnoreCase("TOP")) {
+                return TOP;
+            }
+            if (s.equalsIgnoreCase("BELOW_TOP")) {
+                return BELOW_TOP;
+            }
+            if (s.equalsIgnoreCase("ABOVE_BOTTOM")) {
+                return ABOVE_BOTTOM;
+            }
+            if (s.equalsIgnoreCase("BOTTOM")) {
+                return BOTTOM;
+            }
+            if (s.equalsIgnoreCase("BELOW_BOTTOM")) {
+                return BELOW_BOTTOM;
+            }
+        }
+        return TOP;
+    }
+
+    private int getJustification(Component c) {
+        int justification = getTitleJustification();
+        if ((justification == LEADING) || (justification == DEFAULT_JUSTIFICATION)) {
+            return c.getComponentOrientation().isLeftToRight() ? LEFT : RIGHT;
+        }
+        if (justification == TRAILING) {
+            return c.getComponentOrientation().isLeftToRight() ? RIGHT : LEFT;
+        }
+        return justification;
+    }
+
     protected Font getFont(Component c) {
-        Font font;
-        if ((font = getTitleFont()) != null) {
+        Font font = getTitleFont();
+        if (font != null) {
+            return font;
+        }
+        font = UIManager.getFont("TitledBorder.font");
+        if (font != null) {
             return font;
-        } else if (c != null && (font = c.getFont()) != null) {
-            return font;
+        }
+        if (c != null) {
+            font = c.getFont();
+            if (font != null) {
+                return font;
+            }
         }
         return new Font(Font.DIALOG, Font.PLAIN, 12);
     }
 
-    private static boolean computeIntersection(Rectangle dest,
-                                               int rx, int ry, int rw, int rh) {
-        int x1 = Math.max(rx, dest.x);
-        int x2 = Math.min(rx + rw, dest.x + dest.width);
-        int y1 = Math.max(ry, dest.y);
-        int y2 = Math.min(ry + rh, dest.y + dest.height);
-        dest.x = x1;
-        dest.y = y1;
-        dest.width = x2 - x1;
-        dest.height = y2 - y1;
+    private Color getColor(Component c) {
+        Color color = getTitleColor();
+        if (color != null) {
+            return color;
+        }
+        color = UIManager.getColor("TitledBorder.titleColor");
+        if (color != null) {
+            return color;
+        }
+        return (c != null)
+                ? c.getForeground()
+                : null;
+    }
 
-        if (dest.width <= 0 || dest.height <= 0) {
-            return false;
-        }
-        return true;
+    private JLabel getLabel(Component c) {
+        this.label.setText(getTitle());
+        this.label.setFont(getFont(c));
+        this.label.setForeground(getColor(c));
+        this.label.setComponentOrientation(c.getComponentOrientation());
+        this.label.setEnabled(c.isEnabled());
+        return this.label;
     }
 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java	Thu Jul 29 22:02:45 2010 -0700
@@ -195,9 +195,8 @@
         }
 
         ButtonModel model = b.getModel();
+        model.setPressed(false);
         model.setArmed(false);
-        model.setPressed(false);
-
         b.repaint();
     }
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -876,7 +876,7 @@
             String name = getName();
             if (TOGGLE_SORT_ORDER == name) {
                 JTable table = th.getTable();
-                RowSorter sorter = table.getRowSorter();
+                RowSorter sorter = table == null ? null : table.getRowSorter();
                 if (sorter != null) {
                     int columnIndex = ui.getSelectedColumnIndex();
                     columnIndex = table.convertColumnIndexToModel(
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/skin.laf	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/skin.laf	Thu Jul 29 22:02:45 2010 -0700
@@ -21276,6 +21276,7 @@
                <uiProperty name="centerOneTouchButtons" type="BOOLEAN" value="true"/>
                <uiProperty name="oneTouchButtonOffset" type="INT" value="30"/>
                <uiProperty name="oneTouchExpandable" type="BOOLEAN" value="false"/>
+               <uiProperty name="continuousLayout" type="BOOLEAN" value="true"/>
             </uiproperties>
          </style>
          <backgroundStates>
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java	Thu Jul 29 22:02:45 2010 -0700
@@ -658,8 +658,7 @@
                     }
                     try {
                         _colorTypes.add((ColorType)checkCast(typeClass.
-                              getField(typeName.substring(classIndex,
-                              typeName.length() - classIndex)).
+                              getField(typeName.substring(classIndex)).
                               get(typeClass), ColorType.class));
                     } catch (NoSuchFieldException nsfe) {
                         throw new SAXException("Unable to find color type: " +
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -363,18 +363,24 @@
                     SynthIcon.getIconWidth(handleIcon, context) : 0;
                 Dimension compDim;
                 for (int i = 0; i < tb.getComponentCount(); i++) {
-                    compDim = tb.getComponent(i).getMinimumSize();
-                    dim.width += compDim.width;
-                    dim.height = Math.max(dim.height, compDim.height);
+                    Component component = tb.getComponent(i);
+                    if (component.isVisible()) {
+                        compDim = component.getMinimumSize();
+                        dim.width += compDim.width;
+                        dim.height = Math.max(dim.height, compDim.height);
+                    }
                 }
             } else {
                 dim.height = tb.isFloatable() ?
                     SynthIcon.getIconHeight(handleIcon, context) : 0;
                 Dimension compDim;
                 for (int i = 0; i < tb.getComponentCount(); i++) {
-                    compDim = tb.getComponent(i).getMinimumSize();
-                    dim.width = Math.max(dim.width, compDim.width);
-                    dim.height += compDim.height;
+                    Component component = tb.getComponent(i);
+                    if (component.isVisible()) {
+                        compDim = component.getMinimumSize();
+                        dim.width = Math.max(dim.width, compDim.width);
+                        dim.height += compDim.height;
+                    }
                 }
             }
             dim.width += insets.left + insets.right;
@@ -395,18 +401,24 @@
                     SynthIcon.getIconWidth(handleIcon, context) : 0;
                 Dimension compDim;
                 for (int i = 0; i < tb.getComponentCount(); i++) {
-                    compDim = tb.getComponent(i).getPreferredSize();
-                    dim.width += compDim.width;
-                    dim.height = Math.max(dim.height, compDim.height);
+                    Component component = tb.getComponent(i);
+                    if (component.isVisible()) {
+                        compDim = component.getPreferredSize();
+                        dim.width += compDim.width;
+                        dim.height = Math.max(dim.height, compDim.height);
+                    }
                 }
             } else {
                 dim.height = tb.isFloatable() ?
                     SynthIcon.getIconHeight(handleIcon, context) : 0;
                 Dimension compDim;
                 for (int i = 0; i < tb.getComponentCount(); i++) {
-                    compDim = tb.getComponent(i).getPreferredSize();
-                    dim.width = Math.max(dim.width, compDim.width);
-                    dim.height += compDim.height;
+                    Component component = tb.getComponent(i);
+                    if (component.isVisible()) {
+                        compDim = component.getPreferredSize();
+                        dim.width = Math.max(dim.width, compDim.width);
+                        dim.height += compDim.height;
+                    }
                 }
             }
             dim.width += insets.left + insets.right;
@@ -469,22 +481,24 @@
 
                 for (int i = 0; i < tb.getComponentCount(); i++) {
                     c = tb.getComponent(i);
-                    d = c.getPreferredSize();
-                    int y, h;
-                    if (d.height >= baseH || c instanceof JSeparator) {
-                        // Fill available height
-                        y = baseY;
-                        h = baseH;
-                    } else {
-                        // Center component vertically in the available space
-                        y = baseY + (baseH / 2) - (d.height / 2);
-                        h = d.height;
+                    if (c.isVisible()) {
+                        d = c.getPreferredSize();
+                        int y, h;
+                        if (d.height >= baseH || c instanceof JSeparator) {
+                            // Fill available height
+                            y = baseY;
+                            h = baseH;
+                        } else {
+                            // Center component vertically in the available space
+                            y = baseY + (baseH / 2) - (d.height / 2);
+                            h = d.height;
+                        }
+                        //if the component is a "glue" component then add to its
+                        //width the extraSpacePerGlue it is due
+                        if (isGlue(c)) d.width += extraSpacePerGlue;
+                        c.setBounds(ltr ? x : x - d.width, y, d.width, h);
+                        x = ltr ? x + d.width : x - d.width;
                     }
-                    //if the component is a "glue" component then add to its
-                    //width the extraSpacePerGlue it is due
-                    if (isGlue(c)) d.width += extraSpacePerGlue;
-                    c.setBounds(ltr ? x : x - d.width, y, d.width, h);
-                    x = ltr ? x + d.width : x - d.width;
                 }
             } else {
                 int handleHeight = tb.isFloatable() ?
@@ -512,29 +526,31 @@
 
                 for (int i = 0; i < tb.getComponentCount(); i++) {
                     c = tb.getComponent(i);
-                    d = c.getPreferredSize();
-                    int x, w;
-                    if (d.width >= baseW || c instanceof JSeparator) {
-                        // Fill available width
-                        x = baseX;
-                        w = baseW;
-                    } else {
-                        // Center component horizontally in the available space
-                        x = baseX + (baseW / 2) - (d.width / 2);
-                        w = d.width;
+                    if (c.isVisible()) {
+                        d = c.getPreferredSize();
+                        int x, w;
+                        if (d.width >= baseW || c instanceof JSeparator) {
+                            // Fill available width
+                            x = baseX;
+                            w = baseW;
+                        } else {
+                            // Center component horizontally in the available space
+                            x = baseX + (baseW / 2) - (d.width / 2);
+                            w = d.width;
+                        }
+                        //if the component is a "glue" component then add to its
+                        //height the extraSpacePerGlue it is due
+                        if (isGlue(c)) d.height += extraSpacePerGlue;
+                        c.setBounds(x, y, w, d.height);
+                        y += d.height;
                     }
-                    //if the component is a "glue" component then add to its
-                    //height the extraSpacePerGlue it is due
-                    if (isGlue(c)) d.height += extraSpacePerGlue;
-                    c.setBounds(x, y, w, d.height);
-                    y += d.height;
                 }
             }
             context.dispose();
         }
 
         private boolean isGlue(Component c) {
-            if (c instanceof Box.Filler) {
+            if (c.isVisible() && c instanceof Box.Filler) {
                 Box.Filler f = (Box.Filler)c;
                 Dimension min = f.getMinimumSize();
                 Dimension pref = f.getPreferredSize();
--- a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Thu Jul 29 22:02:45 2010 -0700
@@ -25,15 +25,12 @@
 package javax.swing.text;
 
 import java.awt.Color;
-import java.awt.Component;
 import java.awt.Font;
-import java.awt.FontMetrics;
 import java.awt.font.TextAttribute;
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Stack;
@@ -41,15 +38,14 @@
 import java.util.ArrayList;
 import java.io.IOException;
 import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
-import javax.swing.Icon;
 import javax.swing.event.*;
 import javax.swing.undo.AbstractUndoableEdit;
 import javax.swing.undo.CannotRedoException;
 import javax.swing.undo.CannotUndoException;
 import javax.swing.undo.UndoableEdit;
 import javax.swing.SwingUtilities;
+import static sun.swing.SwingUtilities2.IMPLIED_CR;
 
 /**
  * A document that can be marked up with character and paragraph
@@ -782,9 +778,18 @@
             // Check for the composed text element. If it is, merge the character attributes
             // into this element as well.
             if (Utilities.isComposedTextAttributeDefined(attr)) {
-                ((MutableAttributeSet)attr).addAttributes(cattr);
-                ((MutableAttributeSet)attr).addAttribute(AbstractDocument.ElementNameAttribute,
-                                                         AbstractDocument.ContentElementName);
+                MutableAttributeSet mattr = (MutableAttributeSet) attr;
+                mattr.addAttributes(cattr);
+                mattr.addAttribute(AbstractDocument.ElementNameAttribute,
+                        AbstractDocument.ContentElementName);
+
+                // Assure that the composed text element is named properly
+                // and doesn't have the CR attribute defined.
+                mattr.addAttribute(StyleConstants.NameAttribute,
+                        AbstractDocument.ContentElementName);
+                if (mattr.isDefined(IMPLIED_CR)) {
+                    mattr.removeAttribute(IMPLIED_CR);
+                }
             }
 
             ElementSpec[] spec = new ElementSpec[parseBuffer.size()];
--- a/jdk/src/share/classes/javax/swing/text/GlyphView.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/text/GlyphView.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,6 +32,7 @@
 
 import javax.swing.UIManager;
 import sun.swing.SwingUtilities2;
+import static sun.swing.SwingUtilities2.IMPLIED_CR;
 
 /**
  * A GlyphView is a styled chunk of text that represents a view
@@ -1061,7 +1062,6 @@
     int length;
     // if it is an implied newline character
     boolean impliedCR;
-    private static final String IMPLIED_CR = "CR";
     boolean skipWidth;
 
     /**
--- a/jdk/src/share/classes/javax/swing/text/Utilities.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/text/Utilities.java	Thu Jul 29 22:02:45 2010 -0700
@@ -404,6 +404,24 @@
     }
 
     /**
+     * Adjust text offset so that the length of a resulting string as a whole
+     * fits into the specified width.
+     */
+    static int adjustOffsetForFractionalMetrics(
+            Segment s, FontMetrics fm, int offset, int width) {
+        // Sometimes the offset returned by getTabbedTextOffset is beyond the
+        // available area, when fractional metrics are enabled. We should
+        // guard against this.
+        if (offset < s.count) {
+            while (offset > 0 &&
+                    fm.charsWidth(s.array, s.offset, offset + 1) > width) {
+                offset--;
+            }
+        }
+        return offset;
+    }
+
+    /**
      * Determine where to break the given text to fit
      * within the given span. This tries to find a word boundary.
      * @param s  the source of the text
@@ -425,7 +443,7 @@
         int txtCount = s.count;
         int index = Utilities.getTabbedTextOffset(s, metrics, x0, x,
                                                   e, startOffset, false);
-
+        index = adjustOffsetForFractionalMetrics(s, metrics, index, x - x0);
 
         if (index >= txtCount - 1) {
             return txtCount;
--- a/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java	Thu Jul 29 22:02:45 2010 -0700
@@ -108,7 +108,7 @@
 
         try {
             if (line.isLeaf()) {
-                drawText(line, p0, p1, g, x, y);
+                 drawText(line, p0, p1, g, x, y);
             } else {
                 // this line contains the composed text.
                 int idx = line.getElementIndex(p0);
@@ -239,9 +239,11 @@
                                                 tabBase, tabBase + currentWidth,
                                                 this, p0);
         } else {
-            p = p0 + Utilities.getTabbedTextOffset(segment, metrics,
-                                                   tabBase, tabBase + currentWidth,
-                                                   this, p0, false);
+            int offset = Utilities.getTabbedTextOffset(segment, metrics,
+                    tabBase, tabBase + currentWidth, this, p0, false);
+            offset = Utilities.adjustOffsetForFractionalMetrics(
+                    segment, metrics, offset, currentWidth);
+            p = p0 + offset;
         }
         SegmentCache.releaseSharedSegment(segment);
         return p;
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Thu Jul 29 22:02:45 2010 -0700
@@ -24,20 +24,17 @@
  */
 package javax.swing.text.html;
 
-import java.awt.Color;
-import java.awt.Component;
 import java.awt.font.TextAttribute;
 import java.util.*;
 import java.net.URL;
-import java.net.URLEncoder;
 import java.net.MalformedURLException;
 import java.io.*;
 import javax.swing.*;
 import javax.swing.event.*;
 import javax.swing.text.*;
 import javax.swing.undo.*;
-import java.text.Bidi;
 import sun.swing.SwingUtilities2;
+import static sun.swing.SwingUtilities2.IMPLIED_CR;
 
 /**
  * A document that models HTML.  The purpose of this model is to
@@ -1819,7 +1816,6 @@
     static String MAP_PROPERTY = "__MAP__";
 
     private static char[] NEWLINE;
-    private static final String IMPLIED_CR = "CR";
 
     /**
      * I18N property key.
--- a/jdk/src/share/classes/sun/awt/PlatformFont.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/awt/PlatformFont.java	Thu Jul 29 22:02:45 2010 -0700
@@ -25,10 +25,10 @@
 
 package sun.awt;
 
-import java.awt.GraphicsEnvironment;
 import java.awt.peer.FontPeer;
 import java.util.Locale;
 import java.util.Vector;
+import sun.font.SunFontManager;
 import sun.java2d.FontSupport;
 import java.nio.CharBuffer;
 import java.nio.ByteBuffer;
@@ -57,9 +57,9 @@
     protected static String osVersion;
 
     public PlatformFont(String name, int style){
-        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        if (ge instanceof FontSupport) {
-            fontConfig = ((FontSupport)ge).getFontConfiguration();
+        SunFontManager sfm = SunFontManager.getInstance();
+        if (sfm instanceof FontSupport) {
+            fontConfig = ((FontSupport)sfm).getFontConfiguration();
         }
         if (fontConfig == null) {
             return;
--- a/jdk/src/share/classes/sun/awt/SunToolkit.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/awt/SunToolkit.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,6 +39,7 @@
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 import sun.util.logging.PlatformLogger;
 import sun.misc.SoftCache;
@@ -592,7 +593,7 @@
         }
         PostEventQueue postEventQueue =
             (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY);
-        if(postEventQueue != null) {
+        if (postEventQueue != null) {
             postEventQueue.postEvent(event);
         }
     }
@@ -610,16 +611,29 @@
         postEvent(targetToAppContext(e.getSource()), pe);
     }
 
+    private static final Lock flushLock = new ReentrantLock();
+    private static boolean isFlushingPendingEvents = false;
+
     /*
      * Flush any pending events which haven't been posted to the AWT
      * EventQueue yet.
      */
     public static void flushPendingEvents()  {
-        AppContext appContext = AppContext.getAppContext();
-        PostEventQueue postEventQueue =
-            (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY);
-        if(postEventQueue != null) {
-            postEventQueue.flush();
+        flushLock.lock();
+        try {
+            // Don't call flushPendingEvents() recursively
+            if (!isFlushingPendingEvents) {
+                isFlushingPendingEvents = true;
+                AppContext appContext = AppContext.getAppContext();
+                PostEventQueue postEventQueue =
+                    (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY);
+                if (postEventQueue != null) {
+                    postEventQueue.flush();
+                }
+            }
+        } finally {
+            isFlushingPendingEvents = false;
+            flushLock.unlock();
         }
     }
 
@@ -1930,6 +1944,25 @@
         return (Window)comp;
     }
 
+    /**
+     * Returns the value of the system property indicated by the specified key.
+     */
+    public static String getSystemProperty(final String key) {
+        return (String)AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    return System.getProperty(key);
+                }
+            });
+    }
+
+    /**
+     * Returns the boolean value of the system property indicated by the specified key.
+     */
+    protected static Boolean getBooleanSystemProperty(String key) {
+        return Boolean.valueOf(AccessController.
+                   doPrivileged(new GetBooleanAction(key)));
+    }
+
     private static Boolean sunAwtDisableMixing = null;
 
     /**
@@ -1938,9 +1971,7 @@
      */
     public synchronized static boolean getSunAwtDisableMixing() {
         if (sunAwtDisableMixing == null) {
-            sunAwtDisableMixing = Boolean.valueOf(
-                    AccessController.doPrivileged(
-                        new GetBooleanAction("sun.awt.disableMixing")));
+            sunAwtDisableMixing = getBooleanSystemProperty("sun.awt.disableMixing");
         }
         return sunAwtDisableMixing.booleanValue();
     }
@@ -2079,12 +2110,14 @@
         eventQueue = eq;
     }
 
-    public boolean noEvents() {
+    public synchronized boolean noEvents() {
         return queueHead == null;
     }
 
     /*
-     * Continually post pending AWTEvents to the Java EventQueue.
+     * Continually post pending AWTEvents to the Java EventQueue. The method
+     * is synchronized to ensure the flush is completed before a new event
+     * can be posted to this queue.
      */
     public synchronized void flush() {
         EventQueueItem tempQueue = queueHead;
--- a/jdk/src/share/classes/sun/awt/image/PNGImageDecoder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/awt/image/PNGImageDecoder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,7 +32,7 @@
 import java.awt.Color;
 
 /** PNG - Portable Network Graphics - image file reader.
-    See <a href=ftp://ds.internic.net/rfc/rfc2083.txt>RFC2083</a> for details. */
+    See <a href=http://www.ietf.org/rfc/rfc2083.txt>RFC2083</a> for details. */
 
 /* this is changed
 public class PNGImageDecoder extends FilterInputStream implements Runnable
--- a/jdk/src/share/classes/sun/font/FontUtilities.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/font/FontUtilities.java	Thu Jul 29 22:02:45 2010 -0700
@@ -60,6 +60,10 @@
 
     static final String LUCIDA_FILE_NAME = "LucidaSansRegular.ttf";
 
+    private static boolean debugFonts = false;
+    private static PlatformLogger logger = null;
+    private static boolean logging;
+
     // This static initializer block figures out the OS constants.
     static {
 
@@ -115,6 +119,25 @@
                 File lucidaFile = new File(jreFontDirName + File.separator
                                            + LUCIDA_FILE_NAME);
                 isOpenJDK = !lucidaFile.exists();
+
+                String debugLevel =
+                    System.getProperty("sun.java2d.debugfonts");
+
+                if (debugLevel != null && !debugLevel.equals("false")) {
+                    debugFonts = true;
+                    logger = PlatformLogger.getLogger("sun.java2d");
+                    if (debugLevel.equals("warning")) {
+                        logger.setLevel(PlatformLogger.WARNING);
+                    } else if (debugLevel.equals("severe")) {
+                        logger.setLevel(PlatformLogger.SEVERE);
+                    }
+                }
+
+                if (debugFonts) {
+                    logger = PlatformLogger.getLogger("sun.java2d");
+                    logging = logger.isEnabled();
+                }
+
                 return null;
             }
         });
@@ -140,32 +163,6 @@
      */
     public static final int MAX_LAYOUT_CHARCODE = 0x206F;
 
-    private static boolean debugFonts = false;
-    private static PlatformLogger logger = null;
-    private static boolean logging;
-
-    static {
-
-        String debugLevel =
-            System.getProperty("sun.java2d.debugfonts");
-
-        if (debugLevel != null && !debugLevel.equals("false")) {
-            debugFonts = true;
-            logger = PlatformLogger.getLogger("sun.java2d");
-            if (debugLevel.equals("warning")) {
-                logger.setLevel(PlatformLogger.WARNING);
-            } else if (debugLevel.equals("severe")) {
-                logger.setLevel(PlatformLogger.SEVERE);
-            }
-        }
-
-        if (debugFonts) {
-            logger = PlatformLogger.getLogger("sun.java2d");
-            logging = logger.isEnabled();
-        }
-
-    }
-
     /**
      * Calls the private getFont2D() method in java.awt.Font objects.
      *
--- a/jdk/src/share/classes/sun/java2d/HeadlessGraphicsEnvironment.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/java2d/HeadlessGraphicsEnvironment.java	Thu Jul 29 22:02:45 2010 -0700
@@ -59,17 +59,12 @@
  * Headless decorator implementation of a SunGraphicsEnvironment
  */
 
-public class HeadlessGraphicsEnvironment extends GraphicsEnvironment
-    implements FontSupport {
+public class HeadlessGraphicsEnvironment extends GraphicsEnvironment {
 
     private GraphicsEnvironment ge;
-    private FontSupport fontSupport;
 
     public HeadlessGraphicsEnvironment(GraphicsEnvironment ge) {
         this.ge = ge;
-        if (ge instanceof FontSupport) {
-            fontSupport = (FontSupport)ge;
-        }
     }
 
     public GraphicsDevice[] getScreenDevices()
@@ -101,13 +96,6 @@
     public String[] getAvailableFontFamilyNames(Locale l) {
         return ge.getAvailableFontFamilyNames(l); }
 
-    public FontConfiguration getFontConfiguration() {
-        if (fontSupport != null) {
-            return fontSupport.getFontConfiguration();
-        }
-        return null;
-    }
-
     /* Used by FontManager : internal API */
     public GraphicsEnvironment getSunGraphicsEnvironment() {
         return ge;
--- a/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,2 @@
-# Jules Rendering Engine module
-sun.java2d.jules.JulesRenderingEngine
-
 #  Pisces Rendering Engine module
-sun.java2d.pisces.PiscesRenderingEngine
\ No newline at end of file
+sun.java2d.pisces.PiscesRenderingEngine
--- a/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Thu Jul 29 22:02:45 2010 -0700
@@ -109,6 +109,12 @@
                           new StringBuffer("AATextInfoPropertyKey");
 
     /**
+     * Attribute key for the content elements.  If it is set on an element, the
+     * element is considered to be a line break.
+     */
+    public static final String IMPLIED_CR = "CR";
+
+    /**
      * Used to tell a text component, being used as an editor for table
      * or tree, how many clicks it took to start editing.
      */
@@ -432,8 +438,12 @@
         // c may be null here.
         String clipString = "...";
         availTextWidth -= SwingUtilities2.stringWidth(c, fm, clipString);
+        if (availTextWidth <= 0) {
+            //can not fit any characters
+            return clipString;
+        }
+
         boolean needsTextLayout;
-
         synchronized (charsBufferLock) {
             int stringLength = syncCharsBuffer(string);
             needsTextLayout =
--- a/jdk/src/share/classes/sun/swing/table/DefaultTableCellHeaderRenderer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/classes/sun/swing/table/DefaultTableCellHeaderRenderer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -127,7 +127,7 @@
 
     public static SortOrder getColumnSortOrder(JTable table, int column) {
         SortOrder rv = null;
-        if (table.getRowSorter() == null) {
+        if (table == null || table.getRowSorter() == null) {
             return rv;
         }
         java.util.List<? extends RowSorter.SortKey> sortKeys =
--- a/jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c	Thu Jul 29 22:02:45 2010 -0700
@@ -111,6 +111,10 @@
 {
     BufImgSDOps *bisdo =
         (BufImgSDOps*)SurfaceData_InitOps(env, bisd, sizeof(BufImgSDOps));
+    if (bisdo == NULL) {
+        JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+        return;
+    }
     bisdo->sdOps.Lock = BufImg_Lock;
     bisdo->sdOps.GetRasInfo = BufImg_GetRasInfo;
     bisdo->sdOps.Release = BufImg_Release;
--- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c	Thu Jul 29 22:02:45 2010 -0700
@@ -182,7 +182,7 @@
     int success = 0;
 
     stream->read(stream, sig, SIG_BYTES);
-    if (!png_check_sig(sig, SIG_BYTES)) {
+    if (png_sig_cmp(sig, 0, SIG_BYTES)) {
         goto done;
     }
     success = SplashDecodePng(splash, my_png_read_stream, stream);
--- a/jdk/src/share/native/sun/font/freetypeScaler.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/share/native/sun/font/freetypeScaler.c	Thu Jul 29 22:02:45 2010 -0700
@@ -490,22 +490,23 @@
 
     /* ascent */
     ax = 0;
-    ay = -(jfloat) FT26Dot6ToFloat(
-                       scalerInfo->face->size->metrics.ascender +
-                       bmodifier/2);
+    ay = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
+                       ((jlong) scalerInfo->face->ascender + bmodifier/2),
+                       (jlong) scalerInfo->face->size->metrics.y_scale));
     /* descent */
     dx = 0;
-    dy = -(jfloat) FT26Dot6ToFloat(
-                       scalerInfo->face->size->metrics.descender +
-                       bmodifier/2);
+    dy = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
+                       ((jlong) scalerInfo->face->descender + bmodifier/2),
+                       (jlong) scalerInfo->face->size->metrics.y_scale));
     /* baseline */
     bx = by = 0;
 
     /* leading */
     lx = 0;
-    ly = (jfloat) FT26Dot6ToFloat(
-                      scalerInfo->face->size->metrics.height +
-                      bmodifier) + ay - dy;
+    ly = (jfloat) FT26Dot6ToFloat(FT_MulFix(
+                      (jlong) scalerInfo->face->height + bmodifier,
+                      (jlong) scalerInfo->face->size->metrics.y_scale))
+                  + ay - dy;
     /* max advance */
     mx = (jfloat) FT26Dot6ToFloat(
                      scalerInfo->face->size->metrics.max_advance +
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -275,7 +275,7 @@
         Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
                                                           XToolkit.getDefaultRootWindow(),
                                                           new Point(0, 0));
-        return absoluteLoc.x;
+        return absoluteLoc != null ? absoluteLoc.x : 0;
     }
 
     public int getAbsoluteY()
@@ -283,7 +283,7 @@
         Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
                                                           XToolkit.getDefaultRootWindow(),
                                                           new Point(0, 0));
-        return absoluteLoc.y;
+        return absoluteLoc != null ? absoluteLoc.y : 0;
     }
 
     public int getWidth() {
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -849,7 +849,7 @@
                     // if _NET_WM_STRUT_PARTIAL is present, we should use its values to detect
                     // if the struts area intersects with screenBounds, however some window
                     // managers don't set this hint correctly, so we just get intersection with windowBounds
-                    if (windowBounds.intersects(screenBounds))
+                    if (windowBounds != null && windowBounds.intersects(screenBounds))
                     {
                         insets.left = Math.max((int)Native.getLong(native_ptr, 0), insets.left);
                         insets.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right);
@@ -1053,10 +1053,28 @@
         return peer;
     }
 
+    private static Boolean sunAwtDisableGtkFileDialogs = null;
+
+    /**
+     * Returns the value of "sun.awt.disableGtkFileDialogs" property. Default
+     * value is {@code false}.
+     */
+    public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
+        if (sunAwtDisableGtkFileDialogs == null) {
+            sunAwtDisableGtkFileDialogs =
+                getBooleanSystemProperty("sun.awt.disableGtkFileDialogs");
+        }
+        return sunAwtDisableGtkFileDialogs.booleanValue();
+    }
+
     public FileDialogPeer createFileDialog(FileDialog target) {
+        FileDialogPeer peer = null;
         // The current GtkFileChooser is available from GTK+ 2.4
-        FileDialogPeer peer = checkGtkVersion(2, 4, 0) ? new GtkFileDialogPeer(
-                target) : new XFileDialogPeer(target);
+        if (!getSunAwtDisableGtkFileDialogs() && checkGtkVersion(2, 4, 0)) {
+            peer = new GtkFileDialogPeer(target);
+        } else {
+            peer = new XFileDialogPeer(target);
+        }
         targetCreatedPeer(target, peer);
         return peer;
     }
@@ -1201,14 +1219,6 @@
         }
     }
 
-    static String getSystemProperty(final String name) {
-        return (String)AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
-                    return System.getProperty(name);
-                }
-            });
-    }
-
     public PrintJob getPrintJob(final Frame frame, final String doctitle,
                                 final Properties props) {
 
@@ -1961,7 +1971,7 @@
     }
 
     static long reset_time_utc;
-    static final long WRAP_TIME_MILLIS = Integer.MAX_VALUE;
+    static final long WRAP_TIME_MILLIS = 0x00000000FFFFFFFFL;
 
     /*
      * This function converts between the X server time (number of milliseconds
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java	Thu Jul 29 22:02:45 2010 -0700
@@ -778,8 +778,8 @@
                                                           x, y,
                                                           xbe.get_x_root(),
                                                           xbe.get_y_root(),
-                                                          clickCount,false,MouseWheelEvent.WHEEL_UNIT_SCROLL,
-                                                          3,button==4 ?  -1 : 1);
+                                                          1,false,MouseWheelEvent.WHEEL_UNIT_SCROLL,
+                                                          3,button==4 ?  -1*clickCount : 1*clickCount);
                 postEventToEventQueue(mwe);
             }
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,5 @@
+# Jules Rendering Engine module
+sun.java2d.jules.JulesRenderingEngine
+
+#  Pisces Rendering Engine module
+sun.java2d.pisces.PiscesRenderingEngine
--- a/jdk/src/solaris/doc/sun/man/man1/appletviewer.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/appletviewer.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,12 +19,11 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH appletviewer 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH appletviewer 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
-appletviewer \- The Java Applet Viewer
+appletviewer \- The Java Applet Viewer.
 .LP
 .RS 3
 
@@ -74,6 +73,4 @@
 .LP
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/apt.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/apt.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH apt 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH apt 1 "02 Jun 2010"
 
 .LP
 .SH "NAME"
@@ -124,6 +123,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/extcheck.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/extcheck.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH extcheck 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH extcheck 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -83,6 +82,4 @@
 .LP
 jar(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/idlj.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/idlj.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH idlj 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH idlj 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -508,6 +507,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/appletviewer.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/appletviewer.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH appletviewer 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH appletviewer 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -74,6 +73,4 @@
 .LP
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/apt.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/apt.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH apt 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH apt 1 "02 Jun 2010"
 
 .LP
 .SH "NAME"
--- a/jdk/src/solaris/doc/sun/man/man1/ja/extcheck.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/extcheck.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH extcheck 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH extcheck 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -83,6 +82,4 @@
 .LP
 jar(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/idlj.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/idlj.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH idlj 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH idlj 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -507,6 +506,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jar.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jar.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jar 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jar 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -205,7 +204,7 @@
 
 .LP
 .LP
-Java 2 SDK ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.3 以é™ã‹ã‚‰ã€\f2jar\fP ユーティリティー㧠
+JDK ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.3 以é™ã‹ã‚‰ã€\f2jar\fP ユーティリティー㧠
 .na
 \f2JarIndex\fP @
 .fi
@@ -717,6 +716,4 @@
 .br
 
 .LP
-pack200(1) 
-.LP
- 
+pack200(1)  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jarsigner.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jarsigner.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jarsigner 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jarsigner 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -504,7 +503,7 @@
 .nr 44 \n(83+(3*\n(38)
 .nr 84 +\n(44
 .nr TW \n(84
-.if t .if \n(TW>\n(.li .tm Table at line 186 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 185 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1616,6 +1615,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/java.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/java.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH java 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH java 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -315,19 +314,19 @@
 ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ‘イルを無効ã«ã—ã¾ã™ã€‚通常ã€VM ã§ã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ‘イルãŒçµ‚了ã™ã‚‹ã¾ã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã¨ã—ã¦ã‚³ãƒ³ãƒ‘イルã—ã€ã‚¤ãƒ³ã‚¿ãƒ—リタモードã§ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã—ã¾ã™ã€‚\f2\-Xbatch\fP フラグを指定ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ‘イルãŒç„¡åŠ¹ã«ãªã‚Šã€ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ‘イルãŒå®Œäº†ã™ã‚‹ã¾ã§ãƒ•ã‚©ã‚¢ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ 
 .TP 3
 \-Xbootclasspath:bootclasspath 
-ブートクラスファイルを探ã™ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブをコロンã§åŒºåˆ‡ã£ãŸãƒªã‚¹ãƒˆã§æŒ‡å®šã—ã¾ã™ã€‚指定ã—ãŸãƒ‘スã«å­˜åœ¨ã™ã‚‹ãƒ–ートクラスファイルãŒã€Java 2 SDK ã«å«ã¾ã‚Œã‚‹ãƒ–ートクラスファイルã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚\f2注: rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java 2 Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
+ブートクラスファイルを探ã™ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブをコロンã§åŒºåˆ‡ã£ãŸãƒªã‚¹ãƒˆã§æŒ‡å®šã—ã¾ã™ã€‚指定ã—ãŸãƒ‘スã«å­˜åœ¨ã™ã‚‹ãƒ–ートクラスファイルãŒã€JDK ã«å«ã¾ã‚Œã‚‹ãƒ–ートクラスファイルã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚\f2注: rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
 .TP 3
 \-Xbootclasspath/a:path 
 ディレクトリã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブã®ãƒ‘スをコロンã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ パスã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ–ートストラップクラスパスã®ã‚ã¨ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ 
 .TP 3
 \-Xbootclasspath/p:path 
-ディレクトリã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブã®ãƒ‘スをコロンã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ パスã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ–ートストラップクラスパスã®å‰ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚\f2注 rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java 2 Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
+ディレクトリã€JAR アーカイブã€ãŠã‚ˆã³ ZIP アーカイブã®ãƒ‘スをコロンã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ パスã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ–ートストラップクラスパスã®å‰ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚\f2注 rt.jar 内ã®ã‚¯ãƒ©ã‚¹ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ç›®çš„ã§ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«é…ç½®ã—ãªã„ã§ãã ã•ã„。Java Runtime Environment ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ãƒ©ã‚¤ã‚»ãƒ³ã‚¹é•åã«ãªã‚Šã¾ã™ã€‚\fP 
 .TP 3
 \-Xcheck:jni 
 Java Native Interface (JNI) 機能ã«å¯¾ã—ã¦è¿½åŠ ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã„ã¾ã™ã€‚具体的ã«ã¯ã€Java 仮想マシン㯠JNI è¦æ±‚を処ç†ã™ã‚‹å‰ã«ã€JNI 関数ã«æ¸¡ã•ã‚Œã‚‹ãƒ‘ラメータã¨ã€å®Ÿè¡Œç’°å¢ƒã®ãƒ‡ãƒ¼ã‚¿ã‚’検証ã—ã¾ã™ã€‚無効ãªãƒ‡ãƒ¼ã‚¿ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–コードã«å•é¡ŒãŒã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã‚‹ãŸã‚ã€Java 仮想マシンã¯è‡´å‘½çš„エラーを発生ã—ã¦çµ‚了ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã¨ã€ãƒ‘フォーマンス低下ãŒäºˆæƒ³ã•ã‚Œã¾ã™ã€‚ 
 .TP 3
 \-Xfuture 
-クラスã¨ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ã‚’厳密ã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚下ä½äº’æ›æ€§ã‚’ä¿ã¤ãŸã‚ã€Java 2 SDK ã®ä»®æƒ³ãƒžã‚·ãƒ³ãŒå®Ÿè¡Œã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å½¢å¼ãƒã‚§ãƒƒã‚¯ã¯ã€JDK ソフトウェアã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.1.x ãŒå®Ÿè¡Œã™ã‚‹ãƒã‚§ãƒƒã‚¯ã¨åŒç¨‹åº¦ã®åŽ³å¯†ã•ã«ãªã£ã¦ã„ã¾ã™ã€‚\f3\-Xfuture\fP フラグを指定ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã®ä»•æ§˜ã¸ã®æº–拠を強化ã™ã‚‹ãŸã‚ã®ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚Java アプリケーション起動ツールã®å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«ãªã‚‹ãŸã‚ã€æ–°ã—ã„コードを開発ã™ã‚‹ã¨ãã«ã¯ã“ã®ãƒ•ãƒ©ã‚°ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ 
+クラスã¨ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ã‚’厳密ã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚下ä½äº’æ›æ€§ã‚’ä¿ã¤ãŸã‚ã€JDK ã®ä»®æƒ³ãƒžã‚·ãƒ³ãŒå®Ÿè¡Œã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å½¢å¼ãƒã‚§ãƒƒã‚¯ã¯ã€JDK ソフトウェアã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.1.x ãŒå®Ÿè¡Œã™ã‚‹ãƒã‚§ãƒƒã‚¯ã¨åŒç¨‹åº¦ã®åŽ³å¯†ã•ã«ãªã£ã¦ã„ã¾ã™ã€‚\f3\-Xfuture\fP フラグを指定ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã®ä»•æ§˜ã¸ã®æº–拠を強化ã™ã‚‹ãŸã‚ã®ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚Java アプリケーション起動ツールã®å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«ãªã‚‹ãŸã‚ã€æ–°ã—ã„コードを開発ã™ã‚‹ã¨ãã«ã¯ã“ã®ãƒ•ãƒ©ã‚°ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ 
 .TP 3
 \-Xnoclassgc 
 クラスã®ã‚¬ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’無効ã«ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã¨ã€ãƒ­ãƒ¼ãƒ‰æ¸ˆã¿ã‚¯ãƒ©ã‚¹ã‹ã‚‰ãƒ¡ãƒ¢ãƒªãƒ¼ãŒå›žå¾©ã•ã‚Œã‚‹ã“ã¨ãŒãªããªã‚‹ãŸã‚ã€å…¨ä½“çš„ãªãƒ¡ãƒ¢ãƒªãƒ¼ä½¿ç”¨é‡ãŒå¢—大ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¢ãƒ—リケーションã«ã‚ˆã£ã¦ã¯ OutOfMemoryError ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ 
@@ -503,6 +502,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/javac.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/javac.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javac 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javac 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -960,6 +959,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/javadoc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/javadoc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javadoc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javadoc 1 "02 Jun 2010"
 .SH "åå‰"
 javadoc \- Java API ドキュメントジェãƒãƒ¬ãƒ¼ã‚¿
 .RS 3
@@ -395,7 +394,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 353 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 352 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -529,7 +528,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 406 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 405 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1374,7 +1373,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 1125 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1124 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2309,7 +2308,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1861 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1860 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2677,7 +2676,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 1959 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1958 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3180,7 +3179,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2280 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2279 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3301,7 +3300,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2316 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2315 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3440,7 +3439,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2356 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2355 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3619,7 +3618,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2437 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2436 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3785,7 +3784,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2504 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2503 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4102,7 +4101,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 2681 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2680 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4365,7 +4364,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 2791 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2790 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5831,5 +5830,4 @@
 .RE
 
 .LP
-.LP
-javadoc ã¯ã€Sun Microsystems, Inc ã®å•†æ¨™ã§ã™ (\f2javadoc\fP コマンド自体ã«ã¯å•†æ¨™ã‚·ãƒ³ãƒœãƒ«ã¯ä¸è¦)。 
+ 
--- a/jdk/src/solaris/doc/sun/man/man1/ja/javah.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/javah.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javah 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javah 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -156,6 +155,4 @@
 .LP
 javac(1)ã€java(1)ã€jdb(1)ã€javap(1)ã€javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/javap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/javap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javap 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -359,6 +358,4 @@
 .LP
 javac(1)〠java(1)ã€jdb(1)ã€javah(1)ã€javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/javaws.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/javaws.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,17 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javaws 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
-
-.LP
+.TH javaws 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
 \f2javaws\fP コマンド行
 .LP
-
-.LP
 .LP
 \ 
 .LP
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jconsole.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jconsole.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jconsole 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jconsole 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -160,6 +159,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jdb.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jdb.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jdb 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jdb 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -364,6 +363,4 @@
 .LP
 javac(1)ã€java(1)ã€javah(1)ã€javap(1)ã€javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jhat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jhat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jhat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jhat 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jinfo.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jinfo.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jinfo 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jinfo 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -164,6 +163,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jmap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jmap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jmap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jmap 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -196,6 +195,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jps.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jps.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jps 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jps 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -292,6 +291,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jrunscript.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jrunscript.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jrunscript 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jrunscript 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -220,6 +219,4 @@
 .LP
 JavaScript ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€jrunscript ã¯ã€æœ€åˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã‚¹ã‚¯ãƒªãƒ—トを評価ã™ã‚‹å‰ã«ã€ã„ãã¤ã‹ã®çµ„ã¿è¾¼ã¿é–¢æ•°ã‚„組ã¿è¾¼ã¿ã‚ªãƒ–ジェクトをåˆæœŸåŒ–ã—ã¾ã™ã€‚ã“れら㮠JavaScript 組ã¿è¾¼ã¿æ©Ÿèƒ½ã«ã¤ã„ã¦ã¯ã€jsdocs ã‚’å‚ç…§ã—ã¦ãã ã•ã„。
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jsadebugd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jsadebugd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jsadebugd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jsadebugd 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -147,6 +146,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jstack.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jstack.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstack 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstack 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -189,6 +188,4 @@
 .LP
 æ··åˆãƒ¢ãƒ¼ãƒ‰ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ (\-m オプション使用) ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒãƒƒã‚°ã‚µãƒ¼ãƒãƒ¼ã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jstat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jstat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstat 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -487,7 +486,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 260 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 259 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -887,7 +886,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 314 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 313 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1170,7 +1169,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 350 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 349 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1634,7 +1633,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 420 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 419 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2258,7 +2257,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 494 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 493 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2638,7 +2637,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 517 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 516 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2954,7 +2953,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 571 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 570 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3409,7 +3408,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 627 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 626 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3805,7 +3804,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 669 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 668 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4150,7 +4149,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 711 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 710 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4495,7 +4494,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 753 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 752 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4880,7 +4879,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 803 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 802 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5179,7 +5178,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 829 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 828 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5462,6 +5461,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/jstatd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/jstatd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstatd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstatd 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -298,6 +297,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/keytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/keytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH keytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH keytool 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -1643,6 +1642,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/native2ascii.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/native2ascii.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH native2ascii 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH native2ascii 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -78,6 +77,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/orbd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/orbd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH orbd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH orbd 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -374,6 +373,4 @@
 .br
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/pack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/pack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH pack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH pack200 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/solaris/doc/sun/man/man1/ja/policytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/policytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH policytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH policytool 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -105,6 +104,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/rmic.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/rmic.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmic 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmic 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -265,6 +264,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/rmid.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/rmid.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmid 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmid 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -354,6 +353,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpathã€java(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/rmiregistry.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/rmiregistry.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmiregistry 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmiregistry 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -94,6 +93,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/rmi/Naming.html
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/schemagen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/schemagen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH schemagen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH schemagen 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/solaris/doc/sun/man/man1/ja/serialver.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/serialver.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH serialver 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH serialver 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -121,6 +120,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/io/ObjectStreamClass.html
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/servertool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/servertool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH servertool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH servertool 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
@@ -125,6 +124,4 @@
 .LP
 
 .LP
-orbd(1) 
-.LP
- 
+orbd(1)  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/tnameserv.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/tnameserv.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH tnameserv 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH tnameserv 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
 Java IDL:一時ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“ス \- \f2tnameserv\fP
 .LP
-
-.LP
 .LP
 ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€Java IDL 一時ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“ス \f2tnameserv\fP ã®ä½¿ç”¨æ–¹æ³•ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚Java IDL ã«ã¯ã€Object Request Broker Daemon (ORBD) ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ORBD ã¯ã€ãƒ–ートストラップサービスã€ä¸€æ™‚ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“スã€\f3æŒç¶š\fPãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“スã€ãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’å«ã‚€ãƒ‡ãƒ¼ãƒ¢ãƒ³ãƒ—ロセスã§ã™ã€‚Java IDL ã®ã™ã¹ã¦ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ ORBD を使用ã—ã¦ã„ã¾ã™ãŒã€ä¸€æ™‚ãƒãƒ¼ãƒ ã‚µãƒ¼ãƒ“スを使用ã™ã‚‹ä¾‹ã§ã¯ã€\f2orbd\fP ã®ä»£ã‚ã‚Šã« \f2tnameserv\fP を使用ã§ãã¾ã™ã€‚\f2orbd\fP ツールã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€\f2orbd\fP ã® orbd(1)ã¾ãŸã¯
 .na
@@ -499,6 +496,4 @@
 .fi
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/ja/unpack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/unpack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright  Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH unpack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH unpack200 1 "02 Jun 2010"
 
 .LP
 .SH "åå‰"
--- a/jdk/src/solaris/doc/sun/man/man1/ja/wsgen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/wsgen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsgen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsgen 1 "02 Jun 2010"
 .SH "åå‰"
 wsgen \- XML Web Services (JAX\-WS) 2.0 ã®ãŸã‚ã® Java(TM) API
 .RS 3
@@ -387,7 +386,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 144 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 143 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/solaris/doc/sun/man/man1/ja/wsimport.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/wsimport.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsimport 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsimport 1 "02 Jun 2010"
 .SH "åå‰"
 wsimport \- XML Web Services (JAX\-WS) 2.0 ã®ãŸã‚ã® Java(TM) API
 .LP
@@ -467,7 +466,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 164 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 163 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/solaris/doc/sun/man/man1/ja/xjc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/ja/xjc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH xjc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH xjc 1 "02 Jun 2010"
 
 .LP
 .ad c
--- a/jdk/src/solaris/doc/sun/man/man1/jar.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jar.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jar 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jar 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -183,7 +182,7 @@
 
 .LP
 .LP
-Beginning with version 1.3 of the Java 2 SDK, the \f2jar\fP utility supports 
+Beginning with version 1.3 of the JDK, the \f2jar\fP utility supports 
 .na
 \f2JarIndex\fP @
 .fi
@@ -695,6 +694,4 @@
 .br
 
 .LP
-pack200(1) 
-.LP
- 
+pack200(1)  
--- a/jdk/src/solaris/doc/sun/man/man1/jarsigner.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jarsigner.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jarsigner 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jarsigner 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -246,12 +245,12 @@
 DSA (Digital Signature Algorithm) with the SHA\-1 digest algorithm, or 
 .TP 2
 o
-the RSA algorithm with the SHA\-1 digest algorithm. 
+the RSA algorithm with the SHA\-256 digest algorithm. 
 .RE
 
 .LP
 .LP
-That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA1withRSA" algorithm.
+That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm.
 .LP
 .LP
 These default signature algorithms can be overridden using the \f2\-sigalg\fP option.
@@ -541,7 +540,7 @@
 .na
 \f2Appendix A\fP @
 .fi
-http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA or SHA1withRSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
+http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA or SHA256withRSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
 .LP
 .RE
 .TP 3
@@ -553,7 +552,7 @@
 .na
 \f2Appendix A\fP @
 .fi
-http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA\-1 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
+http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA\-256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed.
 .LP
 .RE
 .TP 3
@@ -1391,7 +1390,7 @@
 .nr 44 \n(83+(3*\n(38)
 .nr 84 +\n(44
 .nr TW \n(84
-.if t .if \n(TW>\n(.li .tm Table at line 1129 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1128 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1615,7 +1614,5 @@
 .RE
 
 .LP
-
-.LP
 .RE
  
--- a/jdk/src/solaris/doc/sun/man/man1/java.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/java.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH java 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH java 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -299,19 +298,19 @@
 Disable background compilation. Normally the VM will compile the method as a background task, running the method in interpreter mode until the background compilation is finished. The \f2\-Xbatch\fP flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed. 
 .TP 3
 \-Xbootclasspath:bootclasspath 
-Specify a colon\-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.\fP 
+Specify a colon\-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java platform JDK. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java Runtime Environment binary code license.\fP 
 .TP 3
 \-Xbootclasspath/a:path 
 Specify a colon\-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path. 
 .TP 3
 \-Xbootclasspath/p:path 
-Specify a colon\-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.\fP 
+Specify a colon\-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. \f2Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java Runtime Environment binary code license.\fP 
 .TP 3
 \-Xcheck:jni 
 Perform additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used. 
 .TP 3
 \-Xfuture 
-Perform strict class\-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The \f3\-Xfuture\fP flag turns on stricter class\-file format checks that enforce closer conformance to the class\-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher. 
+Perform strict class\-file format checks. For purposes of backwards compatibility, the default format checks performed by the JDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The \f3\-Xfuture\fP flag turns on stricter class\-file format checks that enforce closer conformance to the class\-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher. 
 .TP 3
 \-Xnoclassgc 
 Disable class garbage collection. Use of this option will prevent memory recovery from loaded classes thus increasing overall memory usage. This could cause OutOfMemoryError to be thrown in some applications. 
@@ -487,6 +486,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/javac.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/javac.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javac 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javac 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -938,6 +937,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/javadoc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/javadoc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javadoc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javadoc 1 "02 Jun 2010"
 .SH "Name"
 javadoc \- The Java API Documentation Generator
 .RS 3
@@ -395,7 +394,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 353 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 352 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -529,7 +528,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 406 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 405 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1351,7 +1350,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 1123 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1122 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2080,7 +2079,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1666 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1665 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2426,7 +2425,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 1742 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1741 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2829,7 +2828,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1963 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1962 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2946,7 +2945,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 1995 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 1994 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3065,7 +3064,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2029 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2028 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3225,7 +3224,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2104 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2103 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3369,7 +3368,7 @@
 .nr 40 \n(79+(0*\n(38)
 .nr 80 +\n(40
 .nr TW \n(80
-.if t .if \n(TW>\n(.li .tm Table at line 2163 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2162 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3674,7 +3673,7 @@
 .nr 42 \n(81+(3*\n(38)
 .nr 82 +\n(42
 .nr TW \n(82
-.if t .if \n(TW>\n(.li .tm Table at line 2341 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2340 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3937,7 +3936,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 2451 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 2450 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5422,9 +5421,53 @@
 .RE
 
 .LP
+.LP
+.TS
+.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
+.de 35
+.ps \n(.s
+.vs \n(.vu
+.in \n(.iu
+.if \n(.u .fi
+.if \n(.j .ad
+.if \n(.j=0 .na
+..
+.nf
+.nr #~ 0
+.if n .nr #~ 0.6n
+.ds #d .d
+.if \(ts\n(.z\(ts\(ts .ds #d nl
+.fc
+.nr 33 \n(.s
+.rm 80
+.nr 80 0
+.80
+.rm 80
+.nr 38 1n
+.nr 79 0
+.nr 40 \n(79+(0*\n(38)
+.nr 80 +\n(40
+.nr TW \n(80
+.if t .if \n(TW>\n(.li .tm Table at line 3869 file Input is too wide - \n(TW units
+.fc  
+.nr #T 0-1
+.nr #a 0-1
+.eo
+.de T#
+.ds #d .d
+.if \(ts\n(.z\(ts\(ts .ds #d nl
+.mk ##
+.nr ## -1v
+.ls 1
+.ls
+..
+.ec
+.fc
+.nr T. 1
+.T# 1
+.35
+.TE
+.if \n-(b.=0 .nr c. \n(.c-\n(d.-3
 
 .LP
-.LP
-Javadoc is a trademark of Sun Microsystems, Inc. (The \f2javadoc\fP command itself does not require the trademark symbol.)
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/javah.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/javah.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javah 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javah 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -156,6 +155,4 @@
 .LP
 javac(1), java(1), jdb(1), javap(1), javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/javap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/javap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH javap 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -356,6 +355,4 @@
 .LP
 javac(1), java(1), jdb(1), javah(1), javadoc(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/javaws.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/javaws.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,17 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javaws 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
-
-.LP
+.TH javaws 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
 \f2javaws\fP Command Line
 .LP
-
-.LP
 .LP
 \ 
 .LP
@@ -360,6 +355,4 @@
 .LP
 .RE
 .RE
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jconsole.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jconsole.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jconsole 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jconsole 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -141,6 +140,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jdb.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jdb.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jdb 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jdb 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -364,6 +363,4 @@
 .LP
 javac(1), java(1), javah(1), javap(1), javadoc(1).
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jhat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jhat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jhat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jhat 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
--- a/jdk/src/solaris/doc/sun/man/man1/jinfo.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jinfo.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jinfo 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jinfo 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -148,6 +147,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jmap.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jmap.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jmap 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jmap 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -168,6 +167,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jps.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jps.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jps 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jps 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -264,6 +263,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jrunscript.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jrunscript.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jrunscript 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jrunscript 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -195,6 +194,4 @@
 .LP
 If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in jsdocs.
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jsadebugd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jsadebugd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jsadebugd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jsadebugd 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -134,6 +133,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jstack.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jstack.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstack 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstack 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -160,6 +159,4 @@
 .LP
 Mixed mode stack trace, the \-m option, does not work with the remote debug server.
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jstat.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jstat.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstat 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstat 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -458,7 +457,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 231 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 230 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -826,7 +825,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 281 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 280 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1083,7 +1082,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 317 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 316 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -1547,7 +1546,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 387 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 386 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2171,7 +2170,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 461 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 460 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2551,7 +2550,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 484 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 483 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -2867,7 +2866,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 538 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 537 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3322,7 +3321,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 594 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 593 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -3718,7 +3717,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 636 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 635 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4063,7 +4062,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 678 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 677 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4408,7 +4407,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 720 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 719 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -4793,7 +4792,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 770 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 769 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5092,7 +5091,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 796 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 795 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -5375,6 +5374,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/jstatd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/jstatd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH jstatd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH jstatd 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -269,6 +268,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/keytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/keytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH keytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH keytool 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -150,7 +149,9 @@
 .fl
 \-keysize
 .fl
-    1024 (when using \fP\f3\-genkeypair\fP\f3)
+    2048 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "RSA")
+.fl
+    1024 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "DSA")
 .fl
     56 (when using \fP\f3\-genseckey\fP\f3 and \-keyalg is "DES")
 .fl
@@ -186,7 +187,7 @@
 .fi
 
 .LP
-In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", \f2\-sigalg\fP defaults to "SHA1withRSA". Please consult the 
+In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", \f2\-sigalg\fP defaults to "SHA256withRSA". Please consult the 
 .na
 \f2Java Cryptography Architecture API Specification & Reference\fP @
 .fi
@@ -477,7 +478,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 288 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 289 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
@@ -664,6 +665,9 @@
 .LP
 The subjectKeyIdentifier extension is always created. For non self\-signed certificates, the authorityKeyIdentifier is always created.
 .LP
+.LP
+\f3Note:\fP Users should be aware that some combinations of extensions (and other certificate fields) may not conform to the Internet standard. See Warning Regarding Certificate Conformance for details.
+.LP
 .RE
 .RE
 .RE
@@ -679,12 +683,14 @@
 .LP
 .RS 3
 .TP 3
-\-gencert {\-infile infile} {\-outfile outfile} {\-ext ext}* {\-rfc} {\-alias alias} {\-sigalg sigalg} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] [\-keypass keypass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
+\-gencert {\-infile infile} {\-outfile outfile} {\-dname dname} {\-ext ext}* {\-rfc} {\-alias alias} {\-sigalg sigalg} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] [\-keypass keypass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
 .LP
 Generates a certificate as a response to a certificate request file (which can be created by the \f2keytool \-certreq\fP command). The command reads the request from infile (if omitted, from the standard input), signs it using alias's private key, and output the X.509 certificate into outfile (if omitted, to the standard output). If \f2\-rfc\fP is specified, output format is BASE64\-encoded PEM; otherwise, a binary DER is created. 
 .LP
 \f2sigalg\fP specifies the algorithm that should be used to sign the certificate. valDays tells the number of days for which the certificate should be considered valid. 
 .LP
+If \f2dname\fP is provided, it's used as the subject of the generated certificate. Otherwise, the one from the certificate request is used. 
+.LP
 \f2ext\fP shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of \f2\-ext\fP.  
 .TP 3
 \-genkeypair {\-alias alias} {\-keyalg keyalg} {\-keysize keysize} {\-sigalg sigalg} [\-dname dname] [\-keypass keypass] {\-startdate value} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
@@ -845,13 +851,13 @@
 .LP
 .RS 3
 .TP 3
-\-certreq {\-alias alias} {\-sigalg sigalg} {\-file certreq_file} [\-keypass keypass] {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerName provider_name} {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
+\-certreq {\-alias alias} {\-dname dname} {\-sigalg sigalg} {\-file certreq_file} [\-keypass keypass] {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerName provider_name} {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} 
 .LP
 Generates a Certificate Signing Request (CSR), using the PKCS#10 format. 
 .LP
 A CSR is intended to be sent to a certificate authority (CA). The CA will authenticate the certificate requestor (usually off\-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self\-signed certificate) in the keystore. 
 .LP
-The private key and X.500 Distinguished Name associated with \f2alias\fP are used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If \f2keypass\fP is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. 
+The private key associated with \f2alias\fP is used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If \f2keypass\fP is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. If dname is provided, it's used as the subject in the CSR. Otherwise, the X.500 Distinguished Name associated with alias is used. 
 .LP
 \f2sigalg\fP specifies the algorithm that should be used to sign the CSR. 
 .LP
@@ -2069,6 +2075,10 @@
 .fl
          SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
 .fl
+         SHA256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
+.fl
+                 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4
+.fl
 \fP
 .fi
 
@@ -2094,6 +2104,20 @@
 If you don't specify a required password option on a command line, you will be prompted for it.
 .LP
 .RE
+.SS 
+Warning Regarding Certificate Conformance
+.LP
+.RS 3
+
+.LP
+.LP
+The Internet standard 
+.na
+\f2RFC 5280\fP @
+.fi
+http://tools.ietf.org/rfc/rfc5280.txt has defined a profile on conforming X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. \f3keytool\fP has not enforced all these rules so it can generate certificates which do not conform to the standard, and these certificates might be rejected by JRE or other applications. Users should make sure that they provide the correct options for \f2\-dname\fP, \f2\-ext\fP, etc.
+.LP
+.RE
 .SH "SEE ALSO"
 .LP
 
@@ -2176,6 +2200,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/native2ascii.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/native2ascii.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH native2ascii 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH native2ascii 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -78,6 +77,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/orbd.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/orbd.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH orbd 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH orbd 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -374,6 +373,4 @@
 .br
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/pack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/pack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH pack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH pack200 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -422,6 +421,4 @@
 .LP
 The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/policytool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/policytool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH policytool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH policytool 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -89,6 +88,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/rmic.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/rmic.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmic 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmic 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -266,6 +265,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/rmid.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/rmid.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmid 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmid 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -348,6 +347,4 @@
 .fi
 http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath, java(1)
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/rmiregistry.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/rmiregistry.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH rmiregistry 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH rmiregistry 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -94,6 +93,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/rmi/Naming.html
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/schemagen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/schemagen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH schemagen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH schemagen 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -129,6 +128,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/serialver.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/serialver.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH serialver 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH serialver 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -121,6 +120,4 @@
 .fi
 http://java.sun.com/javase/6/docs/api/java/io/ObjectStreamClass.html
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/servertool.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/servertool.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH servertool 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH servertool 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -125,6 +124,4 @@
 .LP
 
 .LP
-orbd(1) 
-.LP
- 
+orbd(1)  
--- a/jdk/src/solaris/doc/sun/man/man1/tnameserv.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/tnameserv.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,12 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH tnameserv 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH tnameserv 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
 Java IDL: Transient Naming Service \- \f2tnameserv\fP
 .LP
-
-.LP
 .LP
 This document discusses using the Java IDL Transient Naming Service, \f2tnameserv\fP. Java IDL also includes the Object Request Broker Daemon (ORBD). ORBD is a daemon process containing a Bootstrap Service, a Transient Naming Service, a \f3Persistent\fP Naming Service, and a Server Manager. The Java IDL tutorials all use ORBD, however, you can substitute \f2tnameserv\fP for \f2orbd\fP in any of the examples that use a Transient Naming Service. For documentation on the \f2orbd\fP tool, link to its orbd(1) or the 
 .na
@@ -499,6 +496,4 @@
 .fi
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/unpack200.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/unpack200.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH unpack200 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH unpack200 1 "02 Jun 2010"
 
 .LP
 .SH "Name"
@@ -190,6 +189,4 @@
 .LP
 The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
 .LP
-
-.LP
  
--- a/jdk/src/solaris/doc/sun/man/man1/wsgen.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/wsgen.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsgen 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsgen 1 "02 Jun 2010"
 .SH "Name"
 wsgen \- Java(TM) API for XML Web Services (JAX\-WS) 2.0
 .RS 3
@@ -355,7 +354,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 140 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 139 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/solaris/doc/sun/man/man1/wsimport.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/wsimport.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH wsimport 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH wsimport 1 "02 Jun 2010"
 .SH "Name"
 wsimport \- Java(TM) API for XML Web Services (JAX\-WS) 2.0
 .LP
@@ -419,7 +418,7 @@
 .nr 41 \n(80+(3*\n(38)
 .nr 81 +\n(41
 .nr TW \n(81
-.if t .if \n(TW>\n(.li .tm Table at line 158 file Input is too wide - \n(TW units
+.if t .if \n(TW>\n(.li .tm Table at line 157 file Input is too wide - \n(TW units
 .fc  
 .nr #T 0-1
 .nr #a 0-1
--- a/jdk/src/solaris/doc/sun/man/man1/xjc.1	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/doc/sun/man/man1/xjc.1	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-." Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 ."
 ." This code is free software; you can redistribute it and/or modify it
@@ -19,8 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH xjc 1 "04 May 2009"
-." Generated from HTML by html2man (author: Eric Armstrong)
+.TH xjc 1 "02 Jun 2010"
 
 .LP
 .ad c
@@ -285,6 +284,4 @@
 .RE
 
 .LP
-
-.LP
  
--- a/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Thu Jul 29 22:02:45 2010 -0700
@@ -42,6 +42,29 @@
             filename);
 }
 
+static void quit(gboolean isSignalHandler)
+{
+    if (dialog != NULL)
+    {
+        // Callbacks from GTK signals are made within the GTK lock
+        // So, within a signal handler there is no need to call
+        // gdk_threads_enter() / fp_gdk_threads_leave()
+        if (!isSignalHandler) {
+            fp_gdk_threads_enter();
+        }
+
+        fp_gtk_widget_hide (dialog);
+        fp_gtk_widget_destroy (dialog);
+
+        fp_gtk_main_quit ();
+        dialog = NULL;
+
+        if (!isSignalHandler) {
+            fp_gdk_threads_leave();
+        }
+    }
+}
+
 /*
  * Class:     sun_awt_X11_GtkFileDialogPeer
  * Method:    quit
@@ -50,14 +73,7 @@
 JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
 (JNIEnv * env, jobject jpeer)
 {
-    if (dialog != NULL)
-    {
-        fp_gtk_widget_hide (dialog);
-        fp_gtk_widget_destroy (dialog);
-
-        fp_gtk_main_quit ();
-        dialog = NULL;
-    }
+    quit(FALSE);
 }
 
 /**
@@ -143,7 +159,7 @@
             jfilenames);
     fp_g_free(current_folder);
 
-    Java_sun_awt_X11_GtkFileDialogPeer_quit(NULL, NULL);
+    quit(TRUE);
 }
 
 /*
@@ -162,7 +178,6 @@
         (*env)->GetJavaVM(env, &jvm);
     }
 
-    fp_gdk_threads_init();
     fp_gdk_threads_enter();
 
     const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
--- a/jdk/src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c	Thu Jul 29 22:02:45 2010 -0700
@@ -65,6 +65,11 @@
 
     J2dTraceLn(J2D_TRACE_INFO, "GLXSurfaceData_initOps");
 
+    if (oglsdo == NULL) {
+        JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+        return;
+    }
+
     if (glxsdo == NULL) {
         JNU_ThrowOutOfMemoryError(env, "creating native GLX ops");
         return;
--- a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Thu Jul 29 22:02:45 2010 -0700
@@ -253,6 +253,10 @@
 {
 #ifndef HEADLESS
     X11SDOps *xsdo = (X11SDOps*)SurfaceData_InitOps(env, xsd, sizeof(X11SDOps));
+    if (xsdo == NULL) {
+        JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+        return;
+    }
     xsdo->sdOps.Lock = X11SD_Lock;
     xsdo->sdOps.GetRasInfo = X11SD_GetRasInfo;
     xsdo->sdOps.Unlock = X11SD_Unlock;
--- a/jdk/src/windows/native/sun/font/fontpath.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/windows/native/sun/font/fontpath.c	Thu Jul 29 22:02:45 2010 -0700
@@ -154,7 +154,7 @@
     fullname = JNU_NewStringPlatform(env, lpelfe->elfFullName);
     fullnameLC = (*env)->CallObjectMethod(env, fullname,
                                           fmi->toLowerCaseMID, fmi->locale);
-    (*env)->CallObjectMethod(env, fmi->list, fmi->addMID, fullname);
+    (*env)->CallBooleanMethod(env, fmi->list, fmi->addMID, fullname);
     (*env)->CallObjectMethod(env, fmi->fontToFamilyMap,
                              fmi->putMID, fullnameLC, fmi->family);
     return 1;
@@ -238,7 +238,7 @@
                                  wcslen((LPWSTR)lpelfe->elfFullName));
     fullnameLC = (*env)->CallObjectMethod(env, fullname,
                                           fmi->toLowerCaseMID, fmi->locale);
-    (*env)->CallObjectMethod(env, fmi->list, fmi->addMID, fullname);
+    (*env)->CallBooleanMethod(env, fmi->list, fmi->addMID, fullname);
     (*env)->CallObjectMethod(env, fmi->fontToFamilyMap,
                              fmi->putMID, fullnameLC, fmi->family);
     return 1;
--- a/jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c	Thu Jul 29 22:02:45 2010 -0700
@@ -66,6 +66,10 @@
 
     J2dTraceLn(J2D_TRACE_INFO, "WGLSurfaceData_initOps");
 
+    if (oglsdo == NULL) {
+        JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+        return;
+    }
     if (wglsdo == NULL) {
         JNU_ThrowOutOfMemoryError(env, "creating native wgl ops");
         return;
--- a/jdk/src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp	Thu Jul 29 22:02:45 2010 -0700
@@ -363,6 +363,10 @@
 {
     J2dTraceLn(J2D_TRACE_INFO, "GDIWindowSurfaceData_initOps");
     GDIWinSDOps *wsdo = (GDIWinSDOps *)SurfaceData_InitOps(env, wsd, sizeof(GDIWinSDOps));
+    if (wsdo == NULL) {
+        JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+        return;
+    }
     wsdo->sdOps.Lock = GDIWinSD_Lock;
     wsdo->sdOps.GetRasInfo = GDIWinSD_GetRasInfo;
     wsdo->sdOps.Unlock = GDIWinSD_Unlock;
--- a/jdk/test/ProblemList.txt	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/ProblemList.txt	Thu Jul 29 22:02:45 2010 -0700
@@ -295,9 +295,6 @@
 
 # jdk_misc
 
-# On Windows com.sun.java.swing.plaf.gtk does not exist, always fails there
-com/sun/java/swing/plaf/gtk/Test6635110.java		 	windows-all
-
 # Need to be marked othervm, or changed to be samevm safe
 com/sun/jndi/ldap/ReadTimeoutTest.java				generic-all
 com/sun/jndi/rmi/registry/RegistryContext/UnbindIdempotent.java	generic-all
@@ -678,9 +675,6 @@
 
 # jdk_swing (not using samevm)
 
-# Fails on solaris 10 sparc, throws RuntimeException that just says "failed"
-javax/swing/JLabel/6501991/bug6501991.java			generic-all
-
 # Fails on solaris 11 i586, with othervm
 javax/swing/JFileChooser/6570445/bug6570445.java		generic-all
 javax/swing/JFileChooser/6738668/bug6738668.java		generic-all
--- a/jdk/test/com/sun/java/swing/plaf/gtk/Test6635110.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/com/sun/java/swing/plaf/gtk/Test6635110.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,7 +28,6 @@
    @run main Test6635110
 */
 
-import com.sun.java.swing.plaf.gtk.GTKLookAndFeel;
 import javax.swing.*;
 import java.awt.*;
 import java.awt.image.BufferedImage;
@@ -59,7 +58,12 @@
     }
 
     public static void main(String[] args) throws Exception {
-        UIManager.setLookAndFeel(new GTKLookAndFeel());
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
+        } catch (Exception e) {
+            System.out.println("GTKLookAndFeel cannot be set, skipping this test");
+            return;
+        }
         SwingUtilities.invokeAndWait(new Test6635110());
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/java/swing/plaf/gtk/Test6963870.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 6963870
+   @summary Tests that GTKPainter.ListTableFocusBorder.getBorderInsets()
+            doesn't return null
+   @author Peter Zhelezniakov
+   @run main Test6963870
+*/
+
+import java.awt.Insets;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.border.Border;
+
+public class Test6963870 implements Runnable {
+
+    final static String[] UI_NAMES = {
+        "List.focusCellHighlightBorder",
+        "List.focusSelectedCellHighlightBorder",
+        "List.noFocusBorder",
+        "Table.focusCellHighlightBorder",
+        "Table.focusSelectedCellHighlightBorder",
+    };
+
+    public void run() {
+        for (String uiName: UI_NAMES) {
+            test(uiName);
+        }
+    }
+
+    void test(String uiName) {
+        Border b = UIManager.getBorder(uiName);
+        Insets i = b.getBorderInsets(null);
+        if (i == null) {
+            throw new RuntimeException("getBorderInsets() returns null for " + uiName);
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
+        } catch (Exception e) {
+            System.out.println("GTKLookAndFeel cannot be set, skipping this test");
+            return;
+        }
+
+        SwingUtilities.invokeAndWait(new Test6963870());
+    }
+}
+
--- a/jdk/test/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,3 +1,26 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6304473 6727884
--- a/jdk/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,35 +34,40 @@
 
 import java.awt.*;
 import java.awt.event.*;
-import java.lang.Math;
+
+import sun.awt.SunToolkit;
+
 import test.java.awt.regtesthelpers.Util;
 
 public class LoopRobustness {
-    static int clicks = 0;
+
     final static long TIMEOUT = 5000;
     final static Object LOCK = new Object();
-    static volatile boolean notifyOccur = false;
 
-    public static void main(String [] args)  {
+    public static int clicks = 0;
+    public static volatile boolean notifyOccured = false;
+    public static volatile boolean otherExceptionsCaught = false;
+
+    public static void main(String [] args) throws Exception {
         ThreadGroup mainThreadGroup = Thread.currentThread().getThreadGroup();
 
         long at;
         //wait for a TIMEOUT giving a chance to a new Thread above to accomplish its stuff.
-        synchronized (LoopRobustness.LOCK){
+        synchronized (LoopRobustness.LOCK) {
             new Thread(new TestThreadGroup(mainThreadGroup, "TestGroup"), new Impl()).start();
             at = System.currentTimeMillis();
             try {
-                while(!notifyOccur && System.currentTimeMillis() - at < TIMEOUT) {
+                while (!notifyOccured && (System.currentTimeMillis() - at < TIMEOUT)) {
                     LoopRobustness.LOCK.wait(1000);
                 }
-            } catch(InterruptedException e){
+            } catch (InterruptedException e) {
                 throw new RuntimeException("Test interrupted.", e);
             }
         }
 
-        if( !notifyOccur){
+        if (!notifyOccured) {
             //notify doesn't occur after a reasonable time.
-            throw new RuntimeException("Test failed. Second Thread didn't notify MainThread.");
+            throw new RuntimeException("Test FAILED: second thread hasn't notified MainThread");
         }
 
         //now wait for two clicks
@@ -75,7 +80,10 @@
             }
         }
         if (clicks != 2) {
-            throw new RuntimeException("robot should press button twice");
+            throw new RuntimeException("Test FAILED: robot should press button twice");
+        }
+        if (otherExceptionsCaught) {
+            throw new RuntimeException("Test FAILED: unexpected exceptions caught");
         }
     }
 }
@@ -83,18 +91,11 @@
 class Impl implements Runnable{
     static Robot robot;
     public void run() {
+        SunToolkit.createNewAppContext();
+
         Button b = new Button("Press me to test the AWT-Event Queue thread");
         Frame lr = new Frame("ROBUST FRAME");
-        /* Must load Toolkit on this thread only, rather then on Main.
-           If load on Main (on the parent ThreadGroup of current ThreadGroup) then
-           EDT will be created on Main thread and supplied with it's own exceptionHandler,
-           which just throws an Exception and terminates current thread.
-           The test implies that EDT is created on the child ThreadGroup (testThreadGroup)
-           which is supplied with its own uncaughtException().
-        */
-        Toolkit.getDefaultToolkit();
         lr.setBounds(100, 100, 300, 100);
-
         b.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                     LoopRobustness.clicks++;
@@ -107,40 +108,46 @@
 
         try {
             robot = new Robot();
-        } catch(AWTException e){
+        } catch (AWTException e) {
             throw new RuntimeException("Test interrupted.", e);
         }
         Util.waitForIdle(robot);
 
         synchronized (LoopRobustness.LOCK){
             LoopRobustness.LOCK.notify();
-            LoopRobustness.notifyOccur = true;
+            LoopRobustness.notifyOccured = true;
         }
 
         int i = 0;
-        while(i < 2){
+        while (i < 2) {
             robot.mouseMove(b.getLocationOnScreen().x + b.getWidth()/2,
-                            b.getLocationOnScreen().y + b.getHeight()/2 );
+                            b.getLocationOnScreen().y + b.getHeight()/2);
+            Util.waitForIdle(robot);
             robot.mousePress(InputEvent.BUTTON1_MASK);
-            //                robot.delay(10);
+            Util.waitForIdle(robot);
             robot.mouseRelease(InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(robot);
             i++;
-            robot.delay(1000);
         }
     }
 }
 
 class TestThreadGroup extends ThreadGroup {
-    TestThreadGroup(ThreadGroup threadGroup, String name){
+    TestThreadGroup(ThreadGroup threadGroup, String name) {
         super(threadGroup, name);
     }
 
-    public void uncaughtException(Thread exitedThread, Throwable e) {
-        e.printStackTrace();
-        if ((e instanceof ExceptionInInitializerError) || (e instanceof
-                NoClassDefFoundError)){
-            throw new RuntimeException("Test failed: other Exceptions were thrown ", e);
+    public void uncaughtException(Thread thread, Throwable e) {
+        System.out.println("Exception caught: " + e);
+        e.printStackTrace(System.out);
+        System.out.flush();
+        if ((e instanceof ExceptionInInitializerError) ||
+            (e instanceof NoClassDefFoundError))
+        {
+            // These two are expected
+            return;
         }
+        LoopRobustness.otherExceptionsCaught = true;
     }
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/EventDispatchThread/PreserveDispathThread/PreserveDispatchThread.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6424157
+  @author Artem Ananiev: area=eventqueue
+  @run main PreserveDispatchThread
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+
+public class PreserveDispatchThread {
+
+    private static volatile Frame f;
+    private static volatile Dialog d;
+
+    private static volatile boolean isEDT = true;
+
+    public static void main(String[] args) throws Exception {
+        f = new Frame("F");
+        f.setSize(320, 340);
+        f.setLocationRelativeTo(null);
+        f.setVisible(true);
+
+        try {
+            test1();
+            if (!isEDT) {
+                throw new RuntimeException("Test FAILED (test1): event dispatch thread is changed");
+            }
+
+            test2();
+            if (!isEDT) {
+                throw new RuntimeException("Test FAILED (test2): event dispatch thread is changed");
+            }
+
+            test3();
+            if (!isEDT) {
+                throw new RuntimeException("Test FAILED (test3): event dispatch thread is changed");
+            }
+        } finally {
+            if (d != null) {
+                d.dispose();
+            }
+            f.dispose();
+        }
+    }
+
+    /*
+     * Tests that push/pop doesn't change the dispatch thread if
+     * called on EDT.
+     */
+    private static void test1() throws Exception {
+        EventQueue.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                TestEventQueue teq = new TestEventQueue();
+                EventQueue seq = Toolkit.getDefaultToolkit().getSystemEventQueue();
+                try {
+                    seq.push(teq);
+                    d = new TestDialog();
+                    d.setVisible(true);
+                    checkEDT();
+                } finally {
+                    teq.pop();
+                }
+                checkEDT();
+            }
+        });
+    }
+
+    /*
+     * Tests that push/pop doesn't change the dispatch thread if
+     * called on the main thread.
+     */
+    private static void test2() throws Exception {
+        TestEventQueue teq = new TestEventQueue();
+        EventQueue seq = Toolkit.getDefaultToolkit().getSystemEventQueue();
+        try {
+            seq.push(teq);
+            EventQueue.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    checkEDT();
+                    d = new TestDialog();
+                    d.setVisible(true);
+                    checkEDT();
+                }
+            });
+        } finally {
+            teq.pop();
+        }
+    }
+
+    private static final Object test3Lock = new Object();
+    private static boolean test3Sync = false;
+
+    /*
+     * A complex test: several nested invokeLater() are called and
+     * in every runnable a check for EDT is performed. At the ent
+     * of the test we wait for all the runnables to be processed
+     * and the dialog is disposed; otherwise the last EDT check can
+     * be later than this method returns and the whole test is passed.
+     */
+    private static void test3() throws Exception {
+        EventQueue.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+                d = new Dialog(f, true);
+                d.setSize(240, 180);
+                d.setLocationRelativeTo(f);
+                EventQueue.invokeLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        d.setVisible(true);
+                        checkEDT();
+                    }
+                });
+                EventQueue.invokeLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        TestEventQueue teq = new TestEventQueue();
+                        EventQueue seq = Toolkit.getDefaultToolkit().getSystemEventQueue();
+                        try {
+                            seq.push(teq);
+                            checkEDT();
+                            EventQueue.invokeLater(new Runnable() {
+                                @Override
+                                public void run() {
+                                    d.dispose();
+                                    checkEDT();
+                                    synchronized (test3Lock) {
+                                        test3Sync = true;
+                                        test3Lock.notify();
+                                    }
+                                }
+                            });
+                        } finally {
+                            teq.pop();
+                        }
+                        checkEDT();
+                    }
+                });
+                checkEDT();
+            }
+        });
+        synchronized (test3Lock) {
+            while (!test3Sync) {
+                try {
+                    test3Lock.wait();
+                } catch (InterruptedException ie) {
+                    break;
+                }
+            }
+        }
+        // Make sure all the nested invokeLater/invokeAndWait are processed
+        EventQueue.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+            }
+        });
+    }
+
+    private static void checkEDT() {
+        isEDT = isEDT && EventQueue.isDispatchThread();
+    }
+
+    private static class TestEventQueue extends EventQueue {
+        public TestEventQueue() {
+            super();
+        }
+        public void pop() {
+            super.pop();
+        }
+    }
+
+    private static class TestDialog extends Dialog {
+        private volatile boolean dialogShown = false;
+        private volatile boolean paintCalled = false;
+        public TestDialog() {
+            super(f, true);
+            setSize(240, 180);
+            setLocationRelativeTo(f);
+            addComponentListener(new ComponentAdapter() {
+                @Override
+                public void componentShown(ComponentEvent e) {
+                    if (paintCalled) {
+                        dispose();
+                    }
+                    dialogShown = true;
+                }
+            });
+        }
+        @Override
+        public void paint(Graphics g) {
+            if (dialogShown) {
+                dispose();
+            }
+            paintCalled = true;
+        }
+    }
+
+}
--- a/jdk/test/java/awt/EventQueue/PushPopDeadlock2/PushPopTest.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/java/awt/EventQueue/PushPopDeadlock2/PushPopTest.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,6 +43,7 @@
         Runnable dummy = new Runnable() {
                 public void run() {
                     System.err.println("Dummy is here.");
+                    System.err.flush();
                 }
             };
         EventQueue seq = Toolkit.getDefaultToolkit().getSystemEventQueue();
@@ -58,10 +59,11 @@
         Runnable runnable = new Runnable() {
                 public void run() {
                     System.err.println("Dummy from SunToolkit");
+                    System.err.flush();
                 }
             };
         InvocationEvent ie = new InvocationEvent(eq2, runnable, null, false);
-        System.err.println(ie);
+//        System.err.println(ie);
         SunToolkit.postEvent(SunToolkit.targetToAppContext(frame), ie);
         eq1.pop();
         frame.dispose();
@@ -70,14 +72,14 @@
 
 class MyEventQueue1 extends EventQueue {
 
-    public void pop() throws EmptyStackException {
+    public void pop() {
         super.pop();
     }
 }
 
 class MyEventQueue2 extends EventQueue {
 
-    protected void pop() throws EmptyStackException {
+    protected void pop() {
         System.err.println("pop2()");
         Thread.dumpStack();
         try {
@@ -85,7 +87,8 @@
                     public void run() {
                         Runnable runnable = new Runnable() {
                                 public void run() {
-                                    System.err.println("Dummy from here");
+                                    System.err.println("Dummy from pop");
+                                    System.err.flush();
                                 }
                              };
                         InvocationEvent ie = new InvocationEvent(MyEventQueue2.this, runnable, null, false);
--- a/jdk/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Thu Jul 29 22:02:45 2010 -0700
@@ -83,6 +83,12 @@
         if (fd == null) {
             throw new RuntimeException("fd is null (very unexpected thing :(");
         }
+        //Wait a little; some native dialog implementations may take a while
+        //to initialize and call the filter. See 6959787 for an example.
+        try {
+            Thread.sleep(5000);
+        } catch (Exception ex) {
+        }
         fd.dispose();
         if (!filter_was_called) {
             throw new RuntimeException("Filter was not called");
--- a/jdk/test/java/awt/FontClass/FontPrivilege.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/java/awt/FontClass/FontPrivilege.java	Thu Jul 29 22:02:45 2010 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 5010310 6319835 6904882
+ * @bug 5010310 6319835 6904882 6968373
  * @summary test fonts can be created in the presence of a security manager
  * @run main/othervm/secure=java.lang.SecurityManager FontPrivilege
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/Test6707234.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6707234
+ * @summary Tests setter in a complex bean
+ * @author Sergey Malenkov
+ */
+
+public class Test6707234 {
+    public static void main(String[] args) {
+        if (null == BeanUtils.getPropertyDescriptor(C.class, "number").getWriteMethod()) {
+            throw new Error("no write method");
+        }
+    }
+
+    public interface I {
+        void setNumber(Object number);
+        Number getNumber();
+    }
+
+    public class C implements I {
+        public void setNumber(Object value) {
+        }
+        public void setNumber(Long value) {
+        }
+        public Long getNumber() {
+            return null;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/Test6963811.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6963811
+ * @summary Tests deadlock in Introspector
+ * @author Sergey Malenkov
+ */
+
+import java.beans.Introspector;
+import java.beans.SimpleBeanInfo;
+
+public class Test6963811 implements Runnable {
+    private final long time;
+    private final boolean sync;
+
+    public Test6963811(long time, boolean sync) {
+        this.time = time;
+        this.sync = sync;
+    }
+
+    public void run() {
+        try {
+            Thread.sleep(this.time); // increase the chance of the deadlock
+            Introspector.getBeanInfo(
+                    this.sync ? Super.class : Sub.class,
+                    this.sync ? null : Object.class);
+        }
+        catch (Exception exception) {
+            exception.printStackTrace();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        Thread[] threads = new Thread[2];
+        for (int i = 0; i < threads.length; i++) {
+            threads[i] = new Thread(new Test6963811(0L, i > 0));
+            threads[i].start();
+            Thread.sleep(500L); // increase the chance of the deadlock
+        }
+        for (Thread thread : threads) {
+            thread.join();
+        }
+    }
+
+    public static class Super {
+    }
+
+    public static class Sub extends Super {
+    }
+
+    public static class SubBeanInfo extends SimpleBeanInfo {
+        public SubBeanInfo() {
+            new Test6963811(1000L, true).run();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/Test6963811.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6963811
+ * @summary Tests deadlock in PropertyEditorManager
+ * @author Sergey Malenkov
+ */
+
+import java.beans.PropertyEditorManager;
+import sun.beans.editors.StringEditor;
+
+public class Test6963811 implements Runnable {
+    private final long time;
+    private final boolean sync;
+
+    public Test6963811(long time, boolean sync) {
+        this.time = time;
+        this.sync = sync;
+    }
+
+    public void run() {
+        try {
+            Thread.sleep(this.time); // increase the chance of the deadlock
+            if (this.sync) {
+                synchronized (Test6963811.class) {
+                    PropertyEditorManager.findEditor(Super.class);
+                }
+            }
+            else {
+                PropertyEditorManager.findEditor(Sub.class);
+            }
+        }
+        catch (Exception exception) {
+            exception.printStackTrace();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        Thread[] threads = new Thread[2];
+        for (int i = 0; i < threads.length; i++) {
+            threads[i] = new Thread(new Test6963811(0L, i > 0));
+            threads[i].start();
+            Thread.sleep(500L); // increase the chance of the deadlock
+        }
+        for (Thread thread : threads) {
+            thread.join();
+        }
+    }
+
+    public static class Super {
+    }
+
+    public static class Sub extends Super {
+    }
+
+    public static class SubEditor extends StringEditor {
+        public SubEditor() {
+            new Test6963811(1000L, true).run();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/Test6963811.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6963811
+ * @summary Tests deadlock in Encoder
+ * @author Sergey Malenkov
+ */
+
+import java.beans.Encoder;
+import java.beans.DefaultPersistenceDelegate;
+
+public class Test6963811 implements Runnable {
+    private static final Encoder ENCODER = new Encoder();
+    private final long time;
+    private final boolean sync;
+
+    public Test6963811(long time, boolean sync) {
+        this.time = time;
+        this.sync = sync;
+    }
+
+    public void run() {
+        try {
+            Thread.sleep(this.time); // increase the chance of the deadlock
+            if (this.sync) {
+                synchronized (Test6963811.class) {
+                    ENCODER.getPersistenceDelegate(Super.class);
+                }
+            }
+            else {
+                ENCODER.getPersistenceDelegate(Sub.class);
+            }
+        }
+        catch (Exception exception) {
+            exception.printStackTrace();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        Thread[] threads = new Thread[2];
+        for (int i = 0; i < threads.length; i++) {
+            threads[i] = new Thread(new Test6963811(0L, i > 0));
+            threads[i].start();
+            Thread.sleep(500L); // increase the chance of the deadlock
+        }
+        for (Thread thread : threads) {
+            thread.join();
+        }
+    }
+
+    public static class Super {
+    }
+
+    public static class Sub extends Super {
+    }
+
+    public static class SubPersistenceDelegate extends DefaultPersistenceDelegate {
+        public SubPersistenceDelegate() {
+            new Test6963811(1000L, true).run();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/AbstractButton/6711682/bug6711682.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6711682
+   @summary  JCheckBox in JTable: checkbox doesn't alaways respond to the first mouse click
+   @author Alexander Potochkin
+   @run main bug6711682
+*/
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.event.CellEditorListener;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableCellRenderer;
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.util.EventObject;
+
+public class bug6711682 {
+    private static JCheckBox editorCb;
+    private static JCheckBox rendererCb;
+    private static JTable table;
+
+    public static void main(String[] args) throws Exception {
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        toolkit.realSync();
+        Point l = table.getLocationOnScreen();
+        int h = table.getRowHeight();
+        for (int i = 0; i < 3; i++) {
+            robot.mouseMove(l.x + 5, l.y + 5 + i * h);
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        }
+        // Without pressing F2 the last table's cell
+        // reported <code>false</code> value
+        // note that I can't press it inside the for loop
+        // because it doesn't reproduce the bug
+        robot.keyPress(KeyEvent.VK_F2);
+        robot.keyRelease(KeyEvent.VK_F2);
+
+        for (int i = 0; i < 3; i++) {
+            if (!Boolean.TRUE.equals(table.getValueAt(i, 0))) {
+                throw new RuntimeException("Row #" + i + " checkbox is not selected");
+            }
+        }
+        for (int i = 2; i >= 0; i--) {
+            robot.mouseMove(l.x + 5, l.y + 5 + i * h);
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        }
+        robot.keyPress(KeyEvent.VK_F2);
+        robot.keyRelease(KeyEvent.VK_F2);
+        for (int i = 0; i < 3; i++) {
+            if (Boolean.TRUE.equals(table.getValueAt(i, 0))) {
+                throw new RuntimeException("Row #" + i + " checkbox is selected");
+            }
+        }
+    }
+
+    private static void createAndShowGUI() {
+        editorCb = new JCheckBox();
+        rendererCb = new JCheckBox();
+        JFrame f = new JFrame("Table with CheckBox");
+        Container p = f.getContentPane();
+        p.setLayout(new BorderLayout());
+        table = new JTable(new Object[][]{{false}, {false}, {false}}, new Object[]{"CheckBox"});
+        TableCellEditor editor = new TableCellEditor() {
+            int editedRow;
+
+            public Component getTableCellEditorComponent(JTable table,
+                                                         Object value, boolean isSelected, int row, int column) {
+                this.editedRow = row;
+                editorCb.setSelected(Boolean.TRUE.equals(value));
+                editorCb.setBackground(UIManager.getColor("Table.selectionBackground"));
+                return editorCb;
+            }
+
+            public void addCellEditorListener(CellEditorListener l) {
+            }
+
+            public void cancelCellEditing() {
+            }
+
+            public Object getCellEditorValue() {
+                return editorCb.isSelected();
+            }
+
+            public boolean isCellEditable(EventObject anEvent) {
+                return true;
+            }
+
+            public void removeCellEditorListener(CellEditorListener l) {
+            }
+
+            public boolean shouldSelectCell(EventObject anEvent) {
+                return true;
+            }
+
+            public boolean stopCellEditing() {
+                table.getModel().setValueAt(editorCb.isSelected(), editedRow, 0);
+                return true;
+            }
+        };
+        table.getColumnModel().getColumn(0).setCellEditor(editor);
+
+        TableCellRenderer renderer = new TableCellRenderer() {
+            public Component getTableCellRendererComponent(JTable table,
+                                                           Object value, boolean isSelected, boolean hasFocus,
+                                                           int row, int column) {
+                rendererCb.setSelected(Boolean.TRUE.equals(value));
+                return rendererCb;
+            }
+        };
+        table.getColumnModel().getColumn(0).setCellRenderer(renderer);
+
+        p.add(table, BorderLayout.CENTER);
+
+        f.pack();
+        f.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6520101/bug6520101.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 @(#)bug6520101
+ * @bug 6520101
+ * @summary JFileChooser throws OOM in 1.4.2, 5.0u4 and 1.6.0
+ * @author Praveen Gupta
+ * @run main/othervm/timeout=600 -Xmx8m -verify bug6520101
+*/
+
+import javax.swing.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+public class bug6520101 implements Runnable {
+
+    private static final int ATTEMPTS = 500;
+    private static final int INTERVAL = 100;
+
+    private static final boolean ALWAYS_NEW_INSTANCE = false;
+    private static final boolean DO_GC_EACH_INTERVAL = false;
+    private static final boolean UPDATE_UI_EACH_INTERVAL = true;
+    private static final boolean AUTO_CLOSE_DIALOG = true;
+
+    private static JFileChooser CHOOSER;
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
+
+        for (int i = 0; i < ATTEMPTS; i++) {
+            doAttempt();
+        }
+
+        System.out.println("Test passed successfully");
+    }
+
+    private static void doAttempt() throws InterruptedException {
+        if (ALWAYS_NEW_INSTANCE || (CHOOSER == null))
+            CHOOSER = new JFileChooser(".");
+
+        if (UPDATE_UI_EACH_INTERVAL) {
+            CHOOSER.updateUI();
+        }
+
+        if (AUTO_CLOSE_DIALOG) {
+            Thread t = new Thread(new bug6520101(CHOOSER));
+            t.start();
+            CHOOSER.showOpenDialog(null);
+            t.join();
+        } else {
+            CHOOSER.showOpenDialog(null);
+        }
+
+        if (DO_GC_EACH_INTERVAL) {
+            System.gc();
+        }
+    }
+
+    private final JFileChooser chooser;
+
+    bug6520101(JFileChooser chooser) {
+        this.chooser = chooser;
+    }
+
+    public void run() {
+        while (!this.chooser.isShowing()) {
+            try {
+                Thread.sleep(30);
+            } catch (InterruptedException exception) {
+                exception.printStackTrace();
+            }
+        }
+
+        Timer timer = new Timer(INTERVAL, new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                chooser.cancelSelection();
+            }
+        });
+
+        timer.setRepeats(false);
+        timer.start();
+    }
+}
--- a/jdk/test/javax/swing/JInternalFrame/6725409/bug6725409.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/jdk/test/javax/swing/JInternalFrame/6725409/bug6725409.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
                     new com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel());
         } catch(UnsupportedLookAndFeelException e) {
             System.out.println("The test is for Windows LaF only");
-            System.exit(0);
+            return;
         }
 
         final bug6725409 bug6725409 = new bug6725409();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/6495920/bug6495920.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6495920
+ * @summary Tests that if the JPopupMenu.setVisible method throws an exception,
+            interaction with GNOME is not crippled
+ * @author Sergey Malenkov
+ * @library ../..
+ */
+
+import sun.awt.AppContext;
+
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.event.InputEvent;
+import java.lang.reflect.Field;
+import javax.swing.JFrame;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.SwingUtilities;
+import javax.swing.plaf.basic.BasicPopupMenuUI;
+
+public class bug6495920 implements Thread.UncaughtExceptionHandler {
+
+    public static void main(String[] args) throws Throwable {
+        SwingTest.start(bug6495920.class);
+    }
+
+    private static Robot robot;
+    private final JPanel panel;
+
+    public bug6495920(JFrame frame) {
+        JPopupMenu menu = new JPopupMenu() {
+            public void setVisible(boolean visible) {
+                super.setVisible(visible);
+                throw new AssertionError(visible ? "show popup" : "hide popup");
+            }
+        };
+        for (int i = 0; i < 10; i++) {
+            menu.add(new JMenuItem(String.valueOf(i)));
+        }
+        this.panel = new JPanel();
+        this.panel.setComponentPopupMenu(menu);
+        frame.add(this.panel);
+    }
+
+    public void firstShowPopup() throws Exception {
+        Point point = this.panel.getLocation();
+        SwingUtilities.convertPointToScreen(point, this.panel);
+
+        robot = new Robot(); // initialize shared static field first time
+        robot.mouseMove(point.x + 1, point.y + 1);
+        robot.mousePress(InputEvent.BUTTON3_MASK);
+        Thread.currentThread().setUncaughtExceptionHandler(this);
+        robot.mouseRelease(InputEvent.BUTTON3_MASK); // causes first AssertionError on EDT
+    }
+
+    public void secondHidePopup() {
+        Point point = this.panel.getLocation();
+        SwingUtilities.convertPointToScreen(point, this.panel);
+
+        robot.mouseMove(point.x - 1, point.y - 1);
+        Thread.currentThread().setUncaughtExceptionHandler(this);
+        robot.mousePress(InputEvent.BUTTON1_MASK); // causes second AssertionError on EDT
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+
+    public void thirdValidate() throws Exception {
+        Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
+        key.setAccessible(true);
+
+        Object grabber = AppContext.getAppContext().get(key.get(null));
+        if (grabber == null) {
+            throw new Exception("cannot find a mouse grabber in app's context");
+        }
+
+        Field field = grabber.getClass().getDeclaredField("grabbedWindow");
+        field.setAccessible(true);
+
+        Object window = field.get(grabber);
+        if (window != null) {
+            throw new Exception("interaction with GNOME is crippled");
+        }
+    }
+
+    public void uncaughtException(Thread thread, Throwable throwable) {
+        System.out.println(throwable);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTable/6777378/bug6777378.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6777378
+   @summary NullPointerException in XPDefaultRenderer.paint()
+   @author Alexander Potochkin
+   @run main bug6777378
+*/
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.JTableHeader;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import java.awt.event.MouseEvent;
+import java.awt.event.InputEvent;
+import java.awt.*;
+
+public class bug6777378 {
+    private static JFrame frame;
+    private static JTableHeader header;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(20);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                try {
+                    UIManager.setLookAndFeel(new MetalLookAndFeel());
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                JTable table = new JTable(new AbstractTableModel() {
+                    public int getRowCount() {
+                        return 10;
+                    }
+
+                    public int getColumnCount() {
+                        return 10;
+                    }
+
+                    public Object getValueAt(int rowIndex, int columnIndex) {
+                        return "" + rowIndex + " " + columnIndex;
+                    }
+                });
+
+                header = new JTableHeader(table.getColumnModel());
+                header.setToolTipText("hello");
+
+                frame = new JFrame();
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.add(header);
+
+                frame.setSize(300, 300);
+                frame.setVisible(true);
+            }
+        });
+        toolkit.realSync();
+        Point point = header.getLocationOnScreen();
+        robot.mouseMove(point.x + 20, point.y + 50);
+        robot.mouseMove(point.x + 30, point.y + 50);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTable/6788484/bug6788484.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 6788484
+   @summary NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
+   @author Alexander Potochkin
+   @run main bug6788484
+*/
+import sun.swing.table.DefaultTableCellHeaderRenderer;
+
+import javax.swing.*;
+
+public class bug6788484 {
+
+    public static void main(String[] args) throws Exception {
+        DefaultTableCellHeaderRenderer.getColumnSortOrder(null, 0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4129681.html	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,10 @@
+<html>
+<body>
+When applet starts, you'll see a checkbox and a label with a titled border.
+Turn on the checkbox to disable the label.
+The test passes if the title of the border is disabled as well as the label.
+
+<applet width="300" height="200" code="Test4129681.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4129681.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 4129681
+ * @summary Tests enabling/disabling of titled border's caption
+ * @author Sergey Malenkov
+ * @run applet/manual=yesno Test4129681.html
+ */
+
+import java.awt.BorderLayout;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import javax.swing.BorderFactory;
+import javax.swing.JApplet;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+
+public class Test4129681 extends JApplet implements ItemListener {
+    private JLabel label;
+
+    @Override
+    public void init() {
+        JCheckBox check = new JCheckBox("disable");
+        check.addItemListener(this);
+
+        this.label = new JLabel("message");
+        this.label.setBorder(BorderFactory.createTitledBorder("label"));
+        this.label.setEnabled(!check.isSelected());
+
+        add(BorderLayout.NORTH, check);
+        add(BorderLayout.CENTER, this.label);
+    }
+
+    public void itemStateChanged(ItemEvent event) {
+        this.label.setEnabled(ItemEvent.DESELECTED == event.getStateChange());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4760089.html	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,10 @@
+<html>
+<body>
+When applet starts, you'll see a panel with a compound titled border.
+If one of its titles is overstriken with the border's line then test fails.
+Otherwise test passes.
+
+<applet width="600" height="300" code="Test4760089.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4760089.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 4760089
+ * @summary Tests that titled border do not paint inner titled border over its caption
+ * @author Sergey Malenkov
+ * @run applet/manual=yesno Test4760089.html
+ */
+
+import javax.swing.JApplet;
+import javax.swing.JPanel;
+import javax.swing.border.Border;
+import javax.swing.border.EtchedBorder;
+import javax.swing.border.TitledBorder;
+
+public class Test4760089 extends JApplet {
+    @Override
+    public void init() {
+        Border border = new EtchedBorder();
+        border = new TitledBorder(border, "LEFT",  TitledBorder.LEFT,  TitledBorder.TOP);
+        border = new TitledBorder(border, "RIGHT", TitledBorder.RIGHT, TitledBorder.TOP);
+
+        JPanel panel = new JPanel();
+        panel.setBorder(border);
+        getContentPane().add(panel);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/6771547/SynthTest.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6771547
+ * @author Alexander Potochkin
+ * @summary SynthParser throws StringIndexOutOfBoundsException parsing custom ColorTypes
+ */
+
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import javax.swing.*;
+import java.io.InputStream;
+import java.awt.*;
+
+public class SynthTest {
+
+    public static void main(String[] args) throws Exception {
+        SynthLookAndFeel laf = new SynthLookAndFeel();
+        InputStream in = SynthTest.class.getResourceAsStream(
+                "synthconfig.xml");
+        laf.load(in, SynthTest.class);
+
+        UIManager.setLookAndFeel(laf);
+
+        if (!Color.RED.equals(new JButton().getForeground())) {
+            throw new RuntimeException("The wrong foreground color!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/6771547/synthconfig.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,10 @@
+<synth>
+    <style id="button">
+        <font name="Verdana" size="16"/>
+        <state>
+            <color value="RED"
+                   type="javax.swing.plaf.synth.ColorType.FOREGROUND"/>
+        </state>
+    </style>
+    <bind style="button" type="region" key="button"/>
+</synth>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/SynthToolBarUI/6739756/bug6739756.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6739756
+ * @author Alexander Potochkin
+ * @summary JToolBar leaves space for non-visible items under Nimbus L&F
+ * @run main bug6739756
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug6739756 {
+
+    public static void main(String[] args) throws Exception {
+        try {
+           UIManager.setLookAndFeel(
+                   "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            return;
+        }
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JToolBar tb = new JToolBar();
+                Dimension preferredSize = tb.getPreferredSize();
+                JButton button = new JButton("Test");
+                button.setVisible(false);
+                tb.add(button);
+                if (!preferredSize.equals(tb.getPreferredSize())) {
+                    throw new RuntimeException("Toolbar's preferredSize is wrong");
+                }
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/DefaultStyledDocument/6636983/bug6636983.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6636983
+ * @summary test that composed text at the line starts is handled correctly
+ * @author Sergey Groznyh
+ * @run main bug6636983
+ */
+
+import sun.swing.SwingUtilities2;
+
+import javax.swing.*;
+import javax.swing.text.*;
+import javax.swing.text.html.HTMLDocument;
+import java.awt.*;
+import java.awt.event.InputMethodEvent;
+import java.awt.event.KeyEvent;
+import java.text.AttributedString;
+
+public class bug6636983 {
+    private Robot robot;
+
+    private final AttributedString Hiragana_A = new AttributedString("\u3042");
+
+    void sendInputMethodEvent() {
+        InputMethodEvent ime = new InputMethodEvent(
+                ep,
+                InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
+                Hiragana_A.getIterator(),
+                0,
+                null,
+                null);
+        ep.dispatchEvent(ime);
+    }
+
+    void checkComposedTextRun() {
+        HTMLDocument d = (HTMLDocument) ep.getDocument();
+        ElementIterator it = new ElementIterator(d.getDefaultRootElement());
+
+        while (true) {
+            Element e = it.next();
+            if (e == null) {
+                throw new RuntimeException("no composed text found");
+            }
+            AttributeSet a = e.getAttributes();
+            if (a.isDefined(StyleConstants.ComposedTextAttribute)) {
+                if (!AbstractDocument.ContentElementName.equals(a.getAttribute(StyleConstants.NameAttribute))) {
+                    throw new RuntimeException("AbstractDocument.ContentElementName.equals(a.getAttribute(StyleConstants.NameAttribute)) is false");
+                }
+
+                if (a.isDefined(SwingUtilities2.IMPLIED_CR)) {
+                    throw new RuntimeException("a.isDefined(SwingUtilities2.IMPLIED_CR) is true");
+                }
+
+                return;
+            }
+        }
+
+    }
+
+    JEditorPane ep;
+
+    void initAtParagraphStart() {
+        ep.setText("A<p>B");
+        hitKey(KeyEvent.VK_LEFT);
+    }
+
+    void sendAtParagraphStart() {
+        sendInputMethodEvent();
+    }
+
+    void checkAtParagraphStart() {
+        checkComposedTextRun();
+    }
+
+    void initAfterBRElement() {
+        ep.setText("A<br>B");
+        hitKey(KeyEvent.VK_LEFT);
+    }
+
+    void sendAtBRElement() {
+        sendInputMethodEvent();
+    }
+
+    void checkAtBrElement() {
+        checkComposedTextRun();
+    }
+
+    private void hitKey(int keycode) {
+        robot.keyPress(keycode);
+        robot.keyRelease(keycode);
+        robot.delay(550); // The magic number equals JRobot.DEFAULT_DELAY
+    }
+
+    private void run() throws Exception {
+        robot = new Robot();
+
+        ep = new JEditorPane();
+        ep.setContentType("text/html");
+        ep.setPreferredSize(new Dimension(100, 100));
+
+        JFrame frame = new JFrame("Test: " + getClass().getName());
+
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.add(ep);
+        frame.setVisible(true);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                try {
+                    bug6636983 bug6636983 = new bug6636983();
+
+                    bug6636983.run();
+                    bug6636983.initAtParagraphStart();
+                    bug6636983.sendAtParagraphStart();
+                    bug6636983.checkAtParagraphStart();
+                    bug6636983.initAfterBRElement();
+                    bug6636983.sendAtBRElement();
+                    bug6636983.checkAtBrElement();
+
+                    System.out.println("OK");
+                } catch (Exception e) {
+                    throw new RuntimeException("The test failed", e);
+                }
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/WrappedPlainView/6857057/StubBranchElement.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import javax.swing.text.*;
+
+class StubBranchElement implements Element {
+    Document document = new DefaultStyledDocument();
+    String context;
+    Element[] children = new StubLeafElement[3];
+
+    public StubBranchElement(String context) {
+        this.context = context;
+        int len = context.length() / 3;
+        for (int i = 0; i < 3; i++) {
+            children[i] = new StubLeafElement(
+                    context.substring(len * i, len * (i + 1)), this, len * i);
+        }
+        try {
+            document.insertString(0, context, new SimpleAttributeSet());
+        } catch (BadLocationException e) {
+        }
+    }
+
+    public Document getDocument() {
+        return document;
+    }
+
+    public Element getParentElement() {
+        return null;
+    }
+
+    public String getName() {
+        return "StubBranchElement";
+    }
+
+    public AttributeSet getAttributes() {
+        return new SimpleAttributeSet();
+    }
+
+    public int getStartOffset() {
+        return 0;
+    }
+
+    public int getEndOffset() {
+        return document.getLength();
+    }
+
+    public int getElementIndex(int offset) {
+        return offset / 3;
+    }
+
+    public int getElementCount() {
+        return 3;
+    }
+
+    public Element getElement(int index) {
+        return children[index];
+    }
+
+    public boolean isLeaf() {
+        return false;
+    }
+
+    public Element[] getChildren() {
+        return children;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/WrappedPlainView/6857057/StubLeafElement.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import javax.swing.text.*;
+
+class StubLeafElement implements Element {
+    Document document = new DefaultStyledDocument();
+    String context;
+    Element parent;
+    int position;
+
+    public StubLeafElement(String context, Element parent, int position) {
+        this.context = context;
+        this.parent = parent;
+        this.position = position;
+        try {
+            document.insertString(0, context, new SimpleAttributeSet());
+        } catch (BadLocationException e) {
+        }
+    }
+
+    public Document getDocument() {
+        return document;
+    }
+
+    public Element getParentElement() {
+        return parent;
+    }
+
+    public String getName() {
+        return "StubLeafElement";
+    }
+
+    public AttributeSet getAttributes() {
+        return new SimpleAttributeSet();
+    }
+
+    public int getStartOffset() {
+        return position;
+    }
+
+    public int getEndOffset() {
+        return position + document.getLength();
+    }
+
+    public int getElementIndex(int offset) {
+        return 0;
+    }
+
+    public int getElementCount() {
+        return 0;
+    }
+
+    public Element getElement(int index) {
+        return this;
+    }
+
+    public boolean isLeaf() {
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/WrappedPlainView/6857057/bug6857057.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6857057
+ * @summary test that the JCK GlyphView2021 test doesn't fail
+ * @author Sergey Groznyh
+ * @run main bug6857057
+ */
+
+import javax.swing.*;
+import javax.swing.text.Element;
+import javax.swing.text.GlyphView;
+import javax.swing.text.View;
+
+public class bug6857057 {
+
+    bug6857057() {
+        Element elem = new StubBranchElement(" G L Y P H V");
+        GlyphView view = new GlyphView(elem);
+        float pos = elem.getStartOffset();
+        float len = elem.getEndOffset() - pos;
+        int res = view.getBreakWeight(View.X_AXIS, pos, len);
+        if (res != View.ExcellentBreakWeight) {
+            throw new RuntimeException("breakWeight != ExcellentBreakWeight");
+        }
+    }
+
+    public static void main(String[] args) throws Throwable {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                new bug6857057();
+            }
+        });
+
+        System.out.println("OK");
+    }
+}
--- a/langtools/.hgtags	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/.hgtags	Thu Jul 29 22:02:45 2010 -0700
@@ -73,3 +73,7 @@
 89cd267c216751bdacf8629bb07a40c0950fc4f2 jdk7-b96
 c0a41294297ed397098dd92b647f481f0e1bb8fa jdk7-b97
 3b38f3aa3dc388eef0737a9fba99f54a1602ee3b jdk7-b98
+005bec70ca27239bdd4e6169b9b078507401aa72 jdk7-b99
+d1d7595fa824925651f09b8ffcb86c9cf39807be jdk7-b100
+20a8fe72ee7b673f59c319a5222fe0eebbd92082 jdk7-b101
+ff9c0a0bf7edf637a7dac5062b920924536ed79c jdk7-b102
--- a/langtools/make/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/make/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -26,9 +26,9 @@
 # Makefile for langtools: wrapper around Ant build.xml file
 
 #
-# On Solaris, the 'make' utility from Sun will not work with these makefiles.
-#    This little rule is only understood by Sun's make, and is harmless
-#    when seen by the GNU make tool. If using Sun's make, this causes the
+# On Solaris, the standard 'make' utility will not work with these makefiles.
+#    This little rule is only understood by Solaris make, and is harmless
+#    when seen by the GNU make tool. If using Solaris make, this causes the
 #    make command to fail.
 #
 SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
@@ -40,15 +40,16 @@
 
 SYSTEM_UNAME := $(shell uname)
 
+# Where is unwanted output to be delivered?
+# On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file.
 ifeq ($(SYSTEM_UNAME), Windows_NT)
 DEV_NULL = NUL
 else
+DEV_NULL = /dev/null 
+endif
+
 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
-DEV_NULL = NUL
 USING_CYGWIN = true
-else
-DEV_NULL = /dev/null
-endif 
 endif
 
 ifdef USING_CYGWIN
@@ -202,7 +203,7 @@
 
 #-------------------------------------------------------------------
 #
-# Targets for Sun's internal JPRT build system
+# Targets for Oracle's internal JPRT build system
 
 CD = cd
 ZIP = zip
--- a/langtools/make/Makefile-classic	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/make/Makefile-classic	Thu Jul 29 22:02:45 2010 -0700
@@ -28,9 +28,9 @@
 #
 
 #
-# On Solaris, the 'make' utility from Sun will not work with these makefiles.
-#    This little rule is only understood by Sun's make, and is harmless
-#    when seen by the GNU make tool. If using Sun's make, this causes the
+# On Solaris, the standard 'make' utility will not work with these makefiles.
+#    This little rule is only understood by Solaris make, and is harmless
+#    when seen by the GNU make tool. If using Solaris make, this causes the
 #    make command to fail.
 #
 SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
--- a/langtools/make/build.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/make/build.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -76,17 +76,27 @@
 javadoc.jls3.option=-tag "jls3:a:See &lt;cite&gt;${javadoc.jls3.cite}&lt;/cite&gt;:"
 
 # jtreg, used to run the JDK regression tests
+# See http://openjdk.java.net/jtreg/
 # Override this path as needed, either on the command line or in
 # one of the standard user build.properties files (see build.xml)
 
-# jtreg.home = /opt/jtreg/3.2.2_02
+# jtreg.home = /opt/jtreg/4.1
 
 # findbugs
+# See http://findbugs.sourceforge.net/
 # Override this path as needed, either on the command line or in
 # one of the standard user build.properties files (see build.xml)
 
 # findbugs.home = /opt/findbugs/1.2.1
 
+# vizant (graph visualization tool for Ant)
+# See http://vizant.sourceforge.net/
+# Override this path as needed, either on the command line or in
+# one of the standard user build.properties files (see build.xml)
+
+# vizant.jar = /opt/vizant/0.1.2/vizant-0.1.2.jar
+# dot = dot
+
 #------------------------------------------------------------
 
 # The following properties define the packages for each of the tools.
@@ -148,12 +158,14 @@
 
 #
 
-# The following files require the import JDK to be available
-require.import.jdk.files = \
+# The following files require the latest JDK to be available.
+# The API can be provided by using a suitable boot.java.home
+# or by setting import.jdk
+require.latest.jdk.files = \
     com/sun/tools/javac/nio/*.java
 
 # The following files in the import jdk source directory are required
-# in order to compile the files defined in ${require.import.jdk.files}
+# in order to compile the files defined in ${require.latest.jdk.files}
 #
 # For NIO, the list of stub files is defined by the contents of the primary
 # API packages, together with such types that may be required in order to
--- a/langtools/make/build.xml	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/make/build.xml	Thu Jul 29 22:02:45 2010 -0700
@@ -25,12 +25,79 @@
 -->
 
 <!--
- This is the main build file for the complete langtools workspace.
- It is used both when working on the tools in NetBeans, and when building
- JDK itself, in which case it is invoked from the wrapper Makefile.
+ This is the main build file for the complete langtools repository.
+ It is used when building JDK (in which case it is invoked from the
+ Makefile), and it can be used when working on the tools themselves,
+ in an IDE such as NetBeans.
+
+ External dependencies are specified via properties. These can be given
+ on the command line, or by providing a local build.properties file.
+ (They can also be edited into make/build.properties, although that is not
+ recommended.)  At a minimum, boot.java.home must be set to the installed
+ location of the version of JDK used to build this repository. Additional
+ properties may be required, depending on the targets that are built.
+ For example, to run any of the jtreg tests you must set jtreg.home,
+ to run findbugs on the code you must set findbugs.home, and so on.
+
+ For the most part, javac can be built using the previous version of JDK.
+ However, a small number of javac files require access to the latest JDK,
+ which may not yet have been compiled. To compile these files, you can do
+ one of the following:
+ - Set boot.java.home to a recent build of the latest version of JDK.
+ - Set import.jdk to either a recent build (containing jre/lib/rt.jar)
+   or to jdk source repository.  In the latter case, stub files will
+   automatically be generated and used for the required API, to avoid
+   unnecessary compilation of the source repository.
+ If you do neither, the relevant files will not be built.
+
+ The main build happens in two phases:
+ - First, javac and other tools as needed are built using ${boot.java.home}.
+   (This implies a constraint on the source code that they can be compiled
+   with the previous version of JDK.
+ - Second, all required classes are compiled with the latest javac, created
+   in the previous step.
+ The first phase is called the bootstrap phase. All targets, properties and
+ tasks that are specific to that phase have "bootstrap" in their name.
+
+ For more details on the JDK build, see
+    http://blogs.sun.com/kto/entry/anatomy_of_the_jdk_build
+    http://openjdk.java.net/groups/build/
+ For more details on the stub generator, see
+    http://blogs.sun.com/jjg/entry/building_javac_for_jdk7
+
+ Internal details ...
+
+ Interim build products are created in the build/ directory.
+ Final build products are created in the dist/ directory.
+ When building JDK, the dist/directory will contain:
+ - A bootstrap compiler suitable for running with ${boot.java.home}
+   suitable for compiling downstream parts of JDK
+ - Source files and class files for inclusion in the JDK being built
+ When building standalone, the dist/directory will contain:
+ - Separate jar files for each of the separate langtools components
+ - Simple scripts to invoke the tools by executing the corresponding
+   jar files.
+ These jar files and scripts are "for developer use only".
+
+ This file is organized into sections as follows:
+ - global property definitions
+ - general top level targets
+ - general diagnostic/debugging targets
+ - groups of targets for each tool: javac, javadoc, doclets, javah, javap, apt
+    Within each group, the following targets are provided, where applicable
+      build-bootstrap-TOOL      build the bootstrap version of the tool
+      build-classes-TOOL        build the classes for the tool
+      build-TOOL                build the jar file and script for the tool
+      jtreg-TOOL                build the tool and run the appropriate tests
+      findbugs-TOOL             run findbugs on the tool's source oode
+      TOOL                      build the tool, run the tests, and run findbugs
+ - utility definitions
  -->
 
 <project name="langtools" default="build" basedir="..">
+    <!--
+    **** Global property definitions.
+    -->
 
     <!-- Force full debuginfo for javac if the debug.classfiles
     property is set.  This must be BEFORE the include of
@@ -107,35 +174,55 @@
         ignoresystemclasses="true"
         classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
 
-    <!-- Set the default value of the sourcepath used for javac. -->
-    <condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
-        <isset property="import.jdk.src.dir"/>
-    </condition>
-
-    <!-- Set the default value of the classpath used for javac. -->
-    <property name="javac.classpath" value=""/>
-
-    <!-- Set the default bootclasspath option used for javac. 
-	Note that different variants of the option are used, meaning we can't just 
-	define the value for the option.
-	Note the explicit use of the standard property ${path.separator} in the following.
-	This is because Ant is not clever enough to handle direct use of : or ; -->
+    <!-- Set the default bootclasspath option used for javac.
+        Note that different variants of the option are used, meaning we can't just
+        define the value for the option.
+        Note the explicit use of the standard property ${path.separator} in the following.
+        This is because Ant is not clever enough to handle direct use of : or ; -->
     <condition property="javac.bootclasspath.opt"
             value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}"
             else="-Xbootclasspath/p:${build.classes.dir}">
         <isset property="import.jdk.jar"/>
     </condition>
 
-    <condition property="exclude.files" value="" else="${require.import.jdk.files}">
-        <isset property="import.jdk"/>
+    <condition property="boot.java.provides.latest.jdk">
+        <available
+            ignoresystemclasses="true"
+            classpath="${boot.java.home}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
+    </condition>
+
+    <condition property="bootstrap.exclude.files" value="" else="${require.latest.jdk.files}">
+        <isset property="boot.java.provides.latest.jdk"/>
+    </condition>
+
+    <condition property="exclude.files" value="" else="${require.latest.jdk.files}">
+        <or>
+            <isset property="boot.java.provides.latest.jdk"/>
+            <isset property="import.jdk"/>
+        </or>
     </condition>
 
-    <!-- for debugging -->
-    <target name="check-import.jdk">
-        <echo message="import.jdk: ${import.jdk}"/>
-        <echo message="import.jdk.jar: ${import.jdk.jar}"/>
-        <echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
-    </target>
+    <condition property="require.import.jdk.stubs">
+        <and>
+            <not>
+                <isset property="boot.java.provides.latest.jdk"/>
+            </not>
+            <isset property="import.jdk.src.dir"/>
+        </and>
+    </condition>
+
+    <!-- Set the default value of the sourcepath used for javac. -->
+    <condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
+        <isset property="require.import.jdk.stubs"/>
+    </condition>
+
+    <!-- Set the default value of the classpath used for javac. -->
+    <property name="javac.classpath" value=""/>
+
+
+    <!--
+    **** General top level targets.
+    -->
 
     <!-- Standard target to build deliverables for JDK build. -->
 
@@ -235,7 +322,61 @@
             datafile="${build.coverage.dir}/cobertura.ser"/>
     </target>
 
-    <!-- javac targets -->
+
+    <!--
+    **** Debugging/diagnostic targets.
+    -->
+
+    <!-- standard JDK target -->
+    <target name="sanity"
+        description="display settings of configuration values">
+        <echo level="info">ant.home = ${ant.home}</echo>
+        <echo level="info">boot.java.home = ${boot.java.home}</echo>
+        <echo level="info">target.java.home = ${target.java.home}</echo>
+        <echo level="info">jtreg.home = ${jtreg.home}</echo>
+        <echo level="info">findbugs.home = ${findbugs.home}</echo>
+    </target>
+
+    <target name="post-sanity" depends="-def-jtreg,sanity,build"
+        description="perform basic validation after a standard build">
+        <jtreg
+            dir="make/test"
+            workDir="${build.jtreg.dir}/post-sanity/work"
+            reportDir="${build.jtreg.dir}/post-sanity/report"
+            jdk="${target.java.home}"
+            verbose="summary"
+            failonerror="false" resultproperty="jtreg.post-sanity.result">
+        </jtreg>
+    </target>
+
+    <!-- use vizant tool to generate graphical image of this Ant file.-->
+    <target name="vizant" depends="-def-vizant">
+        <mkdir dir="${build.dir}"/>
+        <echo message="Generating ${build.dir}/build.dot"/>
+        <vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/>
+        <echo message="Generating ${build.dir}/build.png"/>
+        <exec executable="${dot}" >
+            <arg value="-Tpng"/>
+            <arg value="-o"/>
+            <arg file="${build.dir}/build.png"/>
+            <arg file="${build.dir}/build.dot"/>
+        </exec>
+    </target>
+
+    <target name="check-import.jdk">
+        <echo message="import.jdk: ${import.jdk}"/>
+        <echo message="import.jdk.jar: ${import.jdk.jar}"/>
+        <echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
+    </target>
+
+    <target name="diagnostics">
+        <diagnostics/>
+    </target>
+
+
+    <!--
+    **** javac targets.
+    -->
 
     <target name="build-bootstrap-javac"
             depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
@@ -267,7 +408,10 @@
 
     <target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/>
 
-    <!-- javadoc targets -->
+
+    <!--
+    **** javadoc targets.
+    -->
 
     <target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
         <build-bootstrap-classes includes="${javadoc.includes}"/>
@@ -300,7 +444,10 @@
 
     <target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
 
-    <!-- doclets targets -->
+
+    <!--
+    **** doclets targets.
+    -->
 
     <target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
         <build-bootstrap-classes includes="${doclets.includes}"/>
@@ -330,7 +477,10 @@
 
     <target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
 
-    <!-- javah targets -->
+
+    <!--
+    **** javah targets.
+    -->
 
     <target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
         <build-bootstrap-classes includes="${javah.includes}"/>
@@ -360,7 +510,10 @@
 
     <target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
 
-    <!-- javap targets -->
+
+    <!--
+    **** javap targets.
+    -->
 
     <target name="build-bootstrap-javap"
             depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
@@ -393,7 +546,10 @@
 
     <target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
 
-    <!-- apt targets -->
+
+    <!--
+    **** apt targets.
+    -->
 
     <target name="build-bootstrap-apt" depends="build-bootstrap-javac">
         <build-bootstrap-classes includes="${apt.includes}"/>
@@ -426,9 +582,12 @@
 
     <target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
 
-    <!-- Create import JDK stubs -->
 
-    <target name="-create-import-jdk-stubs" depends="-def-genstubs" if="import.jdk.src.dir">
+    <!--
+    **** Create import JDK stubs.
+    -->
+
+    <target name="-create-import-jdk-stubs" depends="-def-genstubs" if="require.import.jdk.stubs">
         <mkdir dir="${build.genstubs.dir}"/>
         <genstubs
             srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}"
@@ -437,7 +596,12 @@
         />
     </target>
 
-    <!-- Check targets -->
+
+    <!--
+    **** Check targets.
+    **** "-check-*" targets check that a required property is set, and set to a reasonable value.
+    **** A user friendly message is generated if not, and the build exits.
+    -->
 
     <target name="-check-boot.java.home" depends="-def-check">
         <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
@@ -459,7 +623,15 @@
         <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
     </target>
 
-    <!-- Ant macro and preset defs -->
+    <target name="-check-vizant" depends="-def-check">
+        <check name="vizant" property="vizant.jar"/>
+        <check name="dot" property="dot"/>
+    </target>
+
+
+    <!--
+    **** Targets for Ant macro and task definitions.
+    -->
 
     <target name="-def-build-tool">
         <macrodef name="build-tool">
@@ -599,7 +771,7 @@
                 sourcepath=""
                 release="${bootstrap.release}"
                 full.version="${bootstrap.full.version}"
-                excludes="${require.import.jdk.files} **/package-info.java"/>
+                excludes="${bootstrap.exclude.files} **/package-info.java"/>
         </presetdef>
     </target>
 
@@ -617,7 +789,7 @@
                  classpath="${build.toolclasses.dir}/"/>
     </target>
 
-    <target name="-def-genstubs" depends="build-bootstrap-javac">
+    <target name="-def-genstubs" depends="build-bootstrap-javac" if="require.import.jdk.stubs">
         <mkdir dir="${build.toolclasses.dir}"/>
         <javac fork="true"
                source="${boot.javac.source}"
@@ -640,7 +812,7 @@
             <sequential>
                 <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
                 <!-- Note: even with this default value, includes
-         from src.classes.dir get javadoc'd; see packageset below -->
+                from src.classes.dir get javadoc'd; see packageset below -->
                 <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
                 <javadoc
                     executable="${target.java.home}/bin/javadoc"
@@ -691,13 +863,15 @@
             <attribute name="tests"/>
             <attribute name="jdk" default="${target.java.home}"/>
             <attribute name="samevm" default="true"/>
-            <attribute name="verbose" default="summary"/>
-            <attribute name="options" default=""/>
+            <attribute name="verbose" default="${default.jtreg.verbose}"/>
+            <attribute name="options" default="${other.jtreg.options}"/>
             <attribute name="keywords" default="-keywords:!ignore"/>
             <attribute name="jpda.jvmargs" default=""/>
             <sequential>
-                <property name="coverage.options" value=""/>    <!-- default -->
-                <property name="coverage.classpath" value=""/>    <!-- default -->
+                <property name="coverage.options" value=""/>              <!-- default -->
+                <property name="coverage.classpath" value=""/>            <!-- default -->
+                <property name="default.jtreg.verbose" value="summary"/>  <!-- default -->
+                <property name="other.jtreg.options" value=""/>           <!-- default -->
                 <jtreg
                     dir="${test.dir}"
                     workDir="${build.jtreg.dir}/@{name}/work"
@@ -766,11 +940,16 @@
         <property name="findbugs.defined" value="true"/>
     </target>
 
+    <target name="-def-vizant" unless="vizant.defined" depends="-check-vizant">
+        <taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/>
+        <property name="vizant.defined" value="true"/>
+    </target>
+
     <target name="-def-check">
         <macrodef name="check">
             <attribute name="name"/>
             <attribute name="property"/>
-            <attribute name="marker"/>
+            <attribute name="marker" default=""/>
             <sequential>
                 <fail message="Cannot locate @{name}: please set @{property} to its location">
                     <condition>
@@ -781,41 +960,19 @@
                 </fail>
                 <fail message="@{name} is not installed in ${@{property}}">
                     <condition>
-                        <not>
-                            <available file="${@{property}}/@{marker}"/>
-                        </not>
+                        <and>
+                            <not>
+                                <equals arg1="@{marker}" arg2=""/>
+                            </not>
+                            <not>
+                                <available file="${@{property}}/@{marker}"/>
+                            </not>
+                        </and>
                     </condition>
                 </fail>
             </sequential>
         </macrodef>
     </target>
 
-    <!-- standard JDK target -->
-    <target name="sanity"
-        description="display settings of configuration values">
-        <echo level="info">ant.home = ${ant.home}</echo>
-        <echo level="info">boot.java.home = ${boot.java.home}</echo>
-        <echo level="info">target.java.home = ${target.java.home}</echo>
-        <echo level="info">jtreg.home = ${jtreg.home}</echo>
-        <echo level="info">findbugs.home = ${findbugs.home}</echo>
-    </target>
-
-    <!-- useful debugging targets -->
-    <target name="diagnostics">
-        <diagnostics/>
-    </target>
-
-    <target name="post-sanity" depends="-def-jtreg,sanity,build"
-        description="perform basic validation after a standard build">
-        <jtreg
-            dir="make/test"
-            workDir="${build.jtreg.dir}/post-sanity/work"
-            reportDir="${build.jtreg.dir}/post-sanity/report"
-            jdk="${target.java.home}"
-            verbose="summary"
-            failonerror="false" resultproperty="jtreg.post-sanity.result">
-        </jtreg>
-
-    </target>
 </project>
 
--- a/langtools/src/share/classes/com/sun/source/tree/Tree.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/source/tree/Tree.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,7 @@
  *
  * <p><b>WARNING:</b> This interface and its sub-interfaces are
  * subject to change as the Java&trade; programming language evolves.
- * These interfaces are implemented by Sun's Java compiler (javac)
+ * These interfaces are implemented by the JDK Java compiler (javac)
  * and should not be implemented either directly or indirectly by
  * other applications.
  *
--- a/langtools/src/share/classes/com/sun/source/util/JavacTask.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/source/util/JavacTask.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,7 +36,7 @@
 import javax.tools.JavaFileObject;
 
 /**
- * Provides access to functionality specific to the Sun Java Compiler, javac.
+ * Provides access to functionality specific to the JDK Java Compiler, javac.
  *
  * @author Peter von der Ah&eacute;
  * @author Jonathan Gibbons
--- a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,7 @@
 import javax.tools.JavaFileObject;
 
 /**
- * Provides details about work that has been done by the Sun Java Compiler, javac.
+ * Provides details about work that has been done by the JDK Java Compiler, javac.
  *
  * @author Jonathan Gibbons
  * @since 1.6
--- a/langtools/src/share/classes/com/sun/source/util/TaskListener.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/source/util/TaskListener.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,7 +27,7 @@
 
 
 /**
- * Provides a listener to monitor the activity of the Sun Java Compiler, javac.
+ * Provides a listener to monitor the activity of the JDK Java Compiler, javac.
  *
  * @author Jonathan Gibbons
  * @since 1.6
--- a/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java	Thu Jul 29 22:02:45 2010 -0700
@@ -60,7 +60,7 @@
 /**
  * Apt compiler phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/apt/main/CommandLine.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/CommandLine.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,8 +35,8 @@
 /**
  * Various utility methods for processing Java tool command line arguments.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java	Thu Jul 29 22:02:45 2010 -0700
@@ -45,7 +45,7 @@
 import com.sun.tools.javac.parser.DocCommentScanner;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/apt/main/Main.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/Main.java	Thu Jul 29 22:02:45 2010 -0700
@@ -61,7 +61,7 @@
 /** This class provides a commandline interface to the apt build-time
  *  tool.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/apt/util/Bark.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/apt/util/Bark.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
 
 /** A subtype of Log for use in APT.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, sections 4.2, 4.6, 4.7.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.16.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.15.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 import java.util.Map;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -26,8 +26,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 import java.util.Map;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,8 +35,8 @@
 /**
  * See JVMS3, section 4.2.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 import java.io.InputStream;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,8 +42,8 @@
 /**
  * Rewrites a class file using a map of translations.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,8 +41,8 @@
 /**
  * Write a ClassFile data structure to a file or stream.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, section 4.8.3.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,8 +27,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,8 +33,8 @@
 /**
  * See JVMS3, section 4.5.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,8 +27,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.2.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -26,8 +26,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.15.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 /**
  * See JVMS3, section 4.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,8 +27,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 /**
  * See JVMS3, section 4.8.7.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.5.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
 /**
  * See JSR 308 specification, section 4.1
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Field.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Field.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, section 4.8.6.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 /**
  * See JVMS3, chapter 6.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  *
--- a/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.12.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.13.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.14.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Method.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Method.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
  * <p>In addition to providing all the standard opcodes defined in JVMS,
  * this class also provides legacy support for the PicoJava extensions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.16 and 4.8.17.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.17.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.18.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JSR 308 specification, section 4.1
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.18 and 4.8.19.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JSR 308 specification, section 4
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.16.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.18.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JSR 308 specification, section 4.1
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Signature.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Signature.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 /**
  * See JVMS3 4.4.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.9.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, section 4.8.15.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.10.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,8 +27,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.8.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/classfile/Type.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Type.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
  *  Family of classes used to represent the parsed form of a {@link Descriptor}
  *  or {@link Signature}.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/package.html	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/package.html	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,7 @@
 <title>com.sun.tools.doclets.formats.html package</title>
 </head>
 <body bgcolor="white">
-        This is the default doclet provided by doclet provided by 
-        Sun<font size="-2"><sup>TM</sup></font> that produces Javadoc's 
+        This is the default doclet provided with JDK that produces Javadoc's 
         default HTML-formatted API output.  For more documentation
         on this doclet, please refer to the link below.
         
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -92,44 +92,42 @@
     public abstract void build() throws IOException;
 
     /**
-     * Build the documentation, as specified by the given XML elements.
+     * Build the documentation, as specified by the given XML element.
      *
-     * @param elements the XML elements that specify which components to
-     *                 document.
+     * @param node the XML element that specifies which component to document.
      */
-    protected void build(List<?> elements) {
-        for (int i = 0; i < elements.size(); i++ ) {
-            Object element = elements.get(i);
-            String component = (String)
-                ((element instanceof String) ?
-                     element :
-                    ((List<?>) element).get(0));
-            try {
-                invokeMethod("build" + component,
-                    element instanceof String ?
-                        new Class<?>[] {} :
-                        new Class<?>[] {List.class},
-                    element instanceof String ?
-                        new Object[] {} :
-                        new Object[] {((List<?>) element).subList(1,
-                            ((List<?>) element).size())});
-            } catch (NoSuchMethodException e) {
-                e.printStackTrace();
-                configuration.root.printError("Unknown element: " + component);
-                throw new DocletAbortException();
-            } catch (InvocationTargetException e) {
-                e.getCause().printStackTrace();
-            } catch (Exception e) {
-                e.printStackTrace();
-                configuration.root.printError("Exception " +
-                    e.getClass().getName() +
-                    " thrown while processing element: " + component);
-                throw new DocletAbortException();
-            }
+    protected void build(XMLNode node) {
+        String component = node.name;
+        try {
+            invokeMethod("build" + component,
+                    new Class<?>[] { XMLNode.class },
+                    new Object[] { node });
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            configuration.root.printError("Unknown element: " + component);
+            throw new DocletAbortException();
+        } catch (InvocationTargetException e) {
+            e.getCause().printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+            configuration.root.printError("Exception " +
+                e.getClass().getName() +
+                " thrown while processing element: " + component);
+            throw new DocletAbortException();
         }
     }
 
     /**
+     * Build the documentation, as specified by the children of the given XML element.
+     *
+     * @param node the XML element that specifies which components to document.
+     */
+    protected void buildChildren(XMLNode node) {
+        for (XMLNode child: node.children)
+            build(child);
+    }
+
+    /**
      * Given the name and parameters, invoke the method in the builder.  This
      * method is required to invoke the appropriate build method as instructed
      * by the builder XML file.
@@ -138,7 +136,14 @@
      * @param paramClasses the types for each parameter.
      * @param params       the parameters of the method.
      */
-    protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses,
+    protected void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
-    throws Exception;
+    throws Exception {
+        if (DEBUG) {
+            configuration.root.printError("DEBUG: " + this.getClass().getName()
+                + "." + methodName);
+        }
+        Method method = this.getClass().getMethod(methodName, paramClasses);
+        method.invoke(this, params);
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,7 +27,6 @@
 
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.util.*;
 
 /**
  * The superclass for all member builders.  Member builders are only executed
@@ -69,9 +68,10 @@
      *
      * @param elements {@inheritDoc}
      */
-    public void build(List<?> elements) {
+    @Override
+    public void build(XMLNode node) {
         if (hasMembersToDocument()) {
-            super.build(elements);
+            super.build(node);
         }
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,6 @@
 import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the summary for a given annotation type.
@@ -92,20 +91,6 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void build() throws IOException {
         build(LayoutParser.getInstance(configuration).parseXML(ROOT));
     }
@@ -122,8 +107,8 @@
       *
       * @param elements the XML elements that specify how to document a class.
       */
-     public void buildAnnotationTypeDoc(List<?> elements) throws Exception {
-        build(elements);
+     public void buildAnnotationTypeDoc(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
         copyDocFiles();
      }
@@ -154,7 +139,7 @@
     /**
      * Build the header of the page.
      */
-    public void buildAnnotationTypeHeader() {
+    public void buildAnnotationTypeHeader(XMLNode node) {
         writer.writeHeader(configuration.getText("doclet.AnnotationType") +
             " " + annotationTypeDoc.name());
     }
@@ -162,14 +147,14 @@
     /**
      * If this class is deprecated, print the appropriate information.
      */
-    public void buildDeprecationInfo () {
+    public void buildDeprecationInfo (XMLNode node) {
         writer.writeAnnotationTypeDeprecationInfo();
     }
 
     /**
      * Build the signature of the current annotation type.
      */
-    public void buildAnnotationTypeSignature() {
+    public void buildAnnotationTypeSignature(XMLNode node) {
         StringBuffer modifiers = new StringBuffer(
             annotationTypeDoc.modifiers() + " ");
         writer.writeAnnotationTypeSignature(
@@ -180,14 +165,14 @@
     /**
      * Build the class description.
      */
-    public void buildAnnotationTypeDescription() {
+    public void buildAnnotationTypeDescription(XMLNode node) {
        writer.writeAnnotationTypeDescription();
     }
 
     /**
      * Build the tag information for the current class.
      */
-    public void buildAnnotationTypeTagInfo() {
+    public void buildAnnotationTypeTagInfo(XMLNode node) {
        writer.writeAnnotationTypeTagInfo();
     }
 
@@ -197,9 +182,9 @@
      * @param elements the XML elements that specify how a member summary is
      *                 documented.
      */
-    public void buildMemberSummary(List<?> elements) throws Exception {
+    public void buildMemberSummary(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getMemberSummaryBuilder(writer).build(elements);
+            getMemberSummaryBuilder(writer).buildChildren(node);
         writer.completeMemberSummaryBuild();
     }
 
@@ -209,10 +194,10 @@
      * @param elements the XML elements that specify how a annotation type
      *                 members are documented.
      */
-    public void buildAnnotationTypeOptionalMemberDetails(List<?> elements)
+    public void buildAnnotationTypeOptionalMemberDetails(XMLNode node)
     throws Exception {
         configuration.getBuilderFactory().
-            getAnnotationTypeOptionalMemberBuilder(writer).build(elements);
+            getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -221,17 +206,17 @@
      * @param elements the XML elements that specify how a annotation type
      *                 members are documented.
      */
-    public void buildAnnotationTypeRequiredMemberDetails(List<?> elements)
+    public void buildAnnotationTypeRequiredMemberDetails(XMLNode node)
     throws Exception {
         configuration.getBuilderFactory().
-            getAnnotationTypeRequiredMemberBuilder(writer).build(elements);
+            getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node);
     }
 
 
     /**
      * Build the footer of the page.
      */
-    public void buildAnnotationTypeFooter() {
+    public void buildAnnotationTypeFooter(XMLNode node) {
         writer.writeFooter();
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for optional annotation type members.
@@ -85,6 +84,7 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getName() {
         return "AnnotationTypeOptionalMemberDetails";
     }
@@ -95,34 +95,20 @@
      * @param elements the XML elements that specify how to construct this
      *                documentation.
      */
-    public void buildAnnotationTypeOptionalMember(List<?> elements) {
+    public void buildAnnotationTypeOptionalMember(XMLNode node) {
         if (writer == null) {
             return;
         }
         for (currentMemberIndex = 0; currentMemberIndex < members.size();
             currentMemberIndex++) {
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
      * Document the default value for this optional member.
      */
-    public void buildDefaultValueInfo() {
+    public void buildDefaultValueInfo(XMLNode node) {
         ((AnnotationTypeOptionalMemberWriter) writer).writeDefaultValueInfo(
             (MemberDoc) members.get(currentMemberIndex));
     }
@@ -130,6 +116,7 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     public AnnotationTypeRequiredMemberWriter getWriter() {
         return writer;
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for required annotation type members.
@@ -114,20 +113,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
      * Returns a list of members that will be documented for the given class.
      * This information can be used for doclet specific documentation
      * generation.
@@ -161,20 +146,20 @@
      * @param elements the XML elements that specify how to construct this
      *                documentation.
      */
-    public void buildAnnotationTypeRequiredMember(List<?> elements) {
+    public void buildAnnotationTypeRequiredMember(XMLNode node) {
         if (writer == null) {
             return;
         }
         for (currentMemberIndex = 0; currentMemberIndex < members.size();
             currentMemberIndex++) {
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
      * Build the overall header.
      */
-    public void buildHeader() {
+    public void buildHeader(XMLNode node) {
         writer.writeHeader(classDoc,
             configuration.getText("doclet.Annotation_Type_Member_Detail"));
     }
@@ -182,7 +167,7 @@
     /**
      * Build the header for the individual members.
      */
-    public void buildMemberHeader() {
+    public void buildMemberHeader(XMLNode node) {
         writer.writeMemberHeader((MemberDoc) members.get(
                 currentMemberIndex),
             currentMemberIndex == 0);
@@ -191,14 +176,14 @@
     /**
      * Build the signature.
      */
-    public void buildSignature() {
+    public void buildSignature(XMLNode node) {
         writer.writeSignature((MemberDoc) members.get(currentMemberIndex));
     }
 
     /**
      * Build the deprecation information.
      */
-    public void buildDeprecationInfo() {
+    public void buildDeprecationInfo(XMLNode node) {
         writer.writeDeprecated((MemberDoc) members.get(currentMemberIndex));
     }
 
@@ -206,7 +191,7 @@
      * Build the comments for the member.  Do nothing if
      * {@link Configuration#nocomment} is set to true.
      */
-    public void buildMemberComments() {
+    public void buildMemberComments(XMLNode node) {
         if(! configuration.nocomment){
             writer.writeComments((MemberDoc) members.get(currentMemberIndex));
         }
@@ -215,21 +200,21 @@
     /**
      * Build the tag information.
      */
-    public void buildTagInfo() {
+    public void buildTagInfo(XMLNode node) {
         writer.writeTags((MemberDoc) members.get(currentMemberIndex));
     }
 
     /**
      * Build the footer for the individual member.
      */
-    public void buildMemberFooter() {
+    public void buildMemberFooter(XMLNode node) {
         writer.writeMemberFooter();
     }
 
     /**
      * Build the overall footer.
      */
-    public void buildFooter() {
+    public void buildFooter(XMLNode node) {
         writer.writeFooter(classDoc);
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,6 @@
 import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the summary for a given class.
@@ -108,20 +107,6 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void build() throws IOException {
         build(LayoutParser.getInstance(configuration).parseXML(ROOT));
     }
@@ -138,8 +123,8 @@
       *
       * @param elements the XML elements that specify how to document a class.
       */
-     public void buildClassDoc(List<?> elements) throws Exception {
-        build(elements);
+     public void buildClassDoc(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
         copyDocFiles();
      }
@@ -169,7 +154,7 @@
     /**
      * Build the header of the page.
      */
-    public void buildClassHeader() {
+    public void buildClassHeader(XMLNode node) {
         String key;
         if (isInterface) {
             key =  "doclet.Interface";
@@ -185,7 +170,7 @@
     /**
      * Build the class tree documentation.
      */
-    public void buildClassTree() {
+    public void buildClassTree(XMLNode node) {
         writer.writeClassTree();
     }
 
@@ -193,42 +178,42 @@
      * If this is a class, list all interfaces
      * implemented by this class.
      */
-    public void buildImplementedInterfacesInfo() {
+    public void buildImplementedInterfacesInfo(XMLNode node) {
         writer.writeImplementedInterfacesInfo();
     }
 
     /**
      * If this is an interface, list all super interfaces.
      */
-    public void buildSuperInterfacesInfo() {
+    public void buildSuperInterfacesInfo(XMLNode node) {
         writer.writeSuperInterfacesInfo();
     }
 
     /**
      * List the parameters of this class.
      */
-    public void buildTypeParamInfo() {
+    public void buildTypeParamInfo(XMLNode node) {
         writer.writeTypeParamInfo();
     }
 
     /**
      * List all the classes extend this one.
      */
-    public void buildSubClassInfo() {
+    public void buildSubClassInfo(XMLNode node) {
         writer.writeSubClassInfo();
     }
 
     /**
      * List all the interfaces that extend this one.
      */
-    public void buildSubInterfacesInfo() {
+    public void buildSubInterfacesInfo(XMLNode node) {
         writer.writeSubInterfacesInfo();
     }
 
     /**
      * If this is an interface, list all classes that implement this interface.
      */
-    public void buildInterfaceUsageInfo () {
+    public void buildInterfaceUsageInfo (XMLNode node) {
         writer.writeInterfaceUsageInfo();
     }
 
@@ -236,21 +221,21 @@
      * If this is an inner class or interface, list the enclosing class or
      * interface.
      */
-    public void buildNestedClassInfo () {
+    public void buildNestedClassInfo (XMLNode node) {
         writer.writeNestedClassInfo();
     }
 
     /**
      * If this class is deprecated, print the appropriate information.
      */
-    public void buildDeprecationInfo () {
+    public void buildDeprecationInfo (XMLNode node) {
         writer.writeClassDeprecationInfo();
     }
 
     /**
      * Build the signature of the current class.
      */
-    public void buildClassSignature() {
+    public void buildClassSignature(XMLNode node) {
         StringBuffer modifiers = new StringBuffer(classDoc.modifiers() + " ");
         if (isEnum) {
             modifiers.append("enum ");
@@ -276,14 +261,14 @@
     /**
      * Build the class description.
      */
-    public void buildClassDescription() {
+    public void buildClassDescription(XMLNode node) {
        writer.writeClassDescription();
     }
 
     /**
      * Build the tag information for the current class.
      */
-    public void buildClassTagInfo() {
+    public void buildClassTagInfo(XMLNode node) {
        writer.writeClassTagInfo();
     }
 
@@ -293,9 +278,9 @@
      * @param elements the XML elements that specify how a member summary is
      *                 documented.
      */
-    public void buildMemberSummary(List<?> elements) throws Exception {
+    public void buildMemberSummary(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getMemberSummaryBuilder(writer).build(elements);
+            getMemberSummaryBuilder(writer).buildChildren(node);
         writer.completeMemberSummaryBuild();
     }
 
@@ -305,9 +290,9 @@
      * @param elements the XML elements that specify how a enum constants are
      *                 documented.
      */
-    public void buildEnumConstantsDetails(List<?> elements) throws Exception {
+    public void buildEnumConstantsDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getEnumConstantsBuilder(writer).build(elements);
+            getEnumConstantsBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -315,9 +300,9 @@
      *
      * @param elements the XML elements that specify how a field is documented.
      */
-    public void buildFieldDetails(List<?> elements) throws Exception {
+    public void buildFieldDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getFieldBuilder(writer).build(elements);
+            getFieldBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -326,9 +311,9 @@
      * @param elements the XML elements that specify how to document a
      * constructor.
      */
-    public void buildConstructorDetails(List<?> elements) throws Exception {
+    public void buildConstructorDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getConstructorBuilder(writer).build(elements);
+            getConstructorBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -336,15 +321,15 @@
      *
      * @param elements the XML elements that specify how a method is documented.
      */
-    public void buildMethodDetails(List<?> elements) throws Exception {
+    public void buildMethodDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-                getMethodBuilder(writer).build(elements);
+                getMethodBuilder(writer).buildChildren(node);
     }
 
     /**
      * Build the footer of the page.
      */
-    public void buildClassFooter() {
+    public void buildClassFooter(XMLNode node) {
         writer.writeFooter();
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,7 +30,6 @@
 import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the Constants Summary Page.
@@ -109,20 +108,6 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void build() throws IOException {
         if (writer == null) {
             //Doclet does not support this output.
@@ -144,29 +129,29 @@
      * @param elements the list of elements describing constant summary
      *                 documentation.
      */
-    public void buildConstantSummary(List<?> elements) throws Exception {
-        build(elements);
+    public void buildConstantSummary(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
     }
 
     /**
      * Build the header.
      */
-    public void buildHeader() {
+    public void buildHeader(XMLNode node) {
         writer.writeHeader();
     }
 
     /**
      * Build the footer.
      */
-    public void buildFooter() {
+    public void buildFooter(XMLNode node) {
         writer.writeFooter();
     }
 
     /**
      * Build the table of contents.
      */
-    public void buildContents() {
+    public void buildContents(XMLNode node) {
         writer.writeContentsHeader();
         PackageDoc[] packages = configuration.packages;
         printedPackageHeaders = new HashSet<String>();
@@ -186,14 +171,14 @@
      * @param elements the XML elements that represent the components
      *                 of documentation for each package.
      */
-    public void buildConstantSummaries(List<?> elements) {
+    public void buildConstantSummaries(XMLNode node) {
         PackageDoc[] packages = configuration.packages;
         printedPackageHeaders = new HashSet<String>();
         for (int i = 0; i < packages.length; i++) {
             if (hasConstantField(packages[i])) {
                 currentPackage = packages[i];
                 //Build the documentation for the current package.
-                build(elements);
+                buildChildren(node);
             }
         }
     }
@@ -204,8 +189,8 @@
      * @param elements the list of XML elements that make up package
      *                 documentation.
      */
-    public void buildPackageConstantSummary(List<?> elements) {
-        build(elements);
+    public void buildPackageConstantSummary(XMLNode node) {
+        buildChildren(node);
     }
 
     /**
@@ -214,7 +199,7 @@
      * @param elements the list of XML elements that make up the class
      *                 constant summary.
      */
-    public void buildClassConstantSummary(List<?> elements) {
+    public void buildClassConstantSummary(XMLNode node) {
         ClassDoc[] classes = currentPackage.name().length() > 0 ?
             currentPackage.allClasses() :
             configuration.classDocCatalog.allClasses(
@@ -227,14 +212,14 @@
             }
             currentClass = classes[i];
             //Build the documentation for the current class.
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
      * Build the header for the given class.
      */
-    public void buildPackageHeader() {
+    public void buildPackageHeader(XMLNode node) {
         String parsedPackageName = parsePackageName(currentPackage.name());
         if (! printedPackageHeaders.contains(parsedPackageName)) {
             writer.writePackageName(currentPackage,
@@ -246,7 +231,7 @@
     /**
      * Build the header for the given class.
      */
-    public void buildClassHeader() {
+    public void buildClassHeader(XMLNode node) {
         writer.writeConstantMembersHeader(currentClass);
     }
 
@@ -254,14 +239,14 @@
      * Print summary of constant members in the
      * class.
      */
-    public void buildConstantMembers() {
-        new ConstantFieldBuilder(currentClass).buildMembersSummary();
+    public void buildConstantMembers(XMLNode node) {
+        new ConstantFieldBuilder(currentClass).buildMembersSummary(node);
     }
 
     /**
      * Build the footer for the given class.
      */
-    public void buildClassFooter() {
+    public void buildClassFooter(XMLNode node) {
         writer.writeConstantMembersFooter(currentClass);
     }
 
@@ -362,7 +347,7 @@
         /**
          * Builds the table of constants for a given class.
          */
-        protected void buildMembersSummary() {
+        protected void buildMembersSummary(XMLNode node) {
             List<FieldDoc> members = new ArrayList<FieldDoc>(members());
             if (members.size() > 0) {
                 Collections.sort(members);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,7 +28,6 @@
 import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
-import java.lang.reflect.*;
 import java.util.*;
 
 /**
@@ -134,22 +133,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of constructors that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -175,21 +158,21 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildConstructorDoc(List<?> elements) {
+        public void buildConstructorDoc(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentMethodIndex = 0;
                         currentMethodIndex < constructors.size();
                         currentMethodIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Constructor_Detail"));
@@ -198,7 +181,7 @@
         /**
          * Build the header for the individual constructor.
          */
-        public void buildConstructorHeader() {
+        public void buildConstructorHeader(XMLNode node) {
                 writer.writeConstructorHeader(
                         (ConstructorDoc) constructors.get(currentMethodIndex),
                         currentMethodIndex == 0);
@@ -207,7 +190,7 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature(
                         (ConstructorDoc) constructors.get(currentMethodIndex));
         }
@@ -215,7 +198,7 @@
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated(
                         (ConstructorDoc) constructors.get(currentMethodIndex));
         }
@@ -224,7 +207,7 @@
          * Build the comments for the constructor.  Do nothing if
          * {@link Configuration#nocomment} is set to true.
          */
-        public void buildConstructorComments() {
+        public void buildConstructorComments(XMLNode node) {
                 if (!configuration.nocomment) {
                         writer.writeComments(
                                 (ConstructorDoc) constructors.get(currentMethodIndex));
@@ -234,21 +217,21 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags((ConstructorDoc) constructors.get(currentMethodIndex));
         }
 
         /**
          * Build the footer for the individual constructor.
          */
-        public void buildConstructorFooter() {
+        public void buildConstructorFooter(XMLNode node) {
                 writer.writeConstructorFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for a enum constants.
@@ -116,22 +115,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of enum constants that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -165,21 +148,21 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildEnumConstant(List<?> elements) {
+        public void buildEnumConstant(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentEnumConstantsIndex = 0;
                         currentEnumConstantsIndex < enumConstants.size();
                         currentEnumConstantsIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Enum_Constant_Detail"));
@@ -188,7 +171,7 @@
         /**
          * Build the header for the individual enum constants.
          */
-        public void buildEnumConstantHeader() {
+        public void buildEnumConstantHeader(XMLNode node) {
                 writer.writeEnumConstantHeader(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex),
                         currentEnumConstantsIndex == 0);
@@ -197,7 +180,7 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
         }
@@ -205,7 +188,7 @@
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
         }
@@ -214,7 +197,7 @@
          * Build the comments for the enum constant.  Do nothing if
          * {@link Configuration#nocomment} is set to true.
          */
-        public void buildEnumConstantComments() {
+        public void buildEnumConstantComments(XMLNode node) {
                 if (!configuration.nocomment) {
                         writer.writeComments(
                                 (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
@@ -224,7 +207,7 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
         }
@@ -232,14 +215,14 @@
         /**
          * Build the footer for the individual enum constants.
          */
-        public void buildEnumConstantFooter() {
+        public void buildEnumConstantFooter(XMLNode node) {
                 writer.writeEnumConstantFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for a field.
@@ -117,22 +116,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of fields that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -166,21 +149,21 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildFieldDoc(List<?> elements) {
+        public void buildFieldDoc(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentFieldIndex = 0;
                         currentFieldIndex < fields.size();
                         currentFieldIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Field_Detail"));
@@ -189,7 +172,7 @@
         /**
          * Build the header for the individual field.
          */
-        public void buildFieldHeader() {
+        public void buildFieldHeader(XMLNode node) {
                 writer.writeFieldHeader(
                         (FieldDoc) fields.get(currentFieldIndex),
                         currentFieldIndex == 0);
@@ -198,14 +181,14 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature((FieldDoc) fields.get(currentFieldIndex));
         }
 
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated((FieldDoc) fields.get(currentFieldIndex));
         }
 
@@ -213,7 +196,7 @@
          * Build the comments for the field.  Do nothing if
          * {@link Configuration#nocomment} is set to true.
          */
-        public void buildFieldComments() {
+        public void buildFieldComments(XMLNode node) {
                 if (!configuration.nocomment) {
                         writer.writeComments((FieldDoc) fields.get(currentFieldIndex));
                 }
@@ -222,21 +205,21 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags((FieldDoc) fields.get(currentFieldIndex));
         }
 
         /**
          * Build the footer for the individual field.
          */
-        public void buildFieldFooter() {
+        public void buildFieldFooter(XMLNode node) {
                 writer.writeFieldFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java	Thu Jul 29 22:02:45 2010 -0700
@@ -45,8 +45,8 @@
     /**
      * The map of XML elements that have been parsed.
      */
-    private Map<String,List<Object>> xmlElementsMap;
-
+    private Map<String,XMLNode> xmlElementsMap;
+    private XMLNode currentNode;
     private Configuration configuration;
     private static LayoutParser instance;
     private String currentRoot;
@@ -56,7 +56,7 @@
      * This class is a singleton.
      */
     private LayoutParser(Configuration configuration) {
-        xmlElementsMap = new HashMap<String,List<Object>>();
+        xmlElementsMap = new HashMap<String,XMLNode>();
         this.configuration = configuration;
     }
 
@@ -78,20 +78,18 @@
      *
      * @return List the list of XML elements parsed.
      */
-    public List<?> parseXML(String root) {
+    public XMLNode parseXML(String root) {
         if (xmlElementsMap.containsKey(root)) {
             return xmlElementsMap.get(root);
         }
         try {
-            List<Object> xmlElements = new ArrayList<Object>();
-            xmlElementsMap.put(root, xmlElements);
             currentRoot = root;
             isParsing = false;
             SAXParserFactory factory = SAXParserFactory.newInstance();
             SAXParser saxParser = factory.newSAXParser();
             InputStream in = configuration.getBuilderXML();
             saxParser.parse(in, this);
-            return xmlElements;
+            return xmlElementsMap.get(root);
         } catch (Throwable t) {
             t.printStackTrace();
             throw new DocletAbortException();
@@ -101,39 +99,30 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     public void startElement(String namespaceURI, String sName, String qName,
         Attributes attrs)
     throws SAXException {
         if (isParsing || qName.equals(currentRoot)) {
             isParsing = true;
-            List<Object> xmlElements = xmlElementsMap.get(currentRoot);
-            xmlElements.add(qName);
+            currentNode = new XMLNode(currentNode, qName);
+            for (int i = 0; i < attrs.getLength(); i++)
+                currentNode.attrs.put(attrs.getLocalName(i), attrs.getValue(i));
+            if (qName.equals(currentRoot))
+                xmlElementsMap.put(qName, currentNode);
         }
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public void endElement(String namespaceURI, String sName, String qName)
     throws SAXException {
         if (! isParsing) {
-            isParsing = false;
             return;
         }
-        List<Object> xmlElements = xmlElementsMap.get(currentRoot);
-        if (xmlElements.get(xmlElements.size()-1).equals(qName)) {
-            return;
-        } else {
-            List<Object> subElements = new ArrayList<Object>();
-            int targetIndex = xmlElements.indexOf(qName);
-            int size = xmlElements.size();
-            for (int i = targetIndex; i < size; i++) {
-                subElements.add(xmlElements.get(targetIndex));
-                xmlElements.remove(targetIndex);
-            }
-            //Save the sub elements as a list.
-            xmlElements.add(subElements);
-        }
+        currentNode = currentNode.parent;
         isParsing = ! qName.equals(currentRoot);
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the member summary.
@@ -175,22 +174,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Return true it there are any members to summarize.
          *
          * @return true if there are any members to summarize.
@@ -211,7 +194,7 @@
         /**
          * Build the summary for the enum constants.
          */
-        public void buildEnumConstantsSummary() {
+        public void buildEnumConstantsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.ENUM_CONSTANTS],
                         visibleMemberMaps[VisibleMemberMap.ENUM_CONSTANTS]);
@@ -220,7 +203,7 @@
     /**
      * Build the summary for the optional members.
      */
-    public void buildAnnotationTypeOptionalMemberSummary() {
+    public void buildAnnotationTypeOptionalMemberSummary(XMLNode node) {
         buildSummary(
             memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL],
                 visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]);
@@ -229,7 +212,7 @@
     /**
      * Build the summary for the optional members.
      */
-    public void buildAnnotationTypeRequiredMemberSummary() {
+    public void buildAnnotationTypeRequiredMemberSummary(XMLNode node) {
         buildSummary(
             memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED],
                 visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]);
@@ -238,7 +221,7 @@
         /**
          * Build the summary for the fields.
          */
-        public void buildFieldsSummary() {
+        public void buildFieldsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.FIELDS],
                         visibleMemberMaps[VisibleMemberMap.FIELDS]);
@@ -247,7 +230,7 @@
         /**
          * Build the inherited summary for the fields.
          */
-        public void buildFieldsInheritedSummary() {
+        public void buildFieldsInheritedSummary(XMLNode node) {
                 buildInheritedSummary(
                         memberSummaryWriters[VisibleMemberMap.FIELDS],
                         visibleMemberMaps[VisibleMemberMap.FIELDS]);
@@ -256,7 +239,7 @@
         /**
          * Build the summary for the nested classes.
          */
-        public void buildNestedClassesSummary() {
+        public void buildNestedClassesSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.INNERCLASSES],
                         visibleMemberMaps[VisibleMemberMap.INNERCLASSES]);
@@ -265,7 +248,7 @@
         /**
          * Build the inherited summary for the nested classes.
          */
-        public void buildNestedClassesInheritedSummary() {
+        public void buildNestedClassesInheritedSummary(XMLNode node) {
                 buildInheritedSummary(
                         memberSummaryWriters[VisibleMemberMap.INNERCLASSES],
                         visibleMemberMaps[VisibleMemberMap.INNERCLASSES]);
@@ -274,7 +257,7 @@
         /**
          * Build the method summary.
          */
-        public void buildMethodsSummary() {
+        public void buildMethodsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.METHODS],
                         visibleMemberMaps[VisibleMemberMap.METHODS]);
@@ -283,7 +266,7 @@
         /**
          * Build the inherited method summary.
          */
-        public void buildMethodsInheritedSummary() {
+        public void buildMethodsInheritedSummary(XMLNode node) {
                 buildInheritedSummary(
                         memberSummaryWriters[VisibleMemberMap.METHODS],
                         visibleMemberMaps[VisibleMemberMap.METHODS]);
@@ -292,7 +275,7 @@
         /**
          * Build the constructor summary.
          */
-        public void buildConstructorsSummary() {
+        public void buildConstructorsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS],
                         visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS]);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,7 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
+
 /**
  * Builds documentation for a method.
  *
@@ -112,22 +112,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of methods that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -158,21 +142,21 @@
         /**
          * Build the method documentation.
          */
-        public void buildMethodDoc(List<?> elements) {
+        public void buildMethodDoc(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentMethodIndex = 0;
                         currentMethodIndex < methods.size();
                         currentMethodIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Method_Detail"));
@@ -181,7 +165,7 @@
         /**
          * Build the header for the individual method.
          */
-        public void buildMethodHeader() {
+        public void buildMethodHeader(XMLNode node) {
                 writer.writeMethodHeader(
                         (MethodDoc) methods.get(currentMethodIndex),
                         currentMethodIndex == 0);
@@ -190,14 +174,14 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature((MethodDoc) methods.get(currentMethodIndex));
         }
 
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated((MethodDoc) methods.get(currentMethodIndex));
         }
 
@@ -205,7 +189,7 @@
          * Build the comments for the method.  Do nothing if
          * {@link Configuration#nocomment} is set to true.  If this method
          */
-        public void buildMethodComments() {
+        public void buildMethodComments(XMLNode node) {
                 if (!configuration.nocomment) {
             MethodDoc method = (MethodDoc) methods.get(currentMethodIndex);
 
@@ -228,21 +212,21 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags((MethodDoc) methods.get(currentMethodIndex));
         }
 
         /**
          * Build the footer of the method.
          */
-        public void buildMethodFooter() {
+        public void buildMethodFooter(XMLNode node) {
                 writer.writeMethodFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the summary for a given package.
@@ -85,22 +83,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Build the package summary.
          */
         public void build() throws IOException {
@@ -121,8 +103,8 @@
         /**
          * Build the package documentation.
          */
-        public void buildPackageDoc(List<?> elements) throws Exception {
-                build(elements);
+        public void buildPackageDoc(XMLNode node) throws Exception {
+                buildChildren(node);
                 packageWriter.close();
                 Util.copyDocFiles(
                         configuration,
@@ -136,14 +118,14 @@
         /**
          * Build the header of the summary.
          */
-        public void buildPackageHeader() {
+        public void buildPackageHeader(XMLNode node) {
                 packageWriter.writePackageHeader(Util.getPackageName(packageDoc));
         }
 
         /**
          * Build the description of the summary.
          */
-        public void buildPackageDescription() {
+        public void buildPackageDescription(XMLNode node) {
                 if (configuration.nocomment) {
                         return;
                 }
@@ -153,7 +135,7 @@
         /**
          * Build the tags of the summary.
          */
-        public void buildPackageTags() {
+        public void buildPackageTags(XMLNode node) {
                 if (configuration.nocomment) {
                         return;
                 }
@@ -163,28 +145,28 @@
         /**
          * Build the package summary.
          */
-        public void buildSummary(List<?> elements) {
-                build(elements);
+        public void buildSummary(XMLNode node) {
+                buildChildren(node);
         }
 
         /**
          * Build the overall header.
          */
-        public void buildSummaryHeader() {
+        public void buildSummaryHeader(XMLNode node) {
                 packageWriter.writeSummaryHeader();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildSummaryFooter() {
+        public void buildSummaryFooter(XMLNode node) {
                 packageWriter.writeSummaryFooter();
         }
 
         /**
          * Build the summary for the classes in this package.
          */
-        public void buildClassSummary() {
+        public void buildClassSummary(XMLNode node) {
             String classTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Class_Summary"),
@@ -209,7 +191,7 @@
         /**
          * Build the summary for the interfaces in this package.
          */
-        public void buildInterfaceSummary() {
+        public void buildInterfaceSummary(XMLNode node) {
             String interfaceTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Interface_Summary"),
@@ -234,7 +216,7 @@
         /**
          * Build the summary for the enums in this package.
          */
-        public void buildAnnotationTypeSummary() {
+        public void buildAnnotationTypeSummary(XMLNode node) {
             String annotationtypeTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Annotation_Types_Summary"),
@@ -259,7 +241,7 @@
         /**
          * Build the summary for the enums in this package.
          */
-        public void buildEnumSummary() {
+        public void buildEnumSummary(XMLNode node) {
             String enumTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Enum_Summary"),
@@ -284,7 +266,7 @@
         /**
          * Build the summary for the exceptions in this package.
          */
-        public void buildExceptionSummary() {
+        public void buildExceptionSummary(XMLNode node) {
             String exceptionTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Exception_Summary"),
@@ -309,7 +291,7 @@
         /**
          * Build the summary for the errors in this package.
          */
-        public void buildErrorSummary() {
+        public void buildErrorSummary(XMLNode node) {
             String errorTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Error_Summary"),
@@ -334,7 +316,7 @@
         /**
          * Build the footer of the summary.
          */
-        public void buildPackageFooter() {
+        public void buildPackageFooter(XMLNode node) {
                 packageWriter.writePackageFooter();
         }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java	Thu Jul 29 22:02:45 2010 -0700
@@ -26,7 +26,6 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.io.*;
-import java.lang.reflect.*;
 import java.util.*;
 
 import com.sun.javadoc.*;
@@ -132,47 +131,33 @@
     /**
      * Build the serialized form.
      */
-    public void buildSerializedForm(List<?> elements) throws Exception {
-        build(elements);
+    public void buildSerializedForm(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
      * Build the header.
      */
-    public void buildHeader() {
+    public void buildHeader(XMLNode node) {
         writer.writeHeader(configuration.getText("doclet.Serialized_Form"));
     }
 
     /**
      * Build the contents.
      */
-    public void buildSerializedFormSummaries(List<?> elements) {
+    public void buildSerializedFormSummaries(XMLNode node) {
         PackageDoc[] packages = configuration.packages;
         for (int i = 0; i < packages.length; i++) {
             currentPackage = packages[i];
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
      * Build the package serialized for for the current package being processed.
      */
-    public void buildPackageSerializedForm(List<?> elements) {
+    public void buildPackageSerializedForm(XMLNode node) {
         String foo = currentPackage.name();
         ClassDoc[] classes = currentPackage.allClasses(false);
         if (classes == null || classes.length == 0) {
@@ -184,14 +169,14 @@
         if (!serialClassFoundToDocument(classes)) {
             return;
         }
-        build(elements);
+        buildChildren(node);
     }
 
-    public void buildPackageHeader() {
+    public void buildPackageHeader(XMLNode node) {
         writer.writePackageHeader(Util.getPackageName(currentPackage));
     }
 
-    public void buildClassSerializedForm(List<?> elements) {
+    public void buildClassSerializedForm(XMLNode node) {
         ClassDoc[] classes = currentPackage.allClasses(false);
         Arrays.sort(classes);
         for (int j = 0; j < classes.length; j++) {
@@ -202,19 +187,19 @@
                 if(!serialClassInclude(currentClass)) {
                     continue;
                 }
-                build(elements);
+                buildChildren(node);
             }
         }
     }
 
-    public void buildClassHeader() {
+    public void buildClassHeader(XMLNode node) {
         writer.writeClassHeader(currentClass);
     }
 
     /**
      * Build the serial UID information for the given class.
      */
-    public void buildSerialUIDInfo() {
+    public void buildSerialUIDInfo(XMLNode node) {
         FieldDoc[] fields = currentClass.fields(false);
         for (int i = 0; i < fields.length; i++) {
             if (fields[i].name().equals("serialVersionUID") &&
@@ -229,7 +214,7 @@
     /**
      * Build the footer.
      */
-    public void buildFooter() {
+    public void buildFooter(XMLNode node) {
         writer.writeFooter();
     }
 
@@ -316,7 +301,7 @@
     /**
      * Build the method header.
      */
-    public void buildMethodHeader() {
+    public void buildMethodHeader(XMLNode node) {
         if (currentClass.serializationMethods().length > 0) {
             methodWriter.writeHeader(
                 configuration.getText("doclet.Serialized_Form_methods"));
@@ -333,28 +318,28 @@
     /**
      * Build the method sub header.
      */
-    public void buildMethodSubHeader()  {
+    public void buildMethodSubHeader(XMLNode node)  {
         methodWriter.writeMemberHeader((MethodDoc) currentMember);
     }
 
     /**
      * Build the deprecated method description.
      */
-    public void buildDeprecatedMethodInfo() {
+    public void buildDeprecatedMethodInfo(XMLNode node) {
         methodWriter.writeDeprecatedMemberInfo((MethodDoc) currentMember);
     }
 
     /**
      * Build method tags.
      */
-    public void buildMethodDescription() {
+    public void buildMethodDescription(XMLNode node) {
         methodWriter.writeMemberDescription((MethodDoc) currentMember);
     }
 
     /**
      * Build the method tags.
      */
-    public void buildMethodTags() {
+    public void buildMethodTags(XMLNode node) {
         methodWriter.writeMemberTags((MethodDoc) currentMember);
         MethodDoc method = (MethodDoc)currentMember;
         if (method.name().compareTo("writeExternal") == 0
@@ -370,24 +355,24 @@
     /**
      * build the information for the method.
      */
-    public void buildMethodInfo(List<?> elements)  {
+    public void buildMethodInfo(XMLNode node)  {
         if(configuration.nocomment){
             return;
         }
-        build(elements);
+        buildChildren(node);
     }
 
     /**
      * Build the method footer.
      */
-    public void buildMethodFooter() {
+    public void buildMethodFooter(XMLNode node) {
         methodWriter.writeMemberFooter();
     }
 
     /**
      * Build the field header.
      */
-    public void buildFieldHeader() {
+    public void buildFieldHeader(XMLNode node) {
         if (currentClass.serializableFields().length > 0) {
             buildFieldSerializationOverview(currentClass);
             fieldWriter.writeHeader(configuration.getText(
@@ -426,7 +411,7 @@
     /**
      * Build the field sub header.
      */
-    public void buildFieldSubHeader() {
+    public void buildFieldSubHeader(XMLNode node) {
         if (! currentClass.definesSerializableFields() ){
             FieldDoc field = (FieldDoc) currentMember;
             fieldWriter.writeMemberHeader(field.type().asClassDoc(),
@@ -437,7 +422,7 @@
     /**
      * Build the field deprecation information.
      */
-    public void buildFieldDeprecationInfo() {
+    public void buildFieldDeprecationInfo(XMLNode node) {
         if (!currentClass.definesSerializableFields()) {
             FieldDoc field = (FieldDoc)currentMember;
             fieldWriter.writeMemberDeprecatedInfo(field);
@@ -447,7 +432,7 @@
     /**
      * Build the field information.
      */
-    public void buildFieldInfo() {
+    public void buildFieldInfo(XMLNode node) {
         if(configuration.nocomment){
             return;
         }
@@ -483,7 +468,7 @@
     /**
      * Build the field sub footer.
      */
-    public void buildFieldSubFooter() {
+    public void buildFieldSubFooter(XMLNode node) {
         if (! currentClass.definesSerializableFields()) {
             fieldWriter.writeMemberFooter();
         }
@@ -493,12 +478,12 @@
      * Build the summaries for the methods that belong to the given
      * class.
      */
-    public void buildSerializableMethods(List<?> elements) {
+    public void buildSerializableMethods(XMLNode node) {
         MemberDoc[] members = currentClass.serializationMethods();
         if (members.length > 0) {
             for (int i = 0; i < members.length; i++) {
                 currentMember = members[i];
-                build(elements);
+                buildChildren(node);
             }
         }
     }
@@ -507,12 +492,12 @@
      * Build the summaries for the fields that belong to the given
      * class.
      */
-    public void buildSerializableFields(List<?> elements) {
+    public void buildSerializableFields(XMLNode node) {
         MemberDoc[] members = currentClass.serializableFields();
         if (members.length > 0) {
             for (int i = 0; i < members.length; i++) {
                 currentMember = members[i];
-                build(elements);
+                buildChildren(node);
             }
         }
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.doclets.internal.toolkit.builders;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Simple class to represent the attribute and elements of an XML node.
+ */
+public class XMLNode {
+    XMLNode(XMLNode parent, String qname) {
+        this.parent = parent;
+        name = qname;
+        attrs = new HashMap<String,String>();
+        children = new ArrayList<XMLNode>();
+
+        if (parent != null)
+            parent.children.add(this);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("<");
+        sb.append(name);
+        for (Map.Entry<String,String> e: attrs.entrySet())
+            sb.append(" " + e.getKey() + "=\"" + e.getValue() + "\"");
+        if (children.size() == 0)
+            sb.append("/>");
+        else {
+            sb.append(">");
+            for (XMLNode c: children)
+                sb.append(c.toString());
+            sb.append("</" + name + ">");
+        }
+        return sb.toString();
+    }
+
+    final XMLNode parent;
+    final String name;
+    final Map<String,String> attrs;
+    final List<XMLNode> children;
+}
--- a/langtools/src/share/classes/com/sun/tools/javac/Launcher.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/Launcher.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,7 +41,7 @@
  * of a <em>project</em>).  Simply ensure that this class is added to
  * the project and make it the main class of the project.</p>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/Server.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/Server.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,7 +36,7 @@
  * Java Compiler Server.  Can be used to speed up a set of (small)
  * compilation tasks by caching jar files between compilations.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,7 +33,7 @@
  * Provides simple functionalities for javac diagnostic formatting.
  * @param <D> type of diagnostic handled by this formatter
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,7 +31,7 @@
  * This interface must be implemented by any javac class that has non-trivial
  * formatting needs (e.g. where toString() does not apply because of localization).
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacScope.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacScope.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,7 +38,7 @@
 /**
  * Provides an implementation of Scope.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Thu Jul 29 22:02:45 2010 -0700
@@ -54,9 +54,9 @@
 import com.sun.tools.javac.main.JavaCompiler;
 
 /**
- * Provides access to functionality specific to the Sun Java Compiler, javac.
+ * Provides access to functionality specific to the JDK Java Compiler, javac.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
@@ -502,7 +502,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public Context getContext() {
@@ -510,7 +510,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public void updateContext(Context newContext) {
@@ -518,7 +518,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public Type parseType(String expr, TypeElement scope) {
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -57,7 +57,7 @@
 /**
  * TODO: describe com.sun.tools.javac.api.Tool
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu Jul 29 22:02:45 2010 -0700
@@ -71,7 +71,7 @@
 /**
  * Provides an implementation of Trees.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,7 +32,7 @@
  * This interface defines the minimum requirements in order to provide support
  * for localized formatted strings.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,7 +42,7 @@
  * <p>This class might be moved to {@link javax.tools} in a future
  * release.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,8 +38,8 @@
 
 /** An annotation value.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,7 +27,7 @@
 
 /**
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,8 +33,8 @@
 
 /** Access flags and other modifiers for Java classes and members.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -226,7 +226,7 @@
     public static final long HYPOTHETICAL   = 1L<<37;
 
     /**
-     * Flag that marks a Sun proprietary class.
+     * Flag that marks an internal proprietary class.
      */
     public static final long PROPRIETARY = 1L<<38;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,8 +38,8 @@
  *  different subclasses of Symbol. Symbol kinds are organized so they can be
  *  or'ed to sets.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -92,7 +92,7 @@
     public static final int ABSENT_TYP   = ERRONEOUS+8; // missing type
 
     public enum KindName implements Formattable {
-        ANNOTATION("kindname.interface"),
+        ANNOTATION("kindname.annotation"),
         CONSTRUCTOR("kindname.constructor"),
         INTERFACE("kindname.interface"),
         ENUM("kindname.enum"),
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,8 +39,8 @@
 /**
  * A class for handling -Xlint suboptions and @SuppresssWarnings.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -196,14 +196,19 @@
         RAW("rawtypes"),
 
         /**
-         * Warn about Sun proprietary API that may be removed in a future release.
+         * Warn about proprietary API that may be removed in a future release.
          */
         SUNAPI("sunapi", true),
 
         /**
          * Warn about issues relating to use of statics
          */
-        STATIC("static");
+        STATIC("static"),
+
+        /**
+         * Warn about potentially unsafe vararg methods
+         */
+        VARARGS("varargs");
 
         LintCategory(String option) {
             this(option, false);
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,7 +41,7 @@
  * A combined type/symbol visitor for generating non-trivial localized string
  * representation of types and symbols.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
  *  as hash tables. Scopes can be nested; the next field of a scope points
  *  to its next outer scope. Nested scopes can share their hash tables.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,8 +33,8 @@
 
 /** The source language version accepted.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Jul 29 22:02:45 2010 -0700
@@ -49,8 +49,8 @@
  *  types, packages. Each subclass is represented as a static inner class
  *  inside Symbol.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,8 +42,8 @@
  *  fields. This makes it possible to work in multiple concurrent
  *  projects, which might use different class files for library classes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -452,7 +452,7 @@
         synthesizeBoxTypeIfMissing(floatType);
         synthesizeBoxTypeIfMissing(voidType);
 
-        // Enter a synthetic class that is used to mark Sun
+        // Enter a synthetic class that is used to mark internal
         // proprietary classes in ct.sym.  This class does not have a
         // class file.
         ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation");
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,8 +39,8 @@
  * annotation targets a type argument in a local variable, method return type,
  * or a typecast).
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Jul 29 22:02:45 2010 -0700
@@ -56,8 +56,8 @@
  *  the error type (tag: ERROR, class: ErrorType).
  *  </pre>
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  *
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
 
 /** A type annotation position.
 *
-*  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
-*  you write code that depends on this, you do so at your own risk.
+*  <p><b>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.</b>
 */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
 /** An interface for type tag values, which distinguish between different
  *  sorts of types.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Jul 29 22:02:45 2010 -0700
@@ -58,7 +58,7 @@
  * <dd>A second list of types should be named ss.</dd>
  * </dl>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,8 +35,8 @@
  *  which is processed at the top level of any set of recursive calls
  *  requesting it be processed.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Jul 29 22:02:45 2010 -0700
@@ -59,8 +59,8 @@
  *  @see ConstFold
  *  @see Infer
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -161,7 +161,7 @@
     boolean useBeforeDeclarationWarning;
 
     /**
-     * Switch: allow lint infrastructure to control Sun proprietary
+     * Switch: allow lint infrastructure to control proprietary
      * API warnings.
      */
     boolean enableSunApiLintControl;
@@ -652,6 +652,8 @@
                 attribStat(l.head, localEnv);
             }
 
+            chk.checkVarargMethodDecl(tree);
+
             // Check that type parameters are well-formed.
             chk.validate(tree.typarams, localEnv);
             if ((owner.flags() & ANNOTATION) != 0 &&
@@ -2635,10 +2637,11 @@
             }
             if (useVarargs) {
                 JCTree tree = env.tree;
+                Type argtype = owntype.getParameterTypes().last();
                 if (owntype.getReturnType().tag != FORALL || warned) {
-                    chk.checkVararg(env.tree.pos(), owntype.getParameterTypes());
+                    chk.checkVararg(env.tree.pos(), owntype.getParameterTypes(), sym, env);
                 }
-                Type elemtype = types.elemtype(owntype.getParameterTypes().last());
+                Type elemtype = types.elemtype(argtype);
                 switch (tree.getTag()) {
                 case JCTree.APPLY:
                     ((JCMethodInvocation) tree).varargsElement = elemtype;
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 /** Contains information specific to the attribute and enter
  *  passes, to be used in place of the generic field in environments.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContextEnv.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContextEnv.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 
 /** {@code Env<A>} specialized as {@code Env<AttrContext>}
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Jul 29 22:02:45 2010 -0700
@@ -47,8 +47,8 @@
 
 /** Type checking helper class for the attribution phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -64,6 +64,7 @@
     private final JCDiagnostic.Factory diags;
     private final boolean skipAnnotations;
     private boolean warnOnSyntheticConflicts;
+    private boolean suppressAbortOnBadClassFile;
     private final TreeInfo treeinfo;
 
     // The set of lint options currently in effect. It is initialized
@@ -98,12 +99,14 @@
         complexInference = options.get("-complexinference") != null;
         skipAnnotations = options.get("skipAnnotations") != null;
         warnOnSyntheticConflicts = options.get("warnOnSyntheticConflicts") != null;
+        suppressAbortOnBadClassFile = options.get("suppressAbortOnBadClassFile") != null;
 
         Target target = Target.instance(context);
         syntheticNameChar = target.syntheticNameChar();
 
         boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
         boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
+        boolean verboseVarargs = lint.isEnabled(LintCategory.VARARGS);
         boolean verboseSunApi = lint.isEnabled(LintCategory.SUNAPI);
         boolean enforceMandatoryWarnings = source.enforceMandatoryWarnings();
 
@@ -111,6 +114,8 @@
                 enforceMandatoryWarnings, "deprecated");
         uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
                 enforceMandatoryWarnings, "unchecked");
+        unsafeVarargsHandler = new MandatoryWarningHandler(log, verboseVarargs,
+                enforceMandatoryWarnings, "varargs");
         sunApiHandler = new MandatoryWarningHandler(log, verboseSunApi,
                 enforceMandatoryWarnings, "sunapi");
     }
@@ -148,7 +153,11 @@
      */
     private MandatoryWarningHandler uncheckedHandler;
 
-    /** A handler for messages about using Sun proprietary API.
+    /** A handler for messages about unchecked or unsafe vararg method decl.
+     */
+    private MandatoryWarningHandler unsafeVarargsHandler;
+
+    /** A handler for messages about using proprietary API.
      */
     private MandatoryWarningHandler sunApiHandler;
 
@@ -180,7 +189,16 @@
             uncheckedHandler.report(pos, msg, args);
     }
 
-    /** Warn about using Sun proprietary API.
+    /** Warn about unsafe vararg method decl.
+     *  @param pos        Position to be used for error reporting.
+     *  @param sym        The deprecated symbol.
+     */
+    void warnUnsafeVararg(DiagnosticPosition pos, Type elemType) {
+        if (!lint.isSuppressed(LintCategory.VARARGS))
+            unsafeVarargsHandler.report(pos, "varargs.non.reifiable.type", elemType);
+    }
+
+    /** Warn about using proprietary API.
      *  @param pos        Position to be used for error reporting.
      *  @param msg        A string describing the problem.
      */
@@ -200,6 +218,7 @@
     public void reportDeferredDiagnostics() {
         deprecationHandler.reportDeferredDiagnostic();
         uncheckedHandler.reportDeferredDiagnostic();
+        unsafeVarargsHandler.reportDeferredDiagnostic();
         sunApiHandler.reportDeferredDiagnostic();
     }
 
@@ -210,7 +229,8 @@
      */
     public Type completionError(DiagnosticPosition pos, CompletionFailure ex) {
         log.error(pos, "cant.access", ex.sym, ex.getDetailValue());
-        if (ex instanceof ClassReader.BadClassFile) throw new Abort();
+        if (ex instanceof ClassReader.BadClassFile
+                && !suppressAbortOnBadClassFile) throw new Abort();
         else return syms.errType;
     }
 
@@ -543,7 +563,7 @@
             while (args.nonEmpty()) {
                 if (args.head.tag == WILDCARD)
                     return typeTagError(pos,
-                                        Log.getLocalizedString("type.req.exact"),
+                                        diags.fragment("type.req.exact"),
                                         args.head);
                 args = args.tail;
             }
@@ -677,17 +697,33 @@
         }
     }
 
+    void checkVarargMethodDecl(JCMethodDecl tree) {
+        MethodSymbol m = tree.sym;
+        //check the element type of the vararg
+        if (m.isVarArgs()) {
+            Type varargElemType = types.elemtype(tree.params.last().type);
+            if (!types.isReifiable(varargElemType)) {
+                warnUnsafeVararg(tree.params.head.pos(), varargElemType);
+            }
+        }
+    }
+
     /**
      * Check that vararg method call is sound
      * @param pos Position to be used for error reporting.
      * @param argtypes Actual arguments supplied to vararg method.
      */
-    void checkVararg(DiagnosticPosition pos, List<Type> argtypes) {
+    void checkVararg(DiagnosticPosition pos, List<Type> argtypes, Symbol msym, Env<AttrContext> env) {
+        Env<AttrContext> calleeLintEnv = env;
+        while (calleeLintEnv.info.lint == null)
+            calleeLintEnv = calleeLintEnv.next;
+        Lint calleeLint = calleeLintEnv.info.lint.augment(msym.attributes_field, msym.flags());
         Type argtype = argtypes.last();
-        if (!types.isReifiable(argtype))
+        if (!types.isReifiable(argtype) && !calleeLint.isSuppressed(Lint.LintCategory.VARARGS)) {
             warnUnchecked(pos,
                               "unchecked.generic.array.creation",
                               argtype);
+        }
     }
 
     /** Check that given modifiers are legal for given symbol and
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/ConstFold.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/ConstFold.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,8 +37,8 @@
 /** Helper class for constant folding, used by the attribution phase.
  *  This class is marked strictfp as mandated by JLS 15.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Enter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Enter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -82,8 +82,8 @@
  *                                              (only for toplevel classes)
  *  </pre>
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
  *  a generic component, represented as a type parameter, to carry further
  *  information specific to individual passes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Jul 29 22:02:45 2010 -0700
@@ -170,8 +170,8 @@
  *  allow unqualified forms only, parentheses optional, and phase out
  *  support for assigning to a final field via this.x.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,8 +37,8 @@
 
 /** Helper class for type parameter inference, used by the attribution phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -290,6 +290,7 @@
     public Type instantiateMethod(final Env<AttrContext> env,
                                   List<Type> tvars,
                                   MethodType mt,
+                                  final Symbol msym,
                                   final List<Type> argtypes,
                                   final boolean allowBoxing,
                                   final boolean useVarargs,
@@ -418,7 +419,7 @@
                     checkWithinBounds(all_tvars,
                            types.subst(inferredTypes, tvars, inferred), warn);
                     if (useVarargs) {
-                        chk.checkVararg(env.tree.pos(), formals);
+                        chk.checkVararg(env.tree.pos(), formals, msym, env);
                     }
                     return super.inst(inferred, types);
             }};
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Jul 29 22:02:45 2010 -0700
@@ -48,8 +48,8 @@
 /** This pass translates away some syntactic sugar: inner classes,
  *  class literals, assertions, foreach loops, etc.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -674,6 +674,40 @@
         return rs.resolveInternalField(pos, attrEnv, qual, name);
     }
 
+    /** Anon inner classes are used as access constructor tags.
+     * accessConstructorTag will use an existing anon class if one is available,
+     * and synthethise a class (with makeEmptyClass) if one is not available.
+     * However, there is a small possibility that an existing class will not
+     * be generated as expected if it is inside a conditional with a constant
+     * expression. If that is found to be the case, create an empty class here.
+     */
+    private void checkAccessConstructorTags() {
+        for (List<ClassSymbol> l = accessConstrTags; l.nonEmpty(); l = l.tail) {
+            ClassSymbol c = l.head;
+            if (isTranslatedClassAvailable(c))
+                continue;
+            // Create class definition tree.
+            JCClassDecl cdef = make.ClassDef(
+                make.Modifiers(STATIC | SYNTHETIC), names.empty,
+                List.<JCTypeParameter>nil(),
+                null, List.<JCExpression>nil(), List.<JCTree>nil());
+            cdef.sym = c;
+            cdef.type = c.type;
+            // add it to the list of classes to be generated
+            translated.append(cdef);
+        }
+    }
+    // where
+    private boolean isTranslatedClassAvailable(ClassSymbol c) {
+        for (JCTree tree: translated) {
+            if (tree.getTag() == JCTree.CLASSDEF
+                    && ((JCClassDecl) tree).sym == c) {
+                return true;
+            }
+        }
+        return false;
+    }
+
 /**************************************************************************
  * Access methods
  *************************************************************************/
@@ -718,6 +752,10 @@
      */
     private Map<Symbol,MethodSymbol> accessConstrs;
 
+    /** A list of all class symbols used for access constructor tags.
+     */
+    private List<ClassSymbol> accessConstrTags;
+
     /** A queue for all accessed symbols.
      */
     private ListBuffer<Symbol> accessed;
@@ -1138,6 +1176,8 @@
         ClassSymbol ctag = chk.compiled.get(flatname);
         if (ctag == null)
             ctag = makeEmptyClass(STATIC | SYNTHETIC, topClass);
+        // keep a record of all tags, to verify that all are generated as required
+        accessConstrTags = accessConstrTags.prepend(ctag);
         return ctag;
     }
 
@@ -3394,6 +3434,7 @@
             accessNums = new HashMap<Symbol,Integer>();
             accessSyms = new HashMap<Symbol,MethodSymbol[]>();
             accessConstrs = new HashMap<Symbol,MethodSymbol>();
+            accessConstrTags = List.nil();
             accessed = new ListBuffer<Symbol>();
             translate(cdef, (JCExpression)null);
             for (List<Symbol> l = accessed.toList(); l.nonEmpty(); l = l.tail)
@@ -3401,6 +3442,7 @@
             for (EnumMapping map : enumSwitchMap.values())
                 map.translate();
             checkConflicts(this.translated.toList());
+            checkAccessConstructorTags();
             translated = this.translated;
         } finally {
             // note that recursive invocations of this method fail hard
@@ -3420,6 +3462,7 @@
             accessNums = null;
             accessSyms = null;
             accessConstrs = null;
+            accessConstrTags = null;
             accessed = null;
             enumSwitchMap.clear();
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -48,8 +48,8 @@
  *  by entering their members into the class scope using
  *  MemberEnter.complete().  See Enter for an overview.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu Jul 29 22:02:45 2010 -0700
@@ -47,8 +47,8 @@
 
 /** Helper class for name resolution, used mostly by the attribution phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -349,6 +349,7 @@
             infer.instantiateMethod(env,
                                     tvars,
                                     (MethodType)mt,
+                                    m,
                                     argtypes,
                                     allowBoxing,
                                     useVarargs,
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
 
 /** A queue of all as yet unattributed classes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,8 +43,8 @@
 
 /** This pass translates Generic Java to conventional Java.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,7 +42,7 @@
 import com.sun.tools.javac.util.BaseFileManager;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,7 +36,7 @@
 /**
  * Caching implementation of FSInfo.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java	Thu Jul 29 22:02:45 2010 -0700
@@ -17,7 +17,7 @@
  * Get meta-info about files. Default direct (non-caching) implementation.
  * @see CacheFSInfo
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -68,7 +68,7 @@
  * This class provides access to the source, class and other files
  * used by the compiler and related tools.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java	Thu Jul 29 22:02:45 2010 -0700
@@ -54,8 +54,8 @@
  *  into a boot class path, user class path, and source path (in
  *  Collection<String> form).
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Jul 29 22:02:45 2010 -0700
@@ -44,7 +44,7 @@
 /**
  * A subclass of JavaFileObject representing regular files.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,7 +35,7 @@
  * container, such as a directory or zip file.
  * Internally, the file separator is always '/'.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,7 +36,7 @@
 import com.sun.tools.javac.util.List;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java	Thu Jul 29 22:02:45 2010 -0700
@@ -51,7 +51,7 @@
 import java.lang.ref.SoftReference;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Jul 29 22:02:45 2010 -0700
@@ -69,7 +69,7 @@
  * checking to reindex the zip files if it is needed. In batch mode the timestamps are not checked
  * and the compiler uses the cached indexes.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java	Thu Jul 29 22:02:45 2010 -0700
@@ -45,7 +45,7 @@
 import com.sun.tools.javac.util.List;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
 /** Bytecode instruction codes, as well as typecodes used as
  *  instruction modifiers.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTFlags.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTFlags.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 
 /** The CharacterRangeTable flags indicating type of an entry.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTable.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTable.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
  *  and the hashtable for mapping trees or lists of trees to their
  *  ending positions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Thu Jul 29 22:02:45 2010 -0700
@@ -59,8 +59,8 @@
  *  as routines to convert between internal ``.'' and external ``/''
  *  separators in class names.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b> */
 public class ClassFile {
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Jul 29 22:02:45 2010 -0700
@@ -62,8 +62,8 @@
  *  for all other definitions in the classfile. Top-level Classes themselves
  *  appear as members of the scopes of PackageSymbols.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -49,8 +49,8 @@
 /** This class provides operations to map an internal symbol table graph
  *  rooted in a ClassSymbol into a classfile.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,8 +39,8 @@
  *  methods in a classfile. The class also provides some utility operations to
  *  generate bytecode instructions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Jul 29 22:02:45 2010 -0700
@@ -49,8 +49,8 @@
 
 /** This pass maps flat Java (i.e. without inner classes) to bytecodes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,8 +43,8 @@
  *  special values this or super, etc. Individual items are represented as
  *  inner classes in class Items.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 
 /** An internal structure that corresponds to the constant pool of a classfile.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,8 +33,8 @@
 
 /** The classfile version target.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/UninitializedType.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/UninitializedType.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 /** These pseudo-types appear in the generated verifier tables to
  *  indicate objects that have been allocated but not yet constructed.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/main/CommandLine.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/CommandLine.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,8 +35,8 @@
 /**
  * Various utility methods for processing Java tool command line arguments.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Jul 29 22:02:45 2010 -0700
@@ -73,8 +73,8 @@
  *  construct a new compiler, and to run a new compiler on a set of source
  *  files.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -111,14 +111,14 @@
             try {
                 versionRB = ResourceBundle.getBundle(versionRBName);
             } catch (MissingResourceException e) {
-                return Log.getLocalizedString("version.resource.missing", System.getProperty("java.version"));
+                return Log.getLocalizedString("version.not.available");
             }
         }
         try {
             return versionRB.getString(key);
         }
         catch (MissingResourceException e) {
-            return Log.getLocalizedString("version.unknown", System.getProperty("java.version"));
+            return Log.getLocalizedString("version.not.available");
         }
     }
 
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,7 +34,7 @@
 /**
  * TODO: describe com.sun.tools.javac.main.JavacOption
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java	Thu Jul 29 22:02:45 2010 -0700
@@ -47,8 +47,8 @@
 
 /** This class provides a commandline interface to the GJC compiler.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,7 @@
 /**
  * TODO: describe com.sun.tools.javac.main.OptionName
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java	Thu Jul 29 22:02:45 2010 -0700
@@ -49,7 +49,7 @@
 /**
  * TODO: describe com.sun.tools.javac.main.RecognizedOptions
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java	Thu Jul 29 22:02:45 2010 -0700
@@ -50,8 +50,8 @@
  * <p> The "dynamic proxy return form" of an annotation element value is
  * the form used by sun.reflect.annotation.AnnotationInvocationHandler.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- * you write code that depends on this, you do so at your own risk.
+ * <p><b>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.</b>
  */
@@ -181,16 +181,16 @@
         }
 
         public void visitArray(Attribute.Array a) {
-            Name elemName = ((ArrayType) a.type).elemtype.tsym.name;
+            Name elemName = ((ArrayType) a.type).elemtype.tsym.getQualifiedName();
 
-            if (elemName == elemName.table.names.java_lang_Class) {   // Class[]
+            if (elemName.equals(elemName.table.names.java_lang_Class)) {   // Class[]
                 // Construct a proxy for a MirroredTypesException
-                List<TypeMirror> elems = List.nil();
+                ListBuffer<TypeMirror> elems = new ListBuffer<TypeMirror>();
                 for (Attribute value : a.values) {
                     Type elem = ((Attribute.Class) value).type;
-                    elems.add(elem);
+                    elems.append(elem);
                 }
-                value = new MirroredTypesExceptionProxy(elems);
+                value = new MirroredTypesExceptionProxy(elems.toList());
 
             } else {
                 int len = a.values.length;
--- a/langtools/src/share/classes/com/sun/tools/javac/model/FilteredMemberList.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/FilteredMemberList.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,8 +38,8 @@
  * filtering out unwanted elements such as synthetic ones.
  * This view is most efficiently accessed through its iterator() method.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- * you write code that depends on this, you do so at your own risk.
+ * <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java	Thu Jul 29 22:02:45 2010 -0700
@@ -53,7 +53,7 @@
 /**
  * Utility methods for operating on program elements.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacSourcePosition.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacSourcePosition.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,7 +31,7 @@
 /**
  * Implementation of model API SourcePosition based on javac internal state.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,7 +37,7 @@
 /**
  * Utility methods for operating on types.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -101,8 +101,8 @@
  *  <p>To reduce confusion with Path objects, the locations such as "class path",
  *  "source path", etc, are generically referred to here as "search paths".
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,8 +41,8 @@
  *  getStandardFileManager}. However, would need to be handled carefully
  *  as another forward reference from langtools to jdk.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java	Thu Jul 29 22:02:45 2010 -0700
@@ -56,8 +56,8 @@
  *  different factory methods, which compute the binary name based on
  *  information available at the time the file object is created.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,8 +35,8 @@
  *  translating Unicode escape sequences and by stripping the
  *  leading whitespace and starts from each line of the comment.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/EndPosParser.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/EndPosParser.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,7 +36,7 @@
  * This class is similar to Parser except that it stores ending
  * positions for the tree nodes.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,8 +43,8 @@
  *  operator precedence scheme is used for parsing binary operation
  *  expressions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Keywords.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Keywords.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,7 +35,7 @@
 /**
  * Map from Name to Token and Token to String.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Lexer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Lexer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,7 +32,7 @@
  * The lexical analyzer maps an input stream consisting of ASCII
  * characters and Unicode escapes into a token sequence.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Parser.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Parser.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,7 +34,7 @@
  * Reads syntactic units from source code.
  * Parsers are normally created from a ParserFactory.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,7 +35,7 @@
 /**
  * A factory for creating parsers.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,8 +38,8 @@
 /** The lexical analyzer maps an input stream consisting of
  *  ASCII characters and Unicode escapes into a token sequence.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -419,7 +419,7 @@
                 putChar(ch);
             } else {
                 if (!allowUnderscoresInLiterals) {
-                    lexError("unsupported.underscore", source.name);
+                    lexError("unsupported.underscore.lit", source.name);
                     allowUnderscoresInLiterals = true;
                 }
             }
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Token.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Token.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,8 +33,8 @@
 /** An interface that defines codes for Java source tokens
  *  returned from lexical analysis.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/AnnotationProcessingError.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/AnnotationProcessingError.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,7 +29,7 @@
 /**
  * Error thrown for problems encountered during annotation processing.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java	Thu Jul 29 22:02:45 2010 -0700
@@ -87,7 +87,7 @@
  * class path can alter the behavior of the tool and any final
  * compile.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacMessager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacMessager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,7 +37,7 @@
 /**
  * An implementation of the Messager built on top of log.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Thu Jul 29 22:02:45 2010 -0700
@@ -81,7 +81,7 @@
  * Objects of this class hold and manage the state needed to support
  * annotation processing.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
@@ -745,7 +745,7 @@
      * Leave class public for external testing purposes.
      */
     public static class ComputeAnnotationSet extends
-        ElementScanner6<Set<TypeElement>, Set<TypeElement>> {
+        ElementScanner7<Set<TypeElement>, Set<TypeElement>> {
         final Elements elements;
 
         public ComputeAnnotationSet(Elements elements) {
@@ -1380,7 +1380,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public Context getContext() {
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,7 +40,7 @@
  * <p>The methods in this class do not take type annotations into account,
  * as target types, not java elements.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
@@ -125,7 +125,7 @@
         else
             throw new AssertionError("Bad implementation type for " + tm);
 
-        ElementScanner6<Set<Element>, DeclaredType> scanner =
+        ElementScanner7<Set<Element>, DeclaredType> scanner =
             new AnnotationSetScanner(result, typeUtil);
 
         for (Element element : rootElements)
@@ -136,7 +136,7 @@
 
     // Could be written as a local class inside getElementsAnnotatedWith
     private class AnnotationSetScanner extends
-        ElementScanner6<Set<Element>, DeclaredType> {
+        ElementScanner7<Set<Element>, DeclaredType> {
         // Insertion-order preserving set
         Set<Element> annotatedElements = new LinkedHashSet<Element>();
         Types typeUtil;
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,7 +42,7 @@
  * -Xprint option; the included visitor class is used to implement
  * Elements.printElements.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
@@ -83,7 +83,7 @@
      * Used for the -Xprint option and called by Elements.printElements
      */
     public static class PrintingElementVisitor
-        extends SimpleElementVisitor6<PrintingElementVisitor, Boolean> {
+        extends SimpleElementVisitor7<PrintingElementVisitor, Boolean> {
         int indentation; // Indentation level;
         final PrintWriter writer;
         final Elements elementUtils;
@@ -117,7 +117,7 @@
                     enclosing != null &&
                     NestingKind.ANONYMOUS ==
                     // Use an anonymous class to determine anonymity!
-                    (new SimpleElementVisitor6<NestingKind, Void>() {
+                    (new SimpleElementVisitor7<NestingKind, Void>() {
                         @Override
                         public NestingKind visitType(TypeElement e, Void p) {
                             return e.getNestingKind();
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,7 +37,7 @@
  * Utility class to determine if a service can be found on the
  * path that might be used to create a class loader.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -593,18 +593,32 @@
 compiler.note.unchecked.plural.additional=\
     Some input files additionally use unchecked or unsafe operations.
 
+compiler.note.varargs.filename=\
+    {0} declares unsafe vararg methods.
+compiler.note.varargs.plural=\
+    Some input files declare unsafe vararg methods.
+# The following string may appear after one of the above unsafe varargs
+# messages.
+compiler.note.varargs.recompile=\
+    Recompile with -Xlint:varargs for details.
+
+compiler.note.varargs.filename.additional=\
+    {0} declares additional unsafe vararg methods.
+compiler.note.varargs.plural.additional=\
+    Some input files additionally declares unsafe vararg methods.
+
 compiler.note.sunapi.filename=\
-    {0} uses Sun proprietary API that may be removed in a future release.
+    {0} uses internal proprietary API that may be removed in a future release.
 compiler.note.sunapi.plural=\
-    Some input files use Sun proprietary API that may be removed in a future release.
+    Some input files use internal proprietary API that may be removed in a future release.
 # The following string may appear after one of the above sunapi messages.
 compiler.note.sunapi.recompile=\
     Recompile with -Xlint:sunapi for details.
 
 compiler.note.sunapi.filename.additional=\
-    {0} uses additional Sun proprietary API that may be removed in a future release.
+    {0} uses additional internal proprietary API that may be removed in a future release.
 compiler.note.sunapi.plural.additional=\
-    Some input files additionally use Sun proprietary API that may be removed in a future release.
+    Some input files additionally use internal proprietary API that may be removed in a future release.
 
 # Notes related to annotation processing
 
@@ -623,6 +637,9 @@
 compiler.misc.count.warn.plural=\
     {0} warnings
 
+compiler.misc.version.not.available=\
+    (version info not available)
+
 ## extra output when using -verbose (JavaCompiler)
 
 compiler.misc.verbose.checking.attribution=\
@@ -687,7 +704,7 @@
     [deprecation] {0} in {1} has been deprecated
 
 compiler.warn.sun.proprietary=\
-    {0} is Sun proprietary API and may be removed in a future release
+    {0} is internal proprietary API and may be removed in a future release
 
 compiler.warn.illegal.char.for.encoding=\
     unmappable character for encoding {0}
@@ -796,6 +813,9 @@
 compiler.warn.unchecked.generic.array.creation=\
     [unchecked] unchecked generic array creation for varargs parameter of type {0}
 
+compiler.warn.varargs.non.reifiable.type=\
+    [varargs] Possible heap pollution from parameterized vararg type {0}
+
 compiler.warn.missing.deprecated.annotation=\
     [dep-ann] deprecated item is not annotated with @Deprecated
 
@@ -1019,7 +1039,7 @@
 ## diagnostics whose key ends in ".1"
 compiler.misc.undetermined.type=\
     undetermined type
-ncompiler.misc.type.variable.has.undetermined.type=\
+compiler.misc.type.variable.has.undetermined.type=\
     type variable {0} has undetermined type
 compiler.misc.no.unique.maximal.instance.exists=\
     no unique maximal instance exists for type variable {0} with upper bounds {1}
@@ -1105,6 +1125,8 @@
     @interface
 compiler.misc.kindname.constructor=\
     constructor
+compiler.misc.kindname.enum=\
+    enum
 compiler.misc.kindname.interface=\
     interface
 compiler.misc.kindname.static=\
@@ -1239,6 +1261,10 @@
     enums are not supported in -source {0}\n\
 (use -source 5 or higher to enable enums)
 
+compiler.err.diamond.not.supported.in.source=\
+    diamond operator is not supported in -source {0}\n\
+(use -source 7 or higher to enable multi-catch statement)
+
 compiler.err.multicatch.not.supported.in.source=\
     multi-catch statement is not supported in -source {0}\n\
 (use -source 7 or higher to enable multi-catch statement)
--- a/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Thu Jul 29 22:02:45 2010 -0700
@@ -77,7 +77,7 @@
  * <dd>Specifies the destination directory.</dd>
  * </dl>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Thu Jul 29 22:02:45 2010 -0700
@@ -66,7 +66,7 @@
  * <p>To avoid ambiguities with the Tree API in com.sun.source all sub
  * classes should, by convention, start with JC (javac).
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,8 +39,8 @@
 
 /** Prints out a tree as an indented Java source program.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
  * Creates a copy of a tree, using a given TreeMaker.
  * Names, literal values, etc are shared with the original.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,8 +38,8 @@
 
 /** Utility class containing inspector methods for trees.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu Jul 29 22:02:45 2010 -0700
@@ -39,8 +39,8 @@
 
 /** Factory class for trees.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
  *  do some interesting work. The scanner class itself takes care of all
  *  navigational aspects.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,8 +37,8 @@
  *  do some interesting work. The translator class itself takes care of all
  *  navigational aspects.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Abort.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Abort.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 /** Throwing an instance of
  *  this class causes (silent) termination of the main compiler method.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -57,7 +57,7 @@
  *  <li> Provides the formatting logic for rendering the arguments of a JCDiagnostic object.
  * <ul>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,8 +37,8 @@
  *  A base class for error logs. Reports errors and warnings, and
  *  keeps track of error numbers and positions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -58,7 +58,7 @@
  * <li>%_: space delimiter, useful for formatting purposes
  * </ul>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,8 +27,8 @@
 
 /** A class for extensible, mutable bit sets.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
  *  appended. There are also methods to append names to byte buffers
  *  and to convert byte buffers to names.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ClientCodeException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ClientCodeException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
  * An exception used for propogating exceptions found in client code
  * invoked from javac.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,8 +40,8 @@
  * fragile. Caveat emptor.
  * @throws Error if the internal data structures are not as expected.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Constants.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Constants.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
 /**
  * Utilities for operating on constant values.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- * you write code that depends on this, you do so at your own risk.
+ * <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java	Thu Jul 29 22:02:45 2010 -0700
@@ -91,8 +91,8 @@
  *     NewPhase.preRegister(context);
  * </pre>
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 /** Utility class for static conversion methods between numbers
  *  and strings in various formats.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,8 +40,8 @@
  * A simple abstraction of a source file, as needed for use in a diagnostic message.
  * Provides access to the line and position in a line for any given character offset.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/FatalError.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/FatalError.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
  *  of the main compiler method.  It is used when some non-recoverable
  *  error has been detected in the compiler environment at runtime.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,7 +38,7 @@
  * A delegated diagnostic formatter delegates all formatting
  * actions to an underlying formatter (aka the delegated formatter).
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,8 +38,8 @@
 
 /** An abstraction of a diagnostic message generated by the compiler.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,8 +37,8 @@
 /**
  *  Support for formatted localized messages.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,8 +28,8 @@
 /** An interface containing layout character constants used in Java
  *  programs.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/List.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/List.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,8 +43,8 @@
  *  <p>Lists are always trailed by a sentinel element, whose head and tail
  *  are both null.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -103,6 +103,7 @@
 
     /** Construct a list consisting of given elements.
      */
+    @SuppressWarnings("varargs")
     public static <A> List<A> of(A x1, A x2, A x3, A... rest) {
         return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest))));
     }
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ListBuffer.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ListBuffer.java	Thu Jul 29 22:02:45 2010 -0700
@@ -33,8 +33,8 @@
 /** A class for constructing lists by appending elements. Modelled after
  *  java.lang.StringBuffer.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,8 +41,8 @@
 /** A class for error logs. Reports errors and warnings, and
  *  keeps track of error numbers and positions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
@@ -125,8 +125,8 @@
         this.promptOnError = options.get("-prompt") != null;
         this.emitWarnings = options.get("-Xlint:none") == null;
         this.suppressNotes = options.get("suppressNotes") != null;
-        this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100);
-        this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100);
+        this.MaxErrors = getIntOption(options, "-Xmaxerrs", getDefaultMaxErrors());
+        this.MaxWarnings = getIntOption(options, "-Xmaxwarns", getDefaultMaxWarnings());
 
         boolean rawDiagnostics = options.get("rawDiagnostics") != null;
         messages = JavacMessages.instance(context);
@@ -155,6 +155,18 @@
             return defaultValue;
         }
 
+        /** Default value for -Xmaxerrs.
+         */
+        protected int getDefaultMaxErrors() {
+            return 100;
+        }
+
+        /** Default value for -Xmaxwarns.
+         */
+        protected int getDefaultMaxWarnings() {
+            return 100;
+        }
+
     /** The default writer for diagnostics
      */
     static final PrintWriter defaultWriter(Context context) {
--- a/langtools/src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,8 +43,8 @@
  * made on any API to generate a warning at all. In consequence, this handler only
  * gets to handle those warnings that JLS says must be generated.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Name.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Name.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
  *  Utf8 format. Names are stored in a Name.Table, and are unique within
  *  that table.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Names.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Names.java	Thu Jul 29 22:02:45 2010 -0700
@@ -29,8 +29,8 @@
  * Access to the compiler's name table.  STandard names are defined,
  * as well as methods to create new names.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Options.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Options.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
  *  If an option has an argument, the option name is mapped to the argument.
  *  If a set option has no argument, it is mapped to itself.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,8 +27,8 @@
 
 /** A generic class for pairs.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Position.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Position.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
  *  expansion is optional and no Unicode excape translation is considered.
  *  The first character is at location (1,1).
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/PropagatedException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/PropagatedException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,7 +28,7 @@
 /**
  * Used to propagate exceptions through to the user.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,7 +41,7 @@
  * or not the source name and position are set. This formatter provides a standardized, localize-independent
  * implementation of a diagnostic formatter; as such, this formatter is best suited for testing purposes.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -59,7 +59,7 @@
  * to two different type-variables with the same name, their representation is
  * disambiguated by appending an index to the type variable name.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
  * byte array, expanding it as needed. This avoids the overhead incurred
  * by using an array of bytes for each name.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,8 +32,8 @@
  * using weak references. It is recommended for use when a single shared
  * byte array is unsuitable.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,7 +31,7 @@
  * An interface to support optional warnings, needed for support of
  * unchecked conversions and unchecked casts.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b>
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java	Thu Jul 29 22:02:45 2010 -0700
@@ -155,10 +155,8 @@
     public boolean start(RootDoc root) {
         Object retVal;
         String methodName = "start";
-        Class<?>[] paramTypes = new Class<?>[1];
-        Object[] params = new Object[1];
-        paramTypes[0] = RootDoc.class;
-        params[0] = root;
+        Class<?>[] paramTypes = { RootDoc.class };
+        Object[] params = { root };
         try {
             retVal = invoke(methodName, null, paramTypes, params);
         } catch (DocletInvokeException exc) {
@@ -181,10 +179,8 @@
     public int optionLength(String option) {
         Object retVal;
         String methodName = "optionLength";
-        Class<?>[] paramTypes = new Class<?>[1];
-        Object[] params = new Object[1];
-        paramTypes[0] = option.getClass();
-        params[0] = option;
+        Class<?>[] paramTypes = { String.class };
+        Object[] params = { option };
         try {
             retVal = invoke(methodName, new Integer(0), paramTypes, params);
         } catch (DocletInvokeException exc) {
@@ -208,12 +204,8 @@
         String options[][] = optlist.toArray(new String[optlist.length()][]);
         String methodName = "validOptions";
         DocErrorReporter reporter = messager;
-        Class<?>[] paramTypes = new Class<?>[2];
-        Object[] params = new Object[2];
-        paramTypes[0] = options.getClass();
-        paramTypes[1] = DocErrorReporter.class;
-        params[0] = options;
-        params[1] = reporter;
+        Class<?>[] paramTypes = { String[][].class, DocErrorReporter.class };
+        Object[] params = { options, reporter };
         try {
             retVal = invoke(methodName, Boolean.TRUE, paramTypes, params);
         } catch (DocletInvokeException exc) {
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Messager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Messager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -86,7 +86,7 @@
         private static final long serialVersionUID = 0;
     }
 
-    private final String programName;
+    final String programName;
 
     private ResourceBundle messageRB = null;
 
@@ -121,6 +121,16 @@
         this.programName = programName;
     }
 
+    @Override
+    protected int getDefaultMaxErrors() {
+        return Integer.MAX_VALUE;
+    }
+
+    @Override
+    protected int getDefaultMaxWarnings() {
+        return Integer.MAX_VALUE;
+    }
+
     /**
      * Reset resource bundle, eg. locale has changed.
      */
@@ -231,11 +241,13 @@
      * @param msg message to print
      */
     public void printError(SourcePosition pos, String msg) {
-        String prefix = (pos == null) ? programName : pos.toString();
-        errWriter.println(prefix + ": " + getText("javadoc.error") + " - " + msg);
-        errWriter.flush();
-        prompt();
-        nerrors++;
+        if (nerrors < MaxErrors) {
+            String prefix = (pos == null) ? programName : pos.toString();
+            errWriter.println(prefix + ": " + getText("javadoc.error") + " - " + msg);
+            errWriter.flush();
+            prompt();
+            nerrors++;
+        }
     }
 
     /**
@@ -256,10 +268,12 @@
      * @param msg message to print
      */
     public void printWarning(SourcePosition pos, String msg) {
-        String prefix = (pos == null) ? programName : pos.toString();
-        warnWriter.println(prefix +  ": " + getText("javadoc.warning") +" - " + msg);
-        warnWriter.flush();
-        nwarnings++;
+        if (nwarnings < MaxWarnings) {
+            String prefix = (pos == null) ? programName : pos.toString();
+            warnWriter.println(prefix +  ": " + getText("javadoc.warning") +" - " + msg);
+            warnWriter.flush();
+            nwarnings++;
+        }
     }
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Start.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Start.java	Thu Jul 29 22:02:45 2010 -0700
@@ -51,8 +51,6 @@
  * @author Neal Gafter (rewrite)
  */
 class Start {
-    /** Context for this invocation. */
-    private final Context context;
 
     private final String defaultDocletClassName;
     private final ClassLoader docletParentClassLoader;
@@ -98,8 +96,8 @@
           PrintWriter noticeWriter,
           String defaultDocletClassName,
           ClassLoader docletParentClassLoader) {
-        context = new Context();
-        messager = new Messager(context, programName, errWriter, warnWriter, noticeWriter);
+        Context tempContext = new Context(); // interim context until option decoding completed
+        messager = new Messager(tempContext, programName, errWriter, warnWriter, noticeWriter);
         this.defaultDocletClassName = defaultDocletClassName;
         this.docletParentClassLoader = docletParentClassLoader;
     }
@@ -110,8 +108,8 @@
 
     Start(String programName, String defaultDocletClassName,
           ClassLoader docletParentClassLoader) {
-        context = new Context();
-        messager = new Messager(context, programName);
+        Context tempContext = new Context(); // interim context until option decoding completed
+        messager = new Messager(tempContext, programName);
         this.defaultDocletClassName = defaultDocletClassName;
         this.docletParentClassLoader = docletParentClassLoader;
     }
@@ -145,6 +143,13 @@
     }
 
     /**
+     * Usage
+     */
+    private void Xusage() {
+        messager.notice("main.Xusage");
+    }
+
+    /**
      * Exit
      */
     private void exit() {
@@ -213,6 +218,15 @@
         setDocletInvoker(argv);
         ListBuffer<String> subPackages = new ListBuffer<String>();
         ListBuffer<String> excludedPackages = new ListBuffer<String>();
+
+        Context context = new Context();
+        // Setup a new Messager, using the same initial parameters as the
+        // existing Messager, except that this one will be able to use any
+        // options that may be set up below.
+        Messager.preRegister(context,
+                messager.programName,
+                messager.errWriter, messager.warnWriter, messager.noticeWriter);
+
         Options compOpts = Options.instance(context);
         boolean docClasses = false;
 
@@ -310,6 +324,15 @@
                     usageError("main.locale_first");
                 oneArg(argv, i++);
                 docLocale = argv[i];
+            } else if (arg.equals("-Xmaxerrs") || arg.equals("-Xmaxwarns")) {
+                oneArg(argv, i++);
+                if (compOpts.get(arg) != null) {
+                    usageError("main.option.already.seen", arg);
+                }
+                compOpts.put(arg, argv[i]);
+            } else if (arg.equals("-X")) {
+                Xusage();
+                exit();
             } else if (arg.startsWith("-XD")) {
                 String s = arg.substring("-XD".length());
                 int eq = s.indexOf('=');
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -49,7 +49,13 @@
   -locale <name>            Locale to be used, e.g. en_US or en_US_WIN\n\
   -encoding <name>          Source file encoding name\n\
   -quiet                    Do not display status messages\n\
-  -J<flag>                  Pass <flag> directly to the runtime system\n
+  -J<flag>                  Pass <flag> directly to the runtime system\n\
+  -X                        Print a synopsis of nonstandard options\n
+main.Xusage=\
+  -Xmaxerrs <number>        Set the maximum number of errors to print\n\
+  -Xmaxwarns <number>       Set the maximum number of warnings to print\n\
+\n\
+These options are non-standard and subject to change without notice.
 main.option.already.seen=The {0} option may be specified no more than once.
 main.requires_argument=option {0} requires an argument.
 main.locale_first=option -locale must be first on the command line.
@@ -65,7 +71,7 @@
 main.fatal.error=fatal error
 main.fatal.exception=fatal exception
 main.out.of.memory=java.lang.OutOfMemoryError: Please increase memory.\n\
-For example, on the Sun Classic or HotSpot VMs, add the option -J-Xmx\n\
+For example, on the JDK Classic or HotSpot VMs, add the option -J-Xmx\n\
 such as -J-Xmx32m.
 main.done_in=[done in {0} ms]
 main.doclet_method_must_be_static=In doclet class {0}, method {1} must be static.
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Thu Jul 29 22:02:45 2010 -0700
@@ -65,7 +65,7 @@
 main.fatal.error=\u81f4\u547d\u9519\u8bef
 main.fatal.exception=\u81f4\u547d\u5f02\u5e38
 main.out.of.memory=java.lang.OutOfMemoryError\uff1a\u8bf7\u589e\u52a0\u5185\u5b58\u3002\n\
-\u4f8b\u5982\uff0c\u5bf9\u4e8e Sun Classic \u6216 HotSpot VM\uff0c\u8bf7\u6dfb\u52a0\u9009\u9879 -J-Xmx\uff0c\n\
+\u4f8b\u5982\uff0c\u5bf9\u4e8e JDK Classic \u6216 HotSpot VM\uff0c\u8bf7\u6dfb\u52a0\u9009\u9879 -J-Xmx\uff0c\n\
 \u5982 -J-Xmx32m\u3002
 main.done_in=[\u5728{0} \u6beb\u79d2\u5185\u5b8c\u6210]
 main.doclet_method_must_be_static=\u5728 doclet \u7c7b {0} \u4e2d\uff0c\u65b9\u6cd5 {1} \u5fc5\u987b\u4e3a\u9759\u6001\u3002
--- a/langtools/src/share/classes/com/sun/tools/javah/Gen.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/Gen.java	Thu Jul 29 22:02:45 2010 -0700
@@ -60,7 +60,7 @@
  * original writing, this interface is rich enough to support JNI and the
  * old 1.0-style native method interface.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javah/InternalError.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/InternalError.java	Thu Jul 29 22:02:45 2010 -0700
@@ -26,8 +26,8 @@
 package com.sun.tools.javah;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javah/JNI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/JNI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,7 +42,7 @@
 /**
  * Header file generator for JNI.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
 /**
  *  javah's implementation of JavaFileManager.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java	Thu Jul 29 22:02:45 2010 -0700
@@ -59,7 +59,7 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 import javax.lang.model.util.Types;
 
 import javax.tools.Diagnostic;
@@ -76,7 +76,7 @@
  * Javah generates support files for native methods.
  * Parse commandline options & Invokes javadoc to execute those commands.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
@@ -705,7 +705,7 @@
         }
 
         private TypeVisitor<Void,Types> checkMethodParametersVisitor =
-                new SimpleTypeVisitor6<Void,Types>() {
+                new SimpleTypeVisitor7<Void,Types>() {
             @Override
             public Void visitArray(ArrayType t, Types types) {
                 visit(t.getComponentType(), types);
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahTool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,7 +40,7 @@
 import javax.tools.StandardJavaFileManager;
 
 /*
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Thu Jul 29 22:02:45 2010 -0700
@@ -45,10 +45,10 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 
 /*
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
@@ -620,7 +620,7 @@
     }
 
     protected final boolean isLongOrDouble(TypeMirror t) {
-        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor6<Boolean,Void>() {
+        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor7<Boolean,Void>() {
             public Boolean defaultAction(TypeMirror t, Void p){
                 return false;
             }
--- a/langtools/src/share/classes/com/sun/tools/javah/Main.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/Main.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  *  Main entry point.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javah/Mangle.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/Mangle.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,7 +37,7 @@
  * this more fine grained and distribute the functionality to the
  * generators.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -44,8 +44,8 @@
  * @see JavaFileManager
  * @since 1.7
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Thu Jul 29 22:02:45 2010 -0700
@@ -38,12 +38,12 @@
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 
 /**
  * Returns internal type signature.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
@@ -239,7 +239,7 @@
 
 
     String qualifiedTypeName(TypeMirror type) {
-        TypeVisitor<Name, Void> v = new SimpleTypeVisitor6<Name, Void>() {
+        TypeVisitor<Name, Void> v = new SimpleTypeVisitor7<Name, Void>() {
             @Override
             public Name visitArray(ArrayType t, Void p) {
                 return t.getComponentType().accept(this, p);
--- a/langtools/src/share/classes/com/sun/tools/javah/Util.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javah/Util.java	Thu Jul 29 22:02:45 2010 -0700
@@ -44,7 +44,7 @@
  *      bug   -- Bug has occurred in javah
  *      fatal -- We can't even find resources, so bail fast, don't localize
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,8 +40,8 @@
 /**
  *  A writer for writing annotations as text.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -64,8 +64,8 @@
 /*
  *  A writer for writing Attributes as text.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -35,8 +35,8 @@
  *  A writer similar to a PrintWriter but which does not hide exceptions.
  *  The standard print calls are line-buffered; report calls write messages directly.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -54,8 +54,8 @@
 /*
  *  The main javap class to write the contents of a class file as text.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -40,8 +40,8 @@
 /*
  *  Write the contents of a Code attribute.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
 /*
  *  Write a constant pool entry.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/Context.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/Context.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 /*
  *  Class from which to put/get shared resources.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java	Thu Jul 29 22:02:45 2010 -0700
@@ -44,8 +44,8 @@
  * @see JavaFileManager
  * @since 1.7
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -31,8 +31,8 @@
 /*
  *  Write additional details for an instruction.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/InternalError.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/InternalError.java	Thu Jul 29 22:02:45 2010 -0700
@@ -26,8 +26,8 @@
 package com.sun.tools.javap;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -36,8 +36,8 @@
 /**
  *  javap's implementation of JavaFileManager.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Thu Jul 29 22:02:45 2010 -0700
@@ -69,8 +69,8 @@
  *  "Main" class for javap, normally accessed from the command line
  *  via Main, or from JSR199 via DisassemblerTool.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,8 +42,8 @@
 /**
  * Annotate instructions with details about local variables.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,8 +43,8 @@
 /**
  * Annotate instructions with details about local variables.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/Main.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/Main.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  *  Main entry point.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/Messages.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/Messages.java	Thu Jul 29 22:02:45 2010 -0700
@@ -30,8 +30,8 @@
 /**
  *  Access to javap messages.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/Options.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java	Thu Jul 29 22:02:45 2010 -0700
@@ -34,8 +34,8 @@
 /*
  *  Provides access to javap's options, set via the command line
  *  or JSR 199 API.
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -52,8 +52,8 @@
 /**
  * Annotate instructions with source code.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -45,8 +45,8 @@
 /**
  * Annotate instructions with stack map.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -37,8 +37,8 @@
 /**
  * Annotate instructions with details about try blocks.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java	Thu Jul 29 22:02:45 2010 -0700
@@ -41,8 +41,8 @@
 /**
  * Annotate instructions with details about type annotations.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>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.</b>
  */
--- a/langtools/src/share/classes/javax/lang/model/element/ElementKind.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/element/ElementKind.java	Thu Jul 29 22:02:45 2010 -0700
@@ -88,7 +88,13 @@
      * An implementation-reserved element.  This is not the element
      * you are looking for.
      */
-    OTHER;
+    OTHER,
+
+    /**
+     * A resource variable.
+     * @since 1.7
+     */
+    RESOURCE_VARIABLE;
 
 
     /**
--- a/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -62,6 +62,7 @@
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
  * @see AbstractElementVisitor6
+ * @see AbstractElementVisitor7
  * @since 1.6
  */
 public interface ElementVisitor<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -42,7 +42,7 @@
  * @see Element#getAnnotation(Class)
  * @since 1.6
  */
-public class MirroredTypeException extends RuntimeException {
+public class MirroredTypeException extends MirroredTypesException {
 
     private static final long serialVersionUID = 269;
 
@@ -54,7 +54,7 @@
      * @param type  the type being accessed
      */
     public MirroredTypeException(TypeMirror type) {
-        super("Attempt to access Class object for TypeMirror " + type.toString());
+        super("Attempt to access Class object for TypeMirror " + type.toString(), type);
         this.type = type;
     }
 
@@ -76,5 +76,6 @@
         throws IOException, ClassNotFoundException {
         s.defaultReadObject();
         type = null;
+        types = null;
     }
 }
--- a/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java	Thu Jul 29 22:02:45 2010 -0700
@@ -49,7 +49,17 @@
 
     private static final long serialVersionUID = 269;
 
-    private transient List<? extends TypeMirror> types; // cannot be serialized
+    transient List<? extends TypeMirror> types; // cannot be serialized
+
+    /*
+     * Trusted constructor to be called by MirroredTypeException.
+     */
+    MirroredTypesException(String message, TypeMirror type) {
+        super(message);
+        List<TypeMirror> tmp = (new ArrayList<TypeMirror>());
+        tmp.add(type);
+        types = Collections.unmodifiableList(tmp);
+    }
 
     /**
      * Constructs a new MirroredTypesException for the specified types.
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -62,6 +62,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see AbstractAnnotationValueVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A skeletal visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see AbstractAnnotationValueVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public abstract class AbstractAnnotationValueVisitor7<R, P> extends AbstractAnnotationValueVisitor6<R, P> {
+
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractAnnotationValueVisitor7() {
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -65,6 +65,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see AbstractElementVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+
+/**
+ * A skeletal visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractElementVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public abstract class AbstractElementVisitor7<R, P> extends AbstractElementVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractElementVisitor7(){
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -57,6 +57,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see AbstractTypeVisitor7
  * @since 1.6
  */
 public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.type.*;
+
+/**
+ * A skeletal visitor of types with default behavior appropriate for
+ * the version 7 language level.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractTypeVisitor6
+ * @since 1.7
+ */
+public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractTypeVisitor7() {
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -76,6 +76,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see ElementKindVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of program elements based on their {@linkplain
+ * ElementKind kind} with default behavior appropriate for the {@link
+ * SourceVersion#RELEASE_6 RELEASE_6} source version.  For {@linkplain
+ * Element elements} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it or the
+ * {@code ElementKind} {@code enum} used in this case may have
+ * constants added to it in the future to accommodate new, currently
+ * unknown, language structures added to future versions of the
+ * Java&trade; programming language.  Therefore, methods whose names
+ * begin with {@code "visit"} may be added to this class in the
+ * future; to avoid incompatibilities, classes which extend this class
+ * should not declare any instance methods with names beginning with
+ * {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element kind
+ * visitor class will also be introduced to correspond to the new
+ * language level; this visitor will have different default behavior
+ * for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementKindVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class ElementKindVisitor7<R, P> extends ElementKindVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementKindVisitor7() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected ElementKindVisitor7(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -88,6 +88,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see ElementScanner7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A scanning visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.  The <tt>visit<i>XYZ</i></tt> methods in this
+ * class scan their component elements by calling {@code scan} on
+ * their {@linkplain Element#getEnclosedElements enclosed elements},
+ * {@linkplain ExecutableElement#getParameters parameters}, etc., as
+ * indicated in the individual method specifications.  A subclass can
+ * control the order elements are visited by overriding the
+ * <tt>visit<i>XYZ</i></tt> methods.  Note that clients of a scanner
+ * may get the desired behavior be invoking {@code v.scan(e, p)} rather
+ * than {@code v.visit(e, p)} on the root objects of interest.
+ *
+ * <p>When a subclass overrides a <tt>visit<i>XYZ</i></tt> method, the
+ * new method can cause the enclosed elements to be scanned in the
+ * default way by calling <tt>super.visit<i>XYZ</i></tt>.  In this
+ * fashion, the concrete visitor can control the ordering of traversal
+ * over the component elements with respect to the additional
+ * processing; for example, consistently calling
+ * <tt>super.visit<i>XYZ</i></tt> at the start of the overridden
+ * methods will yield a preorder traversal, etc.  If the component
+ * elements should be traversed in some other order, instead of
+ * calling <tt>super.visit<i>XYZ</i></tt>, an overriding visit method
+ * should call {@code scan} with the elements in the desired order.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new element scanner visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementScanner6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementScanner7(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     */
+    protected ElementScanner7(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -69,6 +69,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see SimpleAnnotationValueVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A simple visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.  Visit methods call {@link
+ * #defaultAction} passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see SimpleAnnotationValueVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class SimpleAnnotationValueVisitor7<R, P> extends SimpleAnnotationValueVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleAnnotationValueVisitor7() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleAnnotationValueVisitor7(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -71,6 +71,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see SimpleElementVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_7} language
+ * constructs call {@link #defaultAction}, passing their arguments to
+ * {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@code Void}
+ *             for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
+ *              for visitors that do not need an additional parameter.
+ *
+ * @see SimpleElementVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class SimpleElementVisitor7<R, P> extends SimpleElementVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleElementVisitor7(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleElementVisitor7(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -70,6 +70,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see SimpleTypeVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of types with default behavior appropriate for the
+ * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_7} language
+ * constructs call {@link #defaultAction}, passing their arguments to
+ * {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see SimpleTypeVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class SimpleTypeVisitor7<R, P> extends SimpleTypeVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleTypeVisitor7(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleTypeVisitor7(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Thu Jul 29 22:02:45 2010 -0700
@@ -74,6 +74,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see TypeKindVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of types based on their {@linkplain TypeKind kind} with
+ * default behavior appropriate for the {@link SourceVersion#RELEASE_7
+ * RELEASE_7} source version.  For {@linkplain
+ * TypeMirror types} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new type kind visitor class
+ * will also be introduced to correspond to the new language level;
+ * this visitor will have different default behavior for the visit
+ * method in question.  When the new visitor is introduced, all or
+ * portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see TypeKindVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses to call; uses {@code null}
+     * for the default value.
+     */
+    protected TypeKindVisitor7() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses to call; uses the argument
+     * for the default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected TypeKindVisitor7(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/tools/JavaFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/classes/javax/tools/JavaFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -256,7 +256,7 @@
      *
      * <p>Optionally, this file manager might consider the sibling as
      * a hint for where to place the output.  The exact semantics of
-     * this hint is unspecified.  Sun's compiler, javac, for
+     * this hint is unspecified.  The JDK compiler, javac, for
      * example, will place class files in the same directories as
      * originating source files unless a class file output directory
      * is provided.  To facilitate this behavior, javac might provide
@@ -338,7 +338,7 @@
      *
      * <p>Optionally, this file manager might consider the sibling as
      * a hint for where to place the output.  The exact semantics of
-     * this hint is unspecified.  Sun's compiler, javac, for
+     * this hint is unspecified.  The JDK compiler, javac, for
      * example, will place class files in the same directories as
      * originating source files unless a class file output directory
      * is provided.  To facilitate this behavior, javac might provide
--- a/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Thu Jul 29 22:02:45 2010 -0700
@@ -138,7 +138,7 @@
     public SourceVersion getSupportedSourceVersion() {
         /*
          * Return latest source version instead of a fixed version
-         * like RELEASE_6.  To return a fixed version, this class
+         * like RELEASE_7.  To return a fixed version, this class
          * could be annotated with a SupportedSourceVersion
          * annotation.
          *
@@ -190,7 +190,7 @@
         /**
          * Visitor to implement name checks.
          */
-        private class NameCheckScanner extends ElementScanner6<Void, Void> {
+        private class NameCheckScanner extends ElementScanner7<Void, Void> {
             // The visitor could be enhanced to return true/false if
             // there were warnings reported or a count of the number
             // of warnings.  This could be facilitated by using
@@ -312,7 +312,7 @@
             @Override
             public Void visitUnknown(Element e, Void p) {
                 // This method will be called if a kind of element
-                // added after JDK 6 is visited.  Since as of this
+                // added after JDK 7 is visited.  Since as of this
                 // writing the conventions for such constructs aren't
                 // known, issue a warning.
                 messager.printMessage(WARNING,
--- a/langtools/test/tools/apt/mirror/declaration/pkg1/pkg2/package.html	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/apt/mirror/declaration/pkg1/pkg2/package.html	Thu Jul 29 22:02:45 2010 -0700
@@ -24,7 +24,6 @@
 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.
-
 -->
 
 </head>
--- a/langtools/test/tools/javac/6402516/CheckLocalElements.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/6402516/CheckLocalElements.java	Thu Jul 29 22:02:45 2010 -0700
@@ -95,7 +95,7 @@
         return encl == null ? "" : encl.accept(qualNameVisitor, null);
     }
 
-    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor6<String,Void>() {
+    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor7<String,Void>() {
         protected String defaultAction(Element e, Void ignore) {
             return "";
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6917288/GraphicalInstaller.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+/**
+ * Complex example for the "access constructor tags" issue.
+ * This test causes Lower to evaluate all classes defined in installNext
+ * before they are lowered, thus preventing the use of Lower.classdefs
+ * as a way of determining whether a class has been translated or not.
+ */
+class GraphicalInstaller  {
+    private BackgroundInstaller backgroundInstaller;
+
+    private void installNext() {
+        final Integer x = 0;
+        class X {
+          Object o = new Object() { int y = x; };
+        };
+        new X();
+        if (false) {
+            new Runnable(){
+                public void run() {
+                }
+            };
+        }
+    }
+
+    private void installSuiteCommon() {
+        backgroundInstaller = new BackgroundInstaller();
+    }
+
+    private static class BackgroundInstaller {
+        private BackgroundInstaller() {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6917288/GraphicalInstallerTest.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6917288
+ * @summary Unnamed nested class is not generated
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class GraphicalInstallerTest {
+    public static void main(String... args) throws Exception {
+        new GraphicalInstallerTest().run();
+    }
+
+    void run() throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File classes = new File("classes");
+        classes.mkdirs();
+        List<String> opts = Arrays.asList("-d", classes.getPath());
+        int rc = compile(opts, new File(testSrc, "GraphicalInstaller.java"));
+        if (rc != 0) {
+            error("compilation failed: rc=" + rc);
+            return;
+        }
+
+        check(classes,
+            "GraphicalInstaller$1.class",
+            "GraphicalInstaller$1X$1.class",
+            "GraphicalInstaller$1X.class",
+            "GraphicalInstaller$BackgroundInstaller.class",
+            "GraphicalInstaller.class");
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred");
+    }
+
+    /**
+     *  Compile files with given options.
+     *  Display any output from compiler, and return javac return code.
+     */
+    int compile(List<String> opts, File... files) {
+        List<String> args = new ArrayList<String>();
+        args.addAll(opts);
+        for (File f: files)
+            args.add(f.getPath());
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(args.toArray(new String[args.size()]), pw);
+        pw.close();
+        String out = sw.toString();
+        if (out.length() > 0)
+            System.err.println(out);
+        return rc;
+    }
+
+    /**
+     *  Check that a directory contains the expected files.
+     */
+    void check(File dir, String... paths) {
+        Set<String> found = new TreeSet<String>(Arrays.asList(dir.list()));
+        Set<String> expect = new TreeSet<String>(Arrays.asList(paths));
+        if (found.equals(expect))
+            return;
+        for (String f: found) {
+            if (!expect.contains(f))
+                error("Unexpected file found: " + f);
+        }
+        for (String e: expect) {
+            if (!found.contains(e))
+                error("Expected file not found: " + e);
+        }
+    }
+
+    /**
+     *  Record an error message.
+     */
+    void error(String msg) {
+        System.err.println(msg);
+        errors++;
+    }
+
+    int errors;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6917288/T6917288.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6917288
+ * @summary Unnamed nested class is not generated
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class T6917288 {
+    // refers to kind of reference to an anon inner class that may be generated
+    enum Kind { NONE, FALSE, TRUE, ALWAYS };
+
+    public static void main(String... args) throws Exception {
+        new T6917288().run();
+    }
+
+    void run() throws Exception {
+        for (Kind k: Kind.values()) {
+            test(k);
+        }
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred");
+    }
+
+    /**
+     *  Run a test case for Kind k.
+     */
+    void test(Kind k) throws Exception {
+        System.err.println("Test " + (++count) + ": " + k);
+        File testDir = new File("test" + count);
+        File srcDir = new File(testDir, "src");
+        srcDir.mkdirs();
+        File classesDir = new File(testDir, "classes");
+        classesDir.mkdirs();
+
+        List<String> opts = new ArrayList<String>();
+        opts.add("-d");
+        opts.add(classesDir.getPath());
+
+        File f = writeFile(srcDir, k);
+        int rc = compile(opts, f);
+        if (rc != 0) {
+            error("compilation failed: rc=" + rc);
+            return;
+        }
+
+        check(classesDir, "Test.class", "Test$Inner.class", "Test$1.class");
+    }
+
+    /**
+     *  Compile files with given options.
+     *  Display any output from compiler, and return javac return code.
+     */
+    int compile(List<String> opts, File... files) {
+        List<String> args = new ArrayList<String>();
+        args.addAll(opts);
+        for (File f: files)
+            args.add(f.getPath());
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(args.toArray(new String[args.size()]), pw);
+        pw.close();
+        String out = sw.toString();
+        if (out.length() > 0)
+            System.err.println(out);
+        return rc;
+    }
+
+    /**
+     *  Check that a directory contains the expected files.
+     */
+    void check(File dir, String... paths) {
+        Set<String> found = new TreeSet<String>(Arrays.asList(dir.list()));
+        Set<String> expect = new TreeSet<String>(Arrays.asList(paths));
+        if (found.equals(expect))
+            return;
+        for (String f: found) {
+            if (!expect.contains(f))
+                error("Unexpected file found: " + f);
+        }
+        for (String e: expect) {
+            if (!found.contains(e))
+                error("Expected file not found: " + e);
+        }
+    }
+
+    /**
+     *  Write source file for test case k.
+     */
+    File writeFile(File dir, Kind k) throws Exception {
+        StringBuilder sb = new StringBuilder();
+        sb.append("public class Test {\n");
+        sb.append("    private Inner inner;\n");
+
+        // generate different cases of an anon inner class
+        if (k != Kind.NONE) {
+            sb.append("    private void m() {\n");
+            sb.append("        ");
+            switch (k) {
+                case FALSE: case TRUE:
+                    sb.append("if (" + k.toString().toLowerCase() + ") ");
+            }
+            sb.append("new Runnable() { public void run() { } };\n");
+            sb.append("    }\n");
+        }
+
+        sb.append("    private void init() {\n");
+        sb.append("        inner = new Inner();\n");
+        sb.append("    }\n");
+        sb.append("\n");
+        sb.append("    private static class Inner {\n");
+        sb.append("        private Inner() {\n");
+        sb.append("        }\n");
+        sb.append("    }\n");
+        sb.append("}\n");
+
+        File f = new File(dir, "Test.java");
+        FileWriter w = new FileWriter(f);
+        w.write(sb.toString());
+        w.close();
+        return f;
+    }
+
+    /**
+     *  Record an error message.
+     */
+    void error(String msg) {
+        System.err.println(msg);
+        errors++;
+    }
+
+    int count;
+    int errors;
+}
--- a/langtools/test/tools/javac/6948381/T6948381.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/6948381/T6948381.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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.
  */
 
 /**
--- a/langtools/test/tools/javac/6948381/npe/A.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/6948381/npe/A.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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 npe;
--- a/langtools/test/tools/javac/6948381/npe/B.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/6948381/npe/B.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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 npe;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6956638.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.util.JavacTask;
+
+/**
+ * @test
+ * @bug 6956638
+ * @summary JavacTask.generate does not generate all required files
+ */
+public class T6956638 {
+    public static void main(String[] args) throws Exception {
+        new T6956638().run();
+    }
+
+    void run() throws Exception {
+        File srcDir = new File("src");
+
+        File[] files = {
+            writeFile(new File(srcDir, "T1.java"),
+                "public class T1 extends T2 {}\n"),
+            writeFile(new File(srcDir, "T2.java"),
+                "public class T2 extends T3 {}\n"),
+            writeFile(new File(srcDir, "T3.java"),
+                "public class T3 { public static final int C = 1; }\n"),
+            writeFile(new File(srcDir, "Test.java"),
+                "public class Test { public static final int D = T1.C; }\n")
+        };
+
+        for (File f1: files) {
+            for (File f2: files) {
+                if (f2 == f1) continue;
+                for (File f3: files) {
+                    if (f3 == f2 || f3 == f1) continue;
+                    for (File f4: files) {
+                        if (f4 == f3 || f4 == f2 || f4 == f1) continue;
+                        try {
+                            test(f1, f2, f3, f4);
+                        } catch (Exception e) {
+                            error(e);
+                        }
+                    }
+                }
+            }
+        }
+
+        if (errors > 0)
+            throw new Exception(errors + " tests failed");
+    }
+
+    void test(File... sourceFiles) throws Exception {
+        System.err.println("Test " + (++count) + ": " + Arrays.asList(sourceFiles));
+
+        File classesDir = new File("classes" + count);
+        classesDir.mkdirs();
+
+        StringWriter compilerOutputStream = new StringWriter();
+
+        List<String> compileOptions = Arrays.asList("-d", classesDir.getPath());
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        DiagnosticCollector<JavaFileObject> diagnosticCollector = new DiagnosticCollector<JavaFileObject>();
+        StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnosticCollector, null, null);
+        Iterable<? extends JavaFileObject> sourceFileObjects = fileManager.getJavaFileObjects(sourceFiles);
+        System.err.println("1- javac given java source JavaFileObjects " + sourceFileObjects);
+        JavaCompiler.CompilationTask task = compiler.getTask(compilerOutputStream, fileManager, null, compileOptions, null, sourceFileObjects);
+        JavacTask javacTask = (JavacTask) task;
+
+        Iterable<? extends CompilationUnitTree> parsedTrees = javacTask.parse();
+        Iterable<? extends Element> analyzedTrees = javacTask.analyze();
+        Iterable<? extends JavaFileObject> generatedFiles = javacTask.generate();
+
+        System.err.println("2- parsed:" + size(parsedTrees) + " analysed:" + size(analyzedTrees) + " generated:" + size(generatedFiles));
+
+        System.err.print("3-");
+        for (JavaFileObject f : generatedFiles)
+            System.err.print(" " + f);
+        System.err.println("");
+
+        System.err.print("5-");
+        for (File f : classesDir.listFiles())
+            System.err.print(" " + f);
+        System.err.println("");
+
+        System.err.println("----");
+        System.err.println(compilerOutputStream.toString());
+
+        if (size(generatedFiles) != size(parsedTrees)) {
+            throw new Exception("wrong number of files generated: " + size(generatedFiles)
+                    + " expected: " + size(parsedTrees));
+        }
+    }
+
+    private void error(Throwable t) {
+        t.printStackTrace();
+        errors++;
+    }
+
+    int count;
+    int errors;
+
+    private static <E> int size(Iterable<E> x) {
+        int n = 0;
+        for (Iterator<E> iter = x.iterator(); iter.hasNext(); ++n)
+            iter.next();
+        return n;
+    }
+
+    private static File writeFile(File f, String str) throws IOException {
+        f.getParentFile().mkdirs();
+        BufferedWriter fout = new BufferedWriter(new FileWriter(f));
+        try {
+            fout.write(str);
+            fout.flush();
+        } finally {
+            fout.close();
+        }
+        return f;
+    }
+}
--- a/langtools/test/tools/javac/api/TestOperators.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/api/TestOperators.java	Thu Jul 29 22:02:45 2010 -0700
@@ -299,7 +299,7 @@
         final Trees trees = Trees.instance(processingEnv);
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
-        class Scan extends ElementScanner6<Void,Void> {
+        class Scan extends ElementScanner7<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 Object debug = e; // info for exception handler
--- a/langtools/test/tools/javac/api/evalexpr/ByteArrayClassLoader.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/api/evalexpr/ByteArrayClassLoader.java	Thu Jul 29 22:02:45 2010 -0700
@@ -28,7 +28,7 @@
 /**
  * A class loader which loads classes from byte arrays.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/test/tools/javac/api/evalexpr/CompileFromString.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/api/evalexpr/CompileFromString.java	Thu Jul 29 22:02:45 2010 -0700
@@ -32,7 +32,7 @@
 /**
  * JSR 199 Demo application: compile from a String.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- a/langtools/test/tools/javac/api/evalexpr/MemoryFileManager.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/api/evalexpr/MemoryFileManager.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,7 +43,7 @@
  * This file manager delegates to another file manager
  * to lookup classes on boot class path.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>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.</b></p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,362 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6964768 6964461 6964469 6964487 6964460 6964481
+ * @summary need test program to validate javac resource bundles
+ */
+
+import java.io.*;
+import java.util.*;
+import javax.tools.*;
+import com.sun.tools.classfile.*;
+
+/**
+ * Compare string constants in javac classes against keys in javac resource bundles.
+ */
+public class CheckResourceKeys {
+    /**
+     * Main program.
+     * Options:
+     * -finddeadkeys
+     *      look for keys in resource bundles that are no longer required
+     * -findmissingkeys
+     *      look for keys in resource bundles that are missing
+     *
+     * @throws Exception if invoked by jtreg and errors occur
+     */
+    public static void main(String... args) throws Exception {
+        CheckResourceKeys c = new CheckResourceKeys();
+        if (c.run(args))
+            return;
+
+        if (is_jtreg())
+            throw new Exception(c.errors + " errors occurred");
+        else
+            System.exit(1);
+    }
+
+    static boolean is_jtreg() {
+        return (System.getProperty("test.src") != null);
+    }
+
+    /**
+     * Main entry point.
+     */
+    boolean run(String... args) throws Exception {
+        boolean findDeadKeys = false;
+        boolean findMissingKeys = false;
+
+        if (args.length == 0) {
+            if (is_jtreg()) {
+                findDeadKeys = true;
+                findMissingKeys = true;
+            } else {
+                System.err.println("Usage: java CheckResourceKeys <options>");
+                System.err.println("where options include");
+                System.err.println("  -finddeadkeys      find keys in resource bundles which are no longer required");
+                System.err.println("  -findmissingkeys   find keys in resource bundles that are required but missing");
+                return true;
+            }
+        } else {
+            for (String arg: args) {
+                if (arg.equalsIgnoreCase("-finddeadkeys"))
+                    findDeadKeys = true;
+                else if (arg.equalsIgnoreCase("-findmissingkeys"))
+                    findMissingKeys = true;
+                else
+                    error("bad option: " + arg);
+            }
+        }
+
+        if (errors > 0)
+            return false;
+
+        Set<String> codeStrings = getCodeStrings();
+        Set<String> resourceKeys = getResourceKeys();
+
+        if (findDeadKeys)
+            findDeadKeys(codeStrings, resourceKeys);
+
+        if (findMissingKeys)
+            findMissingKeys(codeStrings, resourceKeys);
+
+        return (errors == 0);
+    }
+
+    /**
+     * Find keys in resource bundles which are probably no longer required.
+     * A key is probably required if there is a string fragment in the code
+     * that is part of the resource key, or if the key is well-known
+     * according to various pragmatic rules.
+     */
+    void findDeadKeys(Set<String> codeStrings, Set<String> resourceKeys) {
+        String[] prefixes = {
+            "compiler.err.", "compiler.warn.", "compiler.note.", "compiler.misc.",
+            "javac."
+        };
+        for (String rk: resourceKeys) {
+            // some keys are used directly, without a prefix.
+            if (codeStrings.contains(rk))
+                continue;
+
+            // remove standard prefix
+            String s = null;
+            for (int i = 0; i < prefixes.length && s == null; i++) {
+                if (rk.startsWith(prefixes[i])) {
+                    s = rk.substring(prefixes[i].length());
+                }
+            }
+            if (s == null) {
+                error("Resource key does not start with a standard prefix: " + rk);
+                continue;
+            }
+
+            if (codeStrings.contains(s))
+                continue;
+
+            // keys ending in .1 are often synthesized
+            if (s.endsWith(".1") && codeStrings.contains(s.substring(0, s.length() - 2)))
+                continue;
+
+            // verbose keys are generated by ClassReader.printVerbose
+            if (s.startsWith("verbose.") && codeStrings.contains(s.substring(8)))
+                continue;
+
+            // mandatory warning messages are synthesized with no characteristic substring
+            if (isMandatoryWarningString(s))
+                continue;
+
+            // check known (valid) exceptions
+            if (knownRequired.contains(rk))
+                continue;
+
+            // check known suspects
+            if (needToInvestigate.contains(rk))
+                continue;
+
+            error("Resource key not found in code: " + rk);
+        }
+    }
+
+    /**
+     * The keys for mandatory warning messages are all synthesized and do not
+     * have a significant recognizable substring to look for.
+     */
+    private boolean isMandatoryWarningString(String s) {
+        String[] bases = { "deprecated", "unchecked", "varargs", "sunapi" };
+        String[] tails = { ".filename", ".filename.additional", ".plural", ".plural.additional", ".recompile" };
+        for (String b: bases) {
+            if (s.startsWith(b)) {
+                String tail = s.substring(b.length());
+                for (String t: tails) {
+                    if (tail.equals(t))
+                        return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    Set<String> knownRequired = new TreeSet<String>(Arrays.asList(
+        // See Resolve.getErrorKey
+        "compiler.err.cant.resolve.args",
+        "compiler.err.cant.resolve.args.params",
+        "compiler.err.cant.resolve.location.args",
+        "compiler.err.cant.resolve.location.args.params",
+        // JavaCompiler, reports #errors and #warnings
+        "compiler.misc.count.error",
+        "compiler.misc.count.error.plural",
+        "compiler.misc.count.warn",
+        "compiler.misc.count.warn.plural",
+        // Used for LintCategory
+        "compiler.warn.lintOption",
+        // Other
+        "compiler.misc.base.membership"                                 // (sic)
+        ));
+
+
+    Set<String> needToInvestigate = new TreeSet<String>(Arrays.asList(
+        "compiler.err.cant.read.file",                      // UNUSED
+        "compiler.err.illegal.self.ref",                    // UNUSED
+        "compiler.err.io.exception",                        // UNUSED
+        "compiler.err.limit.pool.in.class",                 // UNUSED
+        "compiler.err.name.reserved.for.internal.use",      // UNUSED
+        "compiler.err.no.match.entry",                      // UNUSED
+        "compiler.err.not.within.bounds.explain",           // UNUSED
+        "compiler.err.signature.doesnt.match.intf",         // UNUSED
+        "compiler.err.signature.doesnt.match.supertype",    // UNUSED
+        "compiler.err.type.var.more.than.once",             // UNUSED
+        "compiler.err.type.var.more.than.once.in.result",   // UNUSED
+        "compiler.misc.ccf.found.later.version",            // UNUSED
+        "compiler.misc.non.denotable.type",                 // UNUSED
+        "compiler.misc.unnamed.package",                    // should be required, CR 6964147
+        "compiler.misc.verbose.retro",                      // UNUSED
+        "compiler.misc.verbose.retro.with",                 // UNUSED
+        "compiler.misc.verbose.retro.with.list",            // UNUSED
+        "compiler.warn.proc.type.already.exists",           // TODO in JavacFiler
+        "javac.err.invalid.arg",                            // UNUSED ??
+        "javac.opt.arg.class",                              // UNUSED ??
+        "javac.opt.arg.pathname",                           // UNUSED ??
+        "javac.opt.moreinfo",                               // option commented out
+        "javac.opt.nogj",                                   // UNUSED
+        "javac.opt.printflat",                              // option commented out
+        "javac.opt.printsearch",                            // option commented out
+        "javac.opt.prompt",                                 // option commented out
+        "javac.opt.retrofit",                               // UNUSED
+        "javac.opt.s",                                      // option commented out
+        "javac.opt.scramble",                               // option commented out
+        "javac.opt.scrambleall"                             // option commented out
+        ));
+
+    /**
+     * For all strings in the code that look like they might be fragments of
+     * a resource key, verify that a key exists.
+     */
+    void findMissingKeys(Set<String> codeStrings, Set<String> resourceKeys) {
+        for (String cs: codeStrings) {
+            if (cs.matches("[A-Za-z][^.]*\\..*")) {
+                // ignore filenames (i.e. in SourceFile attribute
+                if (cs.matches(".*\\.java"))
+                    continue;
+                // ignore package and class names
+                if (cs.matches("(com|java|javax|sun)\\.[A-Za-z.]+"))
+                    continue;
+                // explicit known exceptions
+                if (noResourceRequired.contains(cs))
+                    continue;
+                // look for matching resource
+                if (hasMatch(resourceKeys, cs))
+                    continue;
+                error("no match for \"" + cs + "\"");
+            }
+        }
+    }
+    // where
+    private Set<String> noResourceRequired = new HashSet<String>(Arrays.asList(
+            // system properties
+            "application.home", // in Paths.java
+            "env.class.path",
+            "line.separator",
+            "user.dir",
+            // file names
+            "ct.sym",
+            "rt.jar",
+            "tools.jar",
+            // -XD option names
+            "process.packages",
+            "ignore.symbol.file",
+            // prefix/embedded strings
+            "compiler.",
+            "compiler.misc.",
+            "count.",
+            "illegal.",
+            "javac.",
+            "verbose."
+    ));
+
+    /**
+     * Look for a resource that ends in this string fragment.
+     */
+    boolean hasMatch(Set<String> resourceKeys, String s) {
+        for (String rk: resourceKeys) {
+            if (rk.endsWith(s))
+                return true;
+        }
+        return false;
+    }
+
+    /**
+     * Get the set of strings from (most of) the javac classfiles.
+     */
+    Set<String> getCodeStrings() throws IOException {
+        Set<String> results = new TreeSet<String>();
+        JavaCompiler c = ToolProvider.getSystemJavaCompiler();
+        JavaFileManager fm = c.getStandardFileManager(null, null, null);
+        String[] pkgs = {
+            "javax.annotation.processing",
+            "javax.lang.model",
+            "javax.tools",
+            "com.sun.source",
+            "com.sun.tools.javac"
+        };
+        for (String pkg: pkgs) {
+            for (JavaFileObject fo: fm.list(StandardLocation.PLATFORM_CLASS_PATH,
+                    pkg, EnumSet.of(JavaFileObject.Kind.CLASS), true)) {
+                String name = fo.getName();
+                // ignore resource files, and files which are not really part of javac
+                if (name.contains("resources")
+                        || name.contains("Launcher.class")
+                        || name.contains("CreateSymbols.class"))
+                    continue;
+                scan(fo, results);
+            }
+        }
+        return results;
+    }
+
+    /**
+     * Get the set of strings from a class file.
+     * Only strings that look like they might be a resource key are returned.
+     */
+    void scan(JavaFileObject fo, Set<String> results) throws IOException {
+        InputStream in = fo.openInputStream();
+        try {
+            ClassFile cf = ClassFile.read(in);
+            for (ConstantPool.CPInfo cpinfo: cf.constant_pool.entries()) {
+                if (cpinfo.getTag() == ConstantPool.CONSTANT_Utf8) {
+                    String v = ((ConstantPool.CONSTANT_Utf8_info) cpinfo).value;
+                    if (v.matches("[A-Za-z0-9-_.]+"))
+                        results.add(v);
+                }
+            }
+        } catch (ConstantPoolException ignore) {
+        } finally {
+            in.close();
+        }
+    }
+
+    /**
+     * Get the set of keys from the javac resource bundles.
+     */
+    Set<String> getResourceKeys() {
+        Set<String> results = new TreeSet<String>();
+        for (String name : new String[]{"javac", "compiler"}) {
+            ResourceBundle b =
+                    ResourceBundle.getBundle("com.sun.tools.javac.resources." + name);
+            results.addAll(b.keySet());
+        }
+        return results;
+    }
+
+    /**
+     * Report an error.
+     */
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
--- a/langtools/test/tools/javac/enum/6424358/T6424358.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/enum/6424358/T6424358.java	Thu Jul 29 22:02:45 2010 -0700
@@ -48,7 +48,7 @@
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
         final TypeElement testMe = elements.getTypeElement("TestMe");
-        class Scan extends ElementScanner6<Void,Void> {
+        class Scan extends ElementScanner7<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 System.err.println("Looking at " + e);
--- a/langtools/test/tools/javac/generics/6946618/T6946618c.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/generics/6946618/T6946618c.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug     6946618
+ * @bug     6946618 6968497
  * @summary sqe test fails: javac/generics/NewOnTypeParm  in pit jdk7 b91 in all platforms.
  * @author  mcimadamore
  * @compile/fail/ref=T6946618c.out -XDrawDiagnostics T6946618c.java
--- a/langtools/test/tools/javac/generics/6946618/T6946618c.out	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/generics/6946618/T6946618c.out	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-T6946618c.java:13:24: compiler.err.type.found.req: ? extends java.lang.String, class or interface without bounds
-T6946618c.java:14:24: compiler.err.type.found.req: ? super java.lang.String, class or interface without bounds
-T6946618c.java:15:24: compiler.err.type.found.req: ?, class or interface without bounds
+T6946618c.java:13:24: compiler.err.type.found.req: ? extends java.lang.String, (compiler.misc.type.req.exact)
+T6946618c.java:14:24: compiler.err.type.found.req: ? super java.lang.String, (compiler.misc.type.req.exact)
+T6946618c.java:15:24: compiler.err.type.found.req: ?, (compiler.misc.type.req.exact)
 3 errors
--- a/langtools/test/tools/javac/generics/diamond/T6951833.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/generics/diamond/T6951833.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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.
  */
 
 /*
--- a/langtools/test/tools/javac/generics/typevars/T6880344.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/generics/typevars/T6880344.java	Thu Jul 29 22:02:45 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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.
  */
 
 /*
--- a/langtools/test/tools/javac/literals/BadUnderscoreLiterals.6.out	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/literals/BadUnderscoreLiterals.6.out	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,4 @@
-BadUnderscoreLiterals.java:14:17: compiler.err.unsupported.underscore: 1.6
+BadUnderscoreLiterals.java:14:17: compiler.err.unsupported.underscore.lit: 1.6
 BadUnderscoreLiterals.java:18:15: compiler.err.illegal.underscore
 BadUnderscoreLiterals.java:22:19: compiler.err.illegal.underscore
 BadUnderscoreLiterals.java:25:14: compiler.err.unsupported.binary.lit: 1.6
--- a/langtools/test/tools/javac/processing/model/6194785/T6194785.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/processing/model/6194785/T6194785.java	Thu Jul 29 22:02:45 2010 -0700
@@ -43,7 +43,7 @@
     {
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
-        class Scan extends ElementScanner6<Void,Void> {
+        class Scan extends ElementScanner7<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void ignored) {
                 for (VariableElement p : e.getParameters())
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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     6519115
+ * @summary Verify MirroredTypeException vs MirroredTypesException is thrown
+ * @compile Plurality.java
+ * @compile -processor Plurality -proc:only Plurality.java
+ * @author  Joseph D. Darcy
+ */
+import java.lang.annotation.*;
+import java.math.BigDecimal;
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.*;
+import javax.lang.model.element.*;
+import javax.lang.model.type.*;
+import javax.lang.model.util.*;
+
+@SupportedAnnotationTypes("*")
+@P0
+@P1
+@P2
+@S1
+public class Plurality extends AbstractProcessor {
+    private boolean executed = false;
+
+    Elements elements;
+    Types types;
+
+    @Override
+    public void init(ProcessingEnvironment penv) {
+        super.init(penv);
+        elements = penv.getElementUtils();
+        types =  penv.getTypeUtils();
+    }
+
+
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            executed = true;
+            // Processing just this type
+            Element e = elements.getTypeElement("Plurality");
+            Class[] classes = null;
+
+            P0 p0 = e.getAnnotation(P0.class);
+            try {
+                classes = p0.value();
+            } catch (MirroredTypesException mtse) {
+                if (mtse instanceof MirroredTypeException) {
+                    throw new RuntimeException("Wrong exception type!");
+                }
+
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 0)
+                    throw new RuntimeException("List size != 0: " +
+                                               types);
+            }
+
+            P1 p1 = e.getAnnotation(P1.class);
+            try {
+                classes = p1.value();
+            } catch (MirroredTypesException mtse) {
+                if (mtse instanceof MirroredTypeException) {
+                    throw new RuntimeException("Wrong exception type!");
+                }
+
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 1)
+                    throw new RuntimeException("List size != 1: " +
+                                               types);
+                checkTypeListMatchesClasses(types,
+                                            this.getClass().getAnnotation(P1.class).value());
+            }
+
+
+            P2 p2 = e.getAnnotation(P2.class);
+            try {
+                classes = p2.value();
+            } catch(MirroredTypesException mtse) {
+                if (mtse instanceof MirroredTypeException) {
+                    throw new RuntimeException("Wrong exception type!");
+                }
+
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 2)
+                    throw new RuntimeException("List size != 2: " +
+                                               types);
+                checkTypeListMatchesClasses(types,
+                                            this.getClass().getAnnotation(P2.class).value());
+            }
+
+            Class<?> clazz = null;
+            S1 s1 = e.getAnnotation(S1.class);
+            try {
+                clazz = s1.value();
+            } catch(MirroredTypesException mtse) {
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 1)
+                    throw new RuntimeException("List size != 1: " +
+                                               types);
+                Class<?>[] clazzes = new Class<?>[1];
+                clazzes[0] = this.getClass().getAnnotation(S1.class).value();
+                checkTypeListMatchesClasses(types,
+                                            clazzes);
+            }
+
+            try {
+                clazz = s1.value();
+            } catch(MirroredTypeException mte) {
+                TypeMirror type = mte.getTypeMirror();
+                if (type == null) {
+                    throw new RuntimeException("Expected null");
+                }
+                List<TypeMirror> types = new ArrayList<>();
+                types.add(type);
+                Class<?>[] clazzes = new Class<?>[1];
+                clazzes[0] = this.getClass().getAnnotation(S1.class).value();
+                checkTypeListMatchesClasses(types, clazzes);
+            }
+        } else {
+            if (!executed) {
+                throw new RuntimeException("Didn't seem to do anything!");
+            }
+        }
+        return true;
+    }
+
+    private static void checkTypeListMatchesClasses(List<? extends TypeMirror> types,
+                                               Class<?>[] classes) {
+        if (types.size() != classes.length)
+            throw new RuntimeException("Size mismatch:\n\t" + types +
+                                       "\n\t" + Arrays.toString(classes));
+        int i = -1;
+        for(Class<?> clazz : classes) {
+            i++;
+            String canonicalName = clazz.getCanonicalName();
+            String toStringName = types.get(i).toString();
+            if (!canonicalName.equals(toStringName))
+                throw new RuntimeException("Mismatched names: " +
+                                           canonicalName + "\t" +
+                                           toStringName);
+        }
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface P0 {
+    Class[] value() default {};
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface P1 {
+    Class[] value() default {Integer.class};
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface P2 {
+    Class[] value() default {String.class, Number.class};
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface S1 {
+    Class value() default BigDecimal.class;
+}
--- a/langtools/test/tools/javac/processing/model/type/NoTypes.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/processing/model/type/NoTypes.java	Thu Jul 29 22:02:45 2010 -0700
@@ -89,7 +89,7 @@
         verifyKind(NONE, types.getNoType(NONE));
 
         // The return type of a constructor or void method is VOID.
-        class Scanner extends ElementScanner6<Void, Void> {
+        class Scanner extends ElementScanner7<Void, Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 verifyKind(VOID, e.getReturnType());
@@ -104,10 +104,10 @@
 
     /**
      * Verify that a NoType instance is of a particular kind,
-     * and that TypeKindVisitor6 properly dispatches on it.
+     * and that TypeKindVisitor7 properly dispatches on it.
      */
     private void verifyKind(TypeKind kind, TypeMirror type) {
-        class Vis extends TypeKindVisitor6<TypeKind, Void> {
+        class Vis extends TypeKindVisitor7<TypeKind, Void> {
             @Override
             public TypeKind visitNoTypeAsVoid(NoType t, Void p) {
                 return VOID;
--- a/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java	Thu Jul 29 22:02:45 2010 -0700
@@ -67,7 +67,7 @@
         return true;
     }
 
-    private class DeprecationChecker extends ElementScanner6<Boolean,Void> {
+    private class DeprecationChecker extends ElementScanner7<Boolean,Void> {
         private Elements elementUtils;
         private boolean failure;
         DeprecationChecker() {
--- a/langtools/test/tools/javac/varargs/6730476/T6730476a.java	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/varargs/6730476/T6730476a.java	Thu Jul 29 22:02:45 2010 -0700
@@ -27,7 +27,7 @@
  *
  * @summary invalid "unchecked generic array" warning
  * @author mcimadamore
- * @compile T6730476a.java -Xlint -Werror
+ * @compile T6730476a.java -Xlint:unchecked -Werror
  *
  */
 
--- a/langtools/test/tools/javac/varargs/6806876/T6806876.out	Thu Jul 29 17:04:07 2010 +0100
+++ b/langtools/test/tools/javac/varargs/6806876/T6806876.out	Thu Jul 29 22:02:45 2010 -0700
@@ -1,4 +1,6 @@
 T6806876.java:11:32: compiler.warn.unchecked.generic.array.creation: java.lang.Number&java.lang.Comparable<? extends java.lang.Number&java.lang.Comparable<?>>[]
 - compiler.err.warnings.and.werror
+- compiler.note.varargs.filename: T6806876.java
+- compiler.note.varargs.recompile
 1 error
 1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/varargs/warning/Warn4.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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     6945418
+ * @summary Project Coin: Simplified Varargs Method Invocation
+ * @author  mcimadamore
+ * @run main Warn4
+ */
+import com.sun.source.util.JavacTask;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.HashSet;
+import javax.tools.Diagnostic;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+public class Warn4 {
+
+    final static Warning[] error = null;
+    final static Warning[] none = new Warning[] {};
+    final static Warning[] vararg = new Warning[] { Warning.VARARGS };
+    final static Warning[] unchecked = new Warning[] { Warning.UNCHECKED };
+    final static Warning[] both = new Warning[] { Warning.VARARGS, Warning.UNCHECKED };
+
+    enum Warning {
+        UNCHECKED("unchecked"),
+        VARARGS("varargs");
+
+        String category;
+
+        Warning(String category) {
+            this.category = category;
+        }
+
+        boolean isEnabled(XlintOption xlint, SuppressLevel suppressLevel) {
+            return Arrays.asList(xlint.enabledWarnings).contains(this);
+        }
+
+        boolean isSuppressed(SuppressLevel suppressLevel) {
+            return Arrays.asList(suppressLevel.suppressedWarnings).contains(VARARGS);
+        }
+    }
+
+    enum XlintOption {
+        NONE(),
+        UNCHECKED(Warning.UNCHECKED),
+        VARARGS(Warning.VARARGS),
+        ALL(Warning.UNCHECKED, Warning.VARARGS);
+
+        Warning[] enabledWarnings;
+
+        XlintOption(Warning... enabledWarnings) {
+            this.enabledWarnings = enabledWarnings;
+        }
+
+        String getXlintOption() {
+            StringBuilder buf = new StringBuilder();
+            String sep = "";
+            for (Warning w : enabledWarnings) {
+                buf.append(sep);
+                buf.append(w.category);
+                sep=",";
+            }
+            return "-Xlint:" +
+                    (this == NONE ? "none" : buf.toString());
+        }
+    }
+
+    enum SuppressLevel {
+        NONE(),
+        UNCHECKED(Warning.UNCHECKED),
+        VARARGS(Warning.VARARGS),
+        ALL(Warning.UNCHECKED, Warning.VARARGS);
+
+        Warning[] suppressedWarnings;
+
+        SuppressLevel(Warning... suppressedWarnings) {
+            this.suppressedWarnings = suppressedWarnings;
+        }
+
+        String getSuppressAnnotation() {
+            StringBuilder buf = new StringBuilder();
+            String sep = "";
+            for (Warning w : suppressedWarnings) {
+                buf.append(sep);
+                buf.append("\"");
+                buf.append(w.category);
+                buf.append("\"");
+                sep=",";
+            }
+            return this == NONE ? "" :
+                "@SuppressWarnings({" + buf.toString() + "})";
+        }
+    }
+
+    enum Signature {
+
+        EXTENDS_TVAR("<Z> void #name(List<? extends Z>#arity arg) { #body }",
+            new Warning[][] {both, both, both, both, error, both, both, both, error}),
+        SUPER_TVAR("<Z> void #name(List<? super Z>#arity arg) { #body }",
+            new Warning[][] {error, both, error, both, error, error, both, both, error}),
+        UNBOUND("void #name(List<?>#arity arg) { #body }",
+            new Warning[][] {none, none, none, none, none, none, none, none, error}),
+        INVARIANT_TVAR("<Z> void #name(List<Z>#arity arg) { #body }",
+            new Warning[][] {both, both, both, both, error, both, both, both, error}),
+        TVAR("<Z> void #name(Z#arity arg) { #body }",
+            new Warning[][] {both, both, both, both, both, both, both, both, vararg}),
+        EXTENDS("void #name(List<? extends String>#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, both, error, both, error}),
+        SUPER("void #name(List<? super String>#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, error, both, both, error}),
+        INVARIANT("void #name(List<String>#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, error, error, both, error}),
+        UNPARAMETERIZED("void #name(String#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, error, error, error, none});
+
+        String template;
+        Warning[][] warnings;
+
+        Signature(String template, Warning[][] warnings) {
+            this.template = template;
+            this.warnings = warnings;
+        }
+
+        boolean isApplicableTo(Signature other) {
+            return warnings[other.ordinal()] != null;
+        }
+
+        boolean giveUnchecked(Signature other) {
+            return warnings[other.ordinal()] == unchecked ||
+                    warnings[other.ordinal()] == both;
+        }
+
+        boolean giveVarargs(Signature other) {
+            return warnings[other.ordinal()] == vararg ||
+                    warnings[other.ordinal()] == both;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+        for (XlintOption xlint : XlintOption.values()) {
+            for (SuppressLevel suppressLevel : SuppressLevel.values()) {
+                for (Signature vararg_meth : Signature.values()) {
+                    for (Signature client_meth : Signature.values()) {
+                        if (vararg_meth.isApplicableTo(client_meth)) {
+                            test(xlint,
+                                    suppressLevel,
+                                    vararg_meth,
+                                    client_meth);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    static void test(XlintOption xlint, SuppressLevel suppressLevel,
+            Signature vararg_meth, Signature client_meth) throws Exception {
+        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        JavaSource source = new JavaSource(suppressLevel, vararg_meth, client_meth);
+        DiagnosticChecker dc = new DiagnosticChecker();
+        JavacTask ct = (JavacTask)tool.getTask(null, null, dc,
+                Arrays.asList(xlint.getXlintOption()), null, Arrays.asList(source));
+        ct.generate(); //to get mandatory notes
+        check(dc.warnings,
+                dc.notes,
+                new boolean[] {vararg_meth.giveUnchecked(client_meth),
+                               vararg_meth.giveVarargs(client_meth)},
+                source, xlint, suppressLevel);
+    }
+
+    static void check(Set<Warning> warnings, Set<Warning> notes, boolean[] warnArr, JavaSource source, XlintOption xlint, SuppressLevel suppressLevel) {
+        boolean badOutput = false;
+        for (Warning wkind : Warning.values()) {
+            badOutput |= (warnArr[wkind.ordinal()] && !wkind.isSuppressed(suppressLevel)) !=
+                    (wkind.isEnabled(xlint, suppressLevel) ?
+                        warnings.contains(wkind) :
+                        notes.contains(wkind));
+        }
+        if (badOutput) {
+            throw new Error("invalid diagnostics for source:\n" +
+                    source.getCharContent(true) +
+                    "\nOptions: " + xlint.getXlintOption() +
+                    "\nExpected unchecked warning: " + warnArr[0] +
+                    "\nExpected unsafe vararg warning: " + warnArr[1] +
+                    "\nWarnings: " + warnings +
+                    "\nNotes: " + notes);
+        }
+    }
+
+    static class JavaSource extends SimpleJavaFileObject {
+
+        String source;
+
+        public JavaSource(SuppressLevel suppressLevel, Signature vararg_meth, Signature client_meth) {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            String meth1 = vararg_meth.template.replace("#arity", "...");
+            meth1 = meth1.replace("#name", "m");
+            meth1 = meth1.replace("#body", "");
+            meth1 = suppressLevel.getSuppressAnnotation() + meth1;
+            String meth2 = client_meth.template.replace("#arity", "");
+            meth2 = meth2.replace("#name", "test");
+            meth2 = meth2.replace("#body", "m(arg);");
+            source = "import java.util.List;\n" +
+               "class Test {\n" + meth1 +
+               "\n" + meth2 + "\n}\n";
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+    }
+
+    static class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
+
+        Set<Warning> warnings = new HashSet<>();
+        Set<Warning> notes = new HashSet<>();
+
+        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+            if (diagnostic.getKind() == Diagnostic.Kind.MANDATORY_WARNING ||
+                    diagnostic.getKind() == Diagnostic.Kind.WARNING) {
+                warnings.add(diagnostic.getCode().contains("varargs") ?
+                    Warning.VARARGS :
+                    Warning.UNCHECKED);
+            }
+            else if (diagnostic.getKind() == Diagnostic.Kind.NOTE) {
+                notes.add(diagnostic.getCode().contains("varargs") ?
+                    Warning.VARARGS :
+                    Warning.UNCHECKED);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javadoc/6958836/Test.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 6958836
+ * @summary javadoc should support -Xmaxerrs and -Xmaxwarns
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class Test {
+    public static void main(String... args) throws Exception {
+        new Test().run();
+    }
+
+    void run() throws Exception {
+        javadoc("errs",  list(),                   10,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "0"), 10,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "2"),  2,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "4"),  4,  0);
+        javadoc("errs",  list("-Xmaxerrs",  "20"), 10,  0);
+
+        javadoc("warns", list(),                    0, 10);
+        javadoc("warns", list("-Xmaxwarns",  "0"),  0, 10);
+        javadoc("warns", list("-Xmaxwarns",  "2"),  0,  2);
+        javadoc("warns", list("-Xmaxwarns",  "4"),  0,  4);
+        javadoc("warns", list("-Xmaxwarns", "20"),  0, 10);
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred.");
+    }
+
+    void javadoc(String pkg, List<String> testOpts,
+                int expectErrs, int expectWarns) {
+        System.err.println("Test " + (++count) + ": " + pkg + " " + testOpts);
+        File testOutDir = new File("test" + count);
+
+        List<String> opts = new ArrayList<String>();
+        // Force en_US locale in lieu of something like -XDrawDiagnostics.
+        // For some reason, this must be the first option when used.
+        opts.addAll(list("-locale", "en_US"));
+        opts.addAll(list("-classpath", System.getProperty("test.src")));
+        opts.addAll(list("-d", testOutDir.getPath()));
+        opts.addAll(testOpts);
+        opts.add(pkg);
+
+        StringWriter errSW = new StringWriter();
+        PrintWriter errPW = new PrintWriter(errSW);
+        StringWriter warnSW = new StringWriter();
+        PrintWriter warnPW = new PrintWriter(warnSW);
+        StringWriter noteSW = new StringWriter();
+        PrintWriter notePW = new PrintWriter(noteSW);
+
+        int rc = com.sun.tools.javadoc.Main.execute("javadoc",
+                              errPW, warnPW, notePW,
+                              "com.sun.tools.doclets.standard.Standard",
+                              getClass().getClassLoader(),
+                              opts.toArray(new String[opts.size()]));
+        System.err.println("rc: " + rc);
+
+        errPW.close();
+        String errOut = errSW.toString();
+        System.err.println("Errors:\n" + errOut);
+        warnPW.close();
+        String warnOut = warnSW.toString();
+        System.err.println("Warnings:\n" + warnOut);
+        notePW.close();
+        String noteOut = noteSW.toString();
+        System.err.println("Notes:\n" + noteOut);
+
+        check(errOut, "Errors.java", expectErrs);
+        check(warnOut, " warning ", expectWarns); // requires -locale en_US
+    }
+
+    void check(String text, String expectText, int expectCount) {
+        int foundCount = 0;
+        for (String line: text.split("[\r\n]+")) {
+            if (line.contains(expectText))
+                foundCount++;
+        }
+        if (foundCount != expectCount) {
+            error("incorrect number of matches found: " + foundCount
+                  + ", expected: " + expectCount);
+        }
+    }
+
+    private List<String> list(String... args) {
+        return Arrays.asList(args);
+    }
+
+    void error(String msg) {
+        System.err.println(msg);
+        errors++;
+    }
+
+    int count;
+    int errors;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javadoc/6958836/errs/Errors.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 errs;
+
+// class with 10 errors
+class Errors {
+    X m0() { }
+    X m1() { }
+    X m2() { }
+    X m3() { }
+    X m4() { }
+    X m5() { }
+    X m6() { }
+    X m7() { }
+    X m8() { }
+    X m9() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javadoc/6958836/warns/Warnings.java	Thu Jul 29 22:02:45 2010 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 warns;
+
+// class with 10 warnings
+public class Warnings {
+    /** @param x */
+    public void m0() { }
+
+    /** @param x */
+    public void m1() { }
+
+    /** @param x */
+    public void m2() { }
+
+    /** @param x */
+    public void m3() { }
+
+    /** @param x */
+    public void m4() { }
+
+    /** @param x */
+    public void m5() { }
+
+    /** @param x */
+    public void m6() { }
+
+    /** @param x */
+    public void m7() { }
+
+    /** @param x */
+    public void m8() { }
+
+    /** @param x */
+    public void m9() { }
+}
--- a/make/Defs-internal.gmk	Thu Jul 29 17:04:07 2010 +0100
+++ b/make/Defs-internal.gmk	Thu Jul 29 22:02:45 2010 -0700
@@ -52,7 +52,6 @@
 endif
 
 # Define absolute paths to TOPDIRs
-ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
 ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
 ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
--- a/make/jprt.gmk	Thu Jul 29 17:04:07 2010 +0100
+++ b/make/jprt.gmk	Thu Jul 29 22:02:45 2010 -0700
@@ -45,11 +45,11 @@
 endif
 
 jprt_build_fastdebug: fastdebug_build
-	( $(CD) $(OUTPUTDIR)-fastdebug/j2sdk-image && \
+	( $(CD) $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/j2sdk-image && \
 	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 jprt_build_debug: debug_build
-	( $(CD) $(OUTPUTDIR)-debug/j2sdk-image && \
+	( $(CD) $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/j2sdk-image && \
 	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 ################################################################
--- a/make/sanity-rules.gmk	Thu Jul 29 17:04:07 2010 +0100
+++ b/make/sanity-rules.gmk	Thu Jul 29 22:02:45 2010 -0700
@@ -228,7 +228,7 @@
 ######################################################
 alt_bootdir:
 ifdef ALT_BOOTDIR
-	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_BOOTDIR is \n" \
@@ -281,7 +281,6 @@
 	@$(ECHO) "Build Directory Structure:" >> $(MESSAGE_FILE)
 	@$(ECHO) "   CWD = `$(PWD)`" >> $(MESSAGE_FILE)
 	@$(ECHO) "   TOPDIR = $(TOPDIR)"  >> $(MESSAGE_FILE)
-	@$(ECHO) "   CONTROL_TOPDIR = $(CONTROL_TOPDIR)"  >> $(MESSAGE_FILE)
 ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
 	@$(ECHO) "   LANGTOOLS_TOPDIR = $(LANGTOOLS_TOPDIR)"  >> $(MESSAGE_FILE)
 endif
--- a/test/Makefile	Thu Jul 29 17:04:07 2010 +0100
+++ b/test/Makefile	Thu Jul 29 22:02:45 2010 -0700
@@ -54,30 +54,33 @@
 
 # Test target list for jdk repository
 JDK_TEST_LIST = \
-	jdk_awt \
-	jdk_beans jdk_beans1 jdk_beans2 jdk_beans3  \
+	jdk_beans1 jdk_beans2 jdk_beans3  \
 	jdk_io  \
 	jdk_lang  \
-	jdk_management jdk_management1 jdk_management2  \
+	jdk_management1 jdk_management2  \
 	jdk_math  \
 	jdk_misc  \
 	jdk_net  \
-	jdk_nio jdk_nio1 jdk_nio2 jdk_nio3  \
+	jdk_nio1 jdk_nio2 jdk_nio3  \
+	jdk_security1 jdk_security2 jdk_security3  \
+	jdk_text  \
+	jdk_tools1 jdk_tools2  \
+	jdk_util
+
+# These tests need a DISPLAY and can create window interaction complications
+JDK_TEST_LIST2 = \
+	jdk_awt \
 	jdk_rmi \
-	jdk_security jdk_security1 jdk_security2 jdk_security3  \
-	jdk_swing \
-	jdk_text  \
-	jdk_tools jdk_tools1 jdk_tools2  \
-	jdk_util
+	jdk_swing
 
 # Default test target (everything)
 all: $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST)
 
 # Test targets
 $(LANGTOOLS_TEST_LIST):
-	@$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@))
+	@$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@))
 $(JDK_TEST_LIST):
-	@$(call SUBDIR_TEST, $(JDK_DIR), $@)
+	@$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), $@)
 
 clean: