changeset 5805:b528ab0c228b

8005566: (fs) test/java/nio/file/Files/Misc.java failing (sol) Reviewed-by: chegar
author alanb
date Fri, 11 Jan 2013 12:27:57 +0000
parents 5c24d5eb8306
children 380a8da01aac
files src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java test/java/nio/file/Files/Misc.java
diffstat 2 files changed, 12 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java	Wed Sep 05 14:42:44 2012 +0200
+++ b/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java	Fri Jan 11 12:27:57 2013 +0000
@@ -52,10 +52,10 @@
     /**
      * typedef struct ace {
      *     uid_t        a_who;
-     *     uitn32_t     a_access_mark;
+     *     uint32_t     a_access_mask;
      *     uint16_t     a_flags;
      *     uint16_t     a_type;
-     * } act_t;
+     * } ace_t;
      */
     private static final short SIZEOF_ACE_T     = 12;
     private static final short OFFSETOF_UID     = 0;
@@ -209,21 +209,16 @@
 
             // map uid and flags to UserPrincipal
             UnixUserPrincipals.User who = null;
-            if (uid == -1) {
-                if ((flags & ACE_OWNER) > 0)
-                    who = UnixUserPrincipals.SPECIAL_OWNER;
-                if ((flags & ACE_GROUP) > 0)
-                    who = UnixUserPrincipals.SPECIAL_GROUP;
-                if ((flags & ACE_EVERYONE) > 0)
-                    who = UnixUserPrincipals.SPECIAL_EVERYONE;
-                if (who == null)
-                    throw new AssertionError("ACE who not handled");
+            if ((flags & ACE_OWNER) > 0) {
+                who = UnixUserPrincipals.SPECIAL_OWNER;
+            } else if ((flags & ACE_GROUP) > 0) {
+                who = UnixUserPrincipals.SPECIAL_GROUP;
+            } else if ((flags & ACE_EVERYONE) > 0) {
+                who = UnixUserPrincipals.SPECIAL_EVERYONE;
+            } else if ((flags & ACE_IDENTIFIER_GROUP) > 0) {
+                who = UnixUserPrincipals.fromGid(uid);
             } else {
-                // can be gid
-                if ((flags & ACE_IDENTIFIER_GROUP) > 0)
-                    who = UnixUserPrincipals.fromGid(uid);
-                else
-                    who = UnixUserPrincipals.fromUid(uid);
+                who = UnixUserPrincipals.fromUid(uid);
             }
 
             AclEntryType aceType = null;
--- a/test/java/nio/file/Files/Misc.java	Wed Sep 05 14:42:44 2012 +0200
+++ b/test/java/nio/file/Files/Misc.java	Fri Jan 11 12:27:57 2013 +0000
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6838333
+ * @bug 4313887 6838333 8005566
  * @summary Unit test for miscellenous methods in java.nio.file.Files
  * @library ..
  */