Author: rgoers Date: Mon Jun 8 15:25:11 2009 New Revision: 782671 URL: http://svn.apache.org/viewvc?rev=782671&view=rev Log: Don't check timestamp if file doesn't exist. Fix more checkstyle issues
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/FileOperations.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsAdd.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCheckout.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommit.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommitListener.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsDelete.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLog.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntryHandler.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsModifyListener.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsRevert.java Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java Mon Jun 8 15:25:11 2009 @@ -453,17 +453,20 @@ catch (FileSystemException fse) { this.exists = false; + this.timestamp = -1; } - try + if (this.exists) { - this.timestamp = this.file.getContent().getLastModifiedTime(); - } - catch (FileSystemException fse) - { - this.timestamp = -1; + try + { + this.timestamp = this.file.getContent().getLastModifiedTime(); + } + catch (FileSystemException fse) + { + this.timestamp = -1; + } } - } private void resetChildrenList() Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java Mon Jun 8 15:25:11 2009 @@ -43,7 +43,7 @@ /** * - * @param file + * @param file The file. */ public DefaultFileOperations(final FileObject file) { @@ -53,7 +53,7 @@ } /** - * @return + * @return The operation classes. * @throws org.apache.commons.vfs.FileSystemException * */ @@ -82,9 +82,9 @@ } /** - * @param operationClass - * @return - * @throws org.apache.commons.vfs.FileSystemException + * @param operationClass The Class that performs the operation. + * @return The FileOperation. + * @throws FileSystemException if an error occurs. * */ public FileOperation getOperation(Class operationClass) @@ -125,13 +125,11 @@ } /** - * @param operationClass - * the operation's class. - * + * @param operationClass the operation's class. * @return true if the operation of specified class is supported for current * FileObject and false otherwise. * - * @throws org.apache.commons.vfs.FileSystemException + * @throws FileSystemException if an error occurs. * */ public boolean hasOperation(Class operationClass) throws FileSystemException Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/FileOperations.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/FileOperations.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/FileOperations.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/FileOperations.java Mon Jun 8 15:25:11 2009 @@ -30,19 +30,21 @@ { /** * @return all operations associated with the fileObject - * @throws FileSystemException + * @throws FileSystemException if an error occurs. */ Class[] getOperations() throws FileSystemException; /** + * @param operationClass the operation Class. * @return a operation implementing the given <code>operationClass</code> - * @throws FileSystemException + * @throws FileSystemException if an error occus. */ FileOperation getOperation(Class operationClass) throws FileSystemException; /** + * @param operationClass the operation Class. * @return if a operation <code>operationClass</code> is available - * @throws FileSystemException + * @throws FileSystemException if an error ocurs. */ boolean hasOperation(Class operationClass) throws FileSystemException; } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsAdd.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsAdd.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsAdd.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsAdd.java Mon Jun 8 15:25:11 2009 @@ -28,13 +28,13 @@ { /** * - * @param makedir + * @param makedir true if directories should be created, false otherwise. */ void setMakedir(final boolean makedir); /** * - * @param recirsive + * @param recursive true if subdirectories should be processed. */ - void setRecursive(final boolean recirsive); + void setRecursive(final boolean recursive); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCheckout.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCheckout.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCheckout.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCheckout.java Mon Jun 8 15:25:11 2009 @@ -29,20 +29,19 @@ { /** * - * @param revision + * @param revision The revision number. */ void setRevision(final long revision); /** * - * @param recursive + * @param recursive true if directories should be traversed. */ void setRecursive(final boolean recursive); /** * - * @param targetDir - * directory under which retrieved files should be placed. + * @param targetDir directory under which retrieved files should be placed. */ void setTargetDirectory(final FileObject targetDir); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommit.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommit.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommit.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommit.java Mon Jun 8 15:25:11 2009 @@ -29,25 +29,25 @@ /** * - * @param isRecursive + * @param isRecursive true if directories should be traversed. */ void setRecursive(final boolean isRecursive); /** * - * @param message + * @param message The message. */ void setMessage(final String message); /** * - * @param listener + * @param listener Listener that is given control when a commit occurs. */ void addCommitListener(final VcsCommitListener listener); /** * - * @param listener + * @param listener The Listener. */ void removeCommitListener(final VcsCommitListener listener); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommitListener.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommitListener.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommitListener.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsCommitListener.java Mon Jun 8 15:25:11 2009 @@ -26,9 +26,8 @@ { /** * - * @param path - * @param contentStatus - * takes one of the values as defined in the + * @param path The path. + * @param contentStatus takes one of the values as defined in the * @see VcsStatus constants. */ void commited(final String path, final int contentStatus); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsDelete.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsDelete.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsDelete.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsDelete.java Mon Jun 8 15:25:11 2009 @@ -28,7 +28,7 @@ { /** * - * @param force + * @param force true if the delete should be unconditional. */ void setForce(final boolean force); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLog.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLog.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLog.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLog.java Mon Jun 8 15:25:11 2009 @@ -28,19 +28,19 @@ { /** * - * @param startRev + * @param startRev The start revision. */ void setStartRevision(final long startRev); /** * - * @param endRev + * @param endRev The end revision. */ void setEndRevision(final long endRev); /** * - * @param handler + * @param handler The LogEntry handler. */ void setLogEntryHandler(final VcsLogEntryHandler handler); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntry.java Mon Jun 8 15:25:11 2009 @@ -53,10 +53,11 @@ /** * - * @param revision - * @param message - * @param date - * @param path + * @param author The author. + * @param revision The revision. + * @param message The message. + * @param date The date. + * @param path The path. */ public VcsLogEntry(final String author, final long revision, final String message, final Calendar date, final String path) @@ -70,7 +71,7 @@ /** * - * @return + * @return The author. */ public String getAuthor() { @@ -79,7 +80,7 @@ /** * - * @return + * @return The revision. */ public long getRevision() { @@ -88,7 +89,7 @@ /** * - * @return + * @return The message. */ public String getMessage() { @@ -97,7 +98,7 @@ /** * - * @return + * @return The date. */ public Calendar getDate() { @@ -106,7 +107,7 @@ /** * - * @return + * @return The path. */ public String getPath() { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntryHandler.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntryHandler.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntryHandler.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsLogEntryHandler.java Mon Jun 8 15:25:11 2009 @@ -28,8 +28,8 @@ { /** * - * @param entry - * @throws FileSystemException + * @param entry The log entry. + * @throws FileSystemException if an error occurs. */ void handleLogEntry(final VcsLogEntry entry) throws FileSystemException; } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsModifyListener.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsModifyListener.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsModifyListener.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsModifyListener.java Mon Jun 8 15:25:11 2009 @@ -26,8 +26,8 @@ { /** * - * @param path - * @param contentStatus + * @param path The path String. + * @param contentStatus The content status. */ void modified(final String path, final int contentStatus); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsRevert.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsRevert.java?rev=782671&r1=782670&r2=782671&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsRevert.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsRevert.java Mon Jun 8 15:25:11 2009 @@ -32,19 +32,19 @@ { /** * - * @param recursive + * @param recursive true if children should be processed. */ void setRecursive(final boolean recursive); /** * - * @param listener + * @param listener The Listener to add. */ void addModifyListener(final VcsModifyListener listener); /** * - * @param listener + * @param listener The Listener to remove. */ void removeModifyListener(final VcsModifyListener listener); }