changeset 13338:dddb1b026323

Merge
author robm
date Fri, 27 Jul 2018 06:47:20 -0700
parents b17237c1ab9c b88f126a9690
children 63b1e705ac7d
files
diffstat 4 files changed, 28 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Tue Jul 24 09:52:09 2018 -0700
+++ b/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Fri Jul 27 06:47:20 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1111,7 +1111,7 @@
         this.genericSignatureGotten = true;
     }
 
-    private static boolean isPrimitiveArray(String signature) {
+    private static boolean isOneDimensionalPrimitiveArray(String signature) {
         int i = signature.lastIndexOf('[');
         /*
          * TO DO: Centralize JNI signature knowledge.
@@ -1120,7 +1120,7 @@
          *  jdk1.4/doc/guide/jpda/jdi/com/sun/jdi/doc-files/signature.html
          */
         boolean isPA;
-        if (i < 0) {
+        if (i < 0 || signature.startsWith("[[")) {
             isPA = false;
         } else {
             char c = signature.charAt(i + 1);
@@ -1144,7 +1144,7 @@
             ClassLoaderReferenceImpl loader =
                        (ClassLoaderReferenceImpl)classLoader();
             if ((loader == null) ||
-                (isPrimitiveArray(signature)) //Work around 4450091
+                (isOneDimensionalPrimitiveArray(signature)) //Work around 4450091
                 ) {
                 // Caller wants type of boot class field
                 type = vm.findBootType(signature);
--- a/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Tue Jul 24 09:52:09 2018 -0700
+++ b/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Fri Jul 27 06:47:20 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,8 @@
         }
 
         // step 2: find mount point
+        List<UnixMountEntry> procMountsEntries =
+            fs.getMountEntries("/proc/mounts");
         UnixPath parent = path.getParent();
         while (parent != null) {
             UnixFileAttributes attrs = null;
@@ -74,16 +76,23 @@
             } catch (UnixException x) {
                 x.rethrowAsIOException(parent);
             }
-            if (attrs.dev() != dev())
-                break;
+            if (attrs.dev() != dev()) {
+                // step 3: lookup mounted file systems (use /proc/mounts to
+                // ensure we find the file system even when not in /etc/mtab)
+                byte[] dir = path.asByteArray();
+                for (UnixMountEntry entry : procMountsEntries) {
+                    if (Arrays.equals(dir, entry.dir()))
+                        return entry;
+                }
+            }
             path = parent;
             parent = parent.getParent();
         }
 
-        // step 3: lookup mounted file systems (use /proc/mounts to ensure we
-        // find the file system even when not in /etc/mtab)
+        // step 3: lookup mounted file systems (use /proc/mounts to
+        // ensure we find the file system even when not in /etc/mtab)
         byte[] dir = path.asByteArray();
-        for (UnixMountEntry entry: fs.getMountEntries("/proc/mounts")) {
+        for (UnixMountEntry entry : procMountsEntries) {
             if (Arrays.equals(dir, entry.dir()))
                 return entry;
         }
--- a/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java	Tue Jul 24 09:52:09 2018 -0700
+++ b/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java	Fri Jul 27 06:47:20 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
     /**
      * Returns object to iterate over the mount entries in the given fstab file.
      */
-    Iterable<UnixMountEntry> getMountEntries(String fstab) {
+    List<UnixMountEntry> getMountEntries(String fstab) {
         ArrayList<UnixMountEntry> entries = new ArrayList<>();
         try {
             long fp = setmntent(Util.toBytes(fstab), Util.toBytes("r"));
@@ -101,7 +101,7 @@
      * Returns object to iterate over the mount entries in /etc/mtab
      */
     @Override
-    Iterable<UnixMountEntry> getMountEntries() {
+    List<UnixMountEntry> getMountEntries() {
         return getMountEntries("/etc/mtab");
     }
 
--- a/test/sun/security/tools/jarsigner/warnings.sh	Tue Jul 24 09:52:09 2018 -0700
+++ b/test/sun/security/tools/jarsigner/warnings.sh	Fri Jul 27 06:47:20 2018 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 # @test
 # @bug 8024302
-# @bug 8026037
+# @bug 8026037 8134124
 # @summary Clarify jar verifications
 #
 
@@ -43,13 +43,16 @@
     ;;
 esac
 
+# make the test locale independent
+TESTTOOLVMOPTS="$TESTTOOLVMOPTS -J-Duser.language=en -J-Duser.country=US"
+
 KS=warnings.jks
 JFILE=warnings.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
         -keystore $KS"
 JAR=$TESTJAVA${FS}bin${FS}jar
-JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit"
+JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS} -keystore $KS -storepass changeit"
 
 rm $KS 2> /dev/null