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

Print this page

        

@@ -43,19 +43,10 @@
     public final String name() {
         return "acl";
     }
 
     @Override
-    public final Object getAttribute(String attribute) throws IOException {
-        if (attribute.equals(OWNER_NAME))
-            return getOwner();
-        if (attribute.equals(ACL_NAME))
-            return getAcl();
-        return null;
-    }
-
-    @Override
     @SuppressWarnings("unchecked")
     public final void setAttribute(String attribute, Object value)
         throws IOException
     {
         if (attribute.equals(OWNER_NAME)) {

@@ -69,11 +60,11 @@
         throw new UnsupportedOperationException("'" + name() + ":" +
                 attribute + "' not supported");
     }
 
     @Override
-    public final Map<String,?> readAttributes(String[] attributes)
+    public final Map<String,Object> readAttributes(String[] attributes)
         throws IOException
     {
         boolean acl = false;
         boolean owner = false;
         for (String attribute: attributes) {

@@ -89,11 +80,11 @@
             if (attribute.equals(OWNER_NAME)) {
                 owner = true;
                 continue;
             }
         }
-        Map<String,Object> result = new HashMap<String,Object>(2);
+        Map<String,Object> result = new HashMap<>(2);
         if (acl)
             result.put(ACL_NAME, getAcl());
         if (owner)
             result.put(OWNER_NAME, getOwner());
         return Collections.unmodifiableMap(result);