changeset 3585:6974128ccb13

Merge
author ysr
date Fri, 31 Jul 2009 10:41:29 -0700
parents 42c1f7bbffa4 2fa2817f3857
children 33e632b72dbf 0140e816d000
files hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp hotspot/src/share/vm/runtime/globals.hpp
diffstat 387 files changed, 4688 insertions(+), 961 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Jul 30 14:50:58 2009 -0400
+++ b/.hgtags	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 6107cbff3130c747d243c25a7874cd59db5744a8 jdk7-b62
 dfd8506f74c3731bb169ce93c72612d78ee0413b jdk7-b63
 d22867c5f1b295a0a2b3b4bc8999a2676f6e20c3 jdk7-b64
+7d3bf00f3cc4f8125de1842521e7567f37dc84b8 jdk7-b65
+62109d1b9e7310f29ab51ca6f1d71b899c0ce6b0 jdk7-b66
--- a/.hgtags-top-repo	Thu Jul 30 14:50:58 2009 -0400
+++ b/.hgtags-top-repo	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 c7ed15ab92ce36a09d264a5e34025884b2d7607f jdk7-b62
 57f7e028c7ad1806500ae89eb3f4cd9a51b10e18 jdk7-b63
 269c1ec4435dfb7b452ae6e3bdde005d55c5c830 jdk7-b64
+e01380cd1de4ce048b87d059d238e5ab5e341947 jdk7-b65
+6bad5e3fe50337d95b1416d744780d65bc570da6 jdk7-b66
--- a/corba/.hgtags	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/.hgtags	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 65b66117dbd70a493e9644aeb4033cf95a4e3c99 jdk7-b62
 d20e45cd539f20405ff843652069cfd7550c5ab3 jdk7-b63
 047dd27fddb607f8135296b3754131f6e13cb8c7 jdk7-b64
+97fd9b42f5c2d342b90d18f0a2b57e4117e39415 jdk7-b65
+a821e059a961bcb02830280d51f6dd030425c066 jdk7-b66
--- a/corba/make/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2009 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
--- a/corba/make/common/Library.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/common/Library.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1995-2009 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
--- a/corba/make/common/Rules.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/common/Rules.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1995-2009 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
--- a/corba/make/common/shared/Compiler-gcc.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/common/shared/Compiler-gcc.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/corba/make/common/shared/Defs-java.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/common/shared/Defs-java.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1995-2009 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
--- a/corba/make/common/shared/Defs-windows.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/common/shared/Defs-windows.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/corba/make/common/shared/Platform.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/common/shared/Platform.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1997-2009 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
--- a/corba/make/jprt.properties	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/jprt.properties	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2006-2009 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
--- a/corba/make/org/omg/idl/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/org/omg/idl/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
--- a/corba/make/tools/logutil/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/make/tools/logutil/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2008-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc	Fri Jul 31 10:41:29 2009 -0700
@@ -1,6 +1,6 @@
 ;
 
-; Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+; Copyright 2003-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2001-2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2001-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/corba/src/share/classes/org/omg/CORBA/ORB.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/share/classes/org/omg/CORBA/ORB.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2009 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
--- a/corba/src/windows/resource/version.rc	Thu Jul 30 14:50:58 2009 -0400
+++ b/corba/src/windows/resource/version.rc	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 //
-// Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+// Copyright 2004-2009 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
--- a/hotspot/.hgtags	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/.hgtags	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 a88386380bdaaa5ab4ffbedf22c57bac5dbec034 jdk7-b62
 32c83fb84370a35344676991a48440378e6b6c8a jdk7-b63
 ba36394eb84b949b31212bdb32a518a8f92bab5b jdk7-b64
+ba313800759b678979434d6da8ed3bf49eb8bea4 jdk7-b65
+57c71ad0341b8b64ed20f81151eb7f06324f8894 jdk7-b66
--- a/hotspot/agent/src/os/linux/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/os/linux/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2009 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
--- a/hotspot/make/hotspot_version	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/hotspot_version	Fri Jul 31 10:41:29 2009 -0700
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=16
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=06
+HS_BUILD_NUMBER=07
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/hotspot/make/jprt.properties	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/jprt.properties	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2006-2009 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
--- a/hotspot/make/linux/makefiles/jsig.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/linux/makefiles/jsig.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/hotspot/make/linux/makefiles/saproc.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/linux/makefiles/saproc.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/hotspot/make/solaris/makefiles/optimized.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/solaris/makefiles/optimized.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1998-2009 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
--- a/hotspot/make/solaris/makefiles/sparcWorks.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1998-2009 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
--- a/hotspot/make/windows/build_vm_def.sh	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/build_vm_def.sh	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2000-2009 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
--- a/hotspot/make/windows/create.bat	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/create.bat	Fri Jul 31 10:41:29 2009 -0700
@@ -1,6 +1,6 @@
 @echo off
 REM
-REM Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+REM Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 REM
 REM This code is free software; you can redistribute it and/or modify it
--- a/hotspot/make/windows/get_msc_ver.sh	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/get_msc_ver.sh	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/hotspot/make/windows/makefiles/adlc.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/adlc.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
--- a/hotspot/make/windows/makefiles/compile.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/compile.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1997-2009 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
--- a/hotspot/make/windows/makefiles/makedeps.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/makedeps.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
--- a/hotspot/make/windows/makefiles/rules.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/rules.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2003-2009 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
--- a/hotspot/make/windows/makefiles/sa.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/sa.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2003-2009 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
--- a/hotspot/make/windows/makefiles/sanity.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/sanity.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2006-2009 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
--- a/hotspot/make/windows/makefiles/vm.make	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/make/windows/makefiles/vm.make	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1997-2009 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
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/cpu/x86/vm/globals_x86.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os/linux/vm/os_linux.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os/linux/vm/os_linux.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os/solaris/dtrace/jhelper.d	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os/solaris/dtrace/jhelper.d	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -616,12 +616,13 @@
 }
 
 julong os::win32::available_memory() {
-  // FIXME: GlobalMemoryStatus() may return incorrect value if total memory
-  // is larger than 4GB
-  MEMORYSTATUS ms;
-  GlobalMemoryStatus(&ms);
-
-  return (julong)ms.dwAvailPhys;
+  // Use GlobalMemoryStatusEx() because GlobalMemoryStatus() may return incorrect
+  // value if total memory is larger than 4GB
+  MEMORYSTATUSEX ms;
+  ms.dwLength = sizeof(ms);
+  GlobalMemoryStatusEx(&ms);
+
+  return (julong)ms.ullAvailPhys;
 }
 
 julong os::physical_memory() {
@@ -1579,16 +1580,17 @@
   st->print("Memory:");
   st->print(" %dk page", os::vm_page_size()>>10);
 
-  // FIXME: GlobalMemoryStatus() may return incorrect value if total memory
-  // is larger than 4GB
-  MEMORYSTATUS ms;
-  GlobalMemoryStatus(&ms);
+  // Use GlobalMemoryStatusEx() because GlobalMemoryStatus() may return incorrect
+  // value if total memory is larger than 4GB
+  MEMORYSTATUSEX ms;
+  ms.dwLength = sizeof(ms);
+  GlobalMemoryStatusEx(&ms);
 
   st->print(", physical %uk", os::physical_memory() >> 10);
   st->print("(%uk free)", os::available_memory() >> 10);
 
-  st->print(", swap %uk", ms.dwTotalPageFile >> 10);
-  st->print("(%uk free)", ms.dwAvailPageFile >> 10);
+  st->print(", swap %uk", ms.ullTotalPageFile >> 10);
+  st->print("(%uk free)", ms.ullAvailPageFile >> 10);
   st->cr();
 }
 
@@ -3135,11 +3137,13 @@
   _processor_level = si.wProcessorLevel;
   _processor_count = si.dwNumberOfProcessors;
 
-  MEMORYSTATUS ms;
+  MEMORYSTATUSEX ms;
+  ms.dwLength = sizeof(ms);
+
   // also returns dwAvailPhys (free physical memory bytes), dwTotalVirtual, dwAvailVirtual,
   // dwMemoryLoad (% of memory in use)
-  GlobalMemoryStatus(&ms);
-  _physical_memory = ms.dwTotalPhys;
+  GlobalMemoryStatusEx(&ms);
+  _physical_memory = ms.ullTotalPhys;
 
   OSVERSIONINFO oi;
   oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
--- a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2009 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
--- a/hotspot/src/share/tools/MakeDeps/BuildConfig.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/MakeDeps/BuildConfig.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/tools/hsdis/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/hsdis/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2008-2009 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
--- a/hotspot/src/share/tools/hsdis/hsdis-demo.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/hsdis/hsdis-demo.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/hotspot/src/share/tools/hsdis/hsdis.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/tools/hsdis/hsdis.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/hotspot/src/share/vm/adlc/adlc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/adlc/adlc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/asm/assembler.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/asm/assembler.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/c1/c1_Compilation.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/c1/c1_Compilation.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/ci/ciEnv.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2006-2009 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
--- a/hotspot/src/share/vm/ci/ciStreams.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/ciStreams.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/ci/ciStreams.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/ciStreams.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -547,7 +547,6 @@
                                                  int length,
                                                  Handle class_loader,
                                                  Handle protection_domain,
-                                                 PerfTraceTime* vmtimer,
                                                  symbolHandle class_name,
                                                  TRAPS) {
   ClassFileStream* cfs = stream();
@@ -575,13 +574,11 @@
       guarantee_property(unresolved_klass->byte_at(0) != JVM_SIGNATURE_ARRAY,
                          "Bad interface name in class file %s", CHECK_(nullHandle));
 
-      vmtimer->suspend();  // do not count recursive loading twice
       // Call resolve_super so classcircularity is checked
       klassOop k = SystemDictionary::resolve_super_or_fail(class_name,
                     unresolved_klass, class_loader, protection_domain,
                     false, CHECK_(nullHandle));
       interf = KlassHandle(THREAD, k);
-      vmtimer->resume();
 
       if (LinkWellKnownClasses)  // my super type is well known to me
         cp->klass_at_put(interface_index, interf()); // eagerly resolve
@@ -2558,7 +2555,15 @@
 
   ClassFileStream* cfs = stream();
   // Timing
-  PerfTraceTime vmtimer(ClassLoader::perf_accumulated_time());
+  assert(THREAD->is_Java_thread(), "must be a JavaThread");
+  JavaThread* jt = (JavaThread*) THREAD;
+
+  PerfClassTraceTime ctimer(ClassLoader::perf_class_parse_time(),
+                            ClassLoader::perf_class_parse_selftime(),
+                            NULL,
+                            jt->get_thread_stat()->perf_recursion_counts_addr(),
+                            jt->get_thread_stat()->perf_timers_addr(),
+                            PerfClassTraceTime::PARSE_CLASS);
 
   _has_finalizer = _has_empty_finalizer = _has_vanilla_constructor = false;
 
@@ -2738,7 +2743,7 @@
     if (itfs_len == 0) {
       local_interfaces = objArrayHandle(THREAD, Universe::the_empty_system_obj_array());
     } else {
-      local_interfaces = parse_interfaces(cp, itfs_len, class_loader, protection_domain, &vmtimer, _class_name, CHECK_(nullHandle));
+      local_interfaces = parse_interfaces(cp, itfs_len, class_loader, protection_domain, _class_name, CHECK_(nullHandle));
     }
 
     // Fields (offsets are filled in later)
@@ -2782,6 +2787,7 @@
                                                            protection_domain,
                                                            true,
                                                            CHECK_(nullHandle));
+
       KlassHandle kh (THREAD, k);
       super_klass = instanceKlassHandle(THREAD, kh());
       if (LinkWellKnownClasses)  // my super class is well known to me
--- a/hotspot/src/share/vm/classfile/classFileParser.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/classfile/classFileParser.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -61,7 +61,6 @@
                                   int length,
                                   Handle class_loader,
                                   Handle protection_domain,
-                                  PerfTraceTime* vmtimer,
                                   symbolHandle class_name,
                                   TRAPS);
 
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
@@ -48,9 +48,26 @@
 PerfCounter*    ClassLoader::_perf_accumulated_time = NULL;
 PerfCounter*    ClassLoader::_perf_classes_inited = NULL;
 PerfCounter*    ClassLoader::_perf_class_init_time = NULL;
+PerfCounter*    ClassLoader::_perf_class_init_selftime = NULL;
+PerfCounter*    ClassLoader::_perf_classes_verified = NULL;
 PerfCounter*    ClassLoader::_perf_class_verify_time = NULL;
+PerfCounter*    ClassLoader::_perf_class_verify_selftime = NULL;
 PerfCounter*    ClassLoader::_perf_classes_linked = NULL;
 PerfCounter*    ClassLoader::_perf_class_link_time = NULL;
+PerfCounter*    ClassLoader::_perf_class_link_selftime = NULL;
+PerfCounter*    ClassLoader::_perf_class_parse_time = NULL;
+PerfCounter*    ClassLoader::_perf_class_parse_selftime = NULL;
+PerfCounter*    ClassLoader::_perf_sys_class_lookup_time = NULL;
+PerfCounter*    ClassLoader::_perf_shared_classload_time = NULL;
+PerfCounter*    ClassLoader::_perf_sys_classload_time = NULL;
+PerfCounter*    ClassLoader::_perf_app_classload_time = NULL;
+PerfCounter*    ClassLoader::_perf_app_classload_selftime = NULL;
+PerfCounter*    ClassLoader::_perf_app_classload_count = NULL;
+PerfCounter*    ClassLoader::_perf_define_appclasses = NULL;
+PerfCounter*    ClassLoader::_perf_define_appclass_time = NULL;
+PerfCounter*    ClassLoader::_perf_define_appclass_selftime = NULL;
+PerfCounter*    ClassLoader::_perf_app_classfile_bytes_read = NULL;
+PerfCounter*    ClassLoader::_perf_sys_classfile_bytes_read = NULL;
 PerfCounter*    ClassLoader::_sync_systemLoaderLockContentionRate = NULL;
 PerfCounter*    ClassLoader::_sync_nonSystemLoaderLockContentionRate = NULL;
 PerfCounter*    ClassLoader::_sync_JVMFindLoadedClassLockFreeCounter = NULL;
@@ -152,6 +169,9 @@
       hpi::close(file_handle);
       // construct ClassFileStream
       if (num_read == (size_t)st.st_size) {
+        if (UsePerfData) {
+          ClassLoader::perf_sys_classfile_bytes_read()->inc(num_read);
+        }
         return new ClassFileStream(buffer, st.st_size, _dir);    // Resource allocated
       }
     }
@@ -198,6 +218,9 @@
       buffer     = NEW_RESOURCE_ARRAY(u1, filesize);
       if (!(*ReadEntry)(_zip, entry, buffer, filename)) return NULL;
   }
+  if (UsePerfData) {
+    ClassLoader::perf_sys_classfile_bytes_read()->inc(filesize);
+  }
   // return result
   return new ClassFileStream(buffer, filesize, _zip_name);    // Resource allocated
 }
@@ -825,7 +848,9 @@
   ClassFileStream* stream = NULL;
   int classpath_index = 0;
   {
-    PerfTraceTime vmtimer(perf_accumulated_time());
+    PerfClassTraceTime vmtimer(perf_sys_class_lookup_time(),
+                               ((JavaThread*) THREAD)->get_thread_stat()->perf_timers_addr(),
+                               PerfClassTraceTime::CLASS_LOAD);
     ClassPathEntry* e = _first_entry;
     while (e != NULL) {
       stream = e->open_stream(name);
@@ -890,11 +915,29 @@
     // jvmstat performance counters
     NEWPERFTICKCOUNTER(_perf_accumulated_time, SUN_CLS, "time");
     NEWPERFTICKCOUNTER(_perf_class_init_time, SUN_CLS, "classInitTime");
+    NEWPERFTICKCOUNTER(_perf_class_init_selftime, SUN_CLS, "classInitTime.self");
     NEWPERFTICKCOUNTER(_perf_class_verify_time, SUN_CLS, "classVerifyTime");
+    NEWPERFTICKCOUNTER(_perf_class_verify_selftime, SUN_CLS, "classVerifyTime.self");
     NEWPERFTICKCOUNTER(_perf_class_link_time, SUN_CLS, "classLinkedTime");
-
+    NEWPERFTICKCOUNTER(_perf_class_link_selftime, SUN_CLS, "classLinkedTime.self");
     NEWPERFEVENTCOUNTER(_perf_classes_inited, SUN_CLS, "initializedClasses");
     NEWPERFEVENTCOUNTER(_perf_classes_linked, SUN_CLS, "linkedClasses");
+    NEWPERFEVENTCOUNTER(_perf_classes_verified, SUN_CLS, "verifiedClasses");
+
+    NEWPERFTICKCOUNTER(_perf_class_parse_time, SUN_CLS, "parseClassTime");
+    NEWPERFTICKCOUNTER(_perf_class_parse_selftime, SUN_CLS, "parseClassTime.self");
+    NEWPERFTICKCOUNTER(_perf_sys_class_lookup_time, SUN_CLS, "lookupSysClassTime");
+    NEWPERFTICKCOUNTER(_perf_shared_classload_time, SUN_CLS, "sharedClassLoadTime");
+    NEWPERFTICKCOUNTER(_perf_sys_classload_time, SUN_CLS, "sysClassLoadTime");
+    NEWPERFTICKCOUNTER(_perf_app_classload_time, SUN_CLS, "appClassLoadTime");
+    NEWPERFTICKCOUNTER(_perf_app_classload_selftime, SUN_CLS, "appClassLoadTime.self");
+    NEWPERFEVENTCOUNTER(_perf_app_classload_count, SUN_CLS, "appClassLoadCount");
+    NEWPERFTICKCOUNTER(_perf_define_appclasses, SUN_CLS, "defineAppClasses");
+    NEWPERFTICKCOUNTER(_perf_define_appclass_time, SUN_CLS, "defineAppClassTime");
+    NEWPERFTICKCOUNTER(_perf_define_appclass_selftime, SUN_CLS, "defineAppClassTime.self");
+    NEWPERFBYTECOUNTER(_perf_app_classfile_bytes_read, SUN_CLS, "appClassBytes");
+    NEWPERFBYTECOUNTER(_perf_sys_classfile_bytes_read, SUN_CLS, "sysClassBytes");
+
 
     // The following performance counters are added for measuring the impact
     // of the bug fix of 6365597. They are mainly focused on finding out
--- a/hotspot/src/share/vm/classfile/classLoader.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -149,9 +149,26 @@
   static PerfCounter* _perf_accumulated_time;
   static PerfCounter* _perf_classes_inited;
   static PerfCounter* _perf_class_init_time;
+  static PerfCounter* _perf_class_init_selftime;
+  static PerfCounter* _perf_classes_verified;
   static PerfCounter* _perf_class_verify_time;
+  static PerfCounter* _perf_class_verify_selftime;
   static PerfCounter* _perf_classes_linked;
   static PerfCounter* _perf_class_link_time;
+  static PerfCounter* _perf_class_link_selftime;
+  static PerfCounter* _perf_class_parse_time;
+  static PerfCounter* _perf_class_parse_selftime;
+  static PerfCounter* _perf_sys_class_lookup_time;
+  static PerfCounter* _perf_shared_classload_time;
+  static PerfCounter* _perf_sys_classload_time;
+  static PerfCounter* _perf_app_classload_time;
+  static PerfCounter* _perf_app_classload_selftime;
+  static PerfCounter* _perf_app_classload_count;
+  static PerfCounter* _perf_define_appclasses;
+  static PerfCounter* _perf_define_appclass_time;
+  static PerfCounter* _perf_define_appclass_selftime;
+  static PerfCounter* _perf_app_classfile_bytes_read;
+  static PerfCounter* _perf_sys_classfile_bytes_read;
 
   static PerfCounter* _sync_systemLoaderLockContentionRate;
   static PerfCounter* _sync_nonSystemLoaderLockContentionRate;
@@ -196,12 +213,29 @@
   static void print_bootclasspath();
 
   // Timing
-  static PerfCounter* perf_accumulated_time()  { return _perf_accumulated_time; }
-  static PerfCounter* perf_classes_inited()    { return _perf_classes_inited; }
-  static PerfCounter* perf_class_init_time()   { return _perf_class_init_time; }
-  static PerfCounter* perf_class_verify_time() { return _perf_class_verify_time; }
-  static PerfCounter* perf_classes_linked()    { return _perf_classes_linked; }
-  static PerfCounter* perf_class_link_time() { return _perf_class_link_time; }
+  static PerfCounter* perf_accumulated_time()         { return _perf_accumulated_time; }
+  static PerfCounter* perf_classes_inited()           { return _perf_classes_inited; }
+  static PerfCounter* perf_class_init_time()          { return _perf_class_init_time; }
+  static PerfCounter* perf_class_init_selftime()      { return _perf_class_init_selftime; }
+  static PerfCounter* perf_classes_verified()         { return _perf_classes_verified; }
+  static PerfCounter* perf_class_verify_time()        { return _perf_class_verify_time; }
+  static PerfCounter* perf_class_verify_selftime()    { return _perf_class_verify_selftime; }
+  static PerfCounter* perf_classes_linked()           { return _perf_classes_linked; }
+  static PerfCounter* perf_class_link_time()          { return _perf_class_link_time; }
+  static PerfCounter* perf_class_link_selftime()      { return _perf_class_link_selftime; }
+  static PerfCounter* perf_class_parse_time()         { return _perf_class_parse_time; }
+  static PerfCounter* perf_class_parse_selftime()     { return _perf_class_parse_selftime; }
+  static PerfCounter* perf_sys_class_lookup_time()    { return _perf_sys_class_lookup_time; }
+  static PerfCounter* perf_shared_classload_time()    { return _perf_shared_classload_time; }
+  static PerfCounter* perf_sys_classload_time()       { return _perf_sys_classload_time; }
+  static PerfCounter* perf_app_classload_time()       { return _perf_app_classload_time; }
+  static PerfCounter* perf_app_classload_selftime()   { return _perf_app_classload_selftime; }
+  static PerfCounter* perf_app_classload_count()      { return _perf_app_classload_count; }
+  static PerfCounter* perf_define_appclasses()        { return _perf_define_appclasses; }
+  static PerfCounter* perf_define_appclass_time()     { return _perf_define_appclass_time; }
+  static PerfCounter* perf_define_appclass_selftime() { return _perf_define_appclass_selftime; }
+  static PerfCounter* perf_app_classfile_bytes_read() { return _perf_app_classfile_bytes_read; }
+  static PerfCounter* perf_sys_classfile_bytes_read() { return _perf_sys_classfile_bytes_read; }
 
   // Record how often system loader lock object is contended
   static PerfCounter* sync_systemLoaderLockContentionRate() {
@@ -307,3 +341,118 @@
   static int  compile_the_world_counter() { return _compile_the_world_counter; }
 #endif //PRODUCT
 };
+
+// PerfClassTraceTime is used to measure time for class loading related events.
+// This class tracks cumulative time and exclusive time for specific event types.
+// During the execution of one event, other event types (e.g. class loading and
+// resolution) as well as recursive calls of the same event type could happen.
+// Only one elapsed timer (cumulative) and one thread-local self timer (exclusive)
+// (i.e. only one event type) are active at a time even multiple PerfClassTraceTime
+// instances have been created as multiple events are happening.
+class PerfClassTraceTime {
+  public:
+    enum {
+       CLASS_LOAD   = 0,
+       PARSE_CLASS  = 1,
+       CLASS_LINK   = 2,
+       CLASS_VERIFY = 3,
+       CLASS_CLINIT = 4,
+       DEFINE_CLASS = 5,
+       EVENT_TYPE_COUNT = 6
+    };
+  protected:
+    // _t tracks time from initialization to destruction of this timer instance
+    // including time for all other event types, and recursive calls of this type.
+    // When a timer is called recursively, the elapsedTimer _t would not be used.
+    elapsedTimer     _t;
+    PerfLongCounter* _timep;
+    PerfLongCounter* _selftimep;
+    PerfLongCounter* _eventp;
+    // pointer to thread-local recursion counter and timer array
+    // The thread_local timers track cumulative time for specific event types
+    // exclusive of time for other event types, but including recursive calls
+    // of the same type.
+    int*             _recursion_counters;
+    elapsedTimer*    _timers;
+    int              _event_type;
+    int              _prev_active_event;
+
+  public:
+
+    inline PerfClassTraceTime(PerfLongCounter* timep,     /* counter incremented with inclusive time */
+                              PerfLongCounter* selftimep, /* counter incremented with exclusive time */
+                              PerfLongCounter* eventp,    /* event counter */
+                              int* recursion_counters,    /* thread-local recursion counter array */
+                              elapsedTimer* timers,       /* thread-local timer array */
+                              int type                    /* event type */ ) :
+        _timep(timep), _selftimep(selftimep), _eventp(eventp), _recursion_counters(recursion_counters), _timers(timers), _event_type(type) {
+      initialize();
+    }
+
+    inline PerfClassTraceTime(PerfLongCounter* timep,     /* counter incremented with inclusive time */
+                              elapsedTimer* timers,       /* thread-local timer array */
+                              int type                    /* event type */ ) :
+        _timep(timep), _selftimep(NULL), _eventp(NULL), _recursion_counters(NULL), _timers(timers), _event_type(type) {
+      initialize();
+    }
+
+    void initialize() {
+      if (!UsePerfData) return;
+
+      if (_eventp != NULL) {
+        // increment the event counter
+        _eventp->inc();
+      }
+
+      // stop the current active thread-local timer to measure inclusive time
+      _prev_active_event = -1;
+      for (int i=0; i < EVENT_TYPE_COUNT; i++) {
+         if (_timers[i].is_active()) {
+           assert(_prev_active_event == -1, "should have only one active timer");
+           _prev_active_event = i;
+           _timers[i].stop();
+         }
+      }
+
+      if (_recursion_counters == NULL || (_recursion_counters[_event_type])++ == 0) {
+        // start the inclusive timer if not recursively called
+        _t.start();
+      }
+
+      // start thread-local timer of the given event type
+      if (!_timers[_event_type].is_active()) {
+        _timers[_event_type].start();
+      }
+    }
+
+    inline void suspend() { _t.stop(); _timers[_event_type].stop(); }
+    inline void resume()  { _t.start(); _timers[_event_type].start(); }
+
+    ~PerfClassTraceTime() {
+      if (!UsePerfData) return;
+
+      // stop the thread-local timer as the event completes
+      // and resume the thread-local timer of the event next on the stack
+      _timers[_event_type].stop();
+      jlong selftime = _timers[_event_type].ticks();
+
+      if (_prev_active_event >= 0) {
+        _timers[_prev_active_event].start();
+      }
+
+      if (_recursion_counters != NULL && --(_recursion_counters[_event_type]) > 0) return;
+
+      // increment the counters only on the leaf call
+      _t.stop();
+      _timep->inc(_t.ticks());
+      if (_selftimep != NULL) {
+        _selftimep->inc(selftime);
+      }
+      // add all class loading related event selftime to the accumulated time counter
+      ClassLoader::perf_accumulated_time()->inc(selftime);
+
+      // reset the timer
+      _timers[_event_type].reset();
+    }
+};
+
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1306,13 +1306,18 @@
 instanceKlassHandle SystemDictionary::load_instance_class(symbolHandle class_name, Handle class_loader, TRAPS) {
   instanceKlassHandle nh = instanceKlassHandle(); // null Handle
   if (class_loader.is_null()) {
+
     // Search the shared system dictionary for classes preloaded into the
     // shared spaces.
     instanceKlassHandle k;
-    k = load_shared_class(class_name, class_loader, THREAD);
+    {
+      PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time());
+      k = load_shared_class(class_name, class_loader, THREAD);
+    }
 
     if (k.is_null()) {
       // Use VM class loader
+      PerfTraceTime vmtimer(ClassLoader::perf_sys_classload_time());
       k = ClassLoader::load_classfile(class_name, CHECK_(nh));
     }
 
@@ -1334,6 +1339,16 @@
     // Use user specified class loader to load class. Call loadClass operation on class_loader.
     ResourceMark rm(THREAD);
 
+    assert(THREAD->is_Java_thread(), "must be a JavaThread");
+    JavaThread* jt = (JavaThread*) THREAD;
+
+    PerfClassTraceTime vmtimer(ClassLoader::perf_app_classload_time(),
+                               ClassLoader::perf_app_classload_selftime(),
+                               ClassLoader::perf_app_classload_count(),
+                               jt->get_thread_stat()->perf_recursion_counts_addr(),
+                               jt->get_thread_stat()->perf_timers_addr(),
+                               PerfClassTraceTime::CLASS_LOAD);
+
     Handle s = java_lang_String::create_from_symbol(class_name, CHECK_(nh));
     // Translate to external class name format, i.e., convert '/' chars to '.'
     Handle string = java_lang_String::externalize_classname(s, CHECK_(nh));
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/code/vtableStubs.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/code/vtableStubs.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/gc_interface/gcCause.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/gc_interface/gcCause.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/src/share/vm/includeDB_compiler1	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/includeDB_compiler1	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 //
-// Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+// Copyright 1999-2009 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
--- a/hotspot/src/share/vm/includeDB_core	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/includeDB_core	Fri Jul 31 10:41:29 2009 -0700
@@ -872,6 +872,7 @@
 classFileParser.cpp                     symbolOop.hpp
 classFileParser.cpp                     symbolTable.hpp
 classFileParser.cpp                     systemDictionary.hpp
+classFileParser.cpp                     threadService.hpp
 classFileParser.cpp                     timer.hpp
 classFileParser.cpp                     universe.inline.hpp
 classFileParser.cpp                     verificationType.hpp
@@ -924,6 +925,7 @@
 classLoader.cpp                         symbolOop.hpp
 classLoader.cpp                         systemDictionary.hpp
 classLoader.cpp                         threadCritical.hpp
+classLoader.cpp                         threadService.hpp
 classLoader.cpp                         timer.hpp
 classLoader.cpp                         universe.inline.hpp
 classLoader.cpp                         vmSymbols.hpp
@@ -4019,6 +4021,7 @@
 systemDictionary.cpp                    resolutionErrors.hpp
 systemDictionary.cpp                    signature.hpp
 systemDictionary.cpp                    systemDictionary.hpp
+systemDictionary.cpp                    threadService.hpp
 systemDictionary.cpp                    typeArrayKlass.hpp
 systemDictionary.cpp                    vmSymbols.hpp
 
--- a/hotspot/src/share/vm/includeDB_jvmti	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/includeDB_jvmti	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 //
-// Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+// Copyright 2007-2009 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
--- a/hotspot/src/share/vm/interpreter/bytecode.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/bytecode.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2002 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/bytecode.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/bytecode.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2002 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/bytecodes.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/bytecodes.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/bytecodes.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/invocationCounter.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/invocationCounter.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/rewriter.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/rewriter.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/interpreter/templateTable.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/templateTable.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/interpreter/templateTable.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/templateTable.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/memory/blockOffsetTable.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/memory/blockOffsetTable.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/share/vm/memory/cardTableRS.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/memory/cardTableRS.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 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
--- a/hotspot/src/share/vm/memory/gcLocker.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/memory/gcLocker.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -482,6 +482,10 @@
     for (int i = starting_level; i <= max_level; i++) {
       if (_gens[i]->should_collect(full, size, is_tlab)) {
         if (i == n_gens() - 1) {  // a major collection is to happen
+          if (!complete) {
+            // The full_collections increment was missed above.
+            increment_total_full_collections();
+          }
           pre_full_gc_dump();    // do any pre full gc dumps
         }
         // Timer for individual generations. Last argument is false: no CR
--- a/hotspot/src/share/vm/memory/heap.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/memory/heap.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/oops/arrayKlass.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/arrayKlass.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -140,6 +140,7 @@
     THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
   }
   if (length > arrayOopDesc::max_array_length(T_ARRAY)) {
+    report_java_out_of_memory("Requested array size exceeds VM limit");
     THROW_OOP_0(Universe::out_of_memory_error_array_size());
   }
   int size = objArrayOopDesc::object_size(length);
--- a/hotspot/src/share/vm/oops/cpCacheOop.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/cpCacheOop.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/oops/generateOopMap.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/generateOopMap.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -158,9 +158,6 @@
   // timer handles recursion
   assert(THREAD->is_Java_thread(), "non-JavaThread in link_class_impl");
   JavaThread* jt = (JavaThread*)THREAD;
-  PerfTraceTimedEvent vmtimer(ClassLoader::perf_class_link_time(),
-                        ClassLoader::perf_classes_linked(),
-                        jt->get_thread_stat()->class_link_recursion_count_addr());
 
   // link super class before linking this class
   instanceKlassHandle super(THREAD, this_oop->super());
@@ -194,6 +191,15 @@
     return true;
   }
 
+  // trace only the link time for this klass that includes
+  // the verification time
+  PerfClassTraceTime vmtimer(ClassLoader::perf_class_link_time(),
+                             ClassLoader::perf_class_link_selftime(),
+                             ClassLoader::perf_classes_linked(),
+                             jt->get_thread_stat()->perf_recursion_counts_addr(),
+                             jt->get_thread_stat()->perf_timers_addr(),
+                             PerfClassTraceTime::CLASS_LINK);
+
   // verification & rewriting
   {
     ObjectLocker ol(this_oop, THREAD);
@@ -203,12 +209,14 @@
     if (!this_oop->is_linked()) {
       if (!this_oop->is_rewritten()) {
         {
-          assert(THREAD->is_Java_thread(), "non-JavaThread in link_class_impl");
-          JavaThread* jt = (JavaThread*)THREAD;
           // Timer includes any side effects of class verification (resolution,
           // etc), but not recursive entry into verify_code().
-          PerfTraceTime timer(ClassLoader::perf_class_verify_time(),
-                            jt->get_thread_stat()->class_verify_recursion_count_addr());
+          PerfClassTraceTime timer(ClassLoader::perf_class_verify_time(),
+                                   ClassLoader::perf_class_verify_selftime(),
+                                   ClassLoader::perf_classes_verified(),
+                                   jt->get_thread_stat()->perf_recursion_counts_addr(),
+                                   jt->get_thread_stat()->perf_timers_addr(),
+                                   PerfClassTraceTime::CLASS_VERIFY);
           bool verify_ok = verify_code(this_oop, throw_verifyerror, THREAD);
           if (!verify_ok) {
             return false;
@@ -350,9 +358,12 @@
     JavaThread* jt = (JavaThread*)THREAD;
     // Timer includes any side effects of class initialization (resolution,
     // etc), but not recursive entry into call_class_initializer().
-    PerfTraceTimedEvent timer(ClassLoader::perf_class_init_time(),
-                              ClassLoader::perf_classes_inited(),
-                              jt->get_thread_stat()->class_init_recursion_count_addr());
+    PerfClassTraceTime timer(ClassLoader::perf_class_init_time(),
+                             ClassLoader::perf_class_init_selftime(),
+                             ClassLoader::perf_classes_inited(),
+                             jt->get_thread_stat()->perf_recursion_counts_addr(),
+                             jt->get_thread_stat()->perf_timers_addr(),
+                             PerfClassTraceTime::CLASS_CLINIT);
     this_oop->call_class_initializer(THREAD);
   }
 
@@ -497,6 +508,7 @@
 objArrayOop instanceKlass::allocate_objArray(int n, int length, TRAPS) {
   if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
   if (length > arrayOopDesc::max_array_length(T_OBJECT)) {
+    report_java_out_of_memory("Requested array size exceeds VM limit");
     THROW_OOP_0(Universe::out_of_memory_error_array_size());
   }
   int size = objArrayOopDesc::object_size(length);
--- a/hotspot/src/share/vm/oops/methodDataOop.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/methodDataOop.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -39,6 +39,7 @@
       assert(a->is_parsable(), "Can't publish unless parsable");
       return a;
     } else {
+      report_java_out_of_memory("Requested array size exceeds VM limit");
       THROW_OOP_0(Universe::out_of_memory_error_array_size());
     }
   } else {
--- a/hotspot/src/share/vm/oops/typeArrayKlass.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -80,6 +80,7 @@
       assert(t->is_parsable(), "Don't publish unless parsable");
       return t;
     } else {
+      report_java_out_of_memory("Requested array size exceeds VM limit");
       THROW_OOP_0(Universe::out_of_memory_error_array_size());
     }
   } else {
--- a/hotspot/src/share/vm/opto/addnode.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/addnode.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/block.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/block.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/buildOopMap.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/buildOopMap.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/opto/callnode.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/callnode.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/callnode.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/callnode.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/coalesce.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/coalesce.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/connode.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/connode.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/doCall.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/doCall.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/opto/escape.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/escape.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
--- a/hotspot/src/share/vm/opto/machnode.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/machnode.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/matcher.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/matcher.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/output.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/opto/parse.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/parse.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/parse1.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/parse1.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/parse2.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/parse2.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/opto/parse3.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/parse3.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/opto/parseHelper.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/parseHelper.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/opto/subnode.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/subnode.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/opto/superword.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/opto/superword.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2007-2009 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
--- a/hotspot/src/share/vm/prims/jvm.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -638,32 +638,10 @@
   if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
 JVM_END
 
-// Common implementation for JVM_FindClassFromBootLoader and
-// JVM_FindClassFromLoader
-static jclass jvm_find_class_from_class_loader(JNIEnv* env, const char* name,
-                                  jboolean init, jobject loader,
-                                  jboolean throwError, TRAPS) {
-  // Java libraries should ensure that name is never null...
-  if (name == NULL || (int)strlen(name) > symbolOopDesc::max_length()) {
-    // It's impossible to create this class;  the name cannot fit
-    // into the constant pool.
-    if (throwError) {
-      THROW_MSG_0(vmSymbols::java_lang_NoClassDefFoundError(), name);
-    } else {
-      THROW_MSG_0(vmSymbols::java_lang_ClassNotFoundException(), name);
-    }
-  }
-  symbolHandle h_name = oopFactory::new_symbol_handle(name, CHECK_NULL);
-  Handle h_loader(THREAD, JNIHandles::resolve(loader));
-  jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
-                                               Handle(), throwError, THREAD);
-
-  if (TraceClassResolution && result != NULL) {
-    trace_class_resolution(java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(result)));
-  }
-  return result;
-}
-
+
+// Returns a class loaded by the bootstrap class loader; or null
+// if not found.  ClassNotFoundException is not thrown.
+//
 // Rationale behind JVM_FindClassFromBootLoader
 // a> JVM_FindClassFromClassLoader was never exported in the export tables.
 // b> because of (a) java.dll has a direct dependecy on the  unexported
@@ -681,12 +659,26 @@
 // to the JDK, and is not intended to be a public API.
 
 JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
-                                              const char* name,
-                                              jboolean throwError))
-  JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
-              throwError ? "error" : "exception");
-  return jvm_find_class_from_class_loader(env, name, JNI_FALSE,
-                                          (jobject)NULL, throwError, THREAD);
+                                              const char* name))
+  JVMWrapper2("JVM_FindClassFromBootLoader %s", name);
+
+  // Java libraries should ensure that name is never null...
+  if (name == NULL || (int)strlen(name) > symbolOopDesc::max_length()) {
+    // It's impossible to create this class;  the name cannot fit
+    // into the constant pool.
+    return NULL;
+  }
+
+  symbolHandle h_name = oopFactory::new_symbol_handle(name, CHECK_NULL);
+  klassOop k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL);
+  if (k == NULL) {
+    return NULL;
+  }
+
+  if (TraceClassResolution) {
+    trace_class_resolution(k);
+  }
+  return (jclass) JNIHandles::make_local(env, Klass::cast(k)->java_mirror());
 JVM_END
 
 JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
@@ -694,8 +686,25 @@
                                                jboolean throwError))
   JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name,
                throwError ? "error" : "exception");
-  return jvm_find_class_from_class_loader(env, name, init, loader,
-                                          throwError, THREAD);
+  // Java libraries should ensure that name is never null...
+  if (name == NULL || (int)strlen(name) > symbolOopDesc::max_length()) {
+    // It's impossible to create this class;  the name cannot fit
+    // into the constant pool.
+    if (throwError) {
+      THROW_MSG_0(vmSymbols::java_lang_NoClassDefFoundError(), name);
+    } else {
+      THROW_MSG_0(vmSymbols::java_lang_ClassNotFoundException(), name);
+    }
+  }
+  symbolHandle h_name = oopFactory::new_symbol_handle(name, CHECK_NULL);
+  Handle h_loader(THREAD, JNIHandles::resolve(loader));
+  jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
+                                               Handle(), throwError, THREAD);
+
+  if (TraceClassResolution && result != NULL) {
+    trace_class_resolution(java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(result)));
+  }
+  return result;
 JVM_END
 
 
@@ -756,6 +765,20 @@
 static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source, TRAPS) {
   if (source == NULL)  source = "__JVM_DefineClass__";
 
+  assert(THREAD->is_Java_thread(), "must be a JavaThread");
+  JavaThread* jt = (JavaThread*) THREAD;
+
+  PerfClassTraceTime vmtimer(ClassLoader::perf_define_appclass_time(),
+                             ClassLoader::perf_define_appclass_selftime(),
+                             ClassLoader::perf_define_appclasses(),
+                             jt->get_thread_stat()->perf_recursion_counts_addr(),
+                             jt->get_thread_stat()->perf_timers_addr(),
+                             PerfClassTraceTime::DEFINE_CLASS);
+
+  if (UsePerfData) {
+    ClassLoader::perf_app_classfile_bytes_read()->inc(len);
+  }
+
   // Since exceptions can be thrown, class initialization can take place
   // if name is NULL no check for class name in .class stream has to be made.
   symbolHandle class_name;
@@ -3905,6 +3928,7 @@
   //   The Java level wrapper will perform the necessary security check allowing
   //   us to pass the NULL as the initiating class loader.
   klassOop klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL);
+
   KlassHandle klass_handle(THREAD, klass);
   // Check if we should initialize the class
   if (init && klass_handle->oop_is_instance()) {
--- a/hotspot/src/share/vm/prims/jvm.h	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/jvm.h	Fri Jul 31 10:41:29 2009 -0700
@@ -390,15 +390,10 @@
                              jobject loader, jboolean throwError);
 
 /*
- * Find a class from a boot class loader. Throw ClassNotFoundException
- * or NoClassDefFoundError depending on the value of the last
- * argument. This is the same as FindClassFromClassLoader but provided
- * as a convenience method exported correctly on all platforms for
- * JSR 277 launcher class loading.
+ * Find a class from a boot class loader. Returns NULL if class not found.
  */
 JNIEXPORT jclass JNICALL
-JVM_FindClassFromBootLoader(JNIEnv *env, const char *name,
-                            jboolean throwError);
+JVM_FindClassFromBootLoader(JNIEnv *env, const char *name);
 
 /*
  * Find a class from a given class.
--- a/hotspot/src/share/vm/prims/jvm_misc.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/jvm_misc.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
@@ -2427,6 +2427,11 @@
     return;
   }
 
+  if (ForceFullGCJVMTIEpilogues) {
+    // force 'Full GC' was done semantics for JVMTI GC epilogues
+    _full = true;
+  }
+
   // GarbageCollectionStart event posted from VM thread - okay because
   // JVMTI is clear that the "world is stopped" and callback shouldn't
   // try to call into the VM.
--- a/hotspot/src/share/vm/prims/methodComparator.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/prims/methodComparator.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/share/vm/runtime/biasedLocking.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/frame.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1082,6 +1082,9 @@
   product(ccstr, TraceJVMTI, NULL,                                          \
           "Trace flags for JVMTI functions and events")                     \
                                                                             \
+  product(bool, ForceFullGCJVMTIEpilogues, false,                           \
+          "Force 'Full GC' was done semantics for JVMTI GC epilogues")      \
+                                                                            \
   /* This option can change an EMCP method into an obsolete method. */      \
   /* This can affect tests that except specific methods to be EMCP. */      \
   /* This option should be used with caution. */                            \
--- a/hotspot/src/share/vm/runtime/hpi.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/hpi.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/mutexLocker.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/mutexLocker.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/mutexLocker.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/orderAccess.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/orderAccess.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/share/vm/runtime/orderAccess.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/orderAccess.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
--- a/hotspot/src/share/vm/runtime/perfData.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/perfData.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -868,6 +868,10 @@
   {counter = PerfDataManager::create_counter(counter_ns, counter_name, \
                                              PerfData::U_Events,CHECK);}
 
+#define NEWPERFBYTECOUNTER(counter, counter_ns, counter_name)  \
+  {counter = PerfDataManager::create_counter(counter_ns, counter_name, \
+                                             PerfData::U_Bytes,CHECK);}
+
 // Utility Classes
 
 /*
--- a/hotspot/src/share/vm/runtime/stackValue.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/stackValue.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/stackValue.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/stackValue.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/thread.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/thread.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/vframe.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vframe.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/vframe.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vframe.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/vframeArray.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vframeArray.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/vframe_hp.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vframe_hp.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/virtualspace.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/virtualspace.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/virtualspace.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/virtualspace.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
--- a/hotspot/src/share/vm/runtime/vmThread.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/runtime/vm_operations.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vm_operations.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/services/threadService.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/services/threadService.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -688,10 +688,9 @@
   _contended_enter_count = 0;
   _monitor_wait_count = 0;
   _sleep_count = 0;
-  _class_init_recursion_count = 0;
-  _class_verify_recursion_count = 0;
   _count_pending_reset = false;
   _timer_pending_reset = false;
+  memset((void*) _perf_recursion_counts, 0, sizeof(_perf_recursion_counts));
 }
 
 ThreadSnapshot::ThreadSnapshot(JavaThread* thread) {
--- a/hotspot/src/share/vm/services/threadService.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/services/threadService.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -120,9 +120,8 @@
   bool         _timer_pending_reset;
 
   // Keep accurate times for potentially recursive class operations
-  int          _class_init_recursion_count;
-  int          _class_verify_recursion_count;
-  int          _class_link_recursion_count;
+  int           _perf_recursion_counts[6];
+  elapsedTimer  _perf_timers[6];
 
   // utility functions
   void  check_and_reset_count()            {
@@ -165,9 +164,8 @@
   void reset_count_stat()                  { _count_pending_reset = true; }
   void reset_time_stat()                   { _timer_pending_reset = true; }
 
-  int* class_init_recursion_count_addr()   { return &_class_init_recursion_count; }
-  int* class_verify_recursion_count_addr() { return &_class_verify_recursion_count; }
-  int* class_link_recursion_count_addr()   { return &_class_link_recursion_count; }
+  int* perf_recursion_counts_addr()        { return _perf_recursion_counts; }
+  elapsedTimer* perf_timers_addr()         { return _perf_timers; }
 };
 
 // Thread snapshot to represent the thread state and statistics
--- a/hotspot/src/share/vm/utilities/bitMap.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/utilities/bitMap.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/utilities/bitMap.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/utilities/bitMap.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/hotspot/src/share/vm/utilities/exceptions.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/utilities/exceptions.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
--- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/src/share/vm/utilities/macros.hpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/src/share/vm/utilities/macros.hpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
--- a/hotspot/test/compiler/6772683/InterruptedTest.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/test/compiler/6772683/InterruptedTest.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/hotspot/test/compiler/6832293/Test.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/test/compiler/6832293/Test.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
--- a/jaxp/.hgtags	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/.hgtags	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 a97dd57a62604c35c79bc2fa77a612ed547f6135 jdk7-b62
 ae449e9c04c1fe651bd30f0f4d4cc24ba794e0c4 jdk7-b63
 a10eec7a1edf536f39b5828d8623054dbc62c2b7 jdk7-b64
+008c662e0ee9a91aebb75e46b97de979083d5c1c jdk7-b65
+22f9d5d5b5fe0f47048f41e6c6e54fee5edad0ec jdk7-b66
--- a/jaxp/make/build.properties	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/make/build.properties	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2009 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
--- a/jaxp/make/build.xml	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/make/build.xml	Fri Jul 31 10:41:29 2009 -0700
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
- Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ Copyright 2007-2009 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
--- a/jaxp/make/jprt.properties	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/make/jprt.properties	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2006-2009 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
--- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
  */
 
 /*
--- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
  */
 
 /*
--- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamFilterImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamFilterImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/jaxp/src/share/classes/com/sun/xml/internal/stream/events/XMLEventAllocatorImpl.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxp/src/share/classes/com/sun/xml/internal/stream/events/XMLEventAllocatorImpl.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
--- a/jaxws/.hgtags	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxws/.hgtags	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 75c801c13ea1ddebc58b1a8c8da9318d72750e62 jdk7-b62
 b8a6e883c0a6708f6d818815040525d472262495 jdk7-b63
 aaa25dfd3de68c6f1a1d3ef8c45fd99f76bca6dd jdk7-b64
+aa22a1be5866a6608ba17a7a443945559409ae0f jdk7-b65
+fa8712c099edd5c9a6b3ed9729353738004d388f jdk7-b66
--- a/jaxws/make/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxws/make/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2009 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
--- a/jaxws/make/build.properties	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxws/make/build.properties	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2009 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
--- a/jaxws/make/build.xml	Thu Jul 30 14:50:58 2009 -0400
+++ b/jaxws/make/build.xml	Fri Jul 31 10:41:29 2009 -0700
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
- Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ Copyright 2007-2009 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
--- a/jdk/.hgtags	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/.hgtags	Fri Jul 31 10:41:29 2009 -0700
@@ -39,3 +39,5 @@
 12e11fab9a839a9666a996a8f9a02fd8fa03aab6 jdk7-b62
 2ed6ed6b5bfc7dd724925b90dbb31223df59c25d jdk7-b63
 a50217eb3ee10b9f9547e0708e5c9625405083ef jdk7-b64
+382a27aa78d3236fa123c60577797a887fe93e09 jdk7-b65
+bd31b30a5b21f20e42965b1633f18a5c7946d398 jdk7-b66
--- a/jdk/make/common/Defs-linux.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/common/Defs-linux.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1999-2009 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
@@ -193,7 +193,7 @@
 CPPFLAGS_COMMON += -D_LP64=1
 endif
 
-CPPFLAGS_OPT    = 
+CPPFLAGS_OPT    = -DNDEBUG
 CPPFLAGS_DBG    = -DDEBUG
 ifneq ($(PRODUCT), java)
   CPPFLAGS_DBG    += -DLOGGING 
--- a/jdk/make/common/Defs-windows.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/common/Defs-windows.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -363,7 +363,7 @@
   CFLAGS_COMMON += -WX
 endif
 
-CPPFLAGS_OPT    = 
+CPPFLAGS_OPT    = -DNDEBUG
 CPPFLAGS_DBG    = -DDEBUG -DLOGGING
 
 CXXFLAGS_COMMON = $(CFLAGS_COMMON)
--- a/jdk/make/common/Release.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/common/Release.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1997-2009 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
--- a/jdk/make/common/shared/Defs-windows.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/common/shared/Defs-windows.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/jdk/make/common/shared/Defs.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/common/shared/Defs.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/jdk/make/common/shared/Sanity.gmk	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/common/shared/Sanity.gmk	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2009 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
--- a/jdk/make/java/redist/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/java/redist/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1997-2009 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
--- a/jdk/make/sun/Makefile	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/make/sun/Makefile	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1995-2009 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
--- a/jdk/src/share/classes/com/sun/awt/AWTUtilities.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/com/sun/awt/AWTUtilities.java	Fri Jul 31 10:41:29 2009 -0700
@@ -374,7 +374,7 @@
                     "The window argument should not be null.");
         }
 
-        return AWTAccessor.getWindowAccessor().isOpaque(window);
+        return window.isOpaque();
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2009 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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 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.
+ */
+package com.sun.beans.finder;
+
+import java.beans.BeanDescriptor;
+import java.beans.BeanInfo;
+import java.beans.MethodDescriptor;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+
+/**
+ * This is utility class that provides functionality
+ * to find a {@link BeanInfo} for a JavaBean specified by its type.
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+public final class BeanInfoFinder
+        extends InstanceFinder<BeanInfo> {
+
+    private static final String DEFAULT = "sun.beans.infos";
+
+    public BeanInfoFinder() {
+        super(BeanInfo.class, true, "BeanInfo", DEFAULT);
+    }
+
+    private static boolean isValid(Class<?> type, Method method) {
+        return (method != null) && type.equals(method.getDeclaringClass());
+    }
+
+    @Override
+    protected BeanInfo instantiate(Class<?> type, String name) {
+        BeanInfo info = super.instantiate(type, name);
+        if (info != null) {
+            // make sure that the returned BeanInfo matches the class
+            BeanDescriptor bd = info.getBeanDescriptor();
+            if (bd != null) {
+                if (type.equals(bd.getBeanClass())) {
+                    return info;
+                }
+            }
+            else {
+                PropertyDescriptor[] pds = info.getPropertyDescriptors();
+                if (pds != null) {
+                    for (PropertyDescriptor pd : pds) {
+                        Method method = pd.getReadMethod();
+                        if (method == null) {
+                            method = pd.getWriteMethod();
+                        }
+                        if (isValid(type, method)) {
+                            return info;
+                        }
+                    }
+                }
+                else {
+                    MethodDescriptor[] mds = info.getMethodDescriptors();
+                    if (mds != null) {
+                        for (MethodDescriptor md : mds) {
+                            if (isValid(type, md.getMethod())) {
+                                return info;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    @Override
+    protected BeanInfo instantiate(Class<?> type, String prefix, String name) {
+        // this optimization will only use the BeanInfo search path
+        // if is has changed from the original
+        // or trying to get the ComponentBeanInfo
+        return !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name)
+                ? super.instantiate(type, prefix, name)
+                : null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2009 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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 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.
+ */
+package com.sun.beans.finder;
+
+/**
+ * This is utility class that provides basic functionality
+ * to find an auxiliary class for a JavaBean specified by its type.
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+class InstanceFinder<T> {
+
+    private static final String[] EMPTY = { };
+
+    private final Class<? extends T> type;
+    private final boolean allow;
+    private final String suffix;
+    private String[] packages;
+
+    InstanceFinder(Class<? extends T> type, boolean allow, String suffix, String... packages) {
+        this.type = type;
+        this.allow = allow;
+        this.suffix = suffix;
+        this.packages = packages.clone();
+    }
+
+    public String[] getPackages() {
+        return (this.packages.length > 0)
+                ? this.packages.clone()
+                : this.packages;
+    }
+
+    public void setPackages(String... packages) {
+        this.packages = (packages != null) && (packages.length > 0)
+                ? packages.clone()
+                : EMPTY;
+    }
+
+    public T find(Class<?> type) {
+        if (type == null) {
+            return null;
+        }
+        String name = type.getName() + this.suffix;
+        T object = instantiate(type, name);
+        if (object != null) {
+            return object;
+        }
+        if (this.allow) {
+            object = instantiate(type, null);
+            if (object != null) {
+                return object;
+            }
+        }
+        int index = name.lastIndexOf('.') + 1;
+        if (index > 0) {
+            name = name.substring(index);
+        }
+        for (String prefix : this.packages) {
+            object = instantiate(type, prefix, name);
+            if (object != null) {
+                return object;
+            }
+        }
+        return null;
+    }
+
+    protected T instantiate(Class<?> type, String name) {
+        if (type != null) {
+            try {
+                if (name != null) {
+                    type = ClassFinder.findClass(name, type.getClassLoader());
+                }
+                if (this.type.isAssignableFrom(type)) {
+                    return (T) type.newInstance();
+                }
+            }
+            catch (Exception exception) {
+                // ignore any exceptions
+            }
+        }
+        return null;
+    }
+
+    protected T instantiate(Class<?> type, String prefix, String name) {
+        return instantiate(type, prefix + '.' + name);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 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.
+ */
+package com.sun.beans.finder;
+
+import java.beans.PersistenceDelegate;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This is utility class that provides functionality
+ * to find a {@link PersistenceDelegate} for a JavaBean specified by its type.
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+public final class PersistenceDelegateFinder
+        extends InstanceFinder<PersistenceDelegate> {
+
+    private final Map<Class<?>, PersistenceDelegate> registry;
+
+    public PersistenceDelegateFinder() {
+        super(PersistenceDelegate.class, true, "PersistenceDelegate");
+        this.registry = new HashMap<Class<?>, PersistenceDelegate>();
+    }
+
+    public void register(Class<?> type, PersistenceDelegate delegate) {
+        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);
+        return (delegate != null) ? delegate : super.find(type);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2009 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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 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.
+ */
+package com.sun.beans.finder;
+
+import com.sun.beans.WeakCache;
+
+import java.beans.PropertyEditor;
+
+import sun.beans.editors.BooleanEditor;
+import sun.beans.editors.ByteEditor;
+import sun.beans.editors.DoubleEditor;
+import sun.beans.editors.EnumEditor;
+import sun.beans.editors.FloatEditor;
+import sun.beans.editors.IntegerEditor;
+import sun.beans.editors.LongEditor;
+import sun.beans.editors.ShortEditor;
+
+/**
+ * This is utility class that provides functionality
+ * to find a {@link PropertyEditor} for a JavaBean specified by its type.
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+public final class PropertyEditorFinder
+        extends InstanceFinder<PropertyEditor> {
+
+    private final WeakCache<Class<?>, Class<?>> registry;
+
+    public PropertyEditorFinder() {
+        super(PropertyEditor.class, false, "Editor", "sun.beans.editors");
+
+        this.registry = new WeakCache<Class<?>, Class<?>>();
+        this.registry.put(Byte.TYPE, ByteEditor.class);
+        this.registry.put(Short.TYPE, ShortEditor.class);
+        this.registry.put(Integer.TYPE, IntegerEditor.class);
+        this.registry.put(Long.TYPE, LongEditor.class);
+        this.registry.put(Boolean.TYPE, BooleanEditor.class);
+        this.registry.put(Float.TYPE, FloatEditor.class);
+        this.registry.put(Double.TYPE, DoubleEditor.class);
+    }
+
+    public void register(Class<?> type, Class<?> editor) {
+        this.registry.put(type, editor);
+    }
+
+    @Override
+    public PropertyEditor find(Class<?> type) {
+        PropertyEditor editor = instantiate(this.registry.get(type), null);
+        if (editor == null) {
+            editor = super.find(type);
+            if ((editor == null) && (null != type.getEnumConstants())) {
+                editor = new EnumEditor(type);
+            }
+        }
+        return editor;
+    }
+}
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
@@ -493,9 +493,9 @@
      * Tests whether a name contains a nonempty component.
      */
     protected static boolean allEmpty(Name name) {
-        Enumeration enum_ = name.getAll();
+        Enumeration<String> enum_ = name.getAll();
         while (enum_.hasMoreElements()) {
-            if (!enum_.equals("")) {
+            if (!enum_.nextElement().isEmpty()) {
                 return false;
             }
         }
--- a/jdk/src/share/classes/java/awt/Component.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/awt/Component.java	Fri Jul 31 10:41:29 2009 -0700
@@ -2370,12 +2370,10 @@
      * rectangular region. A non-opaque component paints only some of
      * its pixels, allowing the pixels underneath it to "show through".
      * A component that does not fully paint its pixels therefore
-     * provides a degree of transparency.  Only lightweight
-     * components can be transparent.
+     * provides a degree of transparency.
      * <p>
      * Subclasses that guarantee to always completely paint their
-     * contents should override this method and return true.  All
-     * of the "heavyweight" AWT components are opaque.
+     * contents should override this method and return true.
      *
      * @return true if this component is completely opaque
      * @see #isLightweight
--- a/jdk/src/share/classes/java/awt/GraphicsDevice.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/awt/GraphicsDevice.java	Fri Jul 31 10:41:29 2009 -0700
@@ -281,8 +281,8 @@
             if (w.getOpacity() < 1.0f) {
                 w.setOpacity(1.0f);
             }
-            Color bgColor = w.getBackground();
-            if ((bgColor != null) && (bgColor.getAlpha() < 255)) {
+            if (!w.isOpaque()) {
+                Color bgColor = w.getBackground();
                 bgColor = new Color(bgColor.getRed(), bgColor.getGreen(),
                                     bgColor.getBlue(), 255);
                 w.setBackground(bgColor);
--- a/jdk/src/share/classes/java/awt/Robot.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/awt/Robot.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2009 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
@@ -70,7 +70,7 @@
     private RobotPeer peer;
     private boolean isAutoWaitForIdle = false;
     private int autoDelay = 0;
-    private static int LEGAL_BUTTON_MASK;
+    private static int LEGAL_BUTTON_MASK = 0;
 
     // location of robot's GC, used in mouseMove(), getPixelColor() and captureScreenImage()
     private Point gdLoc;
@@ -95,23 +95,6 @@
         }
         init(GraphicsEnvironment.getLocalGraphicsEnvironment()
             .getDefaultScreenDevice());
-        int tmpMask = 0;
-
-        if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){
-            if (Toolkit.getDefaultToolkit() instanceof SunToolkit) {
-                final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons();
-                for (int i = 0; i < buttonsNumber; i++){
-                    tmpMask |= InputEvent.getMaskForButton(i+1);
-                }
-            }
-        }
-        tmpMask |= InputEvent.BUTTON1_MASK|
-            InputEvent.BUTTON2_MASK|
-            InputEvent.BUTTON3_MASK|
-            InputEvent.BUTTON1_DOWN_MASK|
-            InputEvent.BUTTON2_DOWN_MASK|
-            InputEvent.BUTTON3_DOWN_MASK;
-        LEGAL_BUTTON_MASK = tmpMask;
     }
 
     /**
@@ -156,6 +139,28 @@
             disposer = new RobotDisposer(peer);
             sun.java2d.Disposer.addRecord(anchor, disposer);
         }
+        initLegalButtonMask();
+    }
+
+    private static synchronized void initLegalButtonMask() {
+        if (LEGAL_BUTTON_MASK != 0) return;
+
+        int tmpMask = 0;
+        if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){
+            if (Toolkit.getDefaultToolkit() instanceof SunToolkit) {
+                final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons();
+                for (int i = 0; i < buttonsNumber; i++){
+                    tmpMask |= InputEvent.getMaskForButton(i+1);
+                }
+            }
+        }
+        tmpMask |= InputEvent.BUTTON1_MASK|
+            InputEvent.BUTTON2_MASK|
+            InputEvent.BUTTON3_MASK|
+            InputEvent.BUTTON1_DOWN_MASK|
+            InputEvent.BUTTON2_DOWN_MASK|
+            InputEvent.BUTTON3_DOWN_MASK;
+        LEGAL_BUTTON_MASK = tmpMask;
     }
 
     /* determine if the security policy allows Robot's to be created */
--- a/jdk/src/share/classes/java/awt/TrayIcon.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/awt/TrayIcon.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
@@ -143,6 +143,9 @@
      */
     public TrayIcon(Image image) {
         this();
+        if (image == null) {
+            throw new IllegalArgumentException("creating TrayIcon with null Image");
+        }
         setImage(image);
     }
 
--- a/jdk/src/share/classes/java/awt/Window.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/awt/Window.java	Fri Jul 31 10:41:29 2009 -0700
@@ -3521,6 +3521,7 @@
      * @return this component's background color
      *
      * @see Window#setBackground
+     * @see Window#isOpaque
      * @see GraphicsDevice.WindowTranslucency
      */
     @Override
@@ -3583,6 +3584,7 @@
      *     PERPIXEL_TRANSLUCENT} translucency is not supported
      *
      * @see Window#getBackground
+     * @see Window#isOpaque
      * @see Window#setOpacity()
      * @see Window#setShape()
      * @see GraphicsDevice.WindowTranslucency
@@ -3597,7 +3599,7 @@
             return;
         }
         int oldAlpha = oldBg != null ? oldBg.getAlpha() : 255;
-        int alpha = bgColor.getAlpha();
+        int alpha = bgColor != null ? bgColor.getAlpha() : 255;
         if ((oldAlpha == 255) && (alpha < 255)) { // non-opaque window
             GraphicsConfiguration gc = getGraphicsConfiguration();
             GraphicsDevice gd = gc.getDevice();
@@ -3623,6 +3625,25 @@
         }
     }
 
+    /**
+     * Indicates if the window is currently opaque.
+     * <p>
+     * The method returns {@code false} if the background color of the window
+     * is not {@code null} and the alpha component of the color is less than
+     * 1.0f. The method returns {@code true} otherwise.
+     *
+     * @return {@code true} if the window is opaque, {@code false} otherwise
+     *
+     * @see Window#getBackground
+     * @see Window#setBackground
+     * @since 1.7
+     */
+    @Override
+    public boolean isOpaque() {
+        Color bg = getBackground();
+        return bg != null ? bg.getAlpha() == 255 : true;
+    }
+
     private void updateWindow() {
         synchronized (getTreeLock()) {
             WindowPeer peer = (WindowPeer)getPeer();
@@ -3639,12 +3660,11 @@
      */
     @Override
     public void paint(Graphics g) {
-        Color bgColor = getBackground();
-        if ((bgColor != null) && (bgColor.getAlpha() < 255)) {
+        if (!isOpaque()) {
             Graphics gg = g.create();
             try {
                 if (gg instanceof Graphics2D) {
-                    gg.setColor(bgColor);
+                    gg.setColor(getBackground());
                     ((Graphics2D)gg).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC));
                     gg.fillRect(0, 0, getWidth(), getHeight());
                 }
@@ -3749,10 +3769,6 @@
             public void setShape(Window window, Shape shape) {
                 window.setShape(shape);
             }
-            public boolean isOpaque(Window window) {
-                Color bg = window.getBackground();
-                return (bg != null) ? bg.getAlpha() == 255 : true;
-            }
             public void setOpaque(Window window, boolean opaque) {
                 Color bg = window.getBackground();
                 if (bg == null) {
--- a/jdk/src/share/classes/java/awt/color/ICC_Profile.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/awt/color/ICC_Profile.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 1997-2009 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
--- a/jdk/src/share/classes/java/beans/Encoder.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/Encoder.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
@@ -24,7 +24,8 @@
  */
 package java.beans;
 
-import java.util.Collections;
+import com.sun.beans.finder.PersistenceDelegateFinder;
+
 import java.util.HashMap;
 import java.util.IdentityHashMap;
 import java.util.Map;
@@ -45,8 +46,7 @@
  */
 
 public class Encoder {
-    private final Map<Class<?>, PersistenceDelegate> delegates
-            = Collections.synchronizedMap(new HashMap<Class<?>, PersistenceDelegate>());
+    private final PersistenceDelegateFinder finder = new PersistenceDelegateFinder();
     private Map bindings = new IdentityHashMap();
     private ExceptionListener exceptionListener;
     boolean executeStatements = true;
@@ -166,8 +166,13 @@
      * @see java.beans.BeanInfo#getBeanDescriptor
      */
     public PersistenceDelegate getPersistenceDelegate(Class<?> type) {
-        PersistenceDelegate pd = this.delegates.get(type);
-        return (pd != null) ? pd : MetaData.getPersistenceDelegate(type);
+        synchronized (this.finder) {
+            PersistenceDelegate pd = this.finder.find(type);
+            if (pd != null) {
+                return pd;
+            }
+        }
+        return MetaData.getPersistenceDelegate(type);
     }
 
     /**
@@ -184,10 +189,8 @@
     public void setPersistenceDelegate(Class<?> type,
                                        PersistenceDelegate persistenceDelegate)
     {
-        if (persistenceDelegate != null) {
-            this.delegates.put(type, persistenceDelegate);
-        } else {
-            this.delegates.remove(type);
+        synchronized (this.finder) {
+            this.finder.register(type, persistenceDelegate);
         }
     }
 
@@ -243,12 +246,11 @@
         for (int i = 0; i < oldArgs.length; i++) {
             newArgs[i] = writeObject1(oldArgs[i]);
         }
-        if (oldExp.getClass() == Statement.class) {
-            return new Statement(newTarget, oldExp.getMethodName(), newArgs);
-        }
-        else {
-            return new Expression(newTarget, oldExp.getMethodName(), newArgs);
-        }
+        Statement newExp = Statement.class.equals(oldExp.getClass())
+                ? new Statement(newTarget, oldExp.getMethodName(), newArgs)
+                : new Expression(newTarget, oldExp.getMethodName(), newArgs);
+        newExp.loader = oldExp.loader;
+        return newExp;
     }
 
     /**
--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -274,6 +274,11 @@
             }
             indexedWriteMethod = Introspector.findMethod(cls, indexedWriteMethodName,
                          2, (type == null) ? null : new Class[] { int.class, type });
+            if (indexedWriteMethod != null) {
+                if (!indexedWriteMethod.getReturnType().equals(void.class)) {
+                    indexedWriteMethod = null;
+                }
+            }
             setIndexedWriteMethod0(indexedWriteMethod);
         }
         return indexedWriteMethod;
--- a/jdk/src/share/classes/java/beans/Introspector.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/Introspector.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -25,6 +25,7 @@
 
 package java.beans;
 
+import com.sun.beans.finder.BeanInfoFinder;
 import com.sun.beans.finder.ClassFinder;
 
 import java.lang.ref.Reference;
@@ -45,6 +46,8 @@
 import java.util.List;
 import java.util.WeakHashMap;
 import java.util.TreeMap;
+
+import sun.awt.AppContext;
 import sun.reflect.misc.ReflectUtil;
 
 /**
@@ -137,10 +140,6 @@
     // events maps from String names to EventSetDescriptors
     private Map events;
 
-    private final static String DEFAULT_INFO_PATH = "sun.beans.infos";
-
-    private static String[] searchPath = { DEFAULT_INFO_PATH };
-
     private final static EventSetDescriptor[] EMPTY_EVENTSETDESCRIPTORS = new EventSetDescriptor[0];
 
     static final String ADD_PREFIX = "add";
@@ -149,7 +148,7 @@
     static final String SET_PREFIX = "set";
     static final String IS_PREFIX = "is";
 
-    private static final String BEANINFO_SUFFIX = "BeanInfo";
+    private static final Object FINDER_KEY = new Object();
 
     //======================================================================
     //                          Public methods
@@ -309,13 +308,11 @@
      *          Sun implementation initially sets to {"sun.beans.infos"}.
      */
 
-    public static synchronized String[] getBeanInfoSearchPath() {
-        // Return a copy of the searchPath.
-        String result[] = new String[searchPath.length];
-        for (int i = 0; i < searchPath.length; i++) {
-            result[i] = searchPath[i];
+    public static String[] getBeanInfoSearchPath() {
+        BeanInfoFinder finder = getFinder();
+        synchronized (finder) {
+            return finder.getPackages();
         }
-        return result;
     }
 
     /**
@@ -334,12 +331,15 @@
      * @see SecurityManager#checkPropertiesAccess
      */
 
-    public static synchronized void setBeanInfoSearchPath(String path[]) {
+    public static void setBeanInfoSearchPath(String[] path) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        searchPath = path;
+        BeanInfoFinder finder = getFinder();
+        synchronized (finder) {
+            finder.setPackages(path);
+        }
     }
 
 
@@ -447,67 +447,14 @@
      * then it checks to see if the class is its own BeanInfo. Finally,
      * the BeanInfo search path is prepended to the class and searched.
      *
+     * @param beanClass  the class type of the bean
      * @return Instance of an explicit BeanInfo class or null if one isn't found.
      */
-    private static synchronized BeanInfo findExplicitBeanInfo(Class beanClass) {
-        String name = beanClass.getName() + BEANINFO_SUFFIX;
-        try {
-            return (java.beans.BeanInfo)instantiate(beanClass, name);
-        } catch (Exception ex) {
-            // Just drop through
-
+    private static BeanInfo findExplicitBeanInfo(Class beanClass) {
+        BeanInfoFinder finder = getFinder();
+        synchronized (finder) {
+            return finder.find(beanClass);
         }
-        // Now try checking if the bean is its own BeanInfo.
-        try {
-            if (isSubclass(beanClass, java.beans.BeanInfo.class)) {
-                return (java.beans.BeanInfo)beanClass.newInstance();
-            }
-        } catch (Exception ex) {
-            // Just drop through
-        }
-        // Now try looking for <searchPath>.fooBeanInfo
-        name = name.substring(name.lastIndexOf('.')+1);
-
-        for (int i = 0; i < searchPath.length; i++) {
-            // This optimization will only use the BeanInfo search path if is has changed
-            // from the original or trying to get the ComponentBeanInfo.
-            if (!DEFAULT_INFO_PATH.equals(searchPath[i]) ||
-                DEFAULT_INFO_PATH.equals(searchPath[i]) && "ComponentBeanInfo".equals(name)) {
-                try {
-                    String fullName = searchPath[i] + "." + name;
-                    java.beans.BeanInfo bi = (java.beans.BeanInfo)instantiate(beanClass, fullName);
-
-                    // Make sure that the returned BeanInfo matches the class.
-                    if (bi.getBeanDescriptor() != null) {
-                        if (bi.getBeanDescriptor().getBeanClass() == beanClass) {
-                            return bi;
-                        }
-                    } else if (bi.getPropertyDescriptors() != null) {
-                        PropertyDescriptor[] pds = bi.getPropertyDescriptors();
-                        for (int j = 0; j < pds.length; j++) {
-                            Method method = pds[j].getReadMethod();
-                            if (method == null) {
-                                method = pds[j].getWriteMethod();
-                            }
-                            if (method != null && method.getDeclaringClass() == beanClass) {
-                                return bi;
-                            }
-                        }
-                    } else if (bi.getMethodDescriptors() != null) {
-                        MethodDescriptor[] mds = bi.getMethodDescriptors();
-                        for (int j = 0; j < mds.length; j++) {
-                            Method method = mds[j].getMethod();
-                            if (method != null && method.getDeclaringClass() == beanClass) {
-                                return bi;
-                            }
-                        }
-                    }
-                } catch (Exception ex) {
-                    // Silently ignore any errors.
-                }
-            }
-        }
-        return null;
     }
 
     /**
@@ -577,9 +524,9 @@
                             pd = new PropertyDescriptor(this.beanClass, name.substring(2), method, null);
                         }
                     } else if (argCount == 1) {
-                        if (argTypes[0] == int.class && name.startsWith(GET_PREFIX)) {
+                        if (int.class.equals(argTypes[0]) && name.startsWith(GET_PREFIX)) {
                             pd = new IndexedPropertyDescriptor(this.beanClass, name.substring(3), null, null, method, null);
-                        } else if (resultType == void.class && name.startsWith(SET_PREFIX)) {
+                        } else if (void.class.equals(resultType) && name.startsWith(SET_PREFIX)) {
                             // Simple setter
                             pd = new PropertyDescriptor(this.beanClass, name.substring(3), null, method);
                             if (throwsException(method, PropertyVetoException.class)) {
@@ -587,7 +534,7 @@
                             }
                         }
                     } else if (argCount == 2) {
-                            if (argTypes[0] == int.class && name.startsWith(SET_PREFIX)) {
+                            if (void.class.equals(resultType) && int.class.equals(argTypes[0]) && name.startsWith(SET_PREFIX)) {
                             pd = new IndexedPropertyDescriptor(this.beanClass, name.substring(3), null, null, null, method);
                             if (throwsException(method, PropertyVetoException.class)) {
                                 pd.setConstrained(true);
@@ -1483,6 +1430,16 @@
         return false;
     }
 
+    private static BeanInfoFinder getFinder() {
+        AppContext context = AppContext.getAppContext();
+        Object object = context.get(FINDER_KEY);
+        if (object instanceof BeanInfoFinder) {
+            return (BeanInfoFinder) object;
+        }
+        BeanInfoFinder finder = new BeanInfoFinder();
+        context.put(FINDER_KEY, finder);
+        return finder;
+    }
 
     /**
      * Try to create an instance of a named class.
--- a/jdk/src/share/classes/java/beans/MetaData.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/MetaData.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
@@ -219,7 +219,9 @@
             return new Expression(oldInstance, String.class, "getClass", new Object[]{});
         }
         else {
-            return new Expression(oldInstance, Class.class, "forName", new Object[]{c.getName()});
+            Expression newInstance = new Expression(oldInstance, Class.class, "forName", new Object[] { c.getName() });
+            newInstance.loader = c.getClassLoader();
+            return newInstance;
         }
     }
 }
--- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -294,6 +294,11 @@
 
             writeMethod = Introspector.findMethod(cls, writeMethodName, 1,
                           (type == null) ? null : new Class[] { type });
+            if (writeMethod != null) {
+                if (!writeMethod.getReturnType().equals(void.class)) {
+                    writeMethod = null;
+                }
+            }
             try {
                 setWriteMethod(writeMethod);
             } catch (IntrospectionException ex) {
--- a/jdk/src/share/classes/java/beans/PropertyEditorManager.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/PropertyEditorManager.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -25,8 +25,8 @@
 
 package java.beans;
 
-import com.sun.beans.WeakCache;
-import sun.beans.editors.*;
+import com.sun.beans.finder.PropertyEditorFinder;
+import sun.awt.AppContext;
 
 /**
  * The PropertyEditorManager can be used to locate a property editor for
@@ -55,6 +55,8 @@
 
 public class PropertyEditorManager {
 
+    private static final Object FINDER_KEY = new Object();
+
     /**
      * Registers an editor class to edit values of the given target class.
      * If the editor class is {@code null},
@@ -74,12 +76,15 @@
      *
      * @see SecurityManager#checkPropertiesAccess
      */
-    public static synchronized void registerEditor(Class<?> targetType, Class<?> editorClass) {
+    public static void registerEditor(Class<?> targetType, Class<?> editorClass) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        registry.put(targetType, editorClass);
+        PropertyEditorFinder finder = getFinder();
+        synchronized (finder) {
+            finder.register(targetType, editorClass);
+        }
     }
 
     /**
@@ -89,46 +94,11 @@
      * @return An editor object for the given target class.
      * The result is null if no suitable editor can be found.
      */
-    public static synchronized PropertyEditor findEditor(Class<?> targetType) {
-        Class editorClass = registry.get(targetType);
-        if (editorClass != null) {
-            try {
-                Object o = editorClass.newInstance();
-                return (PropertyEditor)o;
-            } catch (Exception ex) {
-                System.err.println("Couldn't instantiate type editor \"" +
-                        editorClass.getName() + "\" : " + ex);
-            }
+    public static PropertyEditor findEditor(Class<?> targetType) {
+        PropertyEditorFinder finder = getFinder();
+        synchronized (finder) {
+            return finder.find(targetType);
         }
-
-        // Now try adding "Editor" to the class name.
-
-        String editorName = targetType.getName() + "Editor";
-        try {
-            return (PropertyEditor) Introspector.instantiate(targetType, editorName);
-        } catch (Exception ex) {
-           // Silently ignore any errors.
-        }
-
-        // Now try looking for <searchPath>.fooEditor
-        int index = editorName.lastIndexOf('.') + 1;
-        if (index > 0) {
-            editorName = editorName.substring(index);
-        }
-        for (String path : searchPath) {
-            String name = path + '.' + editorName;
-            try {
-                return (PropertyEditor) Introspector.instantiate(targetType, name);
-            } catch (Exception ex) {
-               // Silently ignore any errors.
-            }
-        }
-
-        if (null != targetType.getEnumConstants()) {
-            return new EnumEditor(targetType);
-        }
-        // We couldn't find a suitable Editor.
-        return null;
     }
 
     /**
@@ -139,8 +109,11 @@
      * <p>     The default value for this array is implementation-dependent,
      *         e.g. Sun implementation initially sets to  {"sun.beans.editors"}.
      */
-    public static synchronized String[] getEditorSearchPath() {
-        return searchPath.clone();
+    public static String[] getEditorSearchPath() {
+        PropertyEditorFinder finder = getFinder();
+        synchronized (finder) {
+            return finder.getPackages();
+        }
     }
 
     /**
@@ -156,28 +129,25 @@
      *              of system properties.
      * @see SecurityManager#checkPropertiesAccess
      */
-    public static synchronized void setEditorSearchPath(String[] path) {
+    public static void setEditorSearchPath(String[] path) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        searchPath = (path != null)
-                ? path.clone()
-                : EMPTY;
+        PropertyEditorFinder finder = getFinder();
+        synchronized (finder) {
+            finder.setPackages(path);
+        }
     }
 
-    private static String[] searchPath = { "sun.beans.editors" };
-    private static final String[] EMPTY = {};
-    private static final WeakCache<Class<?>, Class<?>> registry;
-
-    static {
-        registry = new WeakCache<Class<?>, Class<?>>();
-        registry.put(Byte.TYPE, ByteEditor.class);
-        registry.put(Short.TYPE, ShortEditor.class);
-        registry.put(Integer.TYPE, IntegerEditor.class);
-        registry.put(Long.TYPE, LongEditor.class);
-        registry.put(Boolean.TYPE, BooleanEditor.class);
-        registry.put(Float.TYPE, FloatEditor.class);
-        registry.put(Double.TYPE, DoubleEditor.class);
+    private static PropertyEditorFinder getFinder() {
+        AppContext context = AppContext.getAppContext();
+        Object object = context.get(FINDER_KEY);
+        if (object instanceof PropertyEditorFinder) {
+            return (PropertyEditorFinder) object;
+        }
+        PropertyEditorFinder finder = new PropertyEditorFinder();
+        context.put(FINDER_KEY, finder);
+        return finder;
     }
 }
--- a/jdk/src/share/classes/java/beans/Statement.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/beans/Statement.java	Fri Jul 31 10:41:29 2009 -0700
@@ -66,6 +66,7 @@
     Object target;
     String methodName;
     Object[] arguments;
+    ClassLoader loader;
 
     /**
      * Creates a new <code>Statement</code> object with a <code>target</code>,
@@ -157,7 +158,7 @@
         // of core from a class inside core. Special
         // case this method.
         if (target == Class.class && methodName.equals("forName")) {
-            return ClassFinder.resolveClass((String)arguments[0]);
+            return ClassFinder.resolveClass((String)arguments[0], this.loader);
         }
         Class[] argClasses = new Class[arguments.length];
         for(int i = 0; i < arguments.length; i++) {
--- a/jdk/src/share/classes/java/lang/Byte.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/Byte.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -90,8 +90,8 @@
      * If a new {@code Byte} instance is not required, this method
      * should generally be used in preference to the constructor
      * {@link #Byte(byte)}, as this method is likely to yield
-     * significantly better space and time performance by caching
-     * frequently requested values.
+     * significantly better space and time performance since
+     * all byte values are cached.
      *
      * @param  b a byte value.
      * @return a {@code Byte} instance representing {@code b}.
--- a/jdk/src/share/classes/java/lang/Character.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/Character.java	Fri Jul 31 10:41:29 2009 -0700
@@ -2571,6 +2571,10 @@
      * significantly better space and time performance by caching
      * frequently requested values.
      *
+     * This method will always cache values in the range '&#92;u0000'
+     * to '&#92;u007f'", inclusive, and may cache other values outside
+     * of this range.
+     *
      * @param  c a char value.
      * @return a <tt>Character</tt> instance representing <tt>c</tt>.
      * @since  1.5
--- a/jdk/src/share/classes/java/lang/Class.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/Class.java	Fri Jul 31 10:41:29 2009 -0700
@@ -627,7 +627,7 @@
      *
      * @return an array of {@code TypeVariable} objects that represent
      *     the type variables declared by this generic declaration
-     * @throws GenericSignatureFormatError if the generic
+     * @throws java.lang.reflect.GenericSignatureFormatError if the generic
      *     signature of this generic declaration does not conform to
      *     the format specified in the Java Virtual Machine Specification,
      *     3rd edition
@@ -673,12 +673,12 @@
      * {@code Class} object representing the {@code Object} class is
      * returned.
      *
-     * @throws GenericSignatureFormatError if the generic
+     * @throws java.lang.reflect.GenericSignatureFormatError if the generic
      *     class signature does not conform to the format specified in the
      *     Java Virtual Machine Specification, 3rd edition
      * @throws TypeNotPresentException if the generic superclass
      *     refers to a non-existent type declaration
-     * @throws MalformedParameterizedTypeException if the
+     * @throws java.lang.reflect.MalformedParameterizedTypeException if the
      *     generic superclass refers to a parameterized type that cannot be
      *     instantiated  for any reason
      * @return the superclass of the class represented by this object
@@ -795,14 +795,14 @@
      * <p>If this object represents a primitive type or void, the
      * method returns an array of length 0.
      *
-     * @throws GenericSignatureFormatError
+     * @throws java.lang.reflect.GenericSignatureFormatError
      *     if the generic class signature does not conform to the format
      *     specified in the Java Virtual Machine Specification, 3rd edition
      * @throws TypeNotPresentException if any of the generic
      *     superinterfaces refers to a non-existent type declaration
-     * @throws MalformedParameterizedTypeException if any of the
-     *     generic superinterfaces refer to a parameterized type that cannot
-     *     be instantiated  for any reason
+     * @throws java.lang.reflect.MalformedParameterizedTypeException
+     *     if any of the generic superinterfaces refer to a parameterized
+     *     type that cannot be instantiated for any reason
      * @return an array of interfaces implemented by this class
      * @since 1.5
      */
--- a/jdk/src/share/classes/java/lang/Integer.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/Integer.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2009 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
@@ -638,6 +638,9 @@
      * to yield significantly better space and time performance by
      * caching frequently requested values.
      *
+     * This method will always cache values in the range -128 to 127,
+     * inclusive, and may cache other values outside of this range.
+     *
      * @param  i an {@code int} value.
      * @return an {@code Integer} instance representing {@code i}.
      * @since  1.5
--- a/jdk/src/share/classes/java/lang/Long.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/Long.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2009 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
@@ -560,6 +560,11 @@
      * significantly better space and time performance by caching
      * frequently requested values.
      *
+     * Note that unlike the {@linkplain Integer#valueOf(int)
+     * corresponding method} in the {@code Integer} class, this method
+     * is <em>not</em> required to cache values within a particular
+     * range.
+     *
      * @param  l a long value.
      * @return a {@code Long} instance representing {@code l}.
      * @since  1.5
--- a/jdk/src/share/classes/java/lang/Short.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/Short.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -219,6 +219,9 @@
      * significantly better space and time performance by caching
      * frequently requested values.
      *
+     * This method will always cache values in the range -128 to 127,
+     * inclusive, and may cache other values outside of this range.
+     *
      * @param  s a short value.
      * @return a {@code Short} instance representing {@code s}.
      * @since  1.5
--- a/jdk/src/share/classes/java/lang/System.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/lang/System.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2009 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
--- a/jdk/src/share/classes/java/net/URLClassLoader.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/net/URLClassLoader.java	Fri Jul 31 10:41:29 2009 -0700
@@ -306,6 +306,35 @@
     }
 
     /*
+     * Retrieve the package using the specified package name.
+     * If non-null, verify the package using the specified code
+     * source and manifest.
+     */
+    private Package getAndVerifyPackage(String pkgname,
+                                        Manifest man, URL url) {
+        Package pkg = getPackage(pkgname);
+        if (pkg != null) {
+            // Package found, so check package sealing.
+            if (pkg.isSealed()) {
+                // Verify that code source URL is the same.
+                if (!pkg.isSealed(url)) {
+                    throw new SecurityException(
+                        "sealing violation: package " + pkgname + " is sealed");
+                }
+            } else {
+                // Make sure we are not attempting to seal the package
+                // at this code source URL.
+                if ((man != null) && isSealed(pkgname, man)) {
+                    throw new SecurityException(
+                        "sealing violation: can't seal package " + pkgname +
+                        ": already loaded");
+                }
+            }
+        }
+        return pkg;
+    }
+
+    /*
      * Defines a Class using the class bytes obtained from the specified
      * Resource. The resulting Class must be resolved before it can be
      * used.
@@ -316,32 +345,23 @@
         if (i != -1) {
             String pkgname = name.substring(0, i);
             // Check if package already loaded.
-            Package pkg = getPackage(pkgname);
             Manifest man = res.getManifest();
-            if (pkg != null) {
-                // Package found, so check package sealing.
-                if (pkg.isSealed()) {
-                    // Verify that code source URL is the same.
-                    if (!pkg.isSealed(url)) {
-                        throw new SecurityException(
-                            "sealing violation: package " + pkgname + " is sealed");
+            if (getAndVerifyPackage(pkgname, man, url) == null) {
+                try {
+                    if (man != null) {
+                        definePackage(pkgname, man, url);
+                    } else {
+                        definePackage(pkgname, null, null, null, null, null, null, null);
                     }
-
-                } else {
-                    // Make sure we are not attempting to seal the package
-                    // at this code source URL.
-                    if ((man != null) && isSealed(pkgname, man)) {
-                        throw new SecurityException(
-                            "sealing violation: can't seal package " + pkgname +
-                            ": already loaded");
+                } catch (IllegalArgumentException iae) {
+                    // parallel-capable class loaders: re-verify in case of a
+                    // race condition
+                    if (getAndVerifyPackage(pkgname, man, url) == null) {
+                        // Should never happen
+                        throw new AssertionError("Cannot find package " +
+                                                 pkgname);
                     }
                 }
-            } else {
-                if (man != null) {
-                    definePackage(pkgname, man, url);
-                } else {
-                    definePackage(pkgname, null, null, null, null, null, null, null);
-                }
             }
         }
         // Now read the class bytes and define the class
--- a/jdk/src/share/classes/java/nio/file/LinkPermission.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/nio/file/LinkPermission.java	Fri Jul 31 10:41:29 2009 -0700
@@ -46,7 +46,7 @@
  *   known as creating a link, or hard link. </td>
  *   <td> Extreme care should be taken when granting this permission. It allows
  *   linking to any file or directory in the file system thus allowing the
- *   attacker to access to all files. </td>
+ *   attacker access to all files. </td>
  * </tr>
  * <tr>
  *   <td>symbolic</td>
--- a/jdk/src/share/classes/java/nio/file/NotLinkException.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/nio/file/NotLinkException.java	Fri Jul 31 10:41:29 2009 -0700
@@ -27,7 +27,7 @@
 
 /**
  * Checked exception thrown when a file system operation fails because a file
- * is not a link.
+ * is not a symbolic link.
  *
  * @since 1.7
  */
--- a/jdk/src/share/classes/java/nio/file/Path.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/nio/file/Path.java	Fri Jul 31 10:41:29 2009 -0700
@@ -91,8 +91,8 @@
  *      iterate over the entries in the directory. </p></li>
  *   <li><p> Files can be {@link #copyTo(Path,CopyOption[]) copied} or
  *     {@link #moveTo(Path,CopyOption[]) moved}. </p></li>
- *   <li><p> Symbolic-links may be {@link #createSymbolicLink created}, or the
- *     target of a link may be {@link #readSymbolicLink read}. </p></li>
+ *   <li><p> Symbolic links may be {@link #createSymbolicLink created}, or the
+ *     target of a symbolic link may be {@link #readSymbolicLink read}. </p></li>
  *   <li><p> The {@link #toRealPath real} path of an existing file may be
  *     obtained. </li></p>
  * </ul>
@@ -403,12 +403,12 @@
      *   <i>p</i><tt>.relativize(</tt><i>p</i><tt>.resolve(</tt><i>q</i><tt>)).equals(</tt><i>q</i><tt>)</tt>
      * </blockquote>
      *
-     * <p> When symbolic-links are supported, then whether the resulting path,
+     * <p> When symbolic links are supported, then whether the resulting path,
      * when resolved against this path, yields a path that can be used to locate
      * the {@link #isSameFile same} file as {@code other} is implementation
      * dependent. For example, if this path is  {@code "/a/b"} and the given
      * path is {@code "/a/x"} then the resulting relative path may be {@code
-     * "../x"}. If {@code "b"} is a symbolic-link then is implementation
+     * "../x"}. If {@code "b"} is a symbolic link then is implementation
      * dependent if {@code "a/b/../x"} would locate the same file as {@code "/a/x"}.
      *
      * @param   other
@@ -430,8 +430,8 @@
      *
      * <p> An implementation may require to examine the file to determine if the
      * file is a directory. Consequently this method may not be atomic with respect
-     * to other file system operations.  If the file is a symbolic-link then the
-     * link is deleted and not the final target of the link.
+     * to other file system operations.  If the file is a symbolic link then the
+     * symbolic link itself, not the final target of the link, is deleted.
      *
      * <p> If the file is a directory then the directory must be empty. In some
      * implementations a directory has entries for special files or links that
@@ -459,11 +459,11 @@
     /**
      * Deletes the file located by this path, if it exists.
      *
-     * <p> As with the {@link #delete delete()} method, an implementation
-     * may require to examine the file to determine if the file is a directory.
+     * <p> As with the {@link #delete delete()} method, an implementation may
+     * need to examine the file to determine if the file is a directory.
      * Consequently this method may not be atomic with respect to other file
-     * system operations.  If the file is a symbolic-link then the link is
-     * deleted and not the final target of the link.
+     * system operations.  If the file is a symbolic link, then the symbolic
+     * link itself, not the final target of the link, is deleted.
      *
      * <p> If the file is a directory then the directory must be empty. In some
      * implementations a directory has entries for special files or links that
@@ -507,7 +507,7 @@
      * create symbolic links, in which case this method may throw {@code IOException}.
      *
      * @param   target
-     *          the target of the link
+     *          the target of the symbolic link
      * @param   attrs
      *          the array of attributes to set atomically when creating the
      *          symbolic link
@@ -573,9 +573,9 @@
      * Reads the target of a symbolic link <i>(optional operation)</i>.
      *
      * <p> If the file system supports <a href="package-summary.html#links">symbolic
-     * links</a> then this method is used read the target of the link, failing
-     * if the file is not a link. The target of the link need not exist. The
-     * returned {@code Path} object will be associated with the same file
+     * links</a> then this method is used to read the target of the link, failing
+     * if the file is not a symbolic link. The target of the link need not exist.
+     * The returned {@code Path} object will be associated with the same file
      * system as this {@code Path}.
      *
      * @return  a {@code Path} object representing the target of the link
@@ -584,7 +584,7 @@
      *          if the implementation does not support symbolic links
      * @throws  NotLinkException
      *          if the target could otherwise not be read because the file
-     *          is not a link <i>(optional specific exception)</i>
+     *          is not a symbolic link <i>(optional specific exception)</i>
      * @throws  IOException
      *          if an I/O error occurs
      * @throws  SecurityException
@@ -724,8 +724,8 @@
      * exists, except if the source and target are the {@link #isSameFile same}
      * file, in which case this method has no effect. File attributes are not
      * required to be copied to the target file. If symbolic links are supported,
-     * and the file is a link, then the final target of the link is copied. If
-     * the file is a directory then it creates an empty directory in the target
+     * and the file is a symbolic link, then the final target of the link is copied.
+     * If the file is a directory then it creates an empty directory in the target
      * location (entries in the directory are not copied). This method can be
      * used with the {@link Files#walkFileTree Files.walkFileTree} utility
      * method to copy a directory and all entries in the directory, or an entire
@@ -740,8 +740,8 @@
      *   <td> {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} </td>
      *   <td> If the target file exists, then the target file is replaced if it
      *     is not a non-empty directory. If the target file exists and is a
-     *     symbolic-link then the symbolic-link is replaced (not the target of
-     *     the link. </td>
+     *     symbolic link, then the symbolic link itself, not the target of
+     *     the link, is replaced. </td>
      * </tr>
      * <tr>
      *   <td> {@link StandardCopyOption#COPY_ATTRIBUTES COPY_ATTRIBUTES} </td>
@@ -755,11 +755,11 @@
      * </tr>
      * <tr>
      *   <td> {@link LinkOption#NOFOLLOW_LINKS NOFOLLOW_LINKS} </td>
-     *   <td> Symbolic-links are not followed. If the file, located by this path,
-     *     is a symbolic-link then the link is copied rather than the target of
-     *     the link. It is implementation specific if file attributes can be
-     *     copied to the new link. In other words, the {@code COPY_ATTRIBUTES}
-     *     option may be ignored when copying a link. </td>
+     *   <td> Symbolic links are not followed. If the file, located by this path,
+     *     is a symbolic link, then the symbolic link itself, not the target of
+     *     the link, is copied. It is implementation specific if file attributes
+     *     can be copied to the new link. In other words, the {@code
+     *     COPY_ATTRIBUTES} option may be ignored when copying a symbolic link. </td>
      * </tr>
      * </table>
      *
@@ -807,18 +807,19 @@
      * <p> By default, this method attempts to move the file to the target
      * location, failing if the target file exists except if the source and
      * target are the {@link #isSameFile same} file, in which case this method
-     * has no effect. If the file is a symbolic link then the link is moved and
-     * not the target of the link. This method may be invoked to move an empty
-     * directory. In some implementations a directory has entries for special
-     * files or links that are created when the directory is created. In such
-     * implementations a directory is considered empty when only the special
-     * entries exist. When invoked to move a directory that is not empty then the
-     * directory is moved if it does not require moving the entries in the directory.
-     * For example, renaming a directory on the same {@link FileStore} will usually
-     * not require moving the entries in the directory. When moving a directory
-     * requires that its entries be moved then this method fails (by throwing
-     * an {@code IOException}). To move a <i>file tree</i> may involve copying
-     * rather than moving directories and this can be done using the {@link
+     * has no effect. If the file is a symbolic link then the symbolic link
+     * itself, not the target of the link, is moved. This method may be
+     * invoked to move an empty directory. In some implementations a directory
+     * has entries for special files or links that are created when the
+     * directory is created. In such implementations a directory is considered
+     * empty when only the special entries exist. When invoked to move a
+     * directory that is not empty then the directory is moved if it does not
+     * require moving the entries in the directory.  For example, renaming a
+     * directory on the same {@link FileStore} will usually not require moving
+     * the entries in the directory. When moving a directory requires that its
+     * entries be moved then this method fails (by throwing an {@code
+     * IOException}). To move a <i>file tree</i> may involve copying rather
+     * than moving directories and this can be done using the {@link
      * #copyTo copyTo} method in conjunction with the {@link
      * Files#walkFileTree Files.walkFileTree} utility method.
      *
@@ -831,8 +832,8 @@
      *   <td> {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} </td>
      *   <td> If the target file exists, then the target file is replaced if it
      *     is not a non-empty directory. If the target file exists and is a
-     *     symbolic-link then the symbolic-link is replaced and not the target of
-     *     the link. </td>
+     *     symbolic link, then the symbolic link itself, not the target of
+     *     the link, is replaced. </td>
      * </tr>
      * <tr>
      *   <td> {@link StandardCopyOption#ATOMIC_MOVE ATOMIC_MOVE} </td>
@@ -1495,7 +1496,7 @@
      *
      * <p> Where a file is registered with a watch service by means of a symbolic
      * link then it is implementation specific if the watch continues to depend
-     * on the existence of the link after it is registered.
+     * on the existence of the symbolic link after it is registered.
      *
      * @param   watcher
      *          the watch service to which this object is to be registered
--- a/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java	Fri Jul 31 10:41:29 2009 -0700
@@ -166,12 +166,13 @@
     /**
      * Deletes a file.
      *
-     * <p> Unlike the {@link Path#delete delete()} method, this method
-     * does not first examine the file to determine if the file is a directory.
+     * <p> Unlike the {@link Path#delete delete()} method, this method does
+     * not first examine the file to determine if the file is a directory.
      * Whether a directory is deleted by this method is system dependent and
-     * therefore not specified. If the file is a symbolic-link then the link is
-     * deleted (not the final target of the link). When the parameter is a
-     * relative path then the file to delete is relative to this open directory.
+     * therefore not specified. If the file is a symbolic link, then the link
+     * itself, not the final target of the link, is deleted. When the
+     * parameter is a relative path then the file to delete is relative to
+     * this open directory.
      *
      * @param   path
      *          the path of the file to delete
--- a/jdk/src/share/classes/java/nio/file/attribute/Attributes.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/nio/file/attribute/Attributes.java	Fri Jul 31 10:41:29 2009 -0700
@@ -48,9 +48,9 @@
      * symbolic links are followed and the file attributes of the final target
      * of the link are read. If the option {@link LinkOption#NOFOLLOW_LINKS
      * NOFOLLOW_LINKS} is present then symbolic links are not followed and so
-     * the method returns the file attributes of the symbolic link. This option
-     * should be used where there is a need to determine if a file is a
-     * symbolic link:
+     * the method returns the file attributes of the symbolic link itself.
+     * This option should be used where there is a need to determine if a
+     * file is a symbolic link:
      * <pre>
      *    boolean isSymbolicLink = Attributes.readBasicFileAttributes(file, NOFOLLOW_LINKS).isSymbolicLink();
      * </pre>
@@ -98,7 +98,7 @@
      * symbolic links are followed and the file attributes of the final target
      * of the link are read. If the option {@link LinkOption#NOFOLLOW_LINKS
      * NOFOLLOW_LINKS} is present then symbolic links are not followed and so
-     * the method returns the file attributes of the symbolic link.
+     * the method returns the file attributes of the symbolic link itself.
      *
      * @param   file
      *          A file reference that locates the file
@@ -145,7 +145,7 @@
      * symbolic links are followed and the file attributes of the final target
      * of the link are read. If the option {@link LinkOption#NOFOLLOW_LINKS
      * NOFOLLOW_LINKS} is present then symbolic links are not followed and so
-     * the method returns the file attributes of the symbolic link.
+     * the method returns the file attributes of the symbolic link itself.
      *
      * @param   file
      *          A file reference that locates the file
--- a/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java	Fri Jul 31 10:41:29 2009 -0700
@@ -81,13 +81,13 @@
     boolean isDirectory();
 
     /**
-     * Tells whether the file is a symbolic-link.
+     * Tells whether the file is a symbolic link.
      */
     boolean isSymbolicLink();
 
     /**
      * Tells whether the file is something other than a regular file, directory,
-     * or link.
+     * or symbolic link.
      */
     boolean isOther();
 
--- a/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 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
@@ -708,7 +708,7 @@
       // update window if it's non-opaque
       Window topLevel = SwingUtilities.getWindowAncestor(f);
       Toolkit tk = Toolkit.getDefaultToolkit();
-      if (!AWTAccessor.getWindowAccessor().isOpaque(topLevel) &&
+      if (!topLevel.isOpaque() &&
           (tk instanceof SunToolkit) &&
           ((SunToolkit)tk).needUpdateWindow())
       {
--- a/jdk/src/share/classes/javax/swing/RepaintManager.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/javax/swing/RepaintManager.java	Fri Jul 31 10:41:29 2009 -0700
@@ -732,7 +732,7 @@
                 (Window)dirty :
                 SwingUtilities.getWindowAncestor(dirty);
             if (window != null &&
-                !AWTAccessor.getWindowAccessor().isOpaque(window))
+                !window.isOpaque())
             {
                 windows.add(window);
             }
@@ -996,7 +996,7 @@
 
         // If the window is non-opaque, it's double-buffered at peer's level
         Window w = (c instanceof Window) ? (Window)c : SwingUtilities.getWindowAncestor(c);
-        if (!AWTAccessor.getWindowAccessor().isOpaque(w)) {
+        if (!w.isOpaque()) {
             Toolkit tk = Toolkit.getDefaultToolkit();
             if ((tk instanceof SunToolkit) && (((SunToolkit)tk).needUpdateWindow())) {
                 return null;
@@ -1032,7 +1032,7 @@
 
         // If the window is non-opaque, it's double-buffered at peer's level
         Window w = (c instanceof Window) ? (Window)c : SwingUtilities.getWindowAncestor(c);
-        if (!AWTAccessor.getWindowAccessor().isOpaque(w)) {
+        if (!w.isOpaque()) {
             Toolkit tk = Toolkit.getDefaultToolkit();
             if ((tk instanceof SunToolkit) && (((SunToolkit)tk).needUpdateWindow())) {
                 return null;
--- a/jdk/src/share/classes/sun/awt/AWTAccessor.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/awt/AWTAccessor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -137,11 +137,6 @@
          */
         void setShape(Window window, Shape shape);
         /*
-         * Identify whether the given window is opaque (true)
-         *  or translucent (false).
-         */
-        boolean isOpaque(Window window);
-        /*
          * Set the opaque preoperty to the given window.
          */
         void setOpaque(Window window, boolean isOpaque);
--- a/jdk/src/share/classes/sun/awt/SunToolkit.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/awt/SunToolkit.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1985,8 +1985,7 @@
      */
     public static boolean isContainingTopLevelOpaque(Component c) {
         Window w = getContainingWindow(c);
-        return w != null && ((Window)w).getBackground() != null &&
-            ((Window)w).getBackground().getAlpha() == 255;
+        return w != null && w.isOpaque();
     }
 
     /**
--- a/jdk/src/share/classes/sun/net/www/http/HttpCapture.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/net/www/http/HttpCapture.java	Fri Jul 31 10:41:29 2009 -0700
@@ -25,6 +25,8 @@
 
 package sun.net.www.http;
 import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -60,6 +62,76 @@
     private static boolean initialized = false;
     private static volatile ArrayList<Pattern> patterns = null;
     private static volatile ArrayList<String> capFiles = null;
+    /* Logging is done in an ugly way so that it does not require the presence
+     * the java.util.logging package. If the Logger class is not available, then
+     * logging is turned off. This is for helping the modularization effort.
+     */
+    private static Object logger = null;
+    private static boolean logging = false;
+
+    static {
+        Class cl;
+        try {
+            cl = Class.forName("java.util.logging.Logger");
+        } catch (ClassNotFoundException ex) {
+            cl = null;
+        }
+        if (cl != null) {
+            try {
+                Method m = cl.getMethod("getLogger", String.class);
+                logger = m.invoke(null, "sun.net.www.protocol.http.HttpURLConnection");
+                logging = true;
+            } catch (NoSuchMethodException noSuchMethodException) {
+            } catch (SecurityException securityException) {
+            } catch (IllegalAccessException illegalAccessException) {
+            } catch (IllegalArgumentException illegalArgumentException) {
+            } catch (InvocationTargetException invocationTargetException) {
+            }
+        }
+    }
+
+    public static void fine(String s) {
+        if (logging) {
+            ((Logger)logger).fine(s);
+        }
+    }
+
+    public static void finer(String s) {
+        if (logging) {
+            ((Logger)logger).finer(s);
+        }
+    }
+
+    public static void finest(String s) {
+        if (logging) {
+            ((Logger)logger).finest(s);
+        }
+    }
+
+    public static void severe(String s) {
+        if (logging) {
+            ((Logger)logger).finest(s);
+        }
+    }
+
+    public static void info(String s) {
+        if (logging) {
+            ((Logger)logger).info(s);
+        }
+    }
+
+    public static void warning(String s) {
+        if (logging) {
+            ((Logger)logger).warning(s);
+        }
+    }
+
+    public static boolean isLoggable(String level) {
+        if (!logging) {
+            return false;
+        }
+        return ((Logger)logger).isLoggable(Level.parse(level));
+    }
 
     private static synchronized void init() {
         initialized = true;
--- a/jdk/src/share/classes/sun/net/www/http/HttpClient.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/net/www/http/HttpClient.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2009 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
@@ -28,8 +28,6 @@
 import java.io.*;
 import java.net.*;
 import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import sun.net.NetworkClient;
 import sun.net.ProgressSource;
 import sun.net.www.MessageHeader;
@@ -66,10 +64,6 @@
     /** Default port number for http daemons. REMIND: make these private */
     static final int    httpPortNumber = 80;
 
-    // Use same logger as HttpURLConnection since we want to combine both event
-    // streams into one single HTTP log
-    private static Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection");
-
     /** return default port number (subclasses may override) */
     protected int getDefaultPort () { return httpPortNumber; }
 
@@ -810,8 +804,8 @@
 
             if (isKeepingAlive())   {
                 // Wrap KeepAliveStream if keep alive is enabled.
-                if (logger.isLoggable(Level.FINEST)) {
-                    logger.finest("KeepAlive stream used: " + url);
+                if (HttpCapture.isLoggable("FINEST")) {
+                    HttpCapture.finest("KeepAlive stream used: " + url);
                 }
                 serverInput = new KeepAliveStream(serverInput, pi, cl, this);
                 failedOnce = false;
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpLogFormatter.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpLogFormatter.java	Fri Jul 31 10:41:29 2009 -0700
@@ -49,8 +49,7 @@
 
     @Override
     public String format(LogRecord record) {
-        if (!"sun.net.www.protocol.http.HttpURLConnection".equalsIgnoreCase(record.getSourceClassName())
-                && !"sun.net.www.http.HttpClient".equalsIgnoreCase(record.getSourceClassName())) {
+        if (!"sun.net.www.http.HttpCapture".equalsIgnoreCase(record.getSourceClassName())) {
             // Don't change format for stuff that doesn't concern us
             return super.format(record);
         }
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Fri Jul 31 10:41:29 2009 -0700
@@ -51,14 +51,13 @@
 import java.util.Locale;
 import java.util.StringTokenizer;
 import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import sun.net.*;
 import sun.net.www.*;
 import sun.net.www.http.HttpClient;
 import sun.net.www.http.PosterOutputStream;
 import sun.net.www.http.ChunkedInputStream;
 import sun.net.www.http.ChunkedOutputStream;
+import sun.net.www.http.HttpCapture;
 import java.text.SimpleDateFormat;
 import java.util.TimeZone;
 import java.net.MalformedURLException;
@@ -71,8 +70,6 @@
 
 public class HttpURLConnection extends java.net.HttpURLConnection {
 
-    private static Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection");
-
     static String HTTP_CONNECT = "CONNECT";
 
     static final String version;
@@ -304,14 +301,14 @@
         return java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<PasswordAuthentication>() {
                 public PasswordAuthentication run() {
-                    if (logger.isLoggable(Level.FINEST)) {
-                        logger.finest("Requesting Authentication: host =" + host + " url = " + url);
+                    if (HttpCapture.isLoggable("FINEST")) {
+                        HttpCapture.finest("Requesting Authentication: host =" + host + " url = " + url);
                     }
                     PasswordAuthentication pass = Authenticator.requestPasswordAuthentication(
                         host, addr, port, protocol,
                         prompt, scheme, url, authType);
-                    if (pass != null && logger.isLoggable(Level.FINEST)) {
-                        logger.finest("Authentication returned: " + pass.toString());
+                    if (HttpCapture.isLoggable("FINEST")) {
+                        HttpCapture.finest("Authentication returned: " + (pass != null ? pass.toString() : "null"));
                     }
                     return pass;
                 }
@@ -466,8 +463,8 @@
 
             setRequests=true;
         }
-        if (logger.isLoggable(Level.FINE)) {
-            logger.fine(requests.toString());
+        if (HttpCapture.isLoggable("FINE")) {
+            HttpCapture.fine(requests.toString());
         }
         http.writeRequests(requests, poster);
         if (ps.checkError()) {
@@ -723,11 +720,9 @@
                         && !(cachedResponse instanceof SecureCacheResponse)) {
                         cachedResponse = null;
                     }
-                    if (logger.isLoggable(Level.FINEST)) {
-                        logger.finest("Cache Request for " + uri + " / " + getRequestMethod());
-                        if (cachedResponse != null) {
-                            logger.finest("From cache: "+cachedResponse.toString());
-                        }
+                    if (HttpCapture.isLoggable("FINEST")) {
+                        HttpCapture.finest("Cache Request for " + uri + " / " + getRequestMethod());
+                        HttpCapture.finest("From cache: " + (cachedResponse != null ? cachedResponse.toString() : "null"));
                     }
                     if (cachedResponse != null) {
                         cachedHeaders = mapToMessageHeader(cachedResponse.getHeaders());
@@ -766,8 +761,8 @@
                              });
                 if (sel != null) {
                     URI uri = sun.net.www.ParseUtil.toURI(url);
-                    if (logger.isLoggable(Level.FINEST)) {
-                        logger.finest("ProxySelector Request for " + uri);
+                    if (HttpCapture.isLoggable("FINEST")) {
+                        HttpCapture.finest("ProxySelector Request for " + uri);
                     }
                     Iterator<Proxy> it = sel.select(uri).iterator();
                     Proxy p;
@@ -783,9 +778,9 @@
                                 http = getNewHttpClient(url, p, connectTimeout, false);
                                 http.setReadTimeout(readTimeout);
                             }
-                            if (logger.isLoggable(Level.FINEST)) {
+                            if (HttpCapture.isLoggable("FINEST")) {
                                 if (p != null) {
-                                    logger.finest("Proxy used: " + p.toString());
+                                    HttpCapture.finest("Proxy used: " + p.toString());
                                 }
                             }
                             break;
@@ -1015,15 +1010,15 @@
 
             URI uri = ParseUtil.toURI(url);
             if (uri != null) {
-                if (logger.isLoggable(Level.FINEST)) {
-                    logger.finest("CookieHandler request for " + uri);
+                if (HttpCapture.isLoggable("FINEST")) {
+                    HttpCapture.finest("CookieHandler request for " + uri);
                 }
                 Map<String, List<String>> cookies
                     = cookieHandler.get(
                         uri, requests.getHeaders(EXCLUDE_HEADERS));
                 if (!cookies.isEmpty()) {
-                    if (logger.isLoggable(Level.FINEST)) {
-                        logger.finest("Cookies retrieved: " + cookies.toString());
+                    if (HttpCapture.isLoggable("FINEST")) {
+                        HttpCapture.finest("Cookies retrieved: " + cookies.toString());
                     }
                     for (Map.Entry<String, List<String>> entry :
                              cookies.entrySet()) {
@@ -1154,8 +1149,8 @@
                     writeRequests();
                 }
                 http.parseHTTP(responses, pi, this);
-                if (logger.isLoggable(Level.FINE)) {
-                    logger.fine(responses.toString());
+                if (HttpCapture.isLoggable("FINE")) {
+                    HttpCapture.fine(responses.toString());
                 }
                 inputStream = http.getInputStream();
 
@@ -1599,8 +1594,8 @@
                 http.parseHTTP(responses, null, this);
 
                 /* Log the response to the CONNECT */
-                if (logger.isLoggable(Level.FINE)) {
-                    logger.fine(responses.toString());
+                if (HttpCapture.isLoggable("FINE")) {
+                    HttpCapture.fine(responses.toString());
                 }
 
                 statusLine = responses.getValue(0);
@@ -1727,8 +1722,8 @@
         setPreemptiveProxyAuthentication(requests);
 
          /* Log the CONNECT request */
-        if (logger.isLoggable(Level.FINE)) {
-            logger.fine(requests.toString());
+        if (HttpCapture.isLoggable("FINE")) {
+            HttpCapture.fine(requests.toString());
         }
 
         http.writeRequests(requests, null);
@@ -1872,8 +1867,8 @@
                 }
             }
         }
-        if (logger.isLoggable(Level.FINER)) {
-            logger.finer("Proxy Authentication for " + authhdr.toString() +" returned " + ret.toString());
+        if (HttpCapture.isLoggable("FINER")) {
+            HttpCapture.finer("Proxy Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null"));
         }
         return ret;
     }
@@ -2002,8 +1997,8 @@
                 }
             }
         }
-        if (logger.isLoggable(Level.FINER)) {
-            logger.finer("Server Authentication for " + authhdr.toString() +" returned " + ret.toString());
+        if (HttpCapture.isLoggable("FINER")) {
+            HttpCapture.finer("Server Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null"));
         }
         return ret;
     }
@@ -2078,8 +2073,8 @@
         if (streaming()) {
             throw new HttpRetryException (RETRY_MSG3, stat, loc);
         }
-        if (logger.isLoggable(Level.FINE)) {
-            logger.fine("Redirected from " + url + " to " + locUrl);
+        if (HttpCapture.isLoggable("FINE")) {
+            HttpCapture.fine("Redirected from " + url + " to " + locUrl);
         }
 
         // clear out old response headers!!!!
--- a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java	Fri Jul 31 10:41:29 2009 -0700
@@ -238,7 +238,7 @@
         retVal = (int)(getEndTime().getTime()
                        - (new Date().getTime()));
 
-        return retVal;
+        return retVal/1000;
     }
 
     /**
--- a/jdk/src/share/classes/sun/security/krb5/Config.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/security/krb5/Config.java	Fri Jul 31 10:41:29 2009 -0700
@@ -123,7 +123,7 @@
             java.security.AccessController.doPrivileged(
                 new sun.security.action.GetPropertyAction
                     ("java.security.krb5.kdc"));
-         defaultRealm =
+        defaultRealm =
             java.security.AccessController.doPrivileged(
                 new sun.security.action.GetPropertyAction
                     ("java.security.krb5.realm"));
@@ -134,6 +134,16 @@
                  "java.security.krb5.realm both must be set or " +
                  "neither must be set.");
         }
+
+        // Read the Kerberos configuration file
+        try {
+            Vector<String> configFile;
+            configFile = loadConfigFile();
+            stanzaTable = parseStanzaTable(configFile);
+        } catch (IOException ioe) {
+            // No krb5.conf, no problem. We'll use DNS etc.
+        }
+
         if (kdchost != null) {
             /*
              * If configuration information is only specified by
@@ -141,22 +151,19 @@
              * java.security.krb5.realm, we put both in the hashtable
              * under [libdefaults].
              */
-            Hashtable<String,String> kdcs = new Hashtable<String,String> ();
+            if (stanzaTable == null) {
+                stanzaTable = new Hashtable<String,Object> ();
+            }
+            Hashtable<String,String> kdcs =
+                    (Hashtable<String,String>)stanzaTable.get("libdefaults");
+            if (kdcs == null) {
+                kdcs = new Hashtable<String,String> ();
+                stanzaTable.put("libdefaults", kdcs);
+            }
             kdcs.put("default_realm", defaultRealm);
             // The user can specify a list of kdc hosts separated by ":"
             kdchost = kdchost.replace(':', ' ');
             kdcs.put("kdc", kdchost);
-            stanzaTable = new Hashtable<String,Object> ();
-            stanzaTable.put("libdefaults", kdcs);
-        } else {
-            // Read the Kerberos configuration file
-            try {
-                Vector<String> configFile;
-                configFile = loadConfigFile();
-                stanzaTable = parseStanzaTable(configFile);
-            } catch (IOException ioe) {
-                // No krb5.conf, no problem. We'll use DNS etc.
-            }
         }
     }
 
@@ -294,7 +301,7 @@
          * hashtable.
          */
         if (name.equalsIgnoreCase("kdc") &&
-            (!section.equalsIgnoreCase("libdefaults")) &&
+            (section.equalsIgnoreCase(getDefault("default_realm", "libdefaults"))) &&
             (java.security.AccessController.doPrivileged(
                 new sun.security.action.
                 GetPropertyAction("java.security.krb5.kdc")) != null)) {
--- a/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 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
@@ -34,6 +34,7 @@
 
 import sun.security.action.GetPropertyAction;
 import sun.security.util.Debug;
+import sun.security.util.DerOutputStream;
 import sun.security.x509.*;
 
 /**
@@ -333,7 +334,15 @@
             if (match == false) {
                 return false;
             }
-            indirectCRL = true;
+
+            // we accept the case that a CRL issuer provide status
+            // information for itself.
+            if (ForwardBuilder.issues(certImpl, crlImpl, provider)) {
+                // reset the public key used to verify the CRL's signature
+                prevKey = certImpl.getPublicKey();
+            } else {
+                indirectCRL = true;
+            }
         } else if (crlIssuer.equals(certIssuer) == false) {
             if (debug != null) {
                 debug.println("crl issuer does not equal cert issuer");
@@ -347,7 +356,14 @@
                                 PKIXExtensions.AuthorityKey_Id.toString());
 
             if (!Arrays.equals(certAKID, crlAKID)) {
-                indirectCRL = true;
+                // we accept the case that a CRL issuer provide status
+                // information for itself.
+                if (ForwardBuilder.issues(certImpl, crlImpl, provider)) {
+                    // reset the public key used to verify the CRL's signature
+                    prevKey = certImpl.getPublicKey();
+                } else {
+                    indirectCRL = true;
+                }
             }
         }
 
@@ -542,10 +558,80 @@
             certSel.setSubject(crlIssuer.asX500Principal());
             boolean[] crlSign = {false,false,false,false,false,false,true};
             certSel.setKeyUsage(crlSign);
+
+            // Currently by default, forward builder does not enable
+            // subject/authority key identifier identifying for target
+            // certificate, instead, it only compares the CRL issuer and
+            // the target certificate subject. If the certificate of the
+            // delegated CRL issuer is a self-issued certificate, the
+            // builder is unable to find the proper CRL issuer by issuer
+            // name only, there is a potential dead loop on finding the
+            // proper issuer. It is of great help to narrow the target
+            // scope down to aware of authority key identifiers in the
+            // selector, for the purposes of breaking the dead loop.
+            AuthorityKeyIdentifierExtension akidext =
+                                            crlImpl.getAuthKeyIdExtension();
+            if (akidext != null) {
+                KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID);
+                if (akid != null) {
+                    DerOutputStream derout = new DerOutputStream();
+                    derout.putOctetString(akid.getIdentifier());
+                    certSel.setSubjectKeyIdentifier(derout.toByteArray());
+                }
+
+                SerialNumber asn =
+                    (SerialNumber)akidext.get(akidext.SERIAL_NUMBER);
+                if (asn != null) {
+                    certSel.setSerialNumber(asn.getNumber());
+                }
+                // the subject criterion will be set by builder automatically.
+            }
+
+            // by far, we have validated the previous certificate, we can
+            // trust it during validating the CRL issuer.
+            // Except the performance improvement, another benefit is to break
+            // the dead loop while looking for the issuer back and forth
+            // between the delegated self-issued certificate and its issuer.
+            Set<TrustAnchor> trustAnchors = new HashSet<TrustAnchor>();
+            if (anchor != null) {
+                trustAnchors.add(anchor);
+            }
+
+            if (prevKey != null) {
+                // if the previous key is of the anchor, don't bother to
+                // duplicate the trust.
+                boolean duplicated = false;
+                PublicKey publicKey = prevKey;
+                X500Principal principal = certImpl.getIssuerX500Principal();
+
+                if (anchor != null) {
+                    X509Certificate trustedCert = anchor.getTrustedCert();
+                    X500Principal trustedPrincipal;
+                    PublicKey trustedPublicKey;
+                    if (trustedCert != null) {
+                        trustedPrincipal = trustedCert.getSubjectX500Principal();
+                        trustedPublicKey = trustedCert.getPublicKey();
+                    } else {
+                        trustedPrincipal = anchor.getCA();
+                        trustedPublicKey = anchor.getCAPublicKey();
+                    }
+
+                    if (principal.equals(trustedPrincipal) &&
+                        publicKey.equals(trustedPublicKey)) {
+                        duplicated = true;
+                    }
+                }
+
+                if (!duplicated) {
+                    TrustAnchor temporary =
+                        new TrustAnchor(principal, publicKey, null);
+                    trustAnchors.add(temporary);
+                }
+            }
+
             PKIXBuilderParameters params = null;
             try {
-                params = new PKIXBuilderParameters
-                    (Collections.singleton(anchor), certSel);
+                params = new PKIXBuilderParameters(trustAnchors, certSel);
             } catch (InvalidAlgorithmParameterException iape) {
                 throw new CRLException(iape);
             }
--- a/jdk/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
@@ -30,6 +30,7 @@
 
 import java.security.GeneralSecurityException;
 import java.security.InvalidKeyException;
+import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
 import java.security.cert.CertPathValidatorException;
 import java.security.cert.PKIXReason;
@@ -43,12 +44,22 @@
 import javax.security.auth.x500.X500Principal;
 
 import sun.security.util.Debug;
+import sun.security.util.DerOutputStream;
 import sun.security.x509.AccessDescription;
 import sun.security.x509.AuthorityInfoAccessExtension;
 import sun.security.x509.PKIXExtensions;
 import sun.security.x509.PolicyMappingsExtension;
 import sun.security.x509.X500Name;
 import sun.security.x509.X509CertImpl;
+import sun.security.x509.X509CRLImpl;
+import sun.security.x509.AuthorityKeyIdentifierExtension;
+import sun.security.x509.KeyIdentifier;
+import sun.security.x509.SubjectKeyIdentifierExtension;
+import sun.security.x509.SerialNumber;
+import sun.security.x509.GeneralNames;
+import sun.security.x509.GeneralName;
+import sun.security.x509.GeneralNameInterface;
+import java.math.BigInteger;
 
 /**
  * This class represents a forward builder, which is able to retrieve
@@ -237,7 +248,7 @@
         } else {
 
             if (caSelector == null) {
-                caSelector = new X509CertSelector();
+                caSelector = new AdaptableX509CertSelector();
 
                 /*
                  * Match on certificate validity date.
@@ -269,6 +280,29 @@
              * at least as many CA certs that have already been traversed
              */
             caSelector.setBasicConstraints(currentState.traversedCACerts);
+
+            /*
+             * Facilitate certification path construction with authority
+             * key identifier and subject key identifier.
+             */
+            AuthorityKeyIdentifierExtension akidext =
+                    currentState.cert.getAuthorityKeyIdentifierExtension();
+            if (akidext != null) {
+                KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID);
+                if (akid != null) {
+                    DerOutputStream derout = new DerOutputStream();
+                    derout.putOctetString(akid.getIdentifier());
+                    caSelector.setSubjectKeyIdentifier(derout.toByteArray());
+                }
+
+                SerialNumber asn =
+                    (SerialNumber)akidext.get(akidext.SERIAL_NUMBER);
+                if (asn != null) {
+                    caSelector.setSerialNumber(asn.getNumber());
+                }
+                // the subject criterion was set previously.
+            }
+
             sel = caSelector;
         }
 
@@ -817,13 +851,25 @@
                 } else {
                     continue;
                 }
-            }
+            } else {
+                X500Principal principal = anchor.getCA();
+                java.security.PublicKey publicKey = anchor.getCAPublicKey();
 
-            X500Principal trustedCAName = anchor.getCA();
+                if (principal != null && publicKey != null &&
+                        principal.equals(cert.getSubjectX500Principal())) {
+                    if (publicKey.equals(cert.getPublicKey())) {
+                        // the cert itself is a trust anchor
+                        this.trustAnchor = anchor;
+                        return true;
+                    }
+                    // else, it is a self-issued certificate of the anchor
+                }
 
-            /* Check subject/issuer name chaining */
-            if (!trustedCAName.equals(cert.getIssuerX500Principal())) {
-                continue;
+                // Check subject/issuer name chaining
+                if (principal == null ||
+                        !principal.equals(cert.getIssuerX500Principal())) {
+                    continue;
+                }
             }
 
             /* Check revocation if it is enabled */
@@ -890,4 +936,120 @@
     void removeFinalCertFromPath(LinkedList<X509Certificate> certPathList) {
         certPathList.removeFirst();
     }
+
+    /** Verifies whether a CRL is issued by a certain certificate
+     *
+     * @param cert the certificate
+     * @param crl the CRL to be verified
+     * @param provider the name of the signature provider
+     */
+    static boolean issues(X509CertImpl cert, X509CRLImpl crl, String provider)
+            throws IOException {
+
+        boolean kidmatched = false;
+
+        // check certificate's key usage
+        boolean[] usages = cert.getKeyUsage();
+        if (usages != null && !usages[6]) {
+            return false;
+        }
+
+        // check certificate's SKID and CRL's AKID
+        AuthorityKeyIdentifierExtension akidext = crl.getAuthKeyIdExtension();
+        if (akidext != null) {
+            // the highest priority, matching KID
+            KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID);
+            if (akid != null) {
+                SubjectKeyIdentifierExtension skidext =
+                            cert.getSubjectKeyIdentifierExtension();
+                if (skidext != null) {
+                    KeyIdentifier skid =
+                            (KeyIdentifier)skidext.get(skidext.KEY_ID);
+                    if (!akid.equals(skid)) {
+                        return false;
+                    }
+
+                    kidmatched = true;
+                }
+                // conservatively, in case of X509 V1 certificate,
+                // does return false here if no SKID extension.
+            }
+
+            // the medium priority, matching issuer name/serial number
+            SerialNumber asn = (SerialNumber)akidext.get(akidext.SERIAL_NUMBER);
+            GeneralNames anames = (GeneralNames)akidext.get(akidext.AUTH_NAME);
+            if (asn != null && anames != null) {
+                X500Name subject = (X500Name)cert.getSubjectDN();
+                BigInteger serial = cert.getSerialNumber();
+
+                if (serial != null && subject != null) {
+                    if (serial.equals(asn.getNumber())) {
+                        return false;
+                    }
+
+                    for (GeneralName name : anames.names()) {
+                        GeneralNameInterface gni = name.getName();
+                        if (subject.equals(gni)) {
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+
+            if (kidmatched) {
+                return true;
+            }
+        }
+
+        // the last priority, verify the CRL signature with the cert.
+        X500Principal crlIssuer = crl.getIssuerX500Principal();
+        X500Principal certSubject = cert.getSubjectX500Principal();
+        if (certSubject != null && certSubject.equals(crlIssuer)) {
+            try {
+                crl.verify(cert.getPublicKey(), provider);
+                return true;
+            } catch (Exception e) {
+                // ignore all exceptions.
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * An adaptable X509 certificate selector for forward certification path
+     * building.
+     */
+    private static class AdaptableX509CertSelector extends X509CertSelector {
+        public AdaptableX509CertSelector() {
+            super();
+        }
+
+        /**
+         * Decides whether a <code>Certificate</code> should be selected.
+         *
+         * For the purpose of compatibility, when a certificate is of
+         * version 1 and version 2, or the certificate does not include
+         * a subject key identifier extension, the selection criterion
+         * of subjectKeyIdentifier will be disabled.
+         *
+         * @Override
+         */
+        public boolean match(Certificate cert) {
+            if (!(cert instanceof X509Certificate)) {
+                return false;
+            }
+            X509Certificate xcert = (X509Certificate)cert;
+
+            if (xcert.getVersion() < 3 ||
+                xcert.getExtensionValue("2.5.29.14") == null) {
+                // disable the subjectKeyIdentifier criterion
+                setSubjectKeyIdentifier(null);
+            }
+
+            return super.match(cert);
+        }
+    }
 }
--- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
@@ -351,18 +351,27 @@
             }
             in = con.getInputStream();
 
+            byte[] response = null;
+            int total = 0;
             int contentLength = con.getContentLength();
-            if (contentLength == -1) {
+            if (contentLength != -1) {
+                response = new byte[contentLength];
+            } else {
+                response = new byte[2048];
                 contentLength = Integer.MAX_VALUE;
             }
 
-            byte[] response = new byte[contentLength];
-            int total = 0;
-            int count = 0;
-            while (count != -1 && total < contentLength) {
-                count = in.read(response, total, response.length - total);
+            while (total < contentLength) {
+                int count = in.read(response, total, response.length - total);
+                if (count < 0)
+                    break;
+
                 total += count;
+                if (total >= response.length && total < contentLength) {
+                    response = Arrays.copyOf(response, total * 2);
+                }
             }
+            response = Arrays.copyOf(response, total);
 
             OCSPResponse ocspResponse = new OCSPResponse(response, pkixParams,
                 responderCert);
--- a/jdk/src/share/classes/sun/security/timestamp/HttpTimestamper.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/security/timestamp/HttpTimestamper.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
@@ -32,6 +32,7 @@
 import java.net.HttpURLConnection;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.Arrays;
 
 import sun.security.pkcs.*;
 
@@ -137,23 +138,33 @@
                 }
                 System.out.println();
             }
+            verifyMimeType(connection.getContentType());
+
+            int total = 0;
             int contentLength = connection.getContentLength();
-            if (contentLength == -1) {
+            if (contentLength != -1) {
+                replyBuffer = new byte[contentLength];
+            } else {
+                replyBuffer = new byte[2048];
                 contentLength = Integer.MAX_VALUE;
             }
-            verifyMimeType(connection.getContentType());
 
-            replyBuffer = new byte[contentLength];
-            int total = 0;
-            int count = 0;
-            while (count != -1 && total < contentLength) {
-                count = input.read(replyBuffer, total,
+            while (total < contentLength) {
+                int count = input.read(replyBuffer, total,
                                         replyBuffer.length - total);
+                if (count < 0)
+                    break;
+
                 total += count;
+                if (total >= replyBuffer.length && total < contentLength) {
+                    replyBuffer = Arrays.copyOf(replyBuffer, total * 2);
+                }
             }
+            replyBuffer = Arrays.copyOf(replyBuffer, total);
+
             if (DEBUG) {
                 System.out.println("received timestamp response (length=" +
-                        replyBuffer.length + ")");
+                        total + ")");
             }
         } finally {
             if (input != null) {
--- a/jdk/src/share/classes/sun/tools/jar/Main.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/classes/sun/tools/jar/Main.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2009 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
@@ -26,12 +26,16 @@
 package sun.tools.jar;
 
 import java.io.*;
+import java.nio.file.Path;
 import java.util.*;
 import java.util.zip.*;
 import java.util.jar.*;
 import java.util.jar.Manifest;
 import java.text.MessageFormat;
 import sun.misc.JarIndex;
+import static sun.misc.JarIndex.INDEX_NAME;
+import static java.util.jar.JarFile.MANIFEST_NAME;
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
 
 /**
  * This class implements a simple utility for creating files in the JAR
@@ -58,7 +62,6 @@
     // Directories specified by "-C" operation.
     Set<String> paths = new HashSet<String>();
 
-    CRC32 crc32 = new CRC32();
     /*
      * cflag: create
      * uflag: update
@@ -71,10 +74,8 @@
      */
     boolean cflag, uflag, xflag, tflag, vflag, flag0, Mflag, iflag;
 
-    static final String MANIFEST = JarFile.MANIFEST_NAME;
     static final String MANIFEST_DIR = "META-INF/";
     static final String VERSION = "1.0";
-    static final String INDEX = JarIndex.INDEX_NAME;
 
     private static ResourceBundle rsrc;
 
@@ -126,9 +127,21 @@
         this.program = program;
     }
 
+    /**
+     * Creates a new empty temporary file in the same directory as the
+     * specified file.  A variant of File.createTempFile.
+     */
+    private static File createTempFileInSameDirectoryAs(File file)
+        throws IOException {
+        File dir = file.getParentFile();
+        if (dir == null)
+            dir = new File(".");
+        return File.createTempFile("jartmp", null, dir);
+    }
+
     private boolean ok;
 
-    /*
+    /**
      * Starts main program with the specified arguments.
      */
     public synchronized boolean run(String args[]) {
@@ -161,7 +174,7 @@
                     }
                     addVersion(manifest);
                     addCreatedBy(manifest);
-                    if (isAmbigousMainClass(manifest)) {
+                    if (isAmbiguousMainClass(manifest)) {
                         if (in != null) {
                             in.close();
                         }
@@ -195,9 +208,7 @@
                 FileOutputStream out;
                 if (fname != null) {
                     inputFile = new File(fname);
-                    String path = inputFile.getParent();
-                    tmpFile = File.createTempFile("tmp", null,
-                              new File((path == null) ? "." : path));
+                    tmpFile = createTempFileInSameDirectoryAs(inputFile);
                     in = new FileInputStream(inputFile);
                     out = new FileOutputStream(tmpFile);
                 } else {
@@ -208,7 +219,8 @@
                 InputStream manifest = (!Mflag && (mname != null)) ?
                     (new FileInputStream(mname)) : null;
                 expand(null, files, true);
-                boolean updateOk = update(in, new BufferedOutputStream(out), manifest, null);
+                boolean updateOk = update(in, new BufferedOutputStream(out),
+                                          manifest, null);
                 if (ok) {
                     ok = updateOk;
                 }
@@ -270,8 +282,8 @@
         return ok;
     }
 
-    /*
-     * Parse command line arguments.
+    /**
+     * Parses command line arguments.
      */
     boolean parseArgs(String args[]) {
         /* Preprocess and expand @file arguments */
@@ -405,7 +417,7 @@
         return true;
     }
 
-    /*
+    /**
      * Expands list of files to process into full list of all files that
      * can be found by recursively descending directories.
      */
@@ -442,7 +454,7 @@
         }
     }
 
-    /*
+    /**
      * Creates a new JAR file.
      */
     void create(OutputStream out, Manifest manifest)
@@ -461,7 +473,7 @@
             e.setSize(0);
             e.setCrc(0);
             zos.putNextEntry(e);
-            e = new ZipEntry(MANIFEST);
+            e = new ZipEntry(MANIFEST_NAME);
             e.setTime(System.currentTimeMillis());
             if (flag0) {
                 crc32Manifest(e, manifest);
@@ -476,8 +488,32 @@
         zos.close();
     }
 
-    /*
-     * update an existing jar file.
+    private char toUpperCaseASCII(char c) {
+        return (c < 'a' || c > 'z') ? c : (char) (c + 'A' - 'a');
+    }
+
+    /**
+     * Compares two strings for equality, ignoring case.  The second
+     * argument must contain only upper-case ASCII characters.
+     * We don't want case comparison to be locale-dependent (else we
+     * have the notorious "turkish i bug").
+     */
+    private boolean equalsIgnoreCase(String s, String upper) {
+        assert upper.toUpperCase(java.util.Locale.ENGLISH).equals(upper);
+        int len;
+        if ((len = s.length()) != upper.length())
+            return false;
+        for (int i = 0; i < len; i++) {
+            char c1 = s.charAt(i);
+            char c2 = upper.charAt(i);
+            if (c1 != c2 && toUpperCaseASCII(c1) != c2)
+                return false;
+        }
+        return true;
+    }
+
+    /**
+     * Updates an existing jar file.
      */
     boolean update(InputStream in, OutputStream out,
                    InputStream newManifest,
@@ -487,8 +523,6 @@
         ZipOutputStream zos = new JarOutputStream(out);
         ZipEntry e = null;
         boolean foundManifest = false;
-        byte[] buf = new byte[1024];
-        int n = 0;
         boolean updateOk = true;
 
         if (jarIndex != null) {
@@ -499,10 +533,9 @@
         while ((e = zis.getNextEntry()) != null) {
             String name = e.getName();
 
-            boolean isManifestEntry = name.toUpperCase(
-                                            java.util.Locale.ENGLISH).
-                                        equals(MANIFEST);
-            if ((name.toUpperCase().equals(INDEX) && jarIndex != null)
+            boolean isManifestEntry = equalsIgnoreCase(name, MANIFEST_NAME);
+
+            if ((jarIndex != null && equalsIgnoreCase(name, INDEX_NAME))
                 || (Mflag && isManifestEntry)) {
                 continue;
             } else if (isManifestEntry && ((newManifest != null) ||
@@ -513,9 +546,9 @@
                     // might need it below, and we can't re-read the same data
                     // twice.
                     FileInputStream fis = new FileInputStream(mname);
-                    boolean ambigous = isAmbigousMainClass(new Manifest(fis));
+                    boolean ambiguous = isAmbiguousMainClass(new Manifest(fis));
                     fis.close();
-                    if (ambigous) {
+                    if (ambiguous) {
                         return false;
                     }
                 }
@@ -539,9 +572,7 @@
                         e2.setCrc(e.getCrc());
                     }
                     zos.putNextEntry(e2);
-                    while ((n = zis.read(buf, 0, buf.length)) != -1) {
-                        zos.write(buf, 0, n);
-                    }
+                    copy(zis, zos);
                 } else { // replace with the new files
                     File f = entryMap.get(name);
                     addFile(zos, f);
@@ -558,7 +589,7 @@
         if (!foundManifest) {
             if (newManifest != null) {
                 Manifest m = new Manifest(newManifest);
-                updateOk = !isAmbigousMainClass(m);
+                updateOk = !isAmbiguousMainClass(m);
                 if (updateOk) {
                     updateManifest(m, zos);
                 }
@@ -575,23 +606,16 @@
     private void addIndex(JarIndex index, ZipOutputStream zos)
         throws IOException
     {
-        ZipEntry e = new ZipEntry(INDEX);
+        ZipEntry e = new ZipEntry(INDEX_NAME);
         e.setTime(System.currentTimeMillis());
         if (flag0) {
-            e.setMethod(ZipEntry.STORED);
-            File ifile = File.createTempFile("index", null, new File("."));
-            BufferedOutputStream bos = new BufferedOutputStream
-                (new FileOutputStream(ifile));
-            index.write(bos);
-            crc32File(e, ifile);
-            bos.close();
-            ifile.delete();
+            CRC32OutputStream os = new CRC32OutputStream();
+            index.write(os);
+            os.updateEntry(e);
         }
         zos.putNextEntry(e);
         index.write(zos);
-        if (vflag) {
-            // output(getMsg("out.update.manifest"));
-        }
+        zos.closeEntry();
     }
 
     private void updateManifest(Manifest m, ZipOutputStream zos)
@@ -602,10 +626,9 @@
         if (ename != null) {
             addMainClass(m, ename);
         }
-        ZipEntry e = new ZipEntry(MANIFEST);
+        ZipEntry e = new ZipEntry(MANIFEST_NAME);
         e.setTime(System.currentTimeMillis());
         if (flag0) {
-            e.setMethod(ZipEntry.STORED);
             crc32Manifest(e, m);
         }
         zos.putNextEntry(e);
@@ -620,7 +643,8 @@
         name = name.replace(File.separatorChar, '/');
         String matchPath = "";
         for (String path : paths) {
-            if (name.startsWith(path) && (path.length() > matchPath.length())) {
+            if (name.startsWith(path)
+                && (path.length() > matchPath.length())) {
                 matchPath = path;
             }
         }
@@ -658,7 +682,7 @@
         global.put(Attributes.Name.MAIN_CLASS, mainApp);
     }
 
-    private boolean isAmbigousMainClass(Manifest m) {
+    private boolean isAmbiguousMainClass(Manifest m) {
         if (ename != null) {
             Attributes global = m.getMainAttributes();
             if ((global.get(Attributes.Name.MAIN_CLASS) != null)) {
@@ -670,7 +694,7 @@
         return false;
     }
 
-    /*
+    /**
      * Adds a new file entry to the ZIP output stream.
      */
     void addFile(ZipOutputStream zos, File file) throws IOException {
@@ -684,7 +708,7 @@
 
         if (name.equals("") || name.equals(".") || name.equals(zname)) {
             return;
-        } else if ((name.equals(MANIFEST_DIR) || name.equals(MANIFEST))
+        } else if ((name.equals(MANIFEST_DIR) || name.equals(MANIFEST_NAME))
                    && !Mflag) {
             if (vflag) {
                 output(formatMsg("out.ignore.entry", name));
@@ -704,19 +728,11 @@
             e.setSize(0);
             e.setCrc(0);
         } else if (flag0) {
-            e.setSize(size);
-            e.setMethod(ZipEntry.STORED);
             crc32File(e, file);
         }
         zos.putNextEntry(e);
         if (!isDir) {
-            byte[] buf = new byte[8192];
-            int len;
-            InputStream is = new BufferedInputStream(new FileInputStream(file));
-            while ((len = is.read(buf, 0, buf.length)) != -1) {
-                zos.write(buf, 0, len);
-            }
-            is.close();
+            copy(file, zos);
         }
         zos.closeEntry();
         /* report how much compression occurred. */
@@ -737,39 +753,83 @@
         }
     }
 
-    /*
-     * compute the crc32 of a file.  This is necessary when the ZipOutputStream
-     * is in STORED mode.
+    /**
+     * A buffer for use only by copy(InputStream, OutputStream).
+     * Not as clean as allocating a new buffer as needed by copy,
+     * but significantly more efficient.
+     */
+    private byte[] copyBuf = new byte[8192];
+
+    /**
+     * Copies all bytes from the input stream to the output stream.
+     * Does not close or flush either stream.
+     *
+     * @param from the input stream to read from
+     * @param to the output stream to write to
+     * @throws IOException if an I/O error occurs
+     */
+    private void copy(InputStream from, OutputStream to) throws IOException {
+        int n;
+        while ((n = from.read(copyBuf)) != -1)
+            to.write(copyBuf, 0, n);
+    }
+
+    /**
+     * Copies all bytes from the input file to the output stream.
+     * Does not close or flush the output stream.
+     *
+     * @param from the input file to read from
+     * @param to the output stream to write to
+     * @throws IOException if an I/O error occurs
+     */
+    private void copy(File from, OutputStream to) throws IOException {
+        InputStream in = new FileInputStream(from);
+        try {
+            copy(in, to);
+        } finally {
+            in.close();
+        }
+    }
+
+    /**
+     * Copies all bytes from the input stream to the output file.
+     * Does not close the input stream.
+     *
+     * @param from the input stream to read from
+     * @param to the output file to write to
+     * @throws IOException if an I/O error occurs
+     */
+    private void copy(InputStream from, File to) throws IOException {
+        OutputStream out = new FileOutputStream(to);
+        try {
+            copy(from, out);
+        } finally {
+            out.close();
+        }
+    }
+
+    /**
+     * Computes the crc32 of a Manifest.  This is necessary when the
+     * ZipOutputStream is in STORED mode.
      */
     private void crc32Manifest(ZipEntry e, Manifest m) throws IOException {
-        crc32.reset();
-        CRC32OutputStream os = new CRC32OutputStream(crc32);
+        CRC32OutputStream os = new CRC32OutputStream();
         m.write(os);
-        e.setSize((long) os.n);
-        e.setCrc(crc32.getValue());
+        os.updateEntry(e);
     }
 
-    /*
-     * compute the crc32 of a file.  This is necessary when the ZipOutputStream
-     * is in STORED mode.
+    /**
+     * Computes the crc32 of a File.  This is necessary when the
+     * ZipOutputStream is in STORED mode.
      */
     private void crc32File(ZipEntry e, File f) throws IOException {
-        InputStream is = new BufferedInputStream(new FileInputStream(f));
-        byte[] buf = new byte[8192];
-        crc32.reset();
-        int r = 0;
-        int nread = 0;
-        long len = f.length();
-        while ((r = is.read(buf)) != -1) {
-            nread += r;
-            crc32.update(buf, 0, r);
-        }
-        is.close();
-        if (nread != (int) len) {
+        CRC32OutputStream os = new CRC32OutputStream();
+        copy(f, os);
+        if (os.n != f.length()) {
             throw new JarException(formatMsg(
                         "error.incorrect.length", f.getPath()));
         }
-        e.setCrc(crc32.getValue());
+        os.updateEntry(e);
     }
 
     void replaceFSC(String files[]) {
@@ -780,6 +840,7 @@
         }
     }
 
+    @SuppressWarnings("serial")
     Set<ZipEntry> newDirSet() {
         return new HashSet<ZipEntry>() {
             public boolean add(ZipEntry e) {
@@ -797,7 +858,7 @@
         }
     }
 
-    /*
+    /**
      * Extracts specified entries from JAR file.
      */
     void extract(InputStream in, String files[]) throws IOException {
@@ -827,7 +888,7 @@
         updateLastModifiedTime(dirs);
     }
 
-    /*
+    /**
      * Extracts specified entries from JAR file, via ZipFile.
      */
     void extract(String fname, String files[]) throws IOException {
@@ -853,7 +914,7 @@
         updateLastModifiedTime(dirs);
     }
 
-    /*
+    /**
      * Extracts next entry from JAR file, creating directories as needed.  If
      * the entry is for a directory which doesn't exist prior to this
      * invocation, returns that entry, otherwise returns null.
@@ -888,19 +949,13 @@
                         "error.create.dir", d.getPath()));
                 }
             }
-            OutputStream os = new FileOutputStream(f);
-            byte[] b = new byte[8192];
-            int len;
             try {
-                while ((len = is.read(b, 0, b.length)) != -1) {
-                    os.write(b, 0, len);
-                }
+                copy(is, f);
             } finally {
                 if (is instanceof ZipInputStream)
                     ((ZipInputStream)is).closeEntry();
                 else
                     is.close();
-                os.close();
             }
             if (vflag) {
                 if (e.getMethod() == ZipEntry.DEFLATED) {
@@ -919,7 +974,7 @@
         return rc;
     }
 
-    /*
+    /**
      * Lists contents of JAR file.
      */
     void list(InputStream in, String files[]) throws IOException {
@@ -937,7 +992,7 @@
         }
     }
 
-    /*
+    /**
      * Lists contents of JAR file, via ZipFile.
      */
     void list(String fname, String files[]) throws IOException {
@@ -950,32 +1005,38 @@
     }
 
     /**
-     * Output the class index table to the INDEX.LIST file of the
+     * Outputs the class index table to the INDEX.LIST file of the
      * root jar file.
      */
     void dumpIndex(String rootjar, JarIndex index) throws IOException {
-        File scratchFile = File.createTempFile("scratch", null, new File("."));
         File jarFile = new File(rootjar);
-        boolean updateOk = update(new FileInputStream(jarFile),
-                                  new FileOutputStream(scratchFile),
-                                  null, index);
-        jarFile.delete();
-        if (!scratchFile.renameTo(jarFile)) {
-            scratchFile.delete();
-            throw new IOException(getMsg("error.write.file"));
+        Path jarPath = jarFile.toPath();
+        Path tmpPath = createTempFileInSameDirectoryAs(jarFile).toPath();
+        try {
+            if (update(jarPath.newInputStream(),
+                       tmpPath.newOutputStream(),
+                       null, index)) {
+                try {
+                    tmpPath.moveTo(jarPath, REPLACE_EXISTING);
+                } catch (IOException e) {
+                    throw new IOException(getMsg("error.write.file"), e);
+                }
+            }
+        } finally {
+            tmpPath.deleteIfExists();
         }
-        scratchFile.delete();
     }
 
-    private Hashtable jarTable = new Hashtable();
-    /*
-     * Generate the transitive closure of the Class-Path attribute for
+    private HashSet<String> jarPaths = new HashSet<String>();
+
+    /**
+     * Generates the transitive closure of the Class-Path attribute for
      * the specified jar file.
      */
-    Vector getJarPath(String jar) throws IOException {
-        Vector files = new Vector();
+    List<String> getJarPath(String jar) throws IOException {
+        List<String> files = new ArrayList<String>();
         files.add(jar);
-        jarTable.put(jar, jar);
+        jarPaths.add(jar);
 
         // take out the current path
         String path = jar.substring(0, Math.max(0, jar.lastIndexOf('/') + 1));
@@ -998,7 +1059,7 @@
                             if (!ajar.endsWith("/")) {  // it is a jar file
                                 ajar = path.concat(ajar);
                                 /* check on cyclic dependency */
-                                if (jarTable.get(ajar) == null) {
+                                if (! jarPaths.contains(ajar)) {
                                     files.addAll(getJarPath(ajar));
                                 }
                             }
@@ -1012,10 +1073,10 @@
     }
 
     /**
-     * Generate class index file for the specified root jar file.
+     * Generates class index file for the specified root jar file.
      */
     void genIndex(String rootjar, String[] files) throws IOException {
-        Vector jars = getJarPath(rootjar);
+        List<String> jars = getJarPath(rootjar);
         int njars = jars.size();
         String[] jarfiles;
 
@@ -1027,12 +1088,12 @@
             }
             njars = jars.size();
         }
-        jarfiles = (String[])jars.toArray(new String[njars]);
+        jarfiles = jars.toArray(new String[njars]);
         JarIndex index = new JarIndex(jarfiles);
         dumpIndex(rootjar, index);
     }
 
-    /*
+    /**
      * Prints entry information, if requested.
      */
     void printEntry(ZipEntry e, String[] files) throws IOException {
@@ -1049,7 +1110,7 @@
         }
     }
 
-    /*
+    /**
      * Prints entry information.
      */
     void printEntry(ZipEntry e) throws IOException {
@@ -1067,21 +1128,21 @@
         }
     }
 
-    /*
-     * Print usage message and die.
+    /**
+     * Prints usage message.
      */
     void usageError() {
         error(getMsg("usage"));
     }
 
-    /*
+    /**
      * A fatal exception has been caught.  No recovery possible
      */
     void fatalError(Exception e) {
         e.printStackTrace();
     }
 
-    /*
+    /**
      * A fatal condition has been detected; message is "s".
      * No recovery possible
      */
@@ -1103,39 +1164,43 @@
         err.println(s);
     }
 
-    /*
+    /**
      * Main routine to start program.
      */
     public static void main(String args[]) {
         Main jartool = new Main(System.out, System.err, "jar");
         System.exit(jartool.run(args) ? 0 : 1);
     }
-}
 
-/*
- * an OutputStream that doesn't send its output anywhere, (but could).
- * It's here to find the CRC32 of a manifest, necessary for STORED only
- * mode in ZIP.
- */
-final class CRC32OutputStream extends java.io.OutputStream {
-    CRC32 crc;
-    int n = 0;
-    CRC32OutputStream(CRC32 crc) {
-        this.crc = crc;
-    }
+    /**
+     * An OutputStream that doesn't send its output anywhere, (but could).
+     * It's here to find the CRC32 of an input file, necessary for STORED
+     * mode in ZIP.
+     */
+    private static class CRC32OutputStream extends java.io.OutputStream {
+        final CRC32 crc = new CRC32();
+        long n = 0;
 
-    public void write(int r) throws IOException {
-        crc.update(r);
-        n++;
-    }
+        CRC32OutputStream() {}
 
-    public void write(byte[] b) throws IOException {
-        crc.update(b, 0, b.length);
-        n += b.length;
-    }
+        public void write(int r) throws IOException {
+            crc.update(r);
+            n++;
+        }
 
-    public void write(byte[] b, int off, int len) throws IOException {
-        crc.update(b, off, len);
-        n += len - off;
+        public void write(byte[] b, int off, int len) throws IOException {
+            crc.update(b, off, len);
+            n += len;
+        }
+
+        /**
+         * Updates a ZipEntry which describes the data read by this
+         * output stream, in STORED mode.
+         */
+        public void updateEntry(ZipEntry e) {
+            e.setMethod(ZipEntry.STORED);
+            e.setSize(n);
+            e.setCrc(crc.getValue());
+        }
     }
 }
--- a/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties	Fri Jul 31 10:41:29 2009 -0700
@@ -9,7 +9,7 @@
 #
 # Each of the strings that follow form a key to be 
 # used to the actual menu definition.
-menubar=\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\u30c7\u30d0\u30c3\u30b0
+menubar=file edit debug
 
 # file Menu definition
 #
@@ -20,15 +20,15 @@
 # new  ->  Notepad.newAction
 # save ->  Notepad.saveAction
 # exit ->  Notepad.exitAction
-file=\u65b0\u898f \u958b\u304f \u4fdd\u5b58 - \u7d42\u4e86
-fileLabel=\u30d5\u30a1\u30a4\u30eb (F)
+file=new open save - exit
+fileLabel=\u30d5\u30a1\u30a4\u30eb
 openLabel=\u958b\u304f
 openImage=resources/open.gif
 newLabel=\u65b0\u898f
 newImage=resources/new.gif
 saveLabel=\u4fdd\u5b58
 saveImage=resources/save.gif
-exitLabel=\u7d42\u4e86 (X)
+exitLabel=\u7d42\u4e86
 
 #
 # edit Menu definition
@@ -36,26 +36,26 @@
 # cut   -> JTextComponent.cutAction
 # copy  -> JTextComponent.copyAction
 # paste -> JTextComponent.pasteAction
-edit=\u30ab\u30c3\u30c8 \u30b3\u30d4\u30fc \u30da\u30fc\u30b9\u30c8 - \u5143\u306b\u623b\u3059 \u518d\u5b9f\u884c
+edit=cut copy paste - undo redo
 editLabel=\u7de8\u96c6
-cutLabel=Cut
+cutLabel=\u30ab\u30c3\u30c8
 cutAction=cut-to-clipboard
 cutImage=resources/cut.gif
-copyLabel=Copy
-copyAction=cut-to-clipboard
+copyLabel=\u30b3\u30d4\u30fc
+copyAction=copy-to-clipboard
 copyImage=resources/copy.gif
-pasteLabel=Paste
+pasteLabel=\u30da\u30fc\u30b9\u30c8
 pasteAction=paste-from-clipboard
 pasteImage=resources/paste.gif
 undoLabel=\u5143\u306b\u623b\u3059
-undoAction=\u5143\u306b\u623b\u3059
+undoAction=Undo
 redoLabel=\u518d\u5b9f\u884c
-redoAction=\u518d\u5b9f\u884c
+redoAction=Redo
 
 #
 # debug Menu definition
 #
-debug=showElementTree \u306e\u30c0\u30f3\u30d7
+debug=dump showElementTree
 debugLabel=\u30c7\u30d0\u30c3\u30b0
 dumpLabel=\u30e2\u30c7\u30eb\u3092 System.err \u306b\u30c0\u30f3\u30d7
 dumpAction=dump-model
@@ -67,7 +67,7 @@
 # used as the basis of the tool definition.  Actions
 # are of course sharable, and in this case are shared
 # with the menu items.
-toolbar=\u65b0\u898f \u958b\u304f \u4fdd\u5b58 - \u30ab\u30c3\u30c8 \u30b3\u30d4\u30fc \u30da\u30fc\u30b9\u30c8
+toolbar=new open save - cut copy paste
 newTooltip=\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b
 openTooltip=\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f
 saveTooltip=\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58
--- a/jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -263,8 +263,8 @@
     (void)sprintf(buf,
                 "CRW ASSERTION FAILURE: %s (%s:%s:%d)",
                 condition,
-                ci->name==0?"?":ci->name,
-                mi->name==0?"?":mi->name,
+                ci->name==NULL?"?":ci->name,
+                (mi==NULL||mi->name==NULL)?"?":mi->name,
                 byte_code_offset);
     fatal_error(ci, buf, file, line);
 }
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
@@ -1000,10 +1000,7 @@
         int buttonState = 0;
         final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons();
         for (int i = 0; i<buttonsNumber; i++){
-            // A bug in WM implementation: extra buttons doesn't have state!=0 as they should on Release message.
-            if ((i != 4) && (i != 5)){
-                buttonState |= (xbe.get_state() & XConstants.buttonsMask[i]);
-            }
+            buttonState |= (xbe.get_state() & XConstants.buttonsMask[i]);
         }
         switch (xev.get_type()) {
         case XConstants.ButtonPress:
--- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
@@ -24,6 +24,7 @@
  */
 
 #include <errno.h>
+#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in_systm.h>
--- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 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
@@ -24,6 +24,7 @@
  */
 
 #include <errno.h>
+#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
--- a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java	Fri Jul 31 10:41:29 2009 -0700
@@ -886,14 +886,12 @@
      * this should be done in lazilyLoadDesktopProperty() only.
      */
     protected synchronized void initializeDesktopProperties() {
-        desktopProperties.put("DnD.Autoscroll.initialDelay",     Integer.valueOf(50));
-        desktopProperties.put("DnD.Autoscroll.interval",         Integer.valueOf(50));
-
-        try {
-            desktopProperties.put("Shell.shellFolderManager",
-                                  Class.forName("sun.awt.shell.Win32ShellFolderManager2"));
-        } catch (ClassNotFoundException ex) {
-        }
+        desktopProperties.put("DnD.Autoscroll.initialDelay",
+                              Integer.valueOf(50));
+        desktopProperties.put("DnD.Autoscroll.interval",
+                              Integer.valueOf(50));
+        desktopProperties.put("Shell.shellFolderManager",
+                              "sun.awt.shell.Win32ShellFolderManager2");
     }
 
     /*
--- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java	Fri Jul 31 10:41:29 2009 -0700
@@ -194,8 +194,7 @@
             // default value of a boolean field is 'false', so set isOpaque to
             // true here explicitly
             this.isOpaque = true;
-            Color bgColor = ((Window)target).getBackground();
-            setOpaque((bgColor == null) || (bgColor.getAlpha() == 255));
+            setOpaque(((Window)target).isOpaque());
         }
     }
 
--- a/jdk/src/windows/native/java/lang/java_props_md.c	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/windows/native/java/lang/java_props_md.c	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 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
@@ -714,10 +714,10 @@
          * Windows XP 64 bit            5               2
          *       where ((&ver.wServicePackMinor) + 2) = 1
          *       and  si.wProcessorArchitecture = 9
-         * Windows Vista family         6               0
-         * Windows 2008                 6               0
-         *       where ((&ver.wServicePackMinor) + 2) = 1
-         * Windows 7                    6               1
+         * Windows Vista family         6               0  (VER_NT_WORKSTATION)
+         * Windows Server 2008          6               0  (!VER_NT_WORKSTATION)
+         * Windows 7                    6               1  (VER_NT_WORKSTATION)
+         * Windows Server 2008 R2       6               1  (!VER_NT_WORKSTATION)
          *
          * This mapping will presumably be augmented as new Windows
          * versions are released.
@@ -768,14 +768,7 @@
                 }
             } else if (ver.dwMajorVersion == 6) {
                 /*
-                 * From MSDN OSVERSIONINFOEX documentation:
-                 *
-                 * "Because the version numbers for Windows Server 2008
-                 * and Windows Vista are identical, you must also test
-                 * whether the wProductType member is VER_NT_WORKSTATION.
-                 * If wProductType is VER_NT_WORKSTATION, the operating
-                 * system is Windows Vista or 7; otherwise, it is Windows
-                 * Server 2008."
+                 * See table in MSDN OSVERSIONINFOEX documentation.
                  */
                 if (ver.wProductType == VER_NT_WORKSTATION) {
                     switch (ver.dwMinorVersion) {
@@ -784,7 +777,11 @@
                     default: sprops.os_name = "Windows NT (unknown)";
                     }
                 } else {
-                    sprops.os_name = "Windows Server 2008";
+                    switch (ver.dwMinorVersion) {
+                    case  0: sprops.os_name = "Windows Server 2008";    break;
+                    case  1: sprops.os_name = "Windows Server 2008 R2"; break;
+                    default: sprops.os_name = "Windows NT (unknown)";
+                    }
                 }
             } else {
                 sprops.os_name = "Windows NT (unknown)";
--- a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2009 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
@@ -981,6 +981,15 @@
         hBitmap = (HBITMAP)LoadImage(libShell32,
                     IS_WINVISTA ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216),
                     IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
+
+        if (hBitmap == NULL) {
+            // version of shell32.dll doesn't match OS version.
+            // So we either are in a Vista Compatibility Mode
+            // or shell32.dll was copied from OS of another version
+            hBitmap = (HBITMAP)LoadImage(libShell32,
+                    IS_WINVISTA ? MAKEINTRESOURCE(216) : TEXT("IDB_TB_SH_DEF_16"),
+                    IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
+        }
     }
     if (hBitmap == NULL) {
         libComCtl32 = LoadLibrary(TEXT("comctl32.dll"));
--- a/jdk/test/demo/jvmti/hprof/HelloWorld.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/test/demo/jvmti/hprof/HelloWorld.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2009 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
@@ -24,7 +24,7 @@
 
 /* HelloWorld:
  *
- *   Sample target appluication for HPROF tests
+ *   Sample target application for HPROF tests
  *
  */
 
--- a/jdk/test/demo/jvmti/hprof/StackMapTableTest.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/test/demo/jvmti/hprof/StackMapTableTest.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 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
@@ -23,11 +23,11 @@
 
 
 /* @test
- * @bug 6266289 6299047
+ * @bug 6266289 6299047 6855180 6855551
  * @summary Test jvmti hprof and java_crw_demo with StackMapTable attributes
  *
  * @compile ../DemoRun.java
- * @compile -source 1.6 -g:lines HelloWorld.java
+ * @compile -source 7 -g:lines HelloWorld.java
  * @build StackMapTableTest
  * @run main StackMapTableTest HelloWorld
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Robot/CtorTest/CtorTest.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2009 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 6855323
+  @summary  Robot(GraphicsDevice) constructor initializes LEGAL_BUTTON_MASK variable improperly
+  @author Dmitry Cherepanov area=awt.robot
+  @run main CtorTest
+*/
+
+/**
+ * CtorRobot.java
+ *
+ * summary: creates Robot using one parameter constructor
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+
+import sun.awt.SunToolkit;
+
+public class CtorTest
+{
+    public static void main(String []s) throws Exception
+    {
+        // one parameter constructor
+        GraphicsDevice graphicsDevice = GraphicsEnvironment.
+            getLocalGraphicsEnvironment().getDefaultScreenDevice();
+        Robot robot = new Robot(graphicsDevice);
+        clickOnFrame(robot);
+    }
+
+    // generate mouse events
+    private static void clickOnFrame(Robot robot) {
+        Frame frame = new Frame();
+        frame.setBounds(100, 100, 100, 100);
+        frame.setVisible(true);
+
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+        // click in the middle of the frame
+        robot.mouseMove(150, 150);
+        robot.delay(50);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.delay(50);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TrayIcon/CtorTest/CtorTest.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009 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 6759726
+  @summary TrayIcon constructor throws NPE instead of documented IAE
+  @author Dmitry Cherepanov area=awt.tray
+  @run main CtorTest
+*/
+
+/**
+ * CtorTest.java
+ *
+ * summary:  TrayIcon ctor throws IAE if image is null
+ */
+
+import java.awt.*;
+
+public class CtorTest
+{
+    public static void main(String []s)
+    {
+        boolean isSupported = SystemTray.isSupported();
+        if (isSupported) {
+            try {
+                TrayIcon tray = new TrayIcon(null);
+            } catch(IllegalArgumentException e) {
+                // ctor should throw IAE
+            }
+        }
+    }
+}
--- a/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java	Thu Jul 30 14:50:58 2009 -0400
+++ b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java	Fri Jul 31 10:41:29 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008-2009 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
@@ -65,6 +65,7 @@
                 break;
             }
         }
+        garbage = null;
 
         // Third, make sure all the weak references are null
         for (WeakReference<Window> ref : children)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Window/SetBackgroundNPE/SetBackgroundNPE.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2009 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 6853916
+  @summary Window.setBackground() should not throw NPE
+  @author anthony.petrov@sun.com: area=awt.toplevel
+  @run main SetBackgroundNPE
+*/
+
+import java.awt.Window;
+
+public class SetBackgroundNPE {
+    public static void main(String args[]) {
+        new Window(null).setBackground(null);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2009 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 6847958
+  @library ../../../regtesthelpers
+  @summary MouseWheel event is getting triggered for the disabled Textarea in jdk7 b60 pit build.
+  @author Dmitry Cherepanov: area=awt.event
+  @build Util
+  @run main DisabledComponent
+*/
+
+/**
+ * DisabledComponent.java
+ *
+ * summary: Tests that wheel events aren't coming on disabled component
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+
+import sun.awt.SunToolkit;
+
+import test.java.awt.regtesthelpers.Util;
+
+public class DisabledComponent
+{
+
+    private static volatile boolean passed = true;
+
+    public static void main(String []s) throws Exception
+    {
+        Frame frame = new Frame();
+        frame.setBounds(100,100,400,400);
+        frame.setLayout(new FlowLayout());
+
+        TextArea textArea = new TextArea("TextArea", 6, 15);
+        frame.add(textArea);
+
+        List list = new List(3);
+        list.add("1");
+        list.add("2");
+        list.add("3");
+        frame.add(list);
+
+        MouseWheelListener listener = new MouseWheelListener(){
+            @Override
+                public void mouseWheelMoved(MouseWheelEvent mwe){
+                    System.err.println(mwe);
+                    passed = false;
+                }
+            };
+
+
+        list.addMouseWheelListener(listener);
+        textArea.addMouseWheelListener(listener);
+
+        frame.setVisible(true);
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+        Robot robot = new Robot();
+
+        // point and wheel on the list
+        Util.pointOnComp(list, robot);
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+        robot.mouseWheel(2);
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+        // disable the text area
+        System.err.println(" disable text area ");
+        textArea.setEnabled(false);
+        passed = true;
+
+        // point and wheel on the text area
+        Util.pointOnComp(textArea, robot);
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+        robot.mouseWheel(2);
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+        if (!passed) {
+            throw new RuntimeException(" wrong wheel events ");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,102 @@
+/**
+ * Copyright 2009 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 6380849
+ * @summary Tests BeanInfo finder
+ * @author Sergey Malenkov
+ */
+
+import beans.FirstBean;
+import beans.FirstBeanBeanInfo;
+import beans.SecondBean;
+import beans.ThirdBean;
+
+import infos.SecondBeanBeanInfo;
+import infos.ThirdBeanBeanInfo;
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.lang.reflect.Field;
+
+import sun.awt.SunToolkit;
+
+public class TestBeanInfo implements Runnable {
+
+    private static final String[] SEARCH_PATH = { "infos" }; // NON-NLS: package name
+
+    public static void main(String[] args) throws InterruptedException {
+        TestBeanInfo test = new TestBeanInfo();
+        test.run();
+        // the following tests fails on previous build
+        ThreadGroup group = new ThreadGroup("$$$"); // NON-NLS: unique thread name
+        Thread thread = new Thread(group, test);
+        thread.start();
+        thread.join();
+    }
+
+    private static void test(Class<?> type, Class<? extends BeanInfo> expected) {
+        BeanInfo actual;
+        try {
+            actual = Introspector.getBeanInfo(type);
+            type = actual.getClass();
+            Field field = type.getDeclaredField("targetBeanInfo"); // NON-NLS: field name
+            field.setAccessible(true);
+            actual = (BeanInfo) field.get(actual);
+        }
+        catch (Exception exception) {
+            throw new Error("unexpected error", exception);
+        }
+        if ((actual == null) && (expected != null)) {
+            throw new Error("expected info is not found");
+        }
+        if ((actual != null) && !actual.getClass().equals(expected)) {
+            throw new Error("found unexpected info");
+        }
+    }
+
+    private boolean passed;
+
+    public void run() {
+        if (this.passed) {
+            SunToolkit.createNewAppContext();
+        }
+        Introspector.flushCaches();
+
+        test(FirstBean.class, FirstBeanBeanInfo.class);
+        test(SecondBean.class, null);
+        test(ThirdBean.class, null);
+        test(ThirdBeanBeanInfo.class, ThirdBeanBeanInfo.class);
+
+        Introspector.setBeanInfoSearchPath(SEARCH_PATH);
+        Introspector.flushCaches();
+
+        test(FirstBean.class, FirstBeanBeanInfo.class);
+        test(SecondBean.class, SecondBeanBeanInfo.class);
+        test(ThirdBean.class, null);
+        test(ThirdBeanBeanInfo.class, ThirdBeanBeanInfo.class);
+
+        this.passed = true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/beans/FirstBean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,4 @@
+package beans;
+
+public class FirstBean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/beans/FirstBeanBeanInfo.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,11 @@
+package beans;
+
+import java.beans.BeanDescriptor;
+import java.beans.SimpleBeanInfo;
+
+public class FirstBeanBeanInfo extends SimpleBeanInfo {
+    @Override
+    public BeanDescriptor getBeanDescriptor() {
+        return new BeanDescriptor(FirstBean.class);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/beans/SecondBean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,4 @@
+package beans;
+
+public class SecondBean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/beans/ThirdBean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,4 @@
+package beans;
+
+public class ThirdBean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/infos/SecondBeanBeanInfo.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,13 @@
+package infos;
+
+import beans.SecondBean;
+
+import java.beans.BeanDescriptor;
+import java.beans.SimpleBeanInfo;
+
+public class SecondBeanBeanInfo extends SimpleBeanInfo {
+    @Override
+    public BeanDescriptor getBeanDescriptor() {
+        return new BeanDescriptor(SecondBean.class);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/6380849/infos/ThirdBeanBeanInfo.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,11 @@
+package infos;
+
+import java.beans.BeanDescriptor;
+import java.beans.SimpleBeanInfo;
+
+public class ThirdBeanBeanInfo extends SimpleBeanInfo {
+    @Override
+    public BeanDescriptor getBeanDescriptor() {
+        return new BeanDescriptor(ThirdBeanBeanInfo.class);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/Test6723447.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2009 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 6723447
+ * @summary Tests return type for property setters
+ * @author Sergey Malenkov
+ */
+
+import java.beans.IndexedPropertyDescriptor;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+
+public class Test6723447 {
+
+    public static void main(String[] args) {
+        test(Test6723447.class);
+        test(BigDecimal.class);
+    }
+
+    private static void test(Class<?> type) {
+        for (PropertyDescriptor pd : getPropertyDescriptors(type)) {
+            test(pd.getWriteMethod());
+            if (pd instanceof IndexedPropertyDescriptor) {
+                IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
+                test(ipd.getIndexedWriteMethod());
+            }
+        }
+    }
+
+    private static void test(Method method) {
+        if (method != null) {
+            Class<?> type = method.getReturnType();
+            if (!type.equals(void.class)) {
+                throw new Error("unexpected return type: " + type);
+            }
+        }
+    }
+
+    private static PropertyDescriptor[] getPropertyDescriptors(Class<?> type) {
+        try {
+            return Introspector.getBeanInfo(type).getPropertyDescriptors();
+        }
+        catch (IntrospectionException exception) {
+            throw new Error("unexpected exception", exception);
+        }
+    }
+
+    public Object getValue() {
+        return null;
+    }
+
+    public Object setValue(Object value) {
+        return value;
+    }
+
+    public Object getValues(int index) {
+        return null;
+    }
+
+    public Object setValues(int index, Object value) {
+        return value;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/FirstBean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,2 @@
+public class FirstBean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/FirstBeanEditor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,4 @@
+import java.beans.PropertyEditorSupport;
+
+public class FirstBeanEditor extends PropertyEditorSupport {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/SecondBean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,2 @@
+public class SecondBean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,141 @@
+/**
+ * Copyright 2009 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 6380849
+ * @summary Tests PropertyEditor finder
+ * @author Sergey Malenkov
+ */
+
+import editors.SecondBeanEditor;
+import editors.ThirdBeanEditor;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.beans.PropertyEditor;
+import java.beans.PropertyEditorManager;
+
+import sun.awt.SunToolkit;
+import sun.beans.editors.BooleanEditor;
+import sun.beans.editors.ByteEditor;
+import sun.beans.editors.ColorEditor;
+import sun.beans.editors.DoubleEditor;
+import sun.beans.editors.EnumEditor;
+import sun.beans.editors.FloatEditor;
+import sun.beans.editors.FontEditor;
+import sun.beans.editors.IntegerEditor;
+import sun.beans.editors.LongEditor;
+import sun.beans.editors.ShortEditor;
+import sun.beans.editors.StringEditor;
+
+public class TestPropertyEditor implements Runnable {
+
+    private enum Enumeration {
+        FIRST, SECOND, THIRD
+    }
+
+    private static final String[] SEARCH_PATH = { "editors" }; // NON-NLS: package name
+
+    public static void main(String[] args) throws InterruptedException {
+        TestPropertyEditor test = new TestPropertyEditor();
+        test.run();
+        // the following tests fails on previous build
+        ThreadGroup group = new ThreadGroup("$$$"); // NON-NLS: unique thread name
+        Thread thread = new Thread(group, test);
+        thread.start();
+        thread.join();
+    }
+
+    private static void test(Class<?> type, Class<? extends PropertyEditor> expected) {
+        PropertyEditor actual = PropertyEditorManager.findEditor(type);
+        if ((actual == null) && (expected != null)) {
+            throw new Error("expected editor is not found");
+        }
+        if ((actual != null) && !actual.getClass().equals(expected)) {
+            throw new Error("found unexpected editor");
+        }
+    }
+
+    private boolean passed;
+
+    public void run() {
+        if (this.passed) {
+            SunToolkit.createNewAppContext();
+        }
+        PropertyEditorManager.registerEditor(ThirdBean.class, ThirdBeanEditor.class);
+
+        test(FirstBean.class, FirstBeanEditor.class);
+        test(SecondBean.class, null);
+        test(ThirdBean.class, ThirdBeanEditor.class);
+        // test editors for default primitive types
+        test(Byte.TYPE, ByteEditor.class);
+        test(Short.TYPE, ShortEditor.class);
+        test(Integer.TYPE, IntegerEditor.class);
+        test(Long.TYPE, LongEditor.class);
+        test(Boolean.TYPE, BooleanEditor.class);
+        test(Float.TYPE, FloatEditor.class);
+        test(Double.TYPE, DoubleEditor.class);
+        // test editors for default object types
+        test(Byte.class, ByteEditor.class);
+        test(Short.class, ShortEditor.class);
+        test(Integer.class, IntegerEditor.class);
+        test(Long.class, LongEditor.class);
+        test(Boolean.class, BooleanEditor.class);
+        test(Float.class, FloatEditor.class);
+        test(Double.class, DoubleEditor.class);
+        test(String.class, StringEditor.class);
+        test(Color.class, ColorEditor.class);
+        test(Font.class, FontEditor.class);
+        test(Enumeration.class, EnumEditor.class);
+
+        PropertyEditorManager.registerEditor(ThirdBean.class, null);
+        PropertyEditorManager.setEditorSearchPath(SEARCH_PATH);
+
+        test(FirstBean.class, FirstBeanEditor.class);
+        test(SecondBean.class, SecondBeanEditor.class);
+        test(ThirdBean.class, ThirdBeanEditor.class);
+        // test editors for default primitive types
+        test(Byte.TYPE, ByteEditor.class);
+        test(Short.TYPE, ShortEditor.class);
+        test(Integer.TYPE, IntegerEditor.class);
+        test(Long.TYPE, LongEditor.class);
+        test(Boolean.TYPE, BooleanEditor.class);
+        test(Float.TYPE, FloatEditor.class);
+        test(Double.TYPE, DoubleEditor.class);
+        // test editors for default object types
+        test(Byte.class, null);
+        test(Short.class, null);
+        test(Integer.class, null);
+        test(Long.class, null);
+        test(Boolean.class, null);
+        test(Float.class, null);
+        test(Double.class, null);
+        test(String.class, null);
+        test(Color.class, null);
+        test(Font.class, null);
+        test(Enumeration.class, EnumEditor.class);
+
+        this.passed = true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/ThirdBean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,2 @@
+public class ThirdBean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/editors/SecondBeanEditor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,6 @@
+package editors;
+
+import java.beans.PropertyEditorSupport;
+
+public class SecondBeanEditor extends PropertyEditorSupport {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/6380849/editors/ThirdBeanEditor.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,6 @@
+package editors;
+
+import java.beans.PropertyEditorSupport;
+
+public class ThirdBeanEditor extends PropertyEditorSupport {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/6329581/Test6329581.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2009 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 6329581
+ * @summary Tests encoding of a class with custom ClassLoader
+ * @author Sergey Malenkov
+ */
+
+import java.beans.ExceptionListener;
+import java.beans.XMLDecoder;
+import java.beans.XMLEncoder;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class Test6329581 implements ExceptionListener {
+
+    public static void main(String[] args) throws Exception {
+        ExceptionListener listener = new Test6329581();
+        // write bean to byte array
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(out);
+        encoder.setExceptionListener(listener);
+        encoder.writeObject(getClassLoader("beans.jar").loadClass("test.Bean").newInstance());
+        encoder.close();
+        // read bean from byte array
+        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+        XMLDecoder decoder = new XMLDecoder(in, null, listener, getClassLoader("beans.jar"));
+        Object object = decoder.readObject();
+        decoder.close();
+
+        if (!object.getClass().getClassLoader().getClass().equals(URLClassLoader.class)) {
+            throw new Error("bean is loaded with unexpected class loader");
+        }
+    }
+
+    private static ClassLoader getClassLoader(String name) throws Exception {
+        StringBuilder sb = new StringBuilder(256);
+        sb.append("file:");
+        sb.append(System.getProperty("test.src", "."));
+        sb.append(File.separatorChar);
+        sb.append(name);
+
+        URL[] url = { new URL(sb.toString()) };
+        return new URLClassLoader(url);
+    }
+
+    public void exceptionThrown(Exception exception) {
+        throw new Error("unexpected exception", exception);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/6380849/Bean.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,2 @@
+public class Bean {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/6380849/BeanPersistenceDelegate.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,5 @@
+import java.beans.DefaultPersistenceDelegate;
+
+public class BeanPersistenceDelegate
+        extends DefaultPersistenceDelegate {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/6380849/TestPersistenceDelegate.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,60 @@
+/**
+ * Copyright 2009 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 6380849
+ * @summary Tests PersistenceDelegate finder
+ * @author Sergey Malenkov
+ */
+
+import java.beans.PersistenceDelegate;
+import java.beans.XMLEncoder;
+import java.beans.DefaultPersistenceDelegate;
+
+public class TestPersistenceDelegate {
+
+    private static final XMLEncoder ENCODER = new XMLEncoder(System.out);
+
+    public static void main(String[] args) throws InterruptedException {
+        Class<?> type = TestPersistenceDelegate.class;
+        test(type, DefaultPersistenceDelegate.class);
+        ENCODER.setPersistenceDelegate(type, new BeanPersistenceDelegate());
+        test(type, BeanPersistenceDelegate.class);
+        ENCODER.setPersistenceDelegate(type, null);
+        test(type, DefaultPersistenceDelegate.class);
+        // the following tests fails on previous build
+        test(Bean.class, BeanPersistenceDelegate.class);
+        test(BeanPersistenceDelegate.class, BeanPersistenceDelegate.class);
+    }
+
+    private static void test(Class<?> type, Class<? extends PersistenceDelegate> expected) {
+        PersistenceDelegate actual = ENCODER.getPersistenceDelegate(type);
+        if ((actual == null) && (expected != null)) {
+            throw new Error("expected delegate is not found");
+        }
+        if ((actual != null) && !actual.getClass().equals(expected)) {
+            throw new Error("found unexpected delegate");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,260 @@
+/*
+ * Copyright 2009 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 6852744
+ * @summary PIT b61: PKI test suite fails because self signed certificates
+ *          are being rejected
+ * @run main/othervm DisableRevocation subca
+ * @run main/othervm DisableRevocation subci
+ * @run main/othervm DisableRevocation alice
+ * @author Xuelei Fan
+ */
+
+import java.io.*;
+import java.net.SocketException;
+import java.util.*;
+import java.security.Security;
+import java.security.cert.*;
+import java.security.cert.CertPathValidatorException.BasicReason;
+import sun.security.util.DerInputStream;
+
+/**
+ * A test case helps to ensure that a certification path building process is
+ * able to identify a self-issued certificate from its issuer when disable
+ * revocation checking.
+ */
+public final class DisableRevocation {
+
+    // the trust anchor
+    static String selfSignedCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMThaFw0zMDA2MDgxMzMyMTha\n" +
+        "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
+        "AQUAA4GNADCBiQKBgQDInJhXi0655bPXAVkz1n5I6fAcZejzPnOPuwq3hU3OxFw8\n" +
+        "81Uf6o9oKI1h4w4XAD8u1cUNOgiX+wPwojronlp68bIfO6FVhNf287pLtLhNJo+7\n" +
+        "m6Qxw3ymFvEKy+PVj20CHSggdKHxUa4MBZBmHMFNBuxfYmjwzn+yTMmCCXOvSwID\n" +
+        "AQABo4GJMIGGMB0GA1UdDgQWBBSQ52Dpau+gtL+Kc31dusYnKj16ZTBHBgNVHSME\n" +
+        "QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" +
+        "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw\n" +
+        "DQYJKoZIhvcNAQEEBQADgYEAjBt6ea65HCqbGsS2rs/HhlGusYXtThRVC5vwXSey\n" +
+        "ZFYwSgukuq1KDzckqZFu1meNImEwdZjwxdN0e2p/nVREPC42rZliSj6V1ThayKXj\n" +
+        "DWEZW1U5aR8T+3NYfDrdKcJGx4Hzfz0qKz1j4ssV1M9ptJxYYv4y2Da+592IN1S9\n" +
+        "v/E=\n" +
+        "-----END CERTIFICATE-----";
+
+    // the sub-ca
+    static String subCaCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjRaFw0yOTAzMTUxMzMyMjRa\n" +
+        "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" +
+        "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPFv24SK78VI0gWlyIrq/X\n" +
+        "srl1431K5hJJxMYZtaQunyPmrYg3oI9KvKFykxnR0N4XDPaIi75p9dXGppVu80BA\n" +
+        "+csvIPBwlBQoNmKDQWTziDOqfK4tE+IMuL/Y7pxnH6CDMY7VGpvatty2zcmH+m/v\n" +
+        "E/n+HPyeELJQT2rT/3T+7wIDAQABo4GJMIGGMB0GA1UdDgQWBBRidC8Dt3dBzYES\n" +
+        "KpR2tR560sZ0+zBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw\n" +
+        "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" +
+        "AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMeMKqrMr5d3eTQsv\n" +
+        "MYOD15Dl3THQGLAa4ad5Eyq5/1eUeEOpztzCgDfi0iPD8YCubIEVasBTSqTiGXqb\n" +
+        "RpGuPHOwwfWvHrTeHSludiFBAUiKj7aEV+oQa0FBn4U4TT8HA62HQ93FhzTDI3jP\n" +
+        "iil34GktVl6gfMKGzUEW/Dh8OM4=\n" +
+        "-----END CERTIFICATE-----";
+
+    // a delegated CRL issuer, it's a self-issued certificate of trust anchor
+    static String topCrlIssuerCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICPjCCAaegAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjNaFw0yOTAzMTUxMzMyMjNa\n" +
+        "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
+        "AQUAA4GNADCBiQKBgQC99u93trf+WmpfiqunJy/P31ej1l4rESxft2JSGNjKuLFN\n" +
+        "/BO3SAugGJSkCARAwXjB0c8eeXhXWhVVWdNpbKepRJTxrjDfnFIavLgtUvmFwn/3\n" +
+        "hPXe+RQeA8+AJ99Y+o+10kY8JAZLa2j93C2FdmwOjUbo8aIz85yhbiV1tEDjLwID\n" +
+        "AQABo4GJMIGGMB0GA1UdDgQWBBSyFyA3XWLbdL6W6hksmBn7RKsQmDBHBgNVHSME\n" +
+        "QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" +
+        "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw\n" +
+        "DQYJKoZIhvcNAQEEBQADgYEAHTm8aRTeakgCfEBCgSWK9wvMW1c18ANGMm8OFDBk\n" +
+        "xabVy9BT0MVFHlaneh89oIxTZN0FMTpg21GZMAvIzhEt7DGdO7HLsW7JniN7/OZ0\n" +
+        "rACmpK5frmZrLS03zUm8c+rTbazNfYLoZVG3/mDZbKIi+4y8IGnFcgLVsHsYoBNP\n" +
+        "G0c=\n" +
+        "-----END CERTIFICATE-----";
+
+    // a delegated CRL issuer, it's a self-issued certificate of sub-ca
+    static String subCrlIssuerCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICUDCCAbmgAwIBAgIBBDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjdaFw0yOTAzMTUxMzMyMjda\n" +
+        "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" +
+        "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+8AcLJtGAVUWvv3ifcyQw\n" +
+        "OGqwzcPrBw/XCs6vTMlcdtFzcH1M+Z3/QHN9+5VT1gqeTIZ+b8g9005Og3XKy/HX\n" +
+        "obXZeLv20VZsr+jm52ySghEYOVCTJ9OyFOAp5adp6nf0cA66Feh3LsmVhpTEcDOG\n" +
+        "GnyntQm0DBYxRoOT/GBlvQIDAQABo4GJMIGGMB0GA1UdDgQWBBSRWhMuZLQoHSDN\n" +
+        "xhxr+vdDmfAY8jBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw\n" +
+        "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" +
+        "AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMIDZLdOLFiPyS1bh\n" +
+        "Ch4eUYHT+K1WG93skbga3kVYg3GSe+gctwkKwKK13bwfi8zc7wwz6MtmQwEYhppc\n" +
+        "pKKKEwi5QirBCP54rihLCvRQaj6ZqUJ6VP+zPAqHYMDbzlBbHtVF/1lQUP30I6SV\n" +
+        "Fu987DvLmZ2GuQA9FKJsnlD9pbU=\n" +
+        "-----END CERTIFICATE-----";
+
+    // the target EE certificate
+    static String targetCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA2MjgxMzMy\n" +
+        "MzBaFw0yOTAzMTUxMzMyMzBaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" +
+        "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" +
+        "9w0BAQEFAAOBjQAwgYkCgYEA7wnsvR4XEOfVznf40l8ClLod+7L0y2/+smVV+GM/\n" +
+        "T1/QF/stajAJxXNy08gK00WKZ6ruTHhR9vh/Z6+EQM2RZDCpU0A7LPa3kLE/XTmS\n" +
+        "1MLDu8ntkdlpURpvhdDWem+rl2HU5oZgzV8Jkcov9vXuSjqEDfr45FlPuV40T8+7\n" +
+        "cxsCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBSBwsAhi6Z1kriOs3ty\n" +
+        "uSIujv9a3DAfBgNVHSMEGDAWgBRidC8Dt3dBzYESKpR2tR560sZ0+zANBgkqhkiG\n" +
+        "9w0BAQQFAAOBgQDEiBqd5AMy2SQopFaS3dYkzj8MHlwtbCSoNVYkOfDnewcatrbk\n" +
+        "yFcp6FX++PMdOQFHWvvnDdkCUAzZQp8kCkF9tGLVLBtOK7XxQ1us1LZym7kOPzsd\n" +
+        "G93Dcf0U1JRO77juc61Br5paAy8Bok18Y/MeG7uKgB2MAEJYKhGKbCrfMw==\n" +
+        "-----END CERTIFICATE-----";
+
+    private static Set<TrustAnchor> generateTrustAnchors()
+            throws CertificateException {
+        // generate certificate from cert string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+
+        ByteArrayInputStream is =
+                    new ByteArrayInputStream(selfSignedCertStr.getBytes());
+        Certificate selfSignedCert = cf.generateCertificate(is);
+
+        // generate a trust anchor
+        TrustAnchor anchor =
+            new TrustAnchor((X509Certificate)selfSignedCert, null);
+
+        return Collections.singleton(anchor);
+    }
+
+    private static CertStore generateCertificateStore() throws Exception {
+        Collection entries = new HashSet();
+
+        // generate certificate from certificate string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+
+        ByteArrayInputStream is;
+
+        is = new ByteArrayInputStream(targetCertStr.getBytes());
+        Certificate cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(subCaCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(selfSignedCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(topCrlIssuerCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        return CertStore.getInstance("Collection",
+                            new CollectionCertStoreParameters(entries));
+    }
+
+    private static X509CertSelector generateSelector(String name)
+                throws Exception {
+        X509CertSelector selector = new X509CertSelector();
+
+        // generate certificate from certificate string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        ByteArrayInputStream is = null;
+        if (name.equals("subca")) {
+            is = new ByteArrayInputStream(subCaCertStr.getBytes());
+        } else if (name.equals("subci")) {
+            is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes());
+        } else {
+            is = new ByteArrayInputStream(targetCertStr.getBytes());
+        }
+
+        X509Certificate target = (X509Certificate)cf.generateCertificate(is);
+        byte[] extVal = target.getExtensionValue("2.5.29.14");
+        if (extVal != null) {
+            DerInputStream in = new DerInputStream(extVal);
+            byte[] subjectKID = in.getOctetString();
+            selector.setSubjectKeyIdentifier(subjectKID);
+        } else {
+            // unlikely to happen.
+            throw new Exception("unexpected certificate: no SKID extension");
+        }
+
+        return selector;
+    }
+
+    private static boolean match(String name, Certificate cert)
+                throws Exception {
+        X509CertSelector selector = new X509CertSelector();
+
+        // generate certificate from certificate string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        ByteArrayInputStream is = null;
+        if (name.equals("subca")) {
+            is = new ByteArrayInputStream(subCaCertStr.getBytes());
+        } else if (name.equals("subci")) {
+            is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes());
+        } else {
+            is = new ByteArrayInputStream(targetCertStr.getBytes());
+        }
+        X509Certificate target = (X509Certificate)cf.generateCertificate(is);
+
+        return target.equals(cert);
+    }
+
+
+    public static void main(String[] args) throws Exception {
+        CertPathBuilder builder = CertPathBuilder.getInstance("PKIX");
+
+        X509CertSelector selector = generateSelector(args[0]);
+
+        Set<TrustAnchor> anchors = generateTrustAnchors();
+        CertStore certs = generateCertificateStore();
+
+
+        PKIXBuilderParameters params =
+                new PKIXBuilderParameters(anchors, selector);
+        params.addCertStore(certs);
+        params.setRevocationEnabled(false);
+        params.setDate(new Date(109, 7, 1));   // 2009-07-01
+        Security.setProperty("ocsp.enable", "false");
+        System.setProperty("com.sun.security.enableCRLDP", "false");
+
+        PKIXCertPathBuilderResult result =
+                (PKIXCertPathBuilderResult)builder.build(params);
+
+        if (!match(args[0], result.getCertPath().getCertificates().get(0))) {
+            throw new Exception("unexpected certificate");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,303 @@
+/*
+ * Copyright 2009 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 6852744
+ * @summary PIT b61: PKI test suite fails because self signed certificates
+ *          are being rejected
+ * @run main/othervm KeyUsageMatters subca
+ * @run main/othervm KeyUsageMatters subci
+ * @run main/othervm KeyUsageMatters alice
+ * @author Xuelei Fan
+ */
+
+import java.io.*;
+import java.net.SocketException;
+import java.util.*;
+import java.security.Security;
+import java.security.cert.*;
+import java.security.cert.CertPathValidatorException.BasicReason;
+import sun.security.util.DerInputStream;
+
+/**
+ * KeyUsage extension plays a important rule during looking for the issuer
+ * of a certificate or CRL. A certificate issuer should have the keyCertSign
+ * bit set, and a CRL issuer should have the cRLSign bit set.
+ *
+ * Sometime, a delegated CRL issuer would also have the keyCertSign bit set,
+ * as would be troublesome to find the proper CRL issuer during certificate
+ * path build if the delegated CRL issuer is a self-issued certificate, for
+ * it is hard to identify it from its issuer by the "issuer" field only.
+ *
+ * The fix of 6852744 should addresses above issue, and allow a delegated CRL
+ * issuer to have keyCertSign bit set.
+ *
+ * In the test case, the delegated CRL issuers have cRLSign bit set only, and
+ * the CAs have the keyCertSign bit set only, it is expected to work before
+ * and after the bug fix of 6852744.
+ */
+public final class KeyUsageMatters {
+
+    // the trust anchor
+    static String selfSignedCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzJaFw0zMDA0MDcwMjI0MzJa\n" +
+        "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
+        "AQUAA4GNADCBiQKBgQC4OTag24sTxL2tXTNuvpmUEtdxrYAZoFsslFQ60T+WD9wQ\n" +
+        "Jeiw87FSPsR2vxRuv0j8DNm2a4h7LNNIFcLurfNldbz5pvgZ7VqdbbUMPE9qP85n\n" +
+        "jgDl4woyRTSUeRI4A7O0CO6NpES21dtbdhroWQrEkHxpnrDPxsxrz5gf2m3gqwID\n" +
+        "AQABo4GJMIGGMB0GA1UdDgQWBBSCJd0hpl5PdAD9IZS+Hzng4lXLGzBHBgNVHSME\n" +
+        "QDA+gBSCJd0hpl5PdAD9IZS+Hzng4lXLG6EjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" +
+        "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAgQw\n" +
+        "DQYJKoZIhvcNAQEEBQADgYEAluy6HIjWcq009lTLmhp+Np6dxU78pInBK8RZkza0\n" +
+        "484qGaxFGD3UGyZkI5uWmsH2XuMbuox5khfIq6781gmkPBHXBIEtJN8eLusOHEye\n" +
+        "iE8h7WI+N3qa6Pj56WionMrioqC/3X+b06o147bbhx8U0vkYv/HyPaITOFfMXTdz\n" +
+        "Vjw=\n" +
+        "-----END CERTIFICATE-----";
+
+    // the sub-ca
+    static String subCaCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzRaFw0yOTAxMTIwMjI0MzRa\n" +
+        "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" +
+        "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiAJnAQW2ad3ZMKUhSJVZj\n" +
+        "8pBqxTcHSTwAVguQkDglsN/OIwUpvR5Jgp3lpRWUEt6idEp0FZzORpvtjt3pr5MG\n" +
+        "Eg2CDptekC5BSPS+fIAIKlncB3HwOiFFhH6b3wTydDCdEd2fvsi4QMOSVrIYMeA8\n" +
+        "P/mCz6kRhfUQPE0CMmOUewIDAQABo4GJMIGGMB0GA1UdDgQWBBT0/nNP8WpyxmYr\n" +
+        "IBp4tN8y08jw2jBHBgNVHSMEQDA+gBSCJd0hpl5PdAD9IZS+Hzng4lXLG6EjpCEw\n" +
+        "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" +
+        "AwEB/zALBgNVHQ8EBAMCAgQwDQYJKoZIhvcNAQEEBQADgYEAS9PzI6B39R/U9fRj\n" +
+        "UExzN1FXNP5awnAPtiv34kSCL6n6MryqkfG+8aaAOdZsSjmTylNFaF7cW/Xp1VBF\n" +
+        "hq0bg/SbEAbK7+UwL8GSC3crhULHLbh+1iFdVTEwxCw5YmB8ji3BaZ/WKW/PkjCZ\n" +
+        "7cXP6VDeZMG6oRQ4hbOcixoFPXo=\n" +
+        "-----END CERTIFICATE-----";
+
+    // a delegated CRL issuer, it's a self-issued certificate of trust anchor
+    static String topCrlIssuerCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICKzCCAZSgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzNaFw0yOTAxMTIwMjI0MzNa\n" +
+        "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
+        "AQUAA4GNADCBiQKBgQDMJeBMBybHykI/YpwUJ4O9euqDSLb1kpWpceBS8TVqvgBC\n" +
+        "SgUJWtFZL0i6bdvF6mMdlbuBkGzhXqHiVAi96/zRLbUC9F8SMEJ6MuD+YhQ0ZFTQ\n" +
+        "atKy8zf8O9XzztelLJ26Gqb7QPV133WY3haAqHtCXOhEKkCN16NOYNC37DTaJwID\n" +
+        "AQABo3cwdTAdBgNVHQ4EFgQULXSWzXzUOIpOJpzbSCpW42IJUugwRwYDVR0jBEAw\n" +
+        "PoAUgiXdIaZeT3QA/SGUvh854OJVyxuhI6QhMB8xCzAJBgNVBAYTAlVTMRAwDgYD\n" +
+        "VQQKEwdFeGFtcGxlggEAMAsGA1UdDwQEAwIBAjANBgkqhkiG9w0BAQQFAAOBgQAY\n" +
+        "eMnf5AHSNlyUlzXk8o2S0h4gCuvKX6C3kFfKuZcWvFAbx4yQOWLS2s15/nzR4+AP\n" +
+        "FGX3lgJjROyAh7fGedTQK+NFWwkM2ag1g3hXktnlnT1qHohi0w31nVBJxXEDO/Ck\n" +
+        "uJTpJGt8XxxbFaw5v7cHy7XuTAeU/sekvjEiNHW00Q==\n" +
+        "-----END CERTIFICATE-----";
+
+    // a delegated CRL issuer, it's a self-issued certificate of sub-ca
+    static String subCrlIssuerCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICPTCCAaagAwIBAgIBBDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzRaFw0yOTAxMTIwMjI0MzRa\n" +
+        "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" +
+        "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWUtDQx2MB/7arDiquMJyd\n" +
+        "LWwSg6p8sg5z6wKrC1v47MT4DBhFX+0RUgTMUdQgYpgxGpczn+6y4zfV76064S0N\n" +
+        "4L/IQ+SunTW1w4yRGjB+xkyyJmWAqijG1nr+Dgkv5nxPI+9Er5lHcoVWVMEcvvRm\n" +
+        "6jIBQdldVlSgv+VgUnFm5wIDAQABo3cwdTAdBgNVHQ4EFgQUkV3Qqtk7gIot9n60\n" +
+        "jX6dloxrfMEwRwYDVR0jBEAwPoAUgiXdIaZeT3QA/SGUvh854OJVyxuhI6QhMB8x\n" +
+        "CzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlggEAMAsGA1UdDwQEAwIBAjAN\n" +
+        "BgkqhkiG9w0BAQQFAAOBgQADu4GM8EdmIKhC7FRvk5jF90zfvZ38wbXBzCjKI4jX\n" +
+        "QJrhne1bfyeNNm5c1w+VKidT+XzBzBGH7ZqYzoZmzRIfcbLKX2brEBKiukeeAyL3\n" +
+        "bctQtbp19tX+uu2dQberD188AAysKTkHcJUV+rRsTwVJ9vcYKxoRxKk8DhH7ZS3M\n" +
+        "rg==\n" +
+        "-----END CERTIFICATE-----";
+
+    // the target EE certificate
+    static String targetCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" +
+        "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA0MjcwMjI0\n" +
+        "MzZaFw0yOTAxMTIwMjI0MzZaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" +
+        "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" +
+        "9w0BAQEFAAOBjQAwgYkCgYEAvYSaU3oiE4Pxp/aUIXwMqOwSiWkZ+O3aTu13hRtK\n" +
+        "ZyR+Wtj63IuvaigAC4uC+zBypF93ThjwCzVR2qKDQaQzV8CLleO96gStt7Y+i3G2\n" +
+        "V3IUGgrVCqeK7N6nNYu0wW84sibcPqG/TIy0UoaQMqgB21xtRF+1DUVlFh4Z89X/\n" +
+        "pskCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBSynMEdcal/e9TmvlNE\n" +
+        "4suXGA4+hjAfBgNVHSMEGDAWgBT0/nNP8WpyxmYrIBp4tN8y08jw2jANBgkqhkiG\n" +
+        "9w0BAQQFAAOBgQB/jru7E/+piSmUwByw5qbZsoQZVcgR97pd2TErNJpJMAX2oIHR\n" +
+        "wJH6w4NuYs27+fEAX7wK4whc6EUH/w1SI6o28F2rG6HqYQPPZ2E2WqwbBQL9nYE3\n" +
+        "Vfzu/G9axTUQXFbf90h80UErA+mZVxqc2xtymLuH0YEaMZImtRZ2MXHfXg==\n" +
+        "-----END CERTIFICATE-----";
+
+    // CRL issued by the delegated CRL issuer, topCrlIssuerCertStr
+    static String topCrlStr =
+        "-----BEGIN X509 CRL-----\n" +
+        "MIIBGzCBhQIBATANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQMA4GA1UE\n" +
+        "ChMHRXhhbXBsZRcNMDkwNDI3MDIzODA0WhcNMjgwNjI2MDIzODA0WjAiMCACAQUX\n" +
+        "DTA5MDQyNzAyMzgwMFowDDAKBgNVHRUEAwoBBKAOMAwwCgYDVR0UBAMCAQIwDQYJ\n" +
+        "KoZIhvcNAQEEBQADgYEAoarfzXEtw3ZDi4f9U8eSvRIipHSyxOrJC7HR/hM5VhmY\n" +
+        "CErChny6x9lBVg9s57tfD/P9PSzBLusCcHwHMAbMOEcTltVVKUWZnnbumpywlYyg\n" +
+        "oKLrE9+yCOkYUOpiRlz43/3vkEL5hjIKMcDSZnPKBZi1h16Yj2hPe9GMibNip54=\n" +
+        "-----END X509 CRL-----";
+
+    // CRL issued by the delegated CRL issuer, subCrlIssuerCertStr
+    static String subCrlStr =
+        "-----BEGIN X509 CRL-----\n" +
+        "MIIBLTCBlwIBATANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQMA4GA1UE\n" +
+        "ChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMRcNMDkwNDI3MDIzODA0WhcNMjgw\n" +
+        "NjI2MDIzODA0WjAiMCACAQQXDTA5MDQyNzAyMzgwMVowDDAKBgNVHRUEAwoBBKAO\n" +
+        "MAwwCgYDVR0UBAMCAQIwDQYJKoZIhvcNAQEEBQADgYEAeS+POqYEIHIIJcsLxuUr\n" +
+        "aJFzQ/ujH0QmnyMNEL3Uavyq4VQuAahF+w6aTPb5UBzms0uX8NAvD2vNoUJvmJOX\n" +
+        "nGKuq4Q1DFj82E7/9d25nXdWGOmFvFCRVO+St2Xe5n8CJuZNBiz388FDSIOiFSCa\n" +
+        "ARGr6Qu68MYGtLMC6ZqP3u0=\n" +
+        "-----END X509 CRL-----";
+
+    private static Set<TrustAnchor> generateTrustAnchors()
+            throws CertificateException {
+        // generate certificate from cert string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+
+        ByteArrayInputStream is =
+                    new ByteArrayInputStream(selfSignedCertStr.getBytes());
+        Certificate selfSignedCert = cf.generateCertificate(is);
+
+        // generate a trust anchor
+        TrustAnchor anchor =
+            new TrustAnchor((X509Certificate)selfSignedCert, null);
+
+        return Collections.singleton(anchor);
+    }
+
+    private static CertStore generateCertificateStore() throws Exception {
+        Collection entries = new HashSet();
+
+        // generate certificate from certificate string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+
+        ByteArrayInputStream is;
+
+        is = new ByteArrayInputStream(targetCertStr.getBytes());
+        Certificate cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(subCaCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(selfSignedCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(topCrlIssuerCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes());
+        cert = cf.generateCertificate(is);
+        entries.add(cert);
+
+        // generate CRL from CRL string
+        is = new ByteArrayInputStream(topCrlStr.getBytes());
+        Collection mixes = cf.generateCRLs(is);
+        entries.addAll(mixes);
+
+        is = new ByteArrayInputStream(subCrlStr.getBytes());
+        mixes = cf.generateCRLs(is);
+        entries.addAll(mixes);
+
+        return CertStore.getInstance("Collection",
+                            new CollectionCertStoreParameters(entries));
+    }
+
+    private static X509CertSelector generateSelector(String name)
+                throws Exception {
+        X509CertSelector selector = new X509CertSelector();
+
+        // generate certificate from certificate string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        ByteArrayInputStream is = null;
+        if (name.equals("subca")) {
+            is = new ByteArrayInputStream(subCaCertStr.getBytes());
+        } else if (name.equals("subci")) {
+            is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes());
+        } else {
+            is = new ByteArrayInputStream(targetCertStr.getBytes());
+        }
+
+        X509Certificate target = (X509Certificate)cf.generateCertificate(is);
+        byte[] extVal = target.getExtensionValue("2.5.29.14");
+        if (extVal != null) {
+            DerInputStream in = new DerInputStream(extVal);
+            byte[] subjectKID = in.getOctetString();
+            selector.setSubjectKeyIdentifier(subjectKID);
+        } else {
+            // unlikely to happen.
+            throw new Exception("unexpected certificate: no SKID extension");
+        }
+
+        return selector;
+    }
+
+    private static boolean match(String name, Certificate cert)
+                throws Exception {
+        X509CertSelector selector = new X509CertSelector();
+
+        // generate certificate from certificate string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        ByteArrayInputStream is = null;
+        if (name.equals("subca")) {
+            is = new ByteArrayInputStream(subCaCertStr.getBytes());
+        } else if (name.equals("subci")) {
+            is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes());
+        } else {
+            is = new ByteArrayInputStream(targetCertStr.getBytes());
+        }
+        X509Certificate target = (X509Certificate)cf.generateCertificate(is);
+
+        return target.equals(cert);
+    }
+
+
+    public static void main(String[] args) throws Exception {
+        CertPathBuilder builder = CertPathBuilder.getInstance("PKIX");
+
+        X509CertSelector selector = generateSelector(args[0]);
+
+        Set<TrustAnchor> anchors = generateTrustAnchors();
+        CertStore certs = generateCertificateStore();
+
+
+        PKIXBuilderParameters params =
+                new PKIXBuilderParameters(anchors, selector);
+        params.addCertStore(certs);
+        params.setRevocationEnabled(true);
+        params.setDate(new Date(109, 5, 1));   // 2009-05-01
+        Security.setProperty("ocsp.enable", "false");
+        System.setProperty("com.sun.security.enableCRLDP", "true");
+
+        PKIXCertPathBuilderResult result =
+                (PKIXCertPathBuilderResult)builder.build(params);
+
+        if (!match(args[0], result.getCertPath().getCertificates().get(0))) {
+            throw new Exception("unexpected certificate");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/README	Fri Jul 31 10:41:29 2009 -0700
@@ -0,0 +1,382 @@
+/*
+ * Copyright 2009 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.
+ */
+
+                  Certificates and CRLs
+
+The certificates and CRLs used by KeyUsageMatters.java are copied from
+test/java/security/cert/CertPathValidator/indirectCRL.
+
+Here lists the local generated certificates and CRLs used in the test cases.
+
+The generate.sh depends on openssl, and it should be run under ksh. The
+script will create many directories and