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

Print this page

        

*** 43,61 **** 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)) { --- 43,52 ----
*** 69,79 **** throw new UnsupportedOperationException("'" + name() + ":" + attribute + "' not supported"); } @Override ! public final Map<String,?> readAttributes(String[] attributes) throws IOException { boolean acl = false; boolean owner = false; for (String attribute: attributes) { --- 60,70 ---- throw new UnsupportedOperationException("'" + name() + ":" + attribute + "' not supported"); } @Override ! public final Map<String,Object> readAttributes(String[] attributes) throws IOException { boolean acl = false; boolean owner = false; for (String attribute: attributes) {
*** 89,99 **** if (attribute.equals(OWNER_NAME)) { owner = true; continue; } } ! Map<String,Object> result = new HashMap<String,Object>(2); if (acl) result.put(ACL_NAME, getAcl()); if (owner) result.put(OWNER_NAME, getOwner()); return Collections.unmodifiableMap(result); --- 80,90 ---- if (attribute.equals(OWNER_NAME)) { owner = true; continue; } } ! 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);