src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java

Print this page

        

@@ -55,12 +55,12 @@
         }
         if (attribute.equals(ACL_NAME)) {
             setAcl((List<AclEntry>)value);
             return;
         }
-        throw new UnsupportedOperationException("'" + name() + ":" +
-                attribute + "' not supported");
+        throw new IllegalArgumentException("'" + name() + ":" +
+            attribute + "' not recognized");
     }
 
     @Override
     public final Map<String,Object> readAttributes(String[] attributes)
         throws IOException

@@ -79,10 +79,12 @@
             }
             if (attribute.equals(OWNER_NAME)) {
                 owner = true;
                 continue;
             }
+            throw new IllegalArgumentException("'" + name() + ":" +
+                attribute + "' not recognized");
         }
         Map<String,Object> result = new HashMap<>(2);
         if (acl)
             result.put(ACL_NAME, getAcl());
         if (owner)