changeset 1721:7b85ef3d752e

Merge
author mullan
date Wed, 09 Sep 2009 09:59:48 -0400
parents 8252729d51a3 (current diff) 0d50d40a4a39 (diff)
children f1eb4c28b313
files
diffstat 27 files changed, 372 insertions(+), 137 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Sep 09 09:54:13 2009 -0400
+++ b/.hgtags	Wed Sep 09 09:59:48 2009 -0400
@@ -45,3 +45,4 @@
 b23d905cb5d3b382295240d28ab0bfb266b4503c jdk7-b68
 226b20019b1f020c09ea97d137d98e011ce65d76 jdk7-b69
 893bcca951b747ddcf6986362b877f0e1dbb835b jdk7-b70
+b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71
--- a/make/common/shared/Defs-java.gmk	Wed Sep 09 09:54:13 2009 -0400
+++ b/make/common/shared/Defs-java.gmk	Wed Sep 09 09:59:48 2009 -0400
@@ -201,7 +201,10 @@
 ifeq ($(JAVAC_WARNINGS_FATAL), true)
   BOOT_JAVACFLAGS  += -Werror
 endif
-BOOT_JAVACFLAGS  += -encoding ascii
+
+BOOT_SOURCE_LANGUAGE_VERSION = 6
+BOOT_TARGET_CLASS_VERSION = 6
+BOOT_JAVACFLAGS  += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
 BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
 
 BOOT_JAVACFLAGS  += $(NO_PROPRIETARY_API_WARNINGS)
--- a/make/tools/freetypecheck/Makefile	Wed Sep 09 09:54:13 2009 -0400
+++ b/make/tools/freetypecheck/Makefile	Wed Sep 09 09:59:48 2009 -0400
@@ -28,16 +28,21 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 # Default name
-FT_TEST = $(BUILDTOOLBINDIR)/freetype_versioncheck$(EXE_SUFFIX)
+PROGRAM = freetype_versioncheck
+FT_OBJ = $(BUILDTOOLBINDIR)/$(PROGRAM).$(OBJECT_SUFFIX)
+FT_TEST = $(BUILDTOOLBINDIR)/$(PROGRAM)$(EXE_SUFFIX)
 
 # Used on openjdk only
 ifeq ($(OPENJDK),true)
 
 # Start with CFLAGS (which gets us the required -xarch setting on solaris)
 ifeq ($(PLATFORM), windows)
-  FT_OPTIONS  = /nologo $(CC_OBJECT_OUTPUT_FLAG)$(TEMPDIR)
+  FT_OPTIONS  = /nologo /c
   FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
   FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
+ifdef MT
+  FT_LD_OPTIONS += /manifest
+endif
 else
   FT_OPTIONS  = $(CFLAGS)
   FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
@@ -55,15 +60,22 @@
 
 # Create test program
 all: $(FT_TEST)
-	@$(FT_TEST)
+	$(FT_TEST)
 
 # On windows we need to copy dll to test dir to ensure it will be found
 #   at runtime
 $(FT_TEST): freetypecheck.c
-	@$(prep-target)
+	$(prep-target)
+ifeq ($(PLATFORM), windows)
+	$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
+	$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ)
+	$(CP) $(FREETYPE_DLL) $(@D)/
+ifdef MT
+	$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
+	$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1
+endif
+else
 	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
-ifeq ($(PLATFORM), windows)
-	@$(CP) $(FREETYPE_DLL) `dirname $@`
 endif
 
 else
--- a/make/tools/freetypecheck/freetypecheck.c	Wed Sep 09 09:54:13 2009 -0400
+++ b/make/tools/freetypecheck/freetypecheck.c	Wed Sep 09 09:59:48 2009 -0400
@@ -32,6 +32,45 @@
 #include "ft2build.h"
 #include FT_FREETYPE_H
 
+#ifdef _MSC_VER
+#if _MSC_VER > 1400
+
+/*
+ * When building for Microsoft Windows, your program has a dependency
+ * on msvcr??.dll.
+ *
+ * When using Visual Studio 2005 or later, that must be recorded in
+ * the <program>.exe.manifest file.
+ *
+ * Reference:
+ *     C:/Program Files/Microsoft SDKs/Windows/v6.1/include/crtdefs.h
+ */
+#include <crtassem.h>
+#ifdef _M_IX86
+
+#pragma comment(linker,"/manifestdependency:\"type='win32' "            \
+        "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "              \
+        "version='" _CRT_ASSEMBLY_VERSION "' "                          \
+        "processorArchitecture='x86' "                                  \
+        "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
+
+#endif /* _M_IX86 */
+
+//This may not be necessary yet for the Windows 64-bit build, but it
+//will be when that build environment is updated.  Need to test to see
+//if it is harmless:
+#ifdef _M_AMD64
+
+#pragma comment(linker,"/manifestdependency:\"type='win32' "            \
+        "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "              \
+        "version='" _CRT_ASSEMBLY_VERSION "' "                          \
+        "processorArchitecture='amd64' "                                \
+        "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
+
+#endif  /* _M_AMD64 */
+#endif  /* _MSC_VER > 1400 */
+#endif  /* _MSC_VER */
+
 #define QUOTEMACRO(x) QUOTEME(x)
 #define QUOTEME(x) #x
 
--- a/src/share/bin/java.h	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/bin/java.h	Wed Sep 09 09:59:48 2009 -0400
@@ -187,9 +187,6 @@
  *
  */
 typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
-                                                const char *name,
-                                                jboolean init,
-                                                jobject loader,
-                                                jboolean throwError));
+                                                  const char *name));
 jclass FindBootStrapClass(JNIEnv *env, const char *classname);
 #endif /* _JAVA_H_ */
--- a/src/share/classes/java/lang/Character.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/classes/java/lang/Character.java	Wed Sep 09 09:59:48 2009 -0400
@@ -2587,9 +2587,9 @@
      * 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.
+     * This method will always cache values in the range {@code
+     * '\u005Cu0000'} to {@code '\u005Cu007f'}, 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>.
--- a/src/share/classes/java/lang/ClassLoader.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/classes/java/lang/ClassLoader.java	Wed Sep 09 09:59:48 2009 -0400
@@ -384,9 +384,14 @@
                     if (parent != null) {
                         c = parent.loadClass(name, false);
                     } else {
-                        c = findBootstrapClass0(name);
+                        c = findBootstrapClassOrNull(name);
                     }
                 } catch (ClassNotFoundException e) {
+                    // ClassNotFoundException thrown if class not found
+                    // from the non-null parent class loader
+                }
+
+                if (c == null) {
                     // If still not found, then invoke findClass in order
                     // to find the class.
                     c = findClass(name);
@@ -1008,22 +1013,29 @@
         if (system == null) {
             if (!checkName(name))
                 throw new ClassNotFoundException(name);
-            return findBootstrapClass(name);
+            Class cls = findBootstrapClass(name);
+            if (cls == null) {
+                throw new ClassNotFoundException(name);
+            }
+            return cls;
         }
         return system.loadClass(name);
     }
 
-    private Class findBootstrapClass0(String name)
-        throws ClassNotFoundException
+    /**
+     * Returns a class loaded by the bootstrap class loader;
+     * or return null if not found.
+     */
+    private Class findBootstrapClassOrNull(String name)
     {
         check();
-        if (!checkName(name))
-            throw new ClassNotFoundException(name);
+        if (!checkName(name)) return null;
+
         return findBootstrapClass(name);
     }
 
-    private native Class findBootstrapClass(String name)
-        throws ClassNotFoundException;
+    // return null if not found
+    private native Class findBootstrapClass(String name);
 
     // Check to make sure the class loader has been initialized.
     private void check() {
--- a/src/share/classes/java/nio/file/Files.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/classes/java/nio/file/Files.java	Wed Sep 09 09:59:48 2009 -0400
@@ -133,10 +133,11 @@
      * <p> This method walks a file tree rooted at a given starting file. The
      * file tree traversal is <em>depth-first</em> with the given {@link
      * FileVisitor} invoked for each file encountered. File tree traversal
-     * completes when all accessible files in the tree have been visited, a
-     * visitor returns a result of {@link FileVisitResult#TERMINATE TERMINATE},
-     * or the visitor terminates due to an uncaught {@code Error} or {@code
-     * RuntimeException}.
+     * completes when all accessible files in the tree have been visited, or a
+     * visit method returns a result of {@link FileVisitResult#TERMINATE
+     * TERMINATE}. Where a visit method terminates due an uncaught error or
+     * runtime exception then the traversal is terminated and the error or
+     * exception is propagated to the caller of this method.
      *
      * <p> For each file encountered this method attempts to gets its {@link
      * java.nio.file.attribute.BasicFileAttributes}. If the file is not a
--- a/src/share/classes/java/nio/file/SimpleFileVisitor.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/classes/java/nio/file/SimpleFileVisitor.java	Wed Sep 09 09:59:48 2009 -0400
@@ -124,8 +124,8 @@
      * cause.
      *
      * @throws  IOError
-     *          if iteration of the directory completed prematurely due to an
-     *          I/O error
+     *          with the I/O exception thrown when iteration of the directory
+     *          completed prematurely due to an I/O error
      */
     @Override
     public FileVisitResult postVisitDirectory(T dir, IOException exc) {
--- a/src/share/classes/sun/security/tools/JarSigner.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/classes/sun/security/tools/JarSigner.java	Wed Sep 09 09:59:48 2009 -0400
@@ -1978,20 +1978,35 @@
         String[] base64Digests = getDigests(ze, zf, digests, encoder);
 
         for (int i=0; i<digests.length; i++) {
-            String name = digests[i].getAlgorithm()+"-Digest";
-            String mfDigest = attrs.getValue(name);
-            if (mfDigest == null
-                && digests[i].getAlgorithm().equalsIgnoreCase("SHA")) {
-                // treat "SHA" and "SHA1" the same
-                mfDigest = attrs.getValue("SHA-Digest");
+            // The entry name to be written into attrs
+            String name = null;
+            try {
+                // Find if the digest already exists
+                AlgorithmId aid = AlgorithmId.get(digests[i].getAlgorithm());
+                for (Object key: attrs.keySet()) {
+                    if (key instanceof Attributes.Name) {
+                        String n = ((Attributes.Name)key).toString();
+                        if (n.toUpperCase(Locale.ENGLISH).endsWith("-DIGEST")) {
+                            String tmp = n.substring(0, n.length() - 7);
+                            if (AlgorithmId.get(tmp).equals(aid)) {
+                                name = n;
+                                break;
+                            }
+                        }
+                    }
+                }
+            } catch (NoSuchAlgorithmException nsae) {
+                // Ignored. Writing new digest entry.
             }
-            if (mfDigest == null) {
-                // compute digest and add it to list of attributes
+
+            if (name == null) {
+                name = digests[i].getAlgorithm()+"-Digest";
                 attrs.putValue(name, base64Digests[i]);
                 update=true;
             } else {
                 // compare digests, and replace the one in the manifest
                 // if they are different
+                String mfDigest = attrs.getValue(name);
                 if (!mfDigest.equalsIgnoreCase(base64Digests[i])) {
                     attrs.putValue(name, base64Digests[i]);
                     update=true;
--- a/src/share/classes/sun/security/x509/AlgorithmId.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/classes/sun/security/x509/AlgorithmId.java	Wed Sep 09 09:59:48 2009 -0400
@@ -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
@@ -531,6 +531,18 @@
                 || name.equalsIgnoreCase("ECDSA")) {
             return AlgorithmId.sha1WithECDSA_oid;
         }
+        if (name.equalsIgnoreCase("SHA224withECDSA")) {
+            return AlgorithmId.sha224WithECDSA_oid;
+        }
+        if (name.equalsIgnoreCase("SHA256withECDSA")) {
+            return AlgorithmId.sha256WithECDSA_oid;
+        }
+        if (name.equalsIgnoreCase("SHA384withECDSA")) {
+            return AlgorithmId.sha384WithECDSA_oid;
+        }
+        if (name.equalsIgnoreCase("SHA512withECDSA")) {
+            return AlgorithmId.sha512WithECDSA_oid;
+        }
 
         // See if any of the installed providers supply a mapping from
         // the given algorithm name to an OID string
--- a/src/share/javavm/export/jvm.h	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/javavm/export/jvm.h	Wed Sep 09 09:59:48 2009 -0400
@@ -375,6 +375,12 @@
 JVM_ResolveClass(JNIEnv *env, jclass cls);
 
 /*
+ * Find a class from a boot class loader. Returns NULL if class not found.
+ */
+JNIEXPORT jclass JNICALL
+JVM_FindClassFromBootLoader(JNIEnv *env, const char *name);
+
+/*
  * Find a class from a given class loader. Throw ClassNotFoundException
  * or NoClassDefFoundError depending on the value of the last
  * argument.
--- a/src/share/native/java/lang/ClassLoader.c	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/native/java/lang/ClassLoader.c	Wed Sep 09 09:59:48 2009 -0400
@@ -237,6 +237,9 @@
     JVM_ResolveClass(env, cls);
 }
 
+/*
+ * Returns NULL if class not found.
+ */
 JNIEXPORT jclass JNICALL
 Java_java_lang_ClassLoader_findBootstrapClass(JNIEnv *env, jobject loader,
                                               jstring classname)
@@ -246,7 +249,6 @@
     char buf[128];
 
     if (classname == NULL) {
-        JNU_ThrowClassNotFoundException(env, 0);
         return 0;
     }
 
@@ -258,11 +260,10 @@
     VerifyFixClassname(clname);
 
     if (!VerifyClassname(clname, JNI_TRUE)) {  /* expects slashed name */
-        JNU_ThrowClassNotFoundException(env, clname);
         goto done;
     }
 
-    cls = JVM_FindClassFromClassLoader(env, clname, JNI_FALSE, 0, JNI_FALSE);
+    cls = JVM_FindClassFromBootLoader(env, clname);
 
  done:
     if (clname != buf) {
--- a/src/share/sample/nio/file/Xdd.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/sample/nio/file/Xdd.java	Wed Sep 09 09:59:48 2009 -0400
@@ -57,9 +57,9 @@
         Path file = (args.length == 1) ?
             Paths.get(args[0]) : Paths.get(args[2]);
 
-        // check that user defined attributes are supported by the file system
+        // check that user defined attributes are supported by the file store
         FileStore store = file.getFileStore();
-        if (!store.supportsFileAttributeView("user")) {
+        if (!store.supportsFileAttributeView(UserDefinedFileAttributeView.class)) {
             System.err.format("UserDefinedFileAttributeView not supported on %s\n", store);
             System.exit(-1);
 
--- a/src/share/transport/socket/socketTransport.c	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/share/transport/socket/socketTransport.c	Wed Sep 09 09:59:48 2009 -0400
@@ -134,15 +134,16 @@
 
 static jdwpTransportError
 handshake(int fd, jlong timeout) {
-    char *hello = "JDWP-Handshake";
+    const char *hello = "JDWP-Handshake";
     char b[16];
-    int rv, received, i;
+    int rv, helloLen, received;
 
     if (timeout > 0) {
         dbgsysConfigureBlocking(fd, JNI_FALSE);
     }
+    helloLen = (int)strlen(hello);
     received = 0;
-    while (received < (int)strlen(hello)) {
+    while (received < helloLen) {
         int n;
         char *buf;
         if (timeout > 0) {
@@ -154,7 +155,7 @@
         }
         buf = b;
         buf += received;
-        n = dbgsysRecv(fd, buf, (int)strlen(hello)-received, 0);
+        n = dbgsysRecv(fd, buf, helloLen-received, 0);
         if (n == 0) {
             setLastError(0, "handshake failed - connection prematurally closed");
             return JDWPTRANSPORT_ERROR_IO_ERROR;
@@ -167,20 +168,19 @@
     if (timeout > 0) {
         dbgsysConfigureBlocking(fd, JNI_TRUE);
     }
-    for (i=0; i<(int)strlen(hello); i++) {
-        if (b[i] != hello[i]) {
-            char msg[64];
-            strcpy(msg, "handshake failed - received >");
-            strncat(msg, b, strlen(hello));
-            strcat(msg, "< - excepted >");
-            strcat(msg, hello);
-            strcat(msg, "<");
-            setLastError(0, msg);
-            return JDWPTRANSPORT_ERROR_IO_ERROR;
-        }
+    if (strncmp(b, hello, received) != 0) {
+        char msg[80+2*16];
+        b[received] = '\0';
+        /*
+         * We should really use snprintf here but it's not available on Windows.
+         * We can't use jio_snprintf without linking the transport against the VM.
+         */
+        sprintf(msg, "handshake failed - received >%s< - expected >%s<", b, hello);
+        setLastError(0, msg);
+        return JDWPTRANSPORT_ERROR_IO_ERROR;
     }
 
-    if (dbgsysSend(fd, hello, (int)strlen(hello), 0) != (int)strlen(hello)) {
+    if (dbgsysSend(fd, (char*)hello, helloLen, 0) != helloLen) {
         RETURN_IO_ERROR("send failed during handshake");
     }
     return JDWPTRANSPORT_ERROR_NONE;
--- a/src/solaris/bin/java_md.c	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/solaris/bin/java_md.c	Wed Sep 09 09:59:48 2009 -0400
@@ -1324,12 +1324,12 @@
 {
    if (findBootClass == NULL) {
        findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
-          "JVM_FindClassFromClassLoader");
+          "JVM_FindClassFromBootLoader");
        if (findBootClass == NULL) {
            JLI_ReportErrorMessage(DLL_ERROR4,
-               "JVM_FindClassFromClassLoader");
+               "JVM_FindClassFromBootLoader");
            return NULL;
        }
    }
-   return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
+   return findBootClass(env, classname);
 }
--- a/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Wed Sep 09 09:59:48 2009 -0400
@@ -25,6 +25,7 @@
 
 package sun.nio.fs;
 
+import java.nio.file.attribute.*;
 import java.util.*;
 import java.io.IOException;
 
@@ -113,10 +114,12 @@
     }
 
     @Override
-    public boolean supportsFileAttributeView(String name) {
+    public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type) {
         // support DosFileAttributeView and UserDefinedAttributeView if extended
         // attributes enabled
-        if (name.equals("dos") || name.equals("user")) {
+        if (type == DosFileAttributeView.class ||
+            type == UserDefinedFileAttributeView.class)
+        {
             // lookup fstypes.properties
             FeatureStatus status = checkIfFeaturePresent("user_xattr");
             if (status == FeatureStatus.PRESENT)
@@ -142,7 +145,15 @@
             }
             return xattrEnabled;
         }
+        return super.supportsFileAttributeView(type);
+    }
 
+    @Override
+    public boolean supportsFileAttributeView(String name) {
+        if (name.equals("dos"))
+            return supportsFileAttributeView(DosFileAttributeView.class);
+        if (name.equals("user"))
+            return supportsFileAttributeView(UserDefinedFileAttributeView.class);
         return super.supportsFileAttributeView(name);
     }
 
--- a/src/solaris/classes/sun/nio/fs/SolarisFileStore.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/solaris/classes/sun/nio/fs/SolarisFileStore.java	Wed Sep 09 09:59:48 2009 -0400
@@ -25,6 +25,7 @@
 
 package sun.nio.fs;
 
+import java.nio.file.attribute.*;
 import java.io.IOException;
 
 import static sun.nio.fs.UnixNativeDispatcher.*;
@@ -72,27 +73,39 @@
     }
 
     @Override
-    public boolean supportsFileAttributeView(String name) {
-        if (name.equals("acl")) {
+    public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type) {
+        if (type == AclFileAttributeView.class) {
             // lookup fstypes.properties
             FeatureStatus status = checkIfFeaturePresent("nfsv4acl");
-            if (status == FeatureStatus.PRESENT)
-                return true;
-            if (status == FeatureStatus.NOT_PRESENT)
-                return false;
-            // AclFileAttributeView available on ZFS
-            return (type().equals("zfs"));
+            switch (status) {
+                case PRESENT     : return true;
+                case NOT_PRESENT : return false;
+                default :
+                    // AclFileAttributeView available on ZFS
+                    return (type().equals("zfs"));
+            }
         }
-        if (name.equals("user")) {
+        if (type == UserDefinedFileAttributeView.class) {
             // lookup fstypes.properties
             FeatureStatus status = checkIfFeaturePresent("xattr");
-            if (status == FeatureStatus.PRESENT)
-                return true;
-            if (status == FeatureStatus.NOT_PRESENT)
-                return false;
-            return xattrEnabled;
+            switch (status) {
+                case PRESENT     : return true;
+                case NOT_PRESENT : return false;
+                default :
+                    // UserDefinedFileAttributeView available if extended
+                    // attributes supported
+                    return xattrEnabled;
+            }
         }
+        return super.supportsFileAttributeView(type);
+    }
 
+    @Override
+    public boolean supportsFileAttributeView(String name) {
+        if (name.equals("acl"))
+            return supportsFileAttributeView(AclFileAttributeView.class);
+        if (name.equals("user"))
+            return supportsFileAttributeView(UserDefinedFileAttributeView.class);
         return super.supportsFileAttributeView(name);
     }
 
--- a/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Wed Sep 09 09:59:48 2009 -0400
@@ -145,9 +145,8 @@
         {
             // lookup fstypes.properties
             FeatureStatus status = checkIfFeaturePresent("posix");
-            if (status == FeatureStatus.NOT_PRESENT)
-                return false;
-            return true;
+            // assume supported if UNKNOWN
+            return (status != FeatureStatus.NOT_PRESENT);
         }
         return false;
     }
--- a/src/windows/bin/java_md.c	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/windows/bin/java_md.c	Wed Sep 09 09:59:48 2009 -0400
@@ -1093,12 +1093,6 @@
  */
 static FindClassFromBootLoader_t *findBootClass = NULL;
 
-#ifdef _M_AMD64
-#define JVM_BCLOADER "JVM_FindClassFromClassLoader"
-#else
-#define JVM_BCLOADER "_JVM_FindClassFromClassLoader@20"
-#endif /* _M_AMD64 */
-
 jclass FindBootStrapClass(JNIEnv *env, const char *classname)
 {
    HMODULE hJvm;
@@ -1108,13 +1102,13 @@
        if (hJvm == NULL) return NULL;
        /* need to use the demangled entry point */
        findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
-            JVM_BCLOADER);
+            "JVM_FindClassFromBootLoader");
        if (findBootClass == NULL) {
-          JLI_ReportErrorMessage(DLL_ERROR4, JVM_BCLOADER);
+          JLI_ReportErrorMessage(DLL_ERROR4, "JVM_FindClassFromBootLoader");
           return NULL;
        }
    }
-   return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
+   return findBootClass(env, classname);
 }
 
 void
--- a/src/windows/classes/sun/nio/fs/WindowsFileStore.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/src/windows/classes/sun/nio/fs/WindowsFileStore.java	Wed Sep 09 09:59:48 2009 -0400
@@ -153,7 +153,7 @@
     public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type) {
         if (type == null)
             throw new NullPointerException();
-        if (type == BasicFileAttributeView.class)
+        if (type == BasicFileAttributeView.class || type == DosFileAttributeView.class)
             return true;
         if (type == AclFileAttributeView.class || type == FileOwnerAttributeView.class)
             return ((volInfo.flags() & FILE_PERSISTENT_ACLS) != 0);
--- a/test/com/sun/jdi/BadHandshakeTest.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/test/com/sun/jdi/BadHandshakeTest.java	Wed Sep 09 09:59:48 2009 -0400
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 6306165
+ * @bug 6306165 6432567
  * @summary Check that a bad handshake doesn't cause a debuggee to abort
  *
  * @build VMConnection BadHandshakeTest Exit0
--- a/test/java/lang/ProcessBuilder/Basic.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/test/java/lang/ProcessBuilder/Basic.java	Wed Sep 09 09:59:48 2009 -0400
@@ -25,7 +25,7 @@
  * @test
  * @bug 4199068 4738465 4937983 4930681 4926230 4931433 4932663 4986689
  *      5026830 5023243 5070673 4052517 4811767 6192449 6397034 6413313
- *      6464154 6523983 6206031 4960438 6631352 6631966
+ *      6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958
  * @summary Basic tests for Process and Environment Variable code
  * @run main/othervm Basic
  * @author Martin Buchholz
@@ -302,6 +302,14 @@
                 printUTF8(val == null ? "null" : val);
             } else if (action.equals("System.getenv()")) {
                 printUTF8(getenvAsString(System.getenv()));
+            } else if (action.equals("ArrayOOME")) {
+                Object dummy;
+                switch(new Random().nextInt(3)) {
+                case 0: dummy = new Integer[Integer.MAX_VALUE]; break;
+                case 1: dummy = new double[Integer.MAX_VALUE];  break;
+                case 2: dummy = new byte[Integer.MAX_VALUE][];  break;
+                default: throw new InternalError();
+                }
             } else if (action.equals("pwd")) {
                 printUTF8(new File(System.getProperty("user.dir"))
                           .getCanonicalPath());
@@ -1473,6 +1481,22 @@
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
+        // OOME in child allocating maximally sized array
+        // Test for hotspot/jvmti bug 6850957
+        //----------------------------------------------------------------
+        try {
+            List<String> list = new ArrayList<String>(javaChildArgs);
+            list.add(1, String.format("-XX:OnOutOfMemoryError=%s -version",
+                                      javaExe));
+            list.add("ArrayOOME");
+            ProcessResults r = run(new ProcessBuilder(list));
+            check(r.out().contains("java.lang.OutOfMemoryError:"));
+            check(r.out().contains(javaExe));
+            check(r.err().contains(System.getProperty("java.version")));
+            equal(r.exitValue(), 1);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
         // Windows has tricky semi-case-insensitive semantics
         //----------------------------------------------------------------
         if (Windows.is())
--- a/test/java/lang/reflect/Generics/Probe.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/test/java/lang/reflect/Generics/Probe.java	Wed Sep 09 09:59:48 2009 -0400
@@ -23,11 +23,9 @@
 
 /*
  * @test
- * @bug 5003916 6704655
+ * @bug 5003916 6704655 6873951
  * @summary Testing parsing of signatures attributes of nested classes
  * @author Joseph D. Darcy
- * @compile -source 1.5 Probe.java
- * @run main Probe
  */
 
 import java.lang.reflect.*;
@@ -35,51 +33,35 @@
 import java.util.*;
 import static java.util.Arrays.*;
 
-@Classes(value={
-        "java.util.concurrent.FutureTask",
-        "java.util.concurrent.ConcurrentHashMap$EntryIterator",
-        "java.util.concurrent.ConcurrentHashMap$KeyIterator",
-        "java.util.concurrent.ConcurrentHashMap$ValueIterator",
-        "java.util.AbstractList$ListItr",
-        "java.util.EnumMap$EntryIterator",
-        "java.util.EnumMap$KeyIterator",
-        "java.util.EnumMap$ValueIterator",
-        "java.util.IdentityHashMap$EntryIterator",
-        "java.util.IdentityHashMap$KeyIterator",
-        "java.util.IdentityHashMap$ValueIterator",
-        "java.util.WeakHashMap$EntryIterator",
-        "java.util.WeakHashMap$KeyIterator",
-        "java.util.WeakHashMap$ValueIterator",
-        "java.util.TreeMap$EntryIterator",
-        "java.util.TreeMap$KeyIterator",
-        "java.util.TreeMap$ValueIterator",
-        "java.util.HashMap$EntryIterator",
-        "java.util.HashMap$KeyIterator",
-        "java.util.HashMap$ValueIterator",
-        "java.util.LinkedHashMap$EntryIterator",
-        "java.util.LinkedHashMap$KeyIterator",
-        "java.util.LinkedHashMap$ValueIterator"
-        },
-        sunClasses={
-        "javax.crypto.SunJCE_c",
-        "javax.crypto.SunJCE_e",
-        "javax.crypto.SunJCE_f",
-        "javax.crypto.SunJCE_j",
-        "javax.crypto.SunJCE_k",
-        "javax.crypto.SunJCE_l"
-        })
+@Classes({"java.util.concurrent.FutureTask",
+          "java.util.concurrent.ConcurrentHashMap$EntryIterator",
+          "java.util.concurrent.ConcurrentHashMap$KeyIterator",
+          "java.util.concurrent.ConcurrentHashMap$ValueIterator",
+          "java.util.AbstractList$ListItr",
+          "java.util.EnumMap$EntryIterator",
+          "java.util.EnumMap$KeyIterator",
+          "java.util.EnumMap$ValueIterator",
+          "java.util.IdentityHashMap$EntryIterator",
+          "java.util.IdentityHashMap$KeyIterator",
+          "java.util.IdentityHashMap$ValueIterator",
+          "java.util.WeakHashMap$EntryIterator",
+          "java.util.WeakHashMap$KeyIterator",
+          "java.util.WeakHashMap$ValueIterator",
+          "java.util.TreeMap$EntryIterator",
+          "java.util.TreeMap$KeyIterator",
+          "java.util.TreeMap$ValueIterator",
+          "java.util.HashMap$EntryIterator",
+          "java.util.HashMap$KeyIterator",
+          "java.util.HashMap$ValueIterator",
+          "java.util.LinkedHashMap$EntryIterator",
+          "java.util.LinkedHashMap$KeyIterator",
+          "java.util.LinkedHashMap$ValueIterator"})
 public class Probe {
-    public static void main (String[] args) throws Throwable {
+    public static void main (String... args) throws Throwable {
         Classes classesAnnotation = (Probe.class).getAnnotation(Classes.class);
         List<String> names =
             new ArrayList<String>(asList(classesAnnotation.value()));
 
-        if (System.getProperty("java.runtime.name").startsWith("Java(TM)")) {
-            // Sun production JDK; test crypto classes too
-            for(String name: classesAnnotation.sunClasses())
-                names.add(name);
-        }
-
         int errs = 0;
         for(String name: names) {
             System.out.println("\nCLASS " + name);
@@ -152,5 +134,4 @@
 @Retention(RetentionPolicy.RUNTIME)
 @interface Classes {
     String [] value(); // list of classes to probe
-    String [] sunClasses(); // list of Sun-production JDK specific classes to probe
 }
--- a/test/java/nio/file/FileStore/Basic.java	Wed Sep 09 09:54:13 2009 -0400
+++ b/test/java/nio/file/FileStore/Basic.java	Wed Sep 09 09:59:48 2009 -0400
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887
+ * @bug 4313887 6873621
  * @summary Unit test for java.nio.file.FileStore
  * @library ..
  */
@@ -67,6 +67,15 @@
          * Test: File and FileStore attributes
          */
         assertTrue(store1.supportsFileAttributeView("basic"));
+        assertTrue(store1.supportsFileAttributeView(BasicFileAttributeView.class));
+        assertTrue(store1.supportsFileAttributeView("posix") ==
+            store1.supportsFileAttributeView(PosixFileAttributeView.class));
+        assertTrue(store1.supportsFileAttributeView("dos") ==
+            store1.supportsFileAttributeView(DosFileAttributeView.class));
+        assertTrue(store1.supportsFileAttributeView("acl") ==
+            store1.supportsFileAttributeView(AclFileAttributeView.class));
+        assertTrue(store1.supportsFileAttributeView("user") ==
+            store1.supportsFileAttributeView(UserDefinedFileAttributeView.class));
 
         /**
          * Test: Enumerate all FileStores
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/tools/jarsigner/nameclash.sh	Wed Sep 09 09:59:48 2009 -0400
@@ -0,0 +1,66 @@
+#
+# 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 6876328
+# @summary different names for the same digest algorithms breaks jarsigner
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  Windows_* )
+    FS="\\"
+    ;;
+  * )
+    FS="/"
+    ;;
+esac
+
+KS=nc.jks
+JFILE=nc.jar
+
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS"
+JAR=$TESTJAVA${FS}bin${FS}jar
+JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
+
+rm $KS $JFILE
+
+$KT -alias a -dname CN=a -keyalg rsa -genkey -validity 300
+$KT -alias b -dname CN=b -keyalg rsa -genkey -validity 300
+
+echo A > A
+$JAR cvf $JFILE A
+
+$JARSIGNER -keystore $KS -storepass changeit $JFILE a -digestalg SHA1 || exit 1
+$JARSIGNER -keystore $KS -storepass changeit $JFILE b -digestalg SHA-1 || exit 2
+
+$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 3
+
+exit 0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/x509/AlgorithmId/SHA256withECDSA.java	Wed Sep 09 09:59:48 2009 -0400
@@ -0,0 +1,39 @@
+/*
+ * 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 6871847
+ * @summary AlgorithmId.get("SHA256withECDSA") not available
+ */
+
+import sun.security.x509.*;
+
+public class SHA256withECDSA {
+    public static void main(String[] args) throws Exception {
+        AlgorithmId.get("SHA224withECDSA");
+        AlgorithmId.get("SHA256withECDSA");
+        AlgorithmId.get("SHA384withECDSA");
+        AlgorithmId.get("SHA512withECDSA");
+    }
+}