code: private static File getCanonicalFile(final File file) throws PrivilegedActionException {
          return AccessController.doPrivileged(new PrivilegedExceptionAction<File>() {
  
              @Override
              public File run() throws Exception {
                  return file.getCanonicalFile();
              }
          });
      }
docs: Obtain the canonical file for a file. Performs a call to {@link File#getCanonicalFile()},
  wrapping the calling a {@link PrivelegedExceptionAction}.
  
  @param file The file for which to obtain the canonical file.
  
  @return The canonical file for the file.
  
  @throws PrivilegedActionException Thrown if the call to {@link File#getCanonicalFile()} threw an exception.