6867781: (file) Examples in javadoc use newFileAttributeView instead of getFileAttributeView

Reviewed-by: sherman
This commit is contained in:
Alan Bateman 2009-08-11 12:38:43 +01:00
parent 90b1aee142
commit c583b690e3
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ import java.io.IOException;
* .lookupPrincipalByName("joe");
*
* // get view
* AclFileAttributeView view = file.newFileAttributeView(AclFileAttributeView.class);
* AclFileAttributeView view = file.getFileAttributeView(AclFileAttributeView.class);
*
* // create ACE to give "joe" read access
* AclEntry entry = AclEntry.newBuilder()

View File

@ -61,7 +61,7 @@ import java.io.IOException;
* Suppose we need to print out the owner and access permissions of a file:
* <pre>
* FileRef file = ...
* PosixFileAttributes attrs = file.newFileAttributeView(PosixFileAttributeView.class)
* PosixFileAttributes attrs = file.getFileAttributeView(PosixFileAttributeView.class)
* .readAttributes();
* System.out.format("%s %s%n",
* attrs.owner().getName(),