Gary Gregory created VFS-712:
--------------------------------

             Summary: Add null-safe 
org.apache.commons.vfs2.util.FileObjectUtils.exists(FileObject)
                 Key: VFS-712
                 URL: https://issues.apache.org/jira/browse/VFS-712
             Project: Commons VFS
          Issue Type: New Feature
            Reporter: Gary Gregory
            Assignee: Gary Gregory
             Fix For: 2.4


Add null-safe 
\{{org.apache.commons.vfs2.util.FileObjectUtils.exists(FileObject)}}:

{code:java}
    /**
     * Null-safe call to {@link FileObject#exists()}.
     * 
     * @param fileObject
     * @return false if {@code fileObject} is null, otherwise, see {@link 
FileObject#exists()}.
     * @throws FileSystemException On error determining if this file exists.
     */
    public static boolean exists(final FileObject fileObject) throws 
FileSystemException {
        return fileObject != null && fileObject.exists();
    }
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to