Author: rgoers
Date: Mon Aug 17 07:38:49 2009
New Revision: 804886

URL: http://svn.apache.org/viewvc?rev=804886&view=rev
Log:
More checkstyle fixes

Modified:
    commons/proper/vfs/trunk/checkstyle.xml
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileProvider.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/CombinedResources.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/FileObjectUtils.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Messages.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorInputStream.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorOutputStream.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorRandomAccessContent.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Os.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/OsFamily.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/RandomAccessMode.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/UserAuthenticatorUtils.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
    
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java

Modified: commons/proper/vfs/trunk/checkstyle.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/checkstyle.xml?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- commons/proper/vfs/trunk/checkstyle.xml (original)
+++ commons/proper/vfs/trunk/checkstyle.xml Mon Aug 17 07:38:49 2009
@@ -132,7 +132,7 @@
         <module name="DoubleCheckedLocking"/>
         <module name="EqualsHashCode"/>
         <module name="IllegalInstantiation"/>
-        <module name="InnerAssignment"/>
+        <!-- <module name="InnerAssignment"/> -->
         <module name="MagicNumber">
             <property name="ignoreNumbers" value="-1,0,1,2,3"/>
         </module>

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
 Mon Aug 17 07:38:49 2009
@@ -78,7 +78,7 @@
  */
 public class WebdavFileObject extends HttpFileObject implements FileObject
 {
-    /** The character set property name */
+    /** The character set property name. */
     public static final DavPropertyName RESPONSE_CHARSET = 
DavPropertyName.create(
             "response-charset");
 

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileProvider.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileProvider.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileProvider.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileProvider.java
 Mon Aug 17 07:38:49 2009
@@ -42,7 +42,7 @@
 public class WebdavFileProvider
     extends HttpFileProvider
 {
-    /** The authenticator types used by the WebDAV provider */
+    /** The authenticator types used by the WebDAV provider. */
     public static final UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = 
new UserAuthenticationData.Type[]
         {
             UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java
 Mon Aug 17 07:38:49 2009
@@ -20,7 +20,7 @@
 import org.apache.commons.vfs.provider.http.HttpFileSystemConfigBuilder;
 
 /**
- * Configuration options for WebDav
+ * Configuration options for WebDav.
  *
  * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
  * @version $Revision$ $Date$
@@ -60,7 +60,7 @@
     }
 
     /**
-     * Whether to use versioning
+     * Whether to use versioning.
      * @param opts The FileSystem options.
      * @param versioning true if versioning should be enabled.
      */
@@ -70,7 +70,7 @@
     }
 
     /**
-     * The cookies to add to the reqest
+     * The cookies to add to the request.
      * @param opts The FileSystem options.
      * @return true if versioning is enabled.
      */

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/CombinedResources.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/CombinedResources.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/CombinedResources.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/CombinedResources.java
 Mon Aug 17 07:38:49 2009
@@ -23,6 +23,9 @@
 import java.util.Properties;
 import java.util.ResourceBundle;
 
+/**
+ * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
+ */
 public class CombinedResources extends ResourceBundle
 {
     // locale.getLanguage()

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.java
 Mon Aug 17 07:38:49 2009
@@ -51,30 +51,33 @@
  */
 public class DelegatingFileSystemOptionsBuilder
 {
-    private Log log = 
LogFactory.getLog(DelegatingFileSystemOptionsBuilder.class);
+    private static final Class[] STRING_PARAM = new Class[]{String.class};
+
+    private static final Map PRIMATIVE_TO_OBJECT = new TreeMap();
 
-    private final static Class[] STRING_PARAM = new Class[]{String.class};
+    private Log log = 
LogFactory.getLog(DelegatingFileSystemOptionsBuilder.class);
 
     private final FileSystemManager manager;
 
     private final Map beanMethods = new TreeMap();
 
-    private final static Map primitiveToObject = new TreeMap();
-
     static
     {
-        primitiveToObject.put(Void.TYPE.getName(), Void.class);
-        primitiveToObject.put(Boolean.TYPE.getName(), Boolean.class);
-        primitiveToObject.put(Byte.TYPE.getName(), Byte.class);
-        primitiveToObject.put(Character.TYPE.getName(), Character.class);
-        primitiveToObject.put(Short.TYPE.getName(), Short.class);
-        primitiveToObject.put(Integer.TYPE.getName(), Integer.class);
-        primitiveToObject.put(Long.TYPE.getName(), Long.class);
-        primitiveToObject.put(Double.TYPE.getName(), Double.class);
-        primitiveToObject.put(Float.TYPE.getName(), Float.class);
+        PRIMATIVE_TO_OBJECT.put(Void.TYPE.getName(), Void.class);
+        PRIMATIVE_TO_OBJECT.put(Boolean.TYPE.getName(), Boolean.class);
+        PRIMATIVE_TO_OBJECT.put(Byte.TYPE.getName(), Byte.class);
+        PRIMATIVE_TO_OBJECT.put(Character.TYPE.getName(), Character.class);
+        PRIMATIVE_TO_OBJECT.put(Short.TYPE.getName(), Short.class);
+        PRIMATIVE_TO_OBJECT.put(Integer.TYPE.getName(), Integer.class);
+        PRIMATIVE_TO_OBJECT.put(Long.TYPE.getName(), Long.class);
+        PRIMATIVE_TO_OBJECT.put(Double.TYPE.getName(), Double.class);
+        PRIMATIVE_TO_OBJECT.put(Float.TYPE.getName(), Float.class);
     }
 
-    private static class Context
+    /**
+     * Context.
+     */
+    private static final class Context
     {
         private final FileSystemOptions fso;
         private final String scheme;
@@ -116,8 +119,10 @@
      * @param scheme scheme
      * @param name   name
      * @param value  value
+     * @throws FileSystemException if an error occurs.
      */
-    public void setConfigString(final FileSystemOptions fso, final String 
scheme, final String name, final String value) throws FileSystemException
+    public void setConfigString(final FileSystemOptions fso, final String 
scheme, final String name,
+                                final String value) throws FileSystemException
     {
         setConfigStrings(fso, scheme, name, new String[]{value});
     }
@@ -129,8 +134,10 @@
      * @param scheme scheme
      * @param name   name
      * @param values values
+     * @throws FileSystemException if an error occurs.
      */
-    public void setConfigStrings(final FileSystemOptions fso, final String 
scheme, final String name, final String[] values) throws FileSystemException
+    public void setConfigStrings(final FileSystemOptions fso, final String 
scheme, final String name,
+                                 final String[] values) throws 
FileSystemException
     {
         Context ctx = new Context(fso, scheme, name, values);
 
@@ -145,8 +152,13 @@
      * @param scheme    scheme
      * @param name      name
      * @param className className
-     */
-    public void setConfigClass(final FileSystemOptions fso, final String 
scheme, final String name, final Class className) throws FileSystemException, 
IllegalAccessException, InstantiationException
+     * @throws FileSystemException if an error occurs.
+     * @throws IllegalAccessException if a class canoot be accessed.
+     * @throws InstantiationException if a class cannot be instantiated.
+     */
+    public void setConfigClass(final FileSystemOptions fso, final String 
scheme, final String name,
+                               final Class className)
+            throws FileSystemException, IllegalAccessException, 
InstantiationException
     {
         setConfigClasses(fso, scheme, name, new Class[]{className});
     }
@@ -159,10 +171,15 @@
      * @param scheme     scheme
      * @param name       name
      * @param classNames classNames
-     */
-    public void setConfigClasses(final FileSystemOptions fso, final String 
scheme, final String name, final Class[] classNames) throws 
FileSystemException, IllegalAccessException, InstantiationException
+     * @throws FileSystemException if an error occurs.
+     * @throws IllegalAccessException if a class canoot be accessed.
+     * @throws InstantiationException if a class cannot be instantiated.
+     */
+    public void setConfigClasses(final FileSystemOptions fso, final String 
scheme, final String name,
+                                 final Class[] classNames)
+            throws FileSystemException, IllegalAccessException, 
InstantiationException
     {
-        Object values[] = new Object[classNames.length];
+        Object[] values = new Object[classNames.length];
         for (int iterClassNames = 0; iterClassNames < values.length; 
iterClassNames++)
         {
             values[iterClassNames] = classNames[iterClassNames].newInstance();
@@ -215,7 +232,7 @@
      */
     private boolean convertValuesAndInvoke(final Method configSetter, final 
Context ctx) throws FileSystemException
     {
-        Class parameters[] = configSetter.getParameterTypes();
+        Class[] parameters = configSetter.getParameterTypes();
         if (parameters.length < 2)
         {
             return false;
@@ -243,7 +260,7 @@
 
         if (type.isPrimitive())
         {
-            Class objectType = (Class) primitiveToObject.get(type.getName());
+            Class objectType = (Class) PRIMATIVE_TO_OBJECT.get(type.getName());
             if (objectType == null)
             {
                 
log.warn(Messages.getString("vfs.provider/config-unexpected-primitive.error", 
type.getName()));
@@ -288,7 +305,8 @@
             {
                 try
                 {
-                    Array.set(convertedValues, iterValues, 
valueConstructor.newInstance(new Object[]{ctx.values[iterValues]}));
+                    Array.set(convertedValues, iterValues,
+                            valueConstructor.newInstance(new 
Object[]{ctx.values[iterValues]}));
                 }
                 catch (InstantiationException e)
                 {
@@ -329,7 +347,8 @@
             {
                 try
                 {
-                    Array.set(convertedValues, iterValues, 
valueFactory.invoke(null, new Object[]{ctx.values[iterValues]}));
+                    Array.set(convertedValues, iterValues,
+                            valueFactory.invoke(null, new 
Object[]{ctx.values[iterValues]}));
                 }
                 catch (IllegalAccessException e)
                 {
@@ -430,7 +449,7 @@
 
         Map schemeMethods = new TreeMap();
 
-        Method methods[] = fscb.getClass().getMethods();
+        Method[] methods = fscb.getClass().getMethods();
         for (int iterMethods = 0; iterMethods < methods.length; iterMethods++)
         {
             Method method = methods[iterMethods];

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/FileObjectUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/FileObjectUtils.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/FileObjectUtils.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/FileObjectUtils.java
 Mon Aug 17 07:38:49 2009
@@ -22,19 +22,22 @@
 import org.apache.commons.vfs.provider.AbstractFileObject;
 
 /**
- * Stuff to get some strange things from an FileObject
+ * Stuff to get some strange things from an FileObject.
  *
  * @author <a href="mailto:ima...@apache.org";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class FileObjectUtils
+public final class FileObjectUtils
 {
     private FileObjectUtils()
     {
     }
 
     /**
-     * get access to the base object even if decorated
+     * Get access to the base object even if decorated.
+     * @param fileObject The FileObject.
+     * @return The decorated FileObject or null.
+     * @throws FileSystemException if an error occurs.
      */
     public static AbstractFileObject getAbstractFileObject(final FileObject 
fileObject) throws FileSystemException
     {
@@ -52,11 +55,16 @@
             return null;
         }
 
-        throw new 
FileSystemException("vfs.util/find-abstract-file-object.error", 
fileObject==null?"null":fileObject.getClass().getName());
+        throw new 
FileSystemException("vfs.util/find-abstract-file-object.error",
+                fileObject == null ? "null" : fileObject.getClass().getName());
     }
 
     /**
-     * check if the given FileObject is instance of given class argument
+     * Check if the given FileObject is instance of given class argument.
+     * @param fileObject The FileObject.
+     * @param wantedClass The Class to check.
+     * @return true if fileObject is an instance of the specified Class.
+     * @throws FileSystemException if an error occurs.
      */
     public static boolean isInstanceOf(final FileObject fileObject, final 
Class wantedClass) throws FileSystemException
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Messages.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Messages.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Messages.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Messages.java
 Mon Aug 17 07:38:49 2009
@@ -28,7 +28,7 @@
  * @author <a href="mailto:adammurd...@apache.org";>Adam Murdoch</a>
  * @version $Revision$ $Date$
  */
-public class Messages
+public final class Messages
 {
     /**
      * Map from message code to MessageFormat object for the message.

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorInputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorInputStream.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorInputStream.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorInputStream.java
 Mon Aug 17 07:38:49 2009
@@ -40,7 +40,9 @@
 
 
     /**
-     * Returns 0 if the stream is at eof, else the underlaying inputStream 
will be queried
+     * Returns 0 if the stream is at eof, else the underlaying inputStream 
will be queried.
+     * @return The number of bytes that are available.
+     * @throws IOException if an error occurs.
      */
     public synchronized int available() throws IOException
     {
@@ -54,6 +56,8 @@
 
     /**
      * Reads a character.
+     * @return The character that was read as an integer.
+     * @throws IOException if an error occurs.
      */
     public int read() throws IOException
     {
@@ -75,7 +79,12 @@
     }
 
     /**
-     * Reads bytes from this input stream.error occurs.
+     * Reads bytes from this input stream.
+     * @param buffer A byte array in which to place the characters read.
+     * @param offset The offset at which to start reading.
+     * @param length The maximum number of bytes to read.
+     * @return The number of bytes read.
+     * @throws IOException if an error occurs.
      */
     public int read(final byte[] buffer, final int offset, final int length)
         throws IOException
@@ -100,6 +109,7 @@
     /**
      * Closes this input stream and releases any system resources
      * associated with the stream.
+     * @throws IOException if an error occurs.
      */
     public void close() throws IOException
     {
@@ -139,13 +149,15 @@
     /**
      * Called after the stream has been closed.  This implementation does
      * nothing.
+     * @throws IOException if an error occurs.
      */
     protected void onClose() throws IOException
     {
     }
 
     /**
-     * Get the nuber of bytes read by this input stream
+     * Get the nuber of bytes read by this input stream.
+     * @return The number of bytes read by this input stream.
      */
     public long getCount()
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorOutputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorOutputStream.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorOutputStream.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorOutputStream.java
 Mon Aug 17 07:38:49 2009
@@ -40,6 +40,7 @@
 
     /**
      * Closes this output stream.
+     * @throws IOException if an error occurs.
      */
     public void close() throws IOException
     {
@@ -84,7 +85,7 @@
         super.write(b);
     }
 
-    public synchronized void write(byte b[], int off, int len) throws 
IOException
+    public synchronized void write(byte[] b, int off, int len) throws 
IOException
     {
         assertOpen();
         super.write(b, off, len);
@@ -96,7 +97,7 @@
         super.flush();
     }
 
-    public void write(byte b[]) throws IOException
+    public void write(byte[] b) throws IOException
     {
         assertOpen();
         super.write(b);

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorRandomAccessContent.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorRandomAccessContent.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorRandomAccessContent.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/MonitorRandomAccessContent.java
 Mon Aug 17 07:38:49 2009
@@ -46,6 +46,7 @@
 
     /**
      * Closes this content.
+     * @throws IOException if an error occurs.
      */
     public void close() throws IOException
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Os.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Os.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Os.java 
(original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/Os.java 
Mon Aug 17 07:38:49 2009
@@ -31,17 +31,6 @@
  */
 public final class Os
 {
-    private static final String OS_NAME =
-        System.getProperty("os.name").toLowerCase(Locale.US);
-    private static final String OS_ARCH =
-        System.getProperty("os.arch").toLowerCase(Locale.US);
-    private static final String OS_VERSION =
-        System.getProperty("os.version").toLowerCase(Locale.US);
-    private static final String PATH_SEP =
-        System.getProperty("path.separator");
-    private static final OsFamily OS_FAMILY;
-    private static final OsFamily[] OS_ALL_FAMILIES;
-
     /**
      * All Windows based OSes.
      */
@@ -65,13 +54,13 @@
         new OsFamily("win9x", new OsFamily[]{OS_FAMILY_WINDOWS, 
OS_FAMILY_DOS});
 
     /**
-     * OS/2
+     * OS/2.
      */
     public static final OsFamily OS_FAMILY_OS2 =
         new OsFamily("os/2", new OsFamily[]{OS_FAMILY_DOS});
 
     /**
-     * Netware
+     * Netware.
      */
     public static final OsFamily OS_FAMILY_NETWARE =
         new OsFamily("netware");
@@ -87,11 +76,22 @@
     public static final OsFamily OS_FAMILY_MAC = new OsFamily("mac");
 
     /**
-     * OSX
+     * OSX.
      */
     public static final OsFamily OS_FAMILY_OSX =
         new OsFamily("osx", new OsFamily[]{OS_FAMILY_UNIX, OS_FAMILY_MAC});
 
+    private static final String OS_NAME =
+        System.getProperty("os.name").toLowerCase(Locale.US);
+    private static final String OS_ARCH =
+        System.getProperty("os.arch").toLowerCase(Locale.US);
+    private static final String OS_VERSION =
+        System.getProperty("os.version").toLowerCase(Locale.US);
+    private static final String PATH_SEP =
+        System.getProperty("path.separator");
+    private static final OsFamily OS_FAMILY;
+    private static final OsFamily[] OS_ALL_FAMILIES;
+
     private static final OsFamily[] ALL_FAMILIES = new OsFamily[]
     {
         OS_FAMILY_DOS,
@@ -121,6 +121,8 @@
     /**
      * Determines if the OS on which Ant is executing matches the given OS
      * version.
+     * @param version The version to check.
+     * @return true if the version matches.
      */
     public static boolean isVersion(final String version)
     {
@@ -130,6 +132,8 @@
     /**
      * Determines if the OS on which Ant is executing matches the given OS
      * architecture.
+     * @param arch The architecture to check.
+     * @return true if the architecture mataches.
      */
     public static boolean isArch(final String arch)
     {
@@ -139,6 +143,8 @@
     /**
      * Determines if the OS on which Ant is executing matches the given OS
      * family.
+     * @param family The family to check.
+     * @return true if the family matches.
      */
     public static boolean isFamily(final String family)
     {
@@ -148,6 +154,8 @@
     /**
      * Determines if the OS on which Ant is executing matches the given OS
      * family.
+     * @param family The family to check.
+     * @return true if the family matches.
      */
     public static boolean isFamily(final OsFamily family)
     {
@@ -186,7 +194,7 @@
 
     /**
      * Determines if the OS on which Ant is executing matches the given OS
-     * family, name, architecture and version
+     * family, name, architecture and version.
      *
      * @param family  The OS family
      * @param name    The OS name
@@ -217,6 +225,7 @@
     /**
      * Locates an OsFamily by name (case-insensitive).
      *
+     * @param name The family name to lookup.
      * @return the OS family, or null if not found.
      */
     public static OsFamily getFamily(final String name)

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/OsFamily.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/OsFamily.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/OsFamily.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/OsFamily.java
 Mon Aug 17 07:38:49 2009
@@ -41,6 +41,7 @@
 
     /**
      * Returns the name of this family.
+     * @return The name of this family.
      */
     public String getName()
     {
@@ -49,6 +50,7 @@
 
     /**
      * Returns the OS families that this family belongs to.
+     * @return an array of OSFamily objects that this family belongs to.
      */
     public OsFamily[] getFamilies()
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/RandomAccessMode.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/RandomAccessMode.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/RandomAccessMode.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/RandomAccessMode.java
 Mon Aug 17 07:38:49 2009
@@ -22,15 +22,15 @@
  * @author <a href="mailto:ima...@apache.org";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class RandomAccessMode
+public final class RandomAccessMode
 {
     /**
-     * read
+     * read.
      */
     public static final RandomAccessMode READ = new RandomAccessMode(true, 
false);
 
     /**
-     * read/write
+     * read/write.
      */
     public static final RandomAccessMode READWRITE = new 
RandomAccessMode(true, true);
 

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/UserAuthenticatorUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/UserAuthenticatorUtils.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/UserAuthenticatorUtils.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/UserAuthenticatorUtils.java
 Mon Aug 17 07:38:49 2009
@@ -22,18 +22,29 @@
 import org.apache.commons.vfs.impl.DefaultFileSystemConfigBuilder;
 
 /**
- * some helper
+ * Some helper methods used for authentication.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
  */
-public class UserAuthenticatorUtils
+public final class UserAuthenticatorUtils
 {
+    private UserAuthenticatorUtils()
+    {
+    }
+
     /**
-     * gets data of given type from the UserAuthenticationData or null if 
there is no data or data of this type available
+     * gets data of given type from the UserAuthenticationData or null if 
there is no data or data
+     * of this type available.
+     * @param data The UserAuthenticationData.
+     * @param type The type of the element to retrieve.
+     * @param overriddenValue The default value.
+     * @return The data of the given type as a character array or null if the 
data is not available.
      */
-    public static char[] getData(UserAuthenticationData data, 
UserAuthenticationData.Type type, char[] overwriddenValue)
+    public static char[] getData(UserAuthenticationData data, 
UserAuthenticationData.Type type,
+                                 char[] overriddenValue)
     {
-        if (overwriddenValue != null)
+        if (overriddenValue != null)
         {
-            return overwriddenValue;
+            return overriddenValue;
         }
 
         if (data == null)
@@ -45,18 +56,26 @@
     }
 
     /**
-     * if there is a authenticator the authentication will take place, else 
null will be reutrned
+     * if there is a authenticator the authentication will take place, else 
null will be reutrned.
+     * @param opts The FileSystemOptions.
+     * @param authenticatorTypes An array of types describing the data to be 
retrieved.
+     * @return A UserAuthenticationData object containing the data requested.
      */
-    public static UserAuthenticationData authenticate(FileSystemOptions opts, 
UserAuthenticationData.Type[] authenticatorTypes)
+    public static UserAuthenticationData authenticate(FileSystemOptions opts,
+                                                      
UserAuthenticationData.Type[] authenticatorTypes)
     {
         UserAuthenticator auth = 
DefaultFileSystemConfigBuilder.getInstance().getUserAuthenticator(opts);
         return authenticate(auth, authenticatorTypes);
     }
 
     /**
-     * if there is a authenticator the authentication will take place, else 
null will be reutrned
+     * if there is a authenticator the authentication will take place, else 
null will be reutrned.
+     * @param auth The UserAuthenticator.
+     * @param authenticatorTypes An array of types describing the data to be 
retrieved.
+     * @return A UserAuthenticationData object containing the data requested.
      */
-    public static UserAuthenticationData authenticate(UserAuthenticator auth, 
UserAuthenticationData.Type[] authenticatorTypes)
+    public static UserAuthenticationData authenticate(UserAuthenticator auth,
+                                                      
UserAuthenticationData.Type[] authenticatorTypes)
     {
         if (auth == null)
         {
@@ -67,7 +86,9 @@
     }
 
     /**
-     * converts a string to a char array (null safe)
+     * Converts a string to a char array (null safe).
+     * @param string The String to convert.
+     * @return The character array.
      */
     public static char[] toChar(String string)
     {
@@ -80,7 +101,8 @@
     }
 
     /**
-     * cleanup the data in the UerAuthenticationData (null safe)
+     * cleanup the data in the UerAuthenticationData (null safe).
+     * @param authData The UserAuthenticationDAta.
      */
     public static void cleanup(UserAuthenticationData authData)
     {
@@ -93,7 +115,9 @@
     }
 
     /**
-     * converts the given data to a string (null safe)
+     * converts the given data to a string (null safe).
+     * @param data A character array containing the data to convert to a 
String.
+     * @return The String.
      */
     public static String toString(char[] data)
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
 Mon Aug 17 07:38:49 2009
@@ -44,7 +44,9 @@
     }
 
     /**
-     * This will install the <code>listener<code> at the given 
<code>file</code>
+     * This will install the <code>listener</code> at the given 
<code>file</code>.
+     * @param file The FileObject to listen on.
+     * @param listener The FileListener
      */
     public static void installListener(final FileObject file, final 
FileListener listener)
     {
@@ -56,6 +58,8 @@
     /**
      * returns the wrapped listener. If it is gone, the WeakRefFileListener 
wrapper will
      * remove itself from the list of listeners.
+     * @return The FileListener.
+     * @throws Exception if an error occurs.
      */
     protected FileListener getListener() throws Exception
     {
@@ -70,6 +74,8 @@
 
     /**
      * Called when a file is created.
+     * @param event The FileChangeEvent.
+     * @throws Exception if an error occurs.
      */
     public void fileCreated(final FileChangeEvent event) throws Exception
     {
@@ -83,6 +89,8 @@
 
     /**
      * Called when a file is deleted.
+     * @param event The FileChangeEvent.
+     * @throws Exception if an error occurs.
      */
     public void fileDeleted(final FileChangeEvent event) throws Exception
     {
@@ -98,6 +106,8 @@
      * Called when a file is changed.
      * <p/>
      * This will only happen if you monitor the file using {...@link 
org.apache.commons.vfs.FileMonitor}.
+     * @param event The FileChangeEvent.
+     * @throws Exception if an error occurs.
      */
     public void fileChanged(FileChangeEvent event) throws Exception
     {

Modified: 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java?rev=804886&r1=804885&r2=804886&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
 (original)
+++ 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
 Mon Aug 17 07:38:49 2009
@@ -49,7 +49,7 @@
         final Authority auth = extractToPath(filename, name);
 
         // extract domain
-        String username = auth.userName;
+        String username = auth.getUserName();
         String domain = extractDomain(username);
         if (domain != null)
         {
@@ -73,11 +73,11 @@
         final String path = name.toString();
 
         return new SmbFileName(
-            auth.scheme,
-            auth.hostName,
-            auth.port,
+            auth.getScheme(),
+            auth.getHostName(),
+            auth.getPort(),
             username,
-            auth.password,
+            auth.getPassword(),
             domain,
             share,
             path,


Reply via email to