On 13 August 2013 15:30, Gary Gregory <garydgreg...@gmail.com> wrote: > On Tue, Aug 13, 2013 at 10:04 AM, sebb <seb...@gmail.com> wrote: > >> On 13 August 2013 14:43, <ggreg...@apache.org> wrote: >> > Author: ggregory >> > Date: Tue Aug 13 13:43:41 2013 >> > New Revision: 1513484 >> > >> > URL: http://svn.apache.org/r1513484 >> > Log: >> > [VFS-265][FTP] Set user dir as root dir by default. >> > >> > Modified: >> > >> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java >> > commons/proper/vfs/trunk/src/changes/changes.xml >> > >> > Modified: >> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java >> > URL: >> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java?rev=1513484&r1=1513483&r2=1513484&view=diff >> > >> ============================================================================== >> > --- >> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java >> (original) >> > +++ >> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java >> Tue Aug 13 13:43:41 2013 >> > @@ -209,13 +209,16 @@ public class FtpFileSystemConfigBuilder >> > } >> > >> > /** >> > - * @param opts The FileSystemOptions. >> > - * @return true if the user directory is treated as the root. >> > + * Returns <code>true</code> if VFS treats the user directory as >> the root directory. Defaults to <code>true</code>. >> >> Again, it's not clear from the Javadoc what might cause the default to >> be applied. >> > > The default is just the value if you do not set your own value. I'm sure > how else to explain a "default".
On second look, I think the problem I have is with the phrase "if VFS treats the user directory as the root directory". To me, this implies a fixed attribute of the user directory, when in fact it is an option that can be set by the user. I think the Javadoc should be reworded alongs the lines of: Returns <code>Boolean.TRUE</code> if VFS should treat the user directory as the root directory. Defaults to <code>Boolean.TRUE</code> if the method {@link setUserDirIsRoot(FileSystemOptions, boolean)} has not been invoked. > Gary > > >> >> > + * >> > + * @param opts >> > + * The FileSystemOptions. >> > + * @return <code>true</code> if VFS treats the user directory as >> the root directory. Defaults to <code>true</code>. >> > * @see #setUserDirIsRoot >> > */ >> > public Boolean getUserDirIsRoot(final FileSystemOptions opts) >> > { >> > - return getBoolean(opts, USER_DIR_IS_ROOT); >> > + return getBoolean(opts, USER_DIR_IS_ROOT, Boolean.TRUE); >> > } >> > >> > /** >> > >> > Modified: commons/proper/vfs/trunk/src/changes/changes.xml >> > URL: >> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1513484&r1=1513483&r2=1513484&view=diff >> > >> ============================================================================== >> > --- commons/proper/vfs/trunk/src/changes/changes.xml (original) >> > +++ commons/proper/vfs/trunk/src/changes/changes.xml Tue Aug 13 13:43:41 >> 2013 >> > @@ -26,6 +26,9 @@ >> > <!-- <action issue="VFS-443" dev="ggregory" type="update" >> due-to="nickallen"> --> >> > <!-- [Local] Need an easy way to convert from a FileObject to >> a File. --> >> > <!-- </action> --> >> > + <action issue="VFS-265" dev="ggregory" type="update" >> due-to="Scott Bjerstedt"> >> > + [FTP] Set user dir as root dir by default. >> > + </action> >> > <action issue="VFS-489" dev="ggregory" type="fix" due-to="Bernd >> Eckenfels"> >> > [tests] ProviderWriteTests#testListener does not fail cleanly. >> > </action> >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> >> > > > -- > E-Mail: garydgreg...@gmail.com | ggreg...@apache.org > Java Persistence with Hibernate, Second > Edition<http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org