You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/02/16 21:38:05 UTC

svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Author: ggregory
Date: Thu Feb 16 20:38:04 2012
New Revision: 1245166

URL: http://svn.apache.org/viewvc?rev=1245166&view=rev
Log:
Fix Checkstyle issues.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java Thu Feb 16 20:38:04 2012
@@ -454,7 +454,8 @@ public abstract class AbstractFileName i
      * @see #getType()
      * @see FileType#FILE
      */
-    public boolean isFile() throws FileSystemException {
+    public boolean isFile() throws FileSystemException
+    {
         // Use equals instead of == to avoid any class loader worries.
         return FileType.FILE.equals(this.getType());
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java Thu Feb 16 20:38:04 2012
@@ -518,7 +518,8 @@ public abstract class AbstractFileObject
      * @see #getType()
      * @see FileType#FILE
      */
-    public boolean isFile() throws FileSystemException {
+    public boolean isFile() throws FileSystemException
+    {
         // Use equals instead of == to avoid any class loader worries.
         return FileType.FILE.equals(this.getType());
     }
@@ -531,7 +532,8 @@ public abstract class AbstractFileObject
      * @see #getType()
      * @see FileType#FOLDER
      */
-    public boolean isFolder() throws FileSystemException {
+    public boolean isFolder() throws FileSystemException
+    {
         // Use equals instead of == to avoid any class loader worries.
         return FileType.FOLDER.equals(this.getType());
     }
@@ -623,7 +625,8 @@ public abstract class AbstractFileObject
         try
         {
             return listFiles(Selectors.SELECT_ALL).iterator();
-        } catch (FileSystemException e)
+        }
+        catch (FileSystemException e)
         {
             throw new IllegalStateException(e);
         }
@@ -929,7 +932,7 @@ public abstract class AbstractFileObject
     }
 
     /**
-     * Deletes this file, and all children matching the {@code selector}
+     * Deletes this file, and all children matching the {@code selector}.
      *
      * @param selector The FileSelector.
      * @return the number of deleted files.
@@ -1079,11 +1082,12 @@ public abstract class AbstractFileObject
     }
 
     /**
-     * Compares two FileObjects (ignores case)
+     * Compares two FileObjects (ignores case).
      */
     public int compareTo(FileObject fo)
     {
-        if (fo == null) {
+        if (fo == null)
+        {
             return 1;
         }
         return this.toString().compareToIgnoreCase(fo.toString());
@@ -1091,6 +1095,7 @@ public abstract class AbstractFileObject
 
     /**
      * Copies another file to this file.
+     *
      * @param file The FileObject to copy.
      * @param selector The FileSelector.
      * @throws FileSystemException if an error occurs.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java Thu Feb 16 20:38:04 2012
@@ -310,7 +310,7 @@ public final class DefaultFileContent im
         }
         catch (final Exception e)
         {
-            throw new FileSystemException("vfs.provider/set-attribute.error", e,attrName, fileObject);
+            throw new FileSystemException("vfs.provider/set-attribute.error", e, attrName, fileObject);
         }
 
         if (attrs != null)

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java Thu Feb 16 20:38:04 2012
@@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
 public class HttpFileNameParser extends URLFileNameParser
 {
     private static final int DEFAULT_PORT = 80;
-    
+
     private static final HttpFileNameParser INSTANCE = new HttpFileNameParser();
 
     public HttpFileNameParser()

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java Thu Feb 16 20:38:04 2012
@@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
 public class HttpsFileNameParser extends URLFileNameParser
 {
     private static final int DEFAULT_PORT = 443;
-    
+
     private static final HttpsFileNameParser INSTANCE = new HttpsFileNameParser();
 
     public HttpsFileNameParser()

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java Thu Feb 16 20:38:04 2012
@@ -136,7 +136,7 @@ public class RamFileObject extends Abstr
     protected void doDelete() throws Exception
     {
 
-        if (this.isContentOpen()) 
+        if (this.isContentOpen())
         {
             throw new FileSystemException(this.getName() + " cannot be deleted while the file is openg");
         }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java Thu Feb 16 20:38:04 2012
@@ -296,7 +296,8 @@ public final class SftpClientFactory
 
     private static class JSchLogger implements Logger
     {
-        public boolean isEnabled(int level) {
+        public boolean isEnabled(int level)
+        {
             switch (level)
             {
                 case FATAL:
@@ -315,7 +316,8 @@ public final class SftpClientFactory
             }
         }
 
-        public void log(int level, String msg) {
+        public void log(int level, String msg)
+        {
             switch (level)
             {
                 case FATAL:

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java Thu Feb 16 20:38:04 2012
@@ -53,6 +53,8 @@ import com.jcraft.jsch.SftpException;
  */
 public class SftpFileObject extends AbstractFileObject
 {
+    private static final long MOD_TIME_FACTOR = 1000L;
+
     private final SftpFileSystem fileSystem;
     private SftpATTRS attrs;
     private final String relPath;
@@ -75,7 +77,10 @@ public class SftpFileObject extends Abst
         attrs = null;
     }
 
-    /** @since 2.0 */
+    /**
+     * @throws FileSystemException if error occurs.
+     * @since 2.0
+     */
     @Override
     public void refresh() throws FileSystemException
     {
@@ -223,7 +228,7 @@ public class SftpFileObject extends Abst
             throw new FileSystemException(
                     "vfs.provider.sftp/unknown-modtime.error");
         }
-        return attrs.getMTime() * 1000L;
+        return attrs.getMTime() * MOD_TIME_FACTOR;
     }
 
     /**
@@ -241,7 +246,7 @@ public class SftpFileObject extends Abst
         final ChannelSftp channel = fileSystem.getChannel();
         try
         {
-            int newMTime = (int) (modtime / 1000L);
+            int newMTime = (int) (modtime / MOD_TIME_FACTOR);
 
             attrs.setACMODTIME(attrs.getATime(), newMTime);
             channel.setStat(relPath, attrs);
@@ -301,7 +306,8 @@ public class SftpFileObject extends Abst
     protected FileObject[] doListChildrenResolved() throws Exception
     {
         // should not require a round-trip because type is already set.
-        if (this.isFile()) {
+        if (this.isFile())
+        {
             return null;
         }
         // List the contents of the folder

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java Thu Feb 16 20:38:04 2012
@@ -45,6 +45,8 @@ public class SftpFileSystem
     implements FileSystem
 {
 
+    private static final long LAST_MOD_TIME_ACCURACY = 1000L;
+
     private Session session;
     // private final JSch jSch;
     private ChannelSftp idleChannel;
@@ -196,13 +198,13 @@ public class SftpFileSystem
     }
 
     /**
-     * last mod time is only a int and in seconds, thus can be off by 999.
+     * Last mod time is only a int and in seconds, thus can be off by 999.
      *
      * @return 1000
      */
     @Override
     public double getLastModTimeAccuracy()
     {
-        return 1000L;
+        return LAST_MOD_TIME_ACCURACY;
     }
 }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java Thu Feb 16 20:38:04 2012
@@ -96,7 +96,10 @@ public final class SftpFileSystemConfigB
             return true;
         }
 
-        /** @since 2.0 */
+        /**
+         * @return  a hash code value for this object.
+         * @since 2.0
+         */
         @Override
         public int hashCode()
         {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java Thu Feb 16 20:38:04 2012
@@ -48,6 +48,8 @@ import org.apache.commons.vfs2.provider.
  */
 public class TarFileSystem extends AbstractFileSystem implements FileSystem
 {
+    private static final int DEFAULT_INDEX_SIZE = 100;
+
     private static final Log LOG = LogFactory.getLog(TarFileSystem.class);
 
     private final File file;
@@ -82,7 +84,7 @@ public class TarFileSystem extends Abstr
         // Build the index
         try
         {
-            List<TarFileObject> strongRef = new ArrayList<TarFileObject>(100);
+            List<TarFileObject> strongRef = new ArrayList<TarFileObject>(DEFAULT_INDEX_SIZE);
             TarArchiveEntry entry;
             while ((entry = getTarFile().getNextTarEntry()) != null)
             {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1245166&r1=1245165&r2=1245166&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java Thu Feb 16 20:38:04 2012
@@ -32,9 +32,8 @@ public final class Messages
     /**
      * Map from message code to MessageFormat object for the message.
      */
-    private static ConcurrentMap<String, MessageFormat> messages =
-        new ConcurrentHashMap<String, MessageFormat>();
-    private static final ResourceBundle resources = new CombinedResources("org.apache.commons.vfs2.Resources");
+    private static ConcurrentMap<String, MessageFormat> MessageMap = new ConcurrentHashMap<String, MessageFormat>();
+    private static final ResourceBundle RESOURCES = new CombinedResources("org.apache.commons.vfs2.Resources");
 
     private Messages()
     {
@@ -53,7 +52,7 @@ public final class Messages
 
     /**
      * Formats a message.
-     * 
+     *
      * @param code
      *            The message code.
      * @param param
@@ -100,15 +99,15 @@ public final class Messages
         throws MissingResourceException
     {
         // Check if the message is cached
-        MessageFormat msg = messages.get(code);
+        MessageFormat msg = MessageMap.get(code);
         if (msg != null)
         {
             return msg;
         }
 
-        final String msgText = resources.getString(code);
+        final String msgText = RESOURCES.getString(code);
         msg = new MessageFormat(msgText);
-        messages.putIfAbsent(code, msg);
-        return messages.get(code);
+        MessageMap.putIfAbsent(code, msg);
+        return MessageMap.get(code);
     }
 }



Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Oliver Heger <ol...@oliver-heger.de>.
Am 18.02.2012 15:25, schrieb Ralph Goers:
>
> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>
>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>
>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>
>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>> when I created the checkstyle configuration I started from the one used by
>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>> checkstyle configuration.
>>>>>
>>>>
>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>> it once and for all.
>>
>> Are we sure all components use the same style ?
>> The checkstyle.xml file for [math] origin has evolved its own way,
>> partly when the mantissa library has been merged. I am pretty sure it is
>> not compatible with other ones.
>
> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?

For instance, [configuration] has a different coding style than [lang]. 
Personally, I do not prefer one format over the other. I am +1 for a 
commons wide checkstyle policy. However, doing the reformatting is 
probably a pain.

+1 to a common(s) set of reports, too.

Oliver

>
> Ralph
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Should a vote about a commons wide checkstyle config be submitted to the PMC (was Re: Common checkstyle)

Posted by Ralph Goers <rg...@apache.org>.
Nah. It just means that when someone actually decides to do it we will review it then.  I don't really see the point in voting on something and then no one following through to implement it.

Ralph

On Feb 29, 2012, at 5:27 AM, Benedikt Ritter <be...@systemoutprintln.de> wrote:

> Hi,
> 
> for the record: since more than 72h have passed with no response, I guess we can drop this topic and leave everything the way it is.
> 
> Regards,
> Benedikt
> 
> Am 25.02.2012 17:33, schrieb Benedikt Ritter:
>> Hi,
>> 
>> for some reason this discussion ended without a result. Maybe it is time
>> to summarize what has been discussed so far.
>> 
>> This all goes back to a commit by Gary, that fixed several check style
>> issues in VFS [1]. The following discussion between Gary and Ralph and
>> others [2] showed, that there are several thinks unclear regarding the
>> check style configurations in commons:
>> 
>> - which configuration to use when starting a new project
>> - if the check style configuration of a project can be changed
>> - if there is a commons wide check style configuration, that all
>> projects could agree on
>> 
>> It was then suggested to call a vote on whether there should be a
>> commons wide check style configuration. This question is still unanswered.
>> 
>> Arguments for a commons wide configuration:
>> 
>> - it is easier for people to swap between projects and for new
>> contributers to get started
>> - Commons is one subproject of the ASF, so it should have only one style
>> - all source code would be formated the same way (making it "common" )
>> 
>> Arguments against a commons wide configuration:
>> 
>> - several projects have evolved their configuration in different ways,
>> making it hard to find a commons wide style
>> - Reformatting will be a lot of work
>> - teams should be able to choose their own style
>> - most people only develop a few components, so that the swapping is not
>> that much of an issue
>> - Technical restrictions (where to place such a commons wide check style
>> file?)
>> 
>> As a solution to those arguments it was proposed to have a default check
>> style configuration, that can be used for new projects. This
>> configuration may be overwritten by the different components if they
>> feel the need.
>> 
>> So now we have to answer the question: Should a vote be submitted to the
>> PMC?
>> 
>> Regards,
>> Benedikt
>> 
>> [1] http://markmail.org/thread/4yxhoefo37tpighf
>> [2] http://markmail.org/thread/m337z45fe2d7dps2
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Should a vote about a commons wide checkstyle config be submitted to the PMC (was Re: Common checkstyle)

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Hi,

for the record: since more than 72h have passed with no response, I 
guess we can drop this topic and leave everything the way it is.

Regards,
Benedikt

Am 25.02.2012 17:33, schrieb Benedikt Ritter:
> Hi,
>
> for some reason this discussion ended without a result. Maybe it is time
> to summarize what has been discussed so far.
>
> This all goes back to a commit by Gary, that fixed several check style
> issues in VFS [1]. The following discussion between Gary and Ralph and
> others [2] showed, that there are several thinks unclear regarding the
> check style configurations in commons:
>
> - which configuration to use when starting a new project
> - if the check style configuration of a project can be changed
> - if there is a commons wide check style configuration, that all
> projects could agree on
>
> It was then suggested to call a vote on whether there should be a
> commons wide check style configuration. This question is still unanswered.
>
> Arguments for a commons wide configuration:
>
> - it is easier for people to swap between projects and for new
> contributers to get started
> - Commons is one subproject of the ASF, so it should have only one style
> - all source code would be formated the same way (making it "common" )
>
> Arguments against a commons wide configuration:
>
> - several projects have evolved their configuration in different ways,
> making it hard to find a commons wide style
> - Reformatting will be a lot of work
> - teams should be able to choose their own style
> - most people only develop a few components, so that the swapping is not
> that much of an issue
> - Technical restrictions (where to place such a commons wide check style
> file?)
>
> As a solution to those arguments it was proposed to have a default check
> style configuration, that can be used for new projects. This
> configuration may be overwritten by the different components if they
> feel the need.
>
> So now we have to answer the question: Should a vote be submitted to the
> PMC?
>
> Regards,
> Benedikt
>
> [1] http://markmail.org/thread/4yxhoefo37tpighf
> [2] http://markmail.org/thread/m337z45fe2d7dps2
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Should a vote about a commons wide checkstyle config be submitted to the PMC (was Re: Common checkstyle)

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Feb 29, 2012 at 8:45 AM, Jörg Schaible
<Jo...@scalaris.com>wrote:

> Benedikt Ritter wrote:
>
> > Hi,
> >
> > for the record: since more than 72h have passed with no response, I
> > guess we can drop this topic and leave everything the way it is.
>
> Or it means, you did not draw any attention to a new topic in a thread of
> ~50 postings ...
>

Right! This is a good post that touches on a 'religious' issue. For me
formatting should be consistent and automatic using your IDE.

So ideally, we can define a set of rules that can be implemented in CS and
in an IDE (Eclipse, IJ, NB) and saved in SVN. Then we can decide if we want
to save IDE settings in a new dir called ide/{ide_name}/{ide_version}, that
kind of thing.

I would like to see CS defined in the parent and let each component
override as they see fit.

Gary


>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Should a vote about a commons wide checkstyle config be submitted to the PMC (was Re: Common checkstyle)

Posted by Jörg Schaible <Jo...@scalaris.com>.
Benedikt Ritter wrote:

> Hi,
> 
> for the record: since more than 72h have passed with no response, I
> guess we can drop this topic and leave everything the way it is.

Or it means, you did not draw any attention to a new topic in a thread of 
~50 postings ...

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Should a vote about a commons wide checkstyle config be submitted to the PMC (was Re: Common checkstyle)

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Hi,

for some reason this discussion ended without a result. Maybe it is time 
to summarize what has been discussed so far.

This all goes back to a commit by Gary, that fixed several check style 
issues in VFS [1]. The following discussion between Gary and Ralph and 
others [2] showed, that there are several thinks unclear regarding the 
check style configurations in commons:

- which configuration to use when starting a new project
- if the check style configuration of a project can be changed
- if there is a commons wide check style configuration, that all 
projects could agree on

It was then suggested to call a vote on whether there should be a 
commons wide check style configuration. This question is still unanswered.

Arguments for a commons wide configuration:

- it is easier for people to swap between projects and for new 
contributers to get started
- Commons is one subproject of the ASF, so it should have only one style
- all source code would be formated the same way (making it "common" )

Arguments against a commons wide configuration:

- several projects have evolved their configuration in different ways, 
making it hard to find a commons wide style
- Reformatting will be a lot of work
- teams should be able to choose their own style
- most people only develop a few components, so that the swapping is not 
that much of an issue
- Technical restrictions (where to place such a commons wide check style 
file?)

As a solution to those arguments it was proposed to have a default check 
style configuration, that can be used for new projects. This 
configuration may be overwritten by the different components if they 
feel the need.

So now we have to answer the question: Should a vote be submitted to the 
PMC?

Regards,
Benedikt

[1] http://markmail.org/thread/4yxhoefo37tpighf
[2] http://markmail.org/thread/m337z45fe2d7dps2

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Luc Maisonobe <Lu...@free.fr>.
Le 19/02/2012 09:50, Benedikt Ritter a écrit :
> 
> Am 18.02.2012 um 19:06 schrieb Ralph Goers <ra...@dslextreme.com>:
> 
>>
>> On Feb 18, 2012, at 8:54 AM, Luc Maisonobe wrote:
>>
>>> Le 18/02/2012 17:27, Gary Gregory a écrit :
>>>> On Feb 18, 2012, at 11:00, Oliver Heger <ol...@oliver-heger.de> wrote:
>>>>
>>>>> Am 18.02.2012 15:25, schrieb Ralph Goers:
>>>>>>
>>>>>> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>>>>>>
>>>>>>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>>>>>>
>>>>>>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>>>>>>
>>>>>>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>>>>>>> when I created the checkstyle configuration I started from the one used by
>>>>>>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>>>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>>>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>>>>>>> checkstyle configuration.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>>>>>>> it once and for all.
>>>>>>>
>>>>>>> Are we sure all components use the same style ?
>>>>>>> The checkstyle.xml file for [math] origin has evolved its own way,
>>>>>>> partly when the mantissa library has been merged. I am pretty sure it is
>>>>>>> not compatible with other ones.
>>>>>>
>>>>>> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?
>>>>>
>>>>> For instance, [configuration] has a different coding style than [lang].
>>>>> Personally, I do not prefer one format over the other. I am +1 for a
>>>>> commons wide checkstyle policy. However, doing the reformatting is
>>>>> probably a pain.
>>>>
>>>> We can pick a format that IDEs can perform automatically.
>>>
>>> The style we use for [math] has an eclipse configuration counterpart at
>>> <http://people.apache.org/~luc/Apache-commons.xml> which does almost
>>> everything automatically. There is only one gltich I was not able to
>>> fix: the indent size of the "throws" statement in method signatures
>>> which cannot be set to any value on which checkstyle and eclipse could
>>> agree. So when we do automatic formatting with eclipse, these lines are
>>> flagged by checkstyle as having wrong indentation. I did not check since
>>> one or two years, though, so there may be a setting for this now.
> 
> I'm +1 as well. A common style would make development easier. I think configuration files should be downloadable from commons website. Maybe that will spare some "good patch but there are some style issues..." replies to new contributors. ;-)
> 
> 
>>
>> I use IntelliJ so obviously I'd want a style that it can handle.  FWIW, Jetbrains provides a free license for the full product for open source development or you can use the community edition.
> 
> So are you suggesting that everybody should use IntelliJ? I use eclipse and I'm happy with that (Most of the time ;-)

I think many of us use different development environments (vi, emacs,
eclipse, intellij, perhaps netbeans and others). This is a good thing.

We could provide consistent configuration files for several such
environments. A general scripts repository for commons has recently been
added at <https://svn.apache.org/repos/asf/commons/scripts>. Perhaps we
should host all such files here ?

Luc

> 
>>
>> Ralph
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <rg...@apache.org>.
On Feb 19, 2012, at 12:50 AM, Benedikt Ritter <be...@systemoutprintln.de> wrote:

> 
> Am 18.02.2012 um 19:06 schrieb Ralph Goers <ra...@dslextreme.com>:
> 
>> 
>> I use IntelliJ so obviously I'd want a style that it can handle.  FWIW, Jetbrains provides a free license for the full product for open source development or you can use the community edition.
> 
> So are you suggesting that everybody should use IntelliJ? I use eclipse and I'm happy with that (Most of the time ;-)
> 

I'm not sure why you would think I meant that everyone should use IntelliJ.  In the environment I work in we are free to choose our development tools and in some cases Eclipse is the better choice.  However, I've also seen many arguments in the past that you should not use IntelliJ because it a) isn't open source and b) it is more expensive than Eclipse. While a) is still true, b) is not, at least for use here.

What my point was is that Eclipse is not the only tool we need to provide support for.

Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Sun, Feb 19, 2012 at 9:33 AM, Ralph Goers <rg...@apache.org> wrote:

>
> On Feb 19, 2012, at 5:12 AM, Simone Tripodi <si...@apache.org>
> wrote:
>
> >> I'm +1 as well. A common style would make development easier. I think
> configuration files should be downloadable from commons website. Maybe that
> will spare some "good patch but there are some style issues..." replies to
> new contributors. ;-)
> >>
> >
> > -1 we've let each component developers the freedom to choice their
> > preferred style. What is the reason to tie down the whole community to
> > a unique style? What will be next? The ASF style? seriously?
>
> Unlike Commons, you have to be granted permission to commit at other
> projects at the ASF and each of them have their own PMC and build their own
> communities.  Commons is a single community and thus it makes sense for
> developers to be able to easily switch between sub projects. Having
> commonality between the projects encourages that as it means you don't have
> to figure out what style settings you need as you switch between projects.
>

+1! Next up would be PMD and FindBugs...

Gary

>
>
> >
> >>
> >>>
> >>> I use IntelliJ so obviously I'd want a style that it can handle.
>  FWIW, Jetbrains provides a free license for the full product for open
> source development or you can use the community edition.
> >>
> >> So are you suggesting that everybody should use IntelliJ? I use eclipse
> and I'm happy with that (Most of the time ;-)
> >>
> >
> > +1 as well, users have to feel free to choice their preferred IDE -
> > even EMACS/vi if they feel comfortable with it :)
> >
>
> Yes, that was pretty much the point. Eclipse is not the only IDE.
>
> Ralph
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Gary Gregory <ga...@gmail.com>.
On Feb 21, 2012, at 2:38, Simone Tripodi <si...@apache.org> wrote:

> Sorry but I lost you, at that point I don't understand what meaning we
> want to attribute to the "checkstyle configuration can be overridden"
> sentence.
>
> Do you mean that we add the suppressions file, in order to skip some
> violations (i.e. signature too long of the default 80 char estimated
> by the default rules)
>
>  or
>
> committers can define their own config files?

Both I hope.

Gary
>
> TIA,
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Mon, Feb 20, 2012 at 5:35 PM, Gary Gregory <ga...@gmail.com> wrote:
>> On Mon, Feb 20, 2012 at 4:10 AM, Benedikt Ritter
>> <be...@systemoutprintln.de>wrote:
>>
>>> Am 19.02.2012 22:57, schrieb Simone Tripodi:
>>>
>>>  I think it is reasonable to have Commons wide defaults but let projects
>>>>> override them if they want to.
>>>>>
>>>>
>>> I think that is, what Gary meant in the first place ;-)
>>> http://mail-archives.apache.**org/mod_mbox/commons-dev/**201202.mbox/%3C-*
>>> *662605764588844473%**40unknownmsgid%3E<http://mail-archives.apache.org/mod_mbox/commons-dev/201202.mbox/%3C-662605764588844473%40unknownmsgid%3E>
>>
>>
>> Yes indeed, thank you for pointing that out in the link above. I do not
>> like to repeat myself.
>>
>> A advantage to an overridable default is that it is quicker to get a new
>> project off and running without letting it go wild with yet another set of
>> conventions. Right now, every time I want to work with one of the 20+
>> commons components (!= project), I have to create yet another IDE set of
>> formatter settings, it's become intolerable and sadly ironic for a project
>> named "Commons".
>>
>> Gary
>>
>>>
>>>
>>> To be honest, I'm really indifferent regarding what style to use. But I've
>>> come to the conclusion, that coding style is an important thing for some of
>>> you. I think the result of this discussion should be an easy way for
>>> everyone to switch between components, even if some components are
>>> developed by a few committers only (that is why I suggested to put the IDE
>>> configuration files on the website).
>>>
>>> Regards,
>>> Benedikt
>>>
>>>
>>>
>>>> that is much more than reasonable, we are on the same path now! :)
>>>>
>>>> -Simo
>>>>
>>>> http://people.apache.org/~**simonetripodi/<http://people.apache.org/%7Esimonetripodi/>
>>>> http://simonetripodi.**livejournal.com/<http://simonetripodi.livejournal.com/>
>>>> http://twitter.com/**simonetripodi <http://twitter.com/simonetripodi>
>>>> http://www.99soft.org/
>>>>
>>>>
>>>>
>>>> On Sun, Feb 19, 2012 at 10:49 PM, Ralph Goers<rg...@apache.org>  wrote:
>>>>
>>>>> On Feb 19, 2012, at 12:26 PM, Simone Tripodi<si...@apache.org>>
>>>>>  wrote:
>>>>>
>>>>>  While I agree that checkstyle has to be consistent inside each
>>>>>> component, so I would be +1 on having the plugin in the parent (with
>>>>>> PMD and Findbugs as mentioned by Gary), I am still reluctant with
>>>>>> adopting a general checkstyle *configuration* for all components, and
>>>>>> I make you a sample: commons-ognl.
>>>>>>
>>>>>> main OGNL contributors have been olamy, mcucchiara, grobmeier and
>>>>>> simonetripodi<http://**svnsearch.org/svnsearch/repos/**
>>>>>> ASF/search?path=%2Fcommons%**2Fproper%2Fognl%2Ftrunk<http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>
>>>>>>> .
>>>>>> We all (except grobmeier :P) like the mvn style (brought by
>>>>>> checkstyle-plugin) and we are comfortable on working with it. No one
>>>>>> else committed on OGNL.
>>>>>> So please explain me why the PMC should "force" OGNL guys on adopting
>>>>>> a different style in a component where just a small subset of commons
>>>>>> people (mainly Struts guys) is interested.
>>>>>>
>>>>>> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
>>>>>> which style has to be applied: -1. Good practice are one thing, strict
>>>>>> rules are different.
>>>>>>
>>>>>
>>>>> I think it is reasonable to have Commons wide defaults but let projects
>>>>> override them if they want to.
>>>>>
>>>>> Ralph
>>>>> ------------------------------**------------------------------**
>>>>> ---------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>
>>>>>
>>>> ------------------------------**------------------------------**---------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>
>>>
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
>> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Simone Tripodi <si...@apache.org>.
Sorry but I lost you, at that point I don't understand what meaning we
want to attribute to the "checkstyle configuration can be overridden"
sentence.

Do you mean that we add the suppressions file, in order to skip some
violations (i.e. signature too long of the default 80 char estimated
by the default rules)

  or

committers can define their own config files?

TIA,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Mon, Feb 20, 2012 at 5:35 PM, Gary Gregory <ga...@gmail.com> wrote:
> On Mon, Feb 20, 2012 at 4:10 AM, Benedikt Ritter
> <be...@systemoutprintln.de>wrote:
>
>> Am 19.02.2012 22:57, schrieb Simone Tripodi:
>>
>>  I think it is reasonable to have Commons wide defaults but let projects
>>>> override them if they want to.
>>>>
>>>
>> I think that is, what Gary meant in the first place ;-)
>> http://mail-archives.apache.**org/mod_mbox/commons-dev/**201202.mbox/%3C-*
>> *662605764588844473%**40unknownmsgid%3E<http://mail-archives.apache.org/mod_mbox/commons-dev/201202.mbox/%3C-662605764588844473%40unknownmsgid%3E>
>
>
> Yes indeed, thank you for pointing that out in the link above. I do not
> like to repeat myself.
>
> A advantage to an overridable default is that it is quicker to get a new
> project off and running without letting it go wild with yet another set of
> conventions. Right now, every time I want to work with one of the 20+
> commons components (!= project), I have to create yet another IDE set of
> formatter settings, it's become intolerable and sadly ironic for a project
> named "Commons".
>
> Gary
>
>>
>>
>> To be honest, I'm really indifferent regarding what style to use. But I've
>> come to the conclusion, that coding style is an important thing for some of
>> you. I think the result of this discussion should be an easy way for
>> everyone to switch between components, even if some components are
>> developed by a few committers only (that is why I suggested to put the IDE
>> configuration files on the website).
>>
>> Regards,
>> Benedikt
>>
>>
>>
>>> that is much more than reasonable, we are on the same path now! :)
>>>
>>> -Simo
>>>
>>> http://people.apache.org/~**simonetripodi/<http://people.apache.org/%7Esimonetripodi/>
>>> http://simonetripodi.**livejournal.com/<http://simonetripodi.livejournal.com/>
>>> http://twitter.com/**simonetripodi <http://twitter.com/simonetripodi>
>>> http://www.99soft.org/
>>>
>>>
>>>
>>> On Sun, Feb 19, 2012 at 10:49 PM, Ralph Goers<rg...@apache.org>  wrote:
>>>
>>>> On Feb 19, 2012, at 12:26 PM, Simone Tripodi<si...@apache.org>>
>>>>  wrote:
>>>>
>>>>  While I agree that checkstyle has to be consistent inside each
>>>>> component, so I would be +1 on having the plugin in the parent (with
>>>>> PMD and Findbugs as mentioned by Gary), I am still reluctant with
>>>>> adopting a general checkstyle *configuration* for all components, and
>>>>> I make you a sample: commons-ognl.
>>>>>
>>>>> main OGNL contributors have been olamy, mcucchiara, grobmeier and
>>>>> simonetripodi<http://**svnsearch.org/svnsearch/repos/**
>>>>> ASF/search?path=%2Fcommons%**2Fproper%2Fognl%2Ftrunk<http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>
>>>>> >.
>>>>> We all (except grobmeier :P) like the mvn style (brought by
>>>>> checkstyle-plugin) and we are comfortable on working with it. No one
>>>>> else committed on OGNL.
>>>>> So please explain me why the PMC should "force" OGNL guys on adopting
>>>>> a different style in a component where just a small subset of commons
>>>>> people (mainly Struts guys) is interested.
>>>>>
>>>>> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
>>>>> which style has to be applied: -1. Good practice are one thing, strict
>>>>> rules are different.
>>>>>
>>>>
>>>> I think it is reasonable to have Commons wide defaults but let projects
>>>> override them if they want to.
>>>>
>>>> Ralph
>>>> ------------------------------**------------------------------**
>>>> ---------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Gary Gregory <ga...@gmail.com>.
On Mon, Feb 20, 2012 at 4:10 AM, Benedikt Ritter
<be...@systemoutprintln.de>wrote:

> Am 19.02.2012 22:57, schrieb Simone Tripodi:
>
>  I think it is reasonable to have Commons wide defaults but let projects
>>> override them if they want to.
>>>
>>
> I think that is, what Gary meant in the first place ;-)
> http://mail-archives.apache.**org/mod_mbox/commons-dev/**201202.mbox/%3C-*
> *662605764588844473%**40unknownmsgid%3E<http://mail-archives.apache.org/mod_mbox/commons-dev/201202.mbox/%3C-662605764588844473%40unknownmsgid%3E>


Yes indeed, thank you for pointing that out in the link above. I do not
like to repeat myself.

A advantage to an overridable default is that it is quicker to get a new
project off and running without letting it go wild with yet another set of
conventions. Right now, every time I want to work with one of the 20+
commons components (!= project), I have to create yet another IDE set of
formatter settings, it's become intolerable and sadly ironic for a project
named "Commons".

Gary

>
>
> To be honest, I'm really indifferent regarding what style to use. But I've
> come to the conclusion, that coding style is an important thing for some of
> you. I think the result of this discussion should be an easy way for
> everyone to switch between components, even if some components are
> developed by a few committers only (that is why I suggested to put the IDE
> configuration files on the website).
>
> Regards,
> Benedikt
>
>
>
>> that is much more than reasonable, we are on the same path now! :)
>>
>> -Simo
>>
>> http://people.apache.org/~**simonetripodi/<http://people.apache.org/%7Esimonetripodi/>
>> http://simonetripodi.**livejournal.com/<http://simonetripodi.livejournal.com/>
>> http://twitter.com/**simonetripodi <http://twitter.com/simonetripodi>
>> http://www.99soft.org/
>>
>>
>>
>> On Sun, Feb 19, 2012 at 10:49 PM, Ralph Goers<rg...@apache.org>  wrote:
>>
>>> On Feb 19, 2012, at 12:26 PM, Simone Tripodi<si...@apache.org>>
>>>  wrote:
>>>
>>>  While I agree that checkstyle has to be consistent inside each
>>>> component, so I would be +1 on having the plugin in the parent (with
>>>> PMD and Findbugs as mentioned by Gary), I am still reluctant with
>>>> adopting a general checkstyle *configuration* for all components, and
>>>> I make you a sample: commons-ognl.
>>>>
>>>> main OGNL contributors have been olamy, mcucchiara, grobmeier and
>>>> simonetripodi<http://**svnsearch.org/svnsearch/repos/**
>>>> ASF/search?path=%2Fcommons%**2Fproper%2Fognl%2Ftrunk<http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>
>>>> >.
>>>> We all (except grobmeier :P) like the mvn style (brought by
>>>> checkstyle-plugin) and we are comfortable on working with it. No one
>>>> else committed on OGNL.
>>>> So please explain me why the PMC should "force" OGNL guys on adopting
>>>> a different style in a component where just a small subset of commons
>>>> people (mainly Struts guys) is interested.
>>>>
>>>> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
>>>> which style has to be applied: -1. Good practice are one thing, strict
>>>> rules are different.
>>>>
>>>
>>> I think it is reasonable to have Commons wide defaults but let projects
>>> override them if they want to.
>>>
>>> Ralph
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<de...@commons.apache.org>
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Ralph Goers <ra...@dslextreme.com>.
On Feb 20, 2012, at 7:28 AM, sebb wrote:

> On 20 February 2012 09:10, Benedikt Ritter <be...@systemoutprintln.de> wrote:
>> Am 19.02.2012 22:57, schrieb Simone Tripodi:
>> 
>>>> I think it is reasonable to have Commons wide defaults but let projects
>>>> override them if they want to.
>> 
>> 
>> I think that is, what Gary meant in the first place ;-)
>> http://mail-archives.apache.org/mod_mbox/commons-dev/201202.mbox/%3C-662605764588844473%40unknownmsgid%3E
>> 
>> To be honest, I'm really indifferent regarding what style to use. But I've
>> come to the conclusion, that coding style is an important thing for some of
>> you. I think the result of this discussion should be an easy way for
>> everyone to switch between components, even if some components are developed
>> by a few committers only (that is why I suggested to put the IDE
>> configuration files on the website).
> 
> If there were a single coding style that all present and future
> Commons committers could agree on, then it would make sense to make
> that the Commons style.
> However, the fact that we are having these discussions proves that
> there is no such style.
> Any style chosen today will necessarily depend on those voting at the
> time - at a later date, a different style will probably be chosen.
> 
> Does it really make sense to change all the components to suit a style that is
> - not agreed by all at present
> - may become a minority style choice in future?
> 
> ==
> 
> However, there may be some style aspects that we can agree on:
> - tabs are banned
> - indentation (Java = 4; xml = 2 or 4 )
> 
> I'm not sure there's anything else that has not been contentious at some point.
> 

Actually, I'd bet a lot of things can be agreed on:

1. Is whitespace after "(" and before ")" permitted?
2. Is whitespace required before and after operators (i.e.  a=1 vs a = 1).
3. Do public static final objects require their names be in all caps.

and many more

The item that typically is the point of contention is how curly braces are used.  I used to care but I've worked on so many code bases that I gave up caring a long time ago.  

To me, the issue is really about making it easy to work on multiple projects and have the IDE be able to tell you about style errors.  In IntelliJ, and I assume Eclipse, each project can be configured with its own style.  If there is a default that also provides the IDE rules and we were to require projects to provide IDE rules for whatever style they want to use I would expect more projects would select the default. But even if they didn't, having the checkstyle rules available for every project would still make it easier.

Ralph




Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by sebb <se...@gmail.com>.
On 20 February 2012 09:10, Benedikt Ritter <be...@systemoutprintln.de> wrote:
> Am 19.02.2012 22:57, schrieb Simone Tripodi:
>
>>> I think it is reasonable to have Commons wide defaults but let projects
>>> override them if they want to.
>
>
> I think that is, what Gary meant in the first place ;-)
> http://mail-archives.apache.org/mod_mbox/commons-dev/201202.mbox/%3C-662605764588844473%40unknownmsgid%3E
>
> To be honest, I'm really indifferent regarding what style to use. But I've
> come to the conclusion, that coding style is an important thing for some of
> you. I think the result of this discussion should be an easy way for
> everyone to switch between components, even if some components are developed
> by a few committers only (that is why I suggested to put the IDE
> configuration files on the website).

If there were a single coding style that all present and future
Commons committers could agree on, then it would make sense to make
that the Commons style.
However, the fact that we are having these discussions proves that
there is no such style.
Any style chosen today will necessarily depend on those voting at the
time - at a later date, a different style will probably be chosen.

Does it really make sense to change all the components to suit a style that is
- not agreed by all at present
- may become a minority style choice in future?

==

However, there may be some style aspects that we can agree on:
- tabs are banned
- indentation (Java = 4; xml = 2 or 4 )

I'm not sure there's anything else that has not been contentious at some point.

> Regards,
> Benedikt
>
>
>>
>> that is much more than reasonable, we are on the same path now! :)
>>
>> -Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>>
>>
>> On Sun, Feb 19, 2012 at 10:49 PM, Ralph Goers<rg...@apache.org>  wrote:
>>>
>>> On Feb 19, 2012, at 12:26 PM, Simone Tripodi<si...@apache.org>
>>>  wrote:
>>>
>>>> While I agree that checkstyle has to be consistent inside each
>>>> component, so I would be +1 on having the plugin in the parent (with
>>>> PMD and Findbugs as mentioned by Gary), I am still reluctant with
>>>> adopting a general checkstyle *configuration* for all components, and
>>>> I make you a sample: commons-ognl.
>>>>
>>>> main OGNL contributors have been olamy, mcucchiara, grobmeier and
>>>>
>>>> simonetripodi<http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>.
>>>> We all (except grobmeier :P) like the mvn style (brought by
>>>> checkstyle-plugin) and we are comfortable on working with it. No one
>>>> else committed on OGNL.
>>>> So please explain me why the PMC should "force" OGNL guys on adopting
>>>> a different style in a component where just a small subset of commons
>>>> people (mainly Struts guys) is interested.
>>>>
>>>> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
>>>> which style has to be applied: -1. Good practice are one thing, strict
>>>> rules are different.
>>>
>>>
>>> I think it is reasonable to have Commons wide defaults but let projects
>>> override them if they want to.
>>>
>>> Ralph
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Am 19.02.2012 22:57, schrieb Simone Tripodi:
>> I think it is reasonable to have Commons wide defaults but let projects override them if they want to.

I think that is, what Gary meant in the first place ;-) 
http://mail-archives.apache.org/mod_mbox/commons-dev/201202.mbox/%3C-662605764588844473%40unknownmsgid%3E

To be honest, I'm really indifferent regarding what style to use. But 
I've come to the conclusion, that coding style is an important thing for 
some of you. I think the result of this discussion should be an easy way 
for everyone to switch between components, even if some components are 
developed by a few committers only (that is why I suggested to put the 
IDE configuration files on the website).

Regards,
Benedikt

>
> that is much more than reasonable, we are on the same path now! :)
>
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Sun, Feb 19, 2012 at 10:49 PM, Ralph Goers<rg...@apache.org>  wrote:
>> On Feb 19, 2012, at 12:26 PM, Simone Tripodi<si...@apache.org>  wrote:
>>
>>> While I agree that checkstyle has to be consistent inside each
>>> component, so I would be +1 on having the plugin in the parent (with
>>> PMD and Findbugs as mentioned by Gary), I am still reluctant with
>>> adopting a general checkstyle *configuration* for all components, and
>>> I make you a sample: commons-ognl.
>>>
>>> main OGNL contributors have been olamy, mcucchiara, grobmeier and
>>> simonetripodi<http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>.
>>> We all (except grobmeier :P) like the mvn style (brought by
>>> checkstyle-plugin) and we are comfortable on working with it. No one
>>> else committed on OGNL.
>>> So please explain me why the PMC should "force" OGNL guys on adopting
>>> a different style in a component where just a small subset of commons
>>> people (mainly Struts guys) is interested.
>>>
>>> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
>>> which style has to be applied: -1. Good practice are one thing, strict
>>> rules are different.
>>
>> I think it is reasonable to have Commons wide defaults but let projects override them if they want to.
>>
>> Ralph
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Niall Pemberton <ni...@gmail.com>.
On Sun, Feb 19, 2012 at 8:30 PM, Mark Thomas <ma...@apache.org> wrote:
> On 19/02/2012 20:26, Simone Tripodi wrote:
>> So please explain me why the PMC should "force" OGNL guys on adopting
>> a different style in a component where just a small subset of commons
>> people (mainly Struts guys) is interested.
>
> It shouldn't. Those that do the work get to make the decisions.

+1, let the component committers make the decision - not the PMC impose.

Niall

> Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Mark Thomas <ma...@apache.org>.
On 19/02/2012 20:26, Simone Tripodi wrote:
> So please explain me why the PMC should "force" OGNL guys on adopting
> a different style in a component where just a small subset of commons
> people (mainly Struts guys) is interested.

It shouldn't. Those that do the work get to make the decisions.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Simone Tripodi <si...@apache.org>.
> I think it is reasonable to have Commons wide defaults but let projects override them if they want to.

that is much more than reasonable, we are on the same path now! :)

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Sun, Feb 19, 2012 at 10:49 PM, Ralph Goers <rg...@apache.org> wrote:
> On Feb 19, 2012, at 12:26 PM, Simone Tripodi <si...@apache.org> wrote:
>
>> While I agree that checkstyle has to be consistent inside each
>> component, so I would be +1 on having the plugin in the parent (with
>> PMD and Findbugs as mentioned by Gary), I am still reluctant with
>> adopting a general checkstyle *configuration* for all components, and
>> I make you a sample: commons-ognl.
>>
>> main OGNL contributors have been olamy, mcucchiara, grobmeier and
>> simonetripodi <http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>.
>> We all (except grobmeier :P) like the mvn style (brought by
>> checkstyle-plugin) and we are comfortable on working with it. No one
>> else committed on OGNL.
>> So please explain me why the PMC should "force" OGNL guys on adopting
>> a different style in a component where just a small subset of commons
>> people (mainly Struts guys) is interested.
>>
>> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
>> which style has to be applied: -1. Good practice are one thing, strict
>> rules are different.
>
> I think it is reasonable to have Commons wide defaults but let projects override them if they want to.
>
> Ralph
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Ralph Goers <rg...@apache.org>.
On Feb 19, 2012, at 12:26 PM, Simone Tripodi <si...@apache.org> wrote:

> While I agree that checkstyle has to be consistent inside each
> component, so I would be +1 on having the plugin in the parent (with
> PMD and Findbugs as mentioned by Gary), I am still reluctant with
> adopting a general checkstyle *configuration* for all components, and
> I make you a sample: commons-ognl.
> 
> main OGNL contributors have been olamy, mcucchiara, grobmeier and
> simonetripodi <http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>.
> We all (except grobmeier :P) like the mvn style (brought by
> checkstyle-plugin) and we are comfortable on working with it. No one
> else committed on OGNL.
> So please explain me why the PMC should "force" OGNL guys on adopting
> a different style in a component where just a small subset of commons
> people (mainly Struts guys) is interested.
> 
> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
> which style has to be applied: -1. Good practice are one thing, strict
> rules are different.

I think it is reasonable to have Commons wide defaults but let projects override them if they want to.

Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Christian Grobmeier <gr...@gmail.com>.
On Sun, Feb 19, 2012 at 9:26 PM, Simone Tripodi
<si...@apache.org> wrote:
> main OGNL contributors have been olamy, mcucchiara, grobmeier and
> simonetripodi <http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>.
> We all (except grobmeier :P) like the mvn style (brought by
> checkstyle-plugin) and we are comfortable on working with it. No one
> else committed on OGNL.

haha I always forget there are actually people who LIKE this convention ;-)

> So please explain me why the PMC should "force" OGNL guys on adopting
> a different style in a component where just a small subset of commons
> people (mainly Struts guys) is interested.

its maybe my fault. I tend to think of Commons as one project which
should follow one convention. Actually it is many little projects
which are too small to become a tlp. My thought about standard code
style: contributors can get into the code more easily. But hey, it is
just a minor plus here, I agree. So please read on.

> Concluding: PMD, findbugs and checkstyle by default: +1; deciding
> which style has to be applied: -1. Good practice are one thing, strict
> rules are different.

Ok I follow your argument and expand it because I like it.

Then it would be ok for a component to use gradle instead of maven (in
theory)? The pom.xml is an artwork, but it is far from being easy to
understand or even easy to use.  Why do we have so many discussions on
jdk 5 or not? On can we break bc or not? Dont get me wrong - I am fine
with what you say. Let component committers decide (even when it means
i am overruled on ognl case haha). And a component committer is
somebody who actually commits code to the component - not just fixing
typos in the website or caring on the clirr report.

But then please let us apply generics to collections, because to my
knowledge most of the committers want them. Let us break backwards
compatibility (with major version bumps) when component committers
feel like that without huge discussions. This approach might lead us
to a more agile Commons with more releases on up-to-date technologies
and I gladly will commit code the maven way.

Cheers
Christian


>
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Sun, Feb 19, 2012 at 4:26 PM, Christian Grobmeier
> <gr...@gmail.com> wrote:
>> On Sun, Feb 19, 2012 at 4:23 PM, Ralph Goers <rg...@apache.org> wrote:
>>> On Feb 19, 2012, at 6:55 AM, Simone Tripodi <si...@apache.org> wrote:
>>>
>>>>> Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.
>>>>>
>>>>
>>>> I continue seeing it an imposition that can be avoided, since not
>>>> everybody commits in each component.
>>>> I switched across components and I just respected the original code
>>>> format (well, not always true, because I reformatted Discovery and
>>>> still regret for it) - that doesn't mean that style was always the
>>>> same, since each component defined its own config (and often the
>>>> exception rules)
>>>>
>>>> If a common style has to be applied to all commons components, IMHO a
>>>> VOTE should be subjected to the PMC
>>>
>>> I agree with that.  However, there is nothing wrong with discussing it first to see if a vote is even warranted.
>>
>> If the question is to have a common commons codestyle, so yes. I think
>> public projects should follow standards. And there are sun/oracle
>> coding conventions.
>>
>> Cheers
>> Christian
>>
>>>
>>> Ralph
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>



-- 
http://www.grobmeier.de
https://www.timeandbill.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Simone Tripodi <si...@apache.org>.
While I agree that checkstyle has to be consistent inside each
component, so I would be +1 on having the plugin in the parent (with
PMD and Findbugs as mentioned by Gary), I am still reluctant with
adopting a general checkstyle *configuration* for all components, and
I make you a sample: commons-ognl.

main OGNL contributors have been olamy, mcucchiara, grobmeier and
simonetripodi <http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fcommons%2Fproper%2Fognl%2Ftrunk>.
We all (except grobmeier :P) like the mvn style (brought by
checkstyle-plugin) and we are comfortable on working with it. No one
else committed on OGNL.
So please explain me why the PMC should "force" OGNL guys on adopting
a different style in a component where just a small subset of commons
people (mainly Struts guys) is interested.

Concluding: PMD, findbugs and checkstyle by default: +1; deciding
which style has to be applied: -1. Good practice are one thing, strict
rules are different.

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Sun, Feb 19, 2012 at 4:26 PM, Christian Grobmeier
<gr...@gmail.com> wrote:
> On Sun, Feb 19, 2012 at 4:23 PM, Ralph Goers <rg...@apache.org> wrote:
>> On Feb 19, 2012, at 6:55 AM, Simone Tripodi <si...@apache.org> wrote:
>>
>>>> Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.
>>>>
>>>
>>> I continue seeing it an imposition that can be avoided, since not
>>> everybody commits in each component.
>>> I switched across components and I just respected the original code
>>> format (well, not always true, because I reformatted Discovery and
>>> still regret for it) - that doesn't mean that style was always the
>>> same, since each component defined its own config (and often the
>>> exception rules)
>>>
>>> If a common style has to be applied to all commons components, IMHO a
>>> VOTE should be subjected to the PMC
>>
>> I agree with that.  However, there is nothing wrong with discussing it first to see if a vote is even warranted.
>
> If the question is to have a common commons codestyle, so yes. I think
> public projects should follow standards. And there are sun/oracle
> coding conventions.
>
> Cheers
> Christian
>
>>
>> Ralph
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Common checkstyle (was Re: [vfs] checkstyle)

Posted by Christian Grobmeier <gr...@gmail.com>.
On Sun, Feb 19, 2012 at 4:23 PM, Ralph Goers <rg...@apache.org> wrote:
> On Feb 19, 2012, at 6:55 AM, Simone Tripodi <si...@apache.org> wrote:
>
>>> Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.
>>>
>>
>> I continue seeing it an imposition that can be avoided, since not
>> everybody commits in each component.
>> I switched across components and I just respected the original code
>> format (well, not always true, because I reformatted Discovery and
>> still regret for it) - that doesn't mean that style was always the
>> same, since each component defined its own config (and often the
>> exception rules)
>>
>> If a common style has to be applied to all commons components, IMHO a
>> VOTE should be subjected to the PMC
>
> I agree with that.  However, there is nothing wrong with discussing it first to see if a vote is even warranted.

If the question is to have a common commons codestyle, so yes. I think
public projects should follow standards. And there are sun/oracle
coding conventions.

Cheers
Christian

>
> Ralph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>



-- 
http://www.grobmeier.de
https://www.timeandbill.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Common checkstyle (was Re: [vfs] checkstyle)

Posted by Ralph Goers <rg...@apache.org>.
On Feb 19, 2012, at 6:55 AM, Simone Tripodi <si...@apache.org> wrote:

>> Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.
>> 
> 
> I continue seeing it an imposition that can be avoided, since not
> everybody commits in each component.
> I switched across components and I just respected the original code
> format (well, not always true, because I reformatted Discovery and
> still regret for it) - that doesn't mean that style was always the
> same, since each component defined its own config (and often the
> exception rules)
> 
> If a common style has to be applied to all commons components, IMHO a
> VOTE should be subjected to the PMC

I agree with that.  However, there is nothing wrong with discussing it first to see if a vote is even warranted.

Ralph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by sebb <se...@gmail.com>.
On 19 February 2012 14:55, Simone Tripodi <si...@apache.org> wrote:
>> Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.
>>
>
> I continue seeing it an imposition that can be avoided, since not
> everybody commits in each component.
> I switched across components and I just respected the original code
> format (well, not always true, because I reformatted Discovery and
> still regret for it) - that doesn't mean that style was always the
> same, since each component defined its own config (and often the
> exception rules)
>
> If a common style has to be applied to all commons components, IMHO a
> VOTE should be subjected to the PMC

+1, well said.

> my 2 cents, best,
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Simone Tripodi <si...@apache.org>.
> Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.
>

I continue seeing it an imposition that can be avoided, since not
everybody commits in each component.
I switched across components and I just respected the original code
format (well, not always true, because I reformatted Discovery and
still regret for it) - that doesn't mean that style was always the
same, since each component defined its own config (and often the
exception rules)

If a common style has to be applied to all commons components, IMHO a
VOTE should be subjected to the PMC

my 2 cents, best,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <rg...@apache.org>.
On Feb 19, 2012, at 5:12 AM, Simone Tripodi <si...@apache.org> wrote:

>> I'm +1 as well. A common style would make development easier. I think configuration files should be downloadable from commons website. Maybe that will spare some "good patch but there are some style issues..." replies to new contributors. ;-)
>> 
> 
> -1 we've let each component developers the freedom to choice their
> preferred style. What is the reason to tie down the whole community to
> a unique style? What will be next? The ASF style? seriously?

Unlike Commons, you have to be granted permission to commit at other projects at the ASF and each of them have their own PMC and build their own communities.  Commons is a single community and thus it makes sense for developers to be able to easily switch between sub projects. Having commonality between the projects encourages that as it means you don't have to figure out what style settings you need as you switch between projects.


> 
>> 
>>> 
>>> I use IntelliJ so obviously I'd want a style that it can handle.  FWIW, Jetbrains provides a free license for the full product for open source development or you can use the community edition.
>> 
>> So are you suggesting that everybody should use IntelliJ? I use eclipse and I'm happy with that (Most of the time ;-)
>> 
> 
> +1 as well, users have to feel free to choice their preferred IDE -
> even EMACS/vi if they feel comfortable with it :)
> 

Yes, that was pretty much the point. Eclipse is not the only IDE.

Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Simone Tripodi <si...@apache.org>.
> I'm +1 as well. A common style would make development easier. I think configuration files should be downloadable from commons website. Maybe that will spare some "good patch but there are some style issues..." replies to new contributors. ;-)
>

-1 we've let each component developers the freedom to choice their
preferred style. What is the reason to tie down the whole community to
a unique style? What will be next? The ASF style? seriously?

>
>>
>> I use IntelliJ so obviously I'd want a style that it can handle.  FWIW, Jetbrains provides a free license for the full product for open source development or you can use the community edition.
>
> So are you suggesting that everybody should use IntelliJ? I use eclipse and I'm happy with that (Most of the time ;-)
>

+1 as well, users have to feel free to choice their preferred IDE -
even EMACS/vi if they feel comfortable with it :)

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Sun, Feb 19, 2012 at 9:50 AM, Benedikt Ritter
<be...@systemoutprintln.de> wrote:
>
> Am 18.02.2012 um 19:06 schrieb Ralph Goers <ra...@dslextreme.com>:
>
>>
>> On Feb 18, 2012, at 8:54 AM, Luc Maisonobe wrote:
>>
>>> Le 18/02/2012 17:27, Gary Gregory a écrit :
>>>> On Feb 18, 2012, at 11:00, Oliver Heger <ol...@oliver-heger.de> wrote:
>>>>
>>>>> Am 18.02.2012 15:25, schrieb Ralph Goers:
>>>>>>
>>>>>> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>>>>>>
>>>>>>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>>>>>>
>>>>>>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>>>>>>
>>>>>>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>>>>>>> when I created the checkstyle configuration I started from the one used by
>>>>>>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>>>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>>>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>>>>>>> checkstyle configuration.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>>>>>>> it once and for all.
>>>>>>>
>>>>>>> Are we sure all components use the same style ?
>>>>>>> The checkstyle.xml file for [math] origin has evolved its own way,
>>>>>>> partly when the mantissa library has been merged. I am pretty sure it is
>>>>>>> not compatible with other ones.
>>>>>>
>>>>>> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?
>>>>>
>>>>> For instance, [configuration] has a different coding style than [lang].
>>>>> Personally, I do not prefer one format over the other. I am +1 for a
>>>>> commons wide checkstyle policy. However, doing the reformatting is
>>>>> probably a pain.
>>>>
>>>> We can pick a format that IDEs can perform automatically.
>>>
>>> The style we use for [math] has an eclipse configuration counterpart at
>>> <http://people.apache.org/~luc/Apache-commons.xml> which does almost
>>> everything automatically. There is only one gltich I was not able to
>>> fix: the indent size of the "throws" statement in method signatures
>>> which cannot be set to any value on which checkstyle and eclipse could
>>> agree. So when we do automatic formatting with eclipse, these lines are
>>> flagged by checkstyle as having wrong indentation. I did not check since
>>> one or two years, though, so there may be a setting for this now.
>

>>
>> Ralph
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Am 18.02.2012 um 19:06 schrieb Ralph Goers <ra...@dslextreme.com>:

> 
> On Feb 18, 2012, at 8:54 AM, Luc Maisonobe wrote:
> 
>> Le 18/02/2012 17:27, Gary Gregory a écrit :
>>> On Feb 18, 2012, at 11:00, Oliver Heger <ol...@oliver-heger.de> wrote:
>>> 
>>>> Am 18.02.2012 15:25, schrieb Ralph Goers:
>>>>> 
>>>>> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>>>>> 
>>>>>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>>>>> 
>>>>>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>>>>> 
>>>>>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>>>>>> when I created the checkstyle configuration I started from the one used by
>>>>>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>>>>>> checkstyle configuration.
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>>>>>> it once and for all.
>>>>>> 
>>>>>> Are we sure all components use the same style ?
>>>>>> The checkstyle.xml file for [math] origin has evolved its own way,
>>>>>> partly when the mantissa library has been merged. I am pretty sure it is
>>>>>> not compatible with other ones.
>>>>> 
>>>>> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?
>>>> 
>>>> For instance, [configuration] has a different coding style than [lang].
>>>> Personally, I do not prefer one format over the other. I am +1 for a
>>>> commons wide checkstyle policy. However, doing the reformatting is
>>>> probably a pain.
>>> 
>>> We can pick a format that IDEs can perform automatically.
>> 
>> The style we use for [math] has an eclipse configuration counterpart at
>> <http://people.apache.org/~luc/Apache-commons.xml> which does almost
>> everything automatically. There is only one gltich I was not able to
>> fix: the indent size of the "throws" statement in method signatures
>> which cannot be set to any value on which checkstyle and eclipse could
>> agree. So when we do automatic formatting with eclipse, these lines are
>> flagged by checkstyle as having wrong indentation. I did not check since
>> one or two years, though, so there may be a setting for this now.

I'm +1 as well. A common style would make development easier. I think configuration files should be downloadable from commons website. Maybe that will spare some "good patch but there are some style issues..." replies to new contributors. ;-)


> 
> I use IntelliJ so obviously I'd want a style that it can handle.  FWIW, Jetbrains provides a free license for the full product for open source development or you can use the community edition.

So are you suggesting that everybody should use IntelliJ? I use eclipse and I'm happy with that (Most of the time ;-)

> 
> Ralph
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
On Feb 18, 2012, at 8:54 AM, Luc Maisonobe wrote:

> Le 18/02/2012 17:27, Gary Gregory a écrit :
>> On Feb 18, 2012, at 11:00, Oliver Heger <ol...@oliver-heger.de> wrote:
>> 
>>> Am 18.02.2012 15:25, schrieb Ralph Goers:
>>>> 
>>>> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>>>> 
>>>>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>>>> 
>>>>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>>>> 
>>>>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>>>>> when I created the checkstyle configuration I started from the one used by
>>>>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>>>>> checkstyle configuration.
>>>>>>>> 
>>>>>>> 
>>>>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>>>>> it once and for all.
>>>>> 
>>>>> Are we sure all components use the same style ?
>>>>> The checkstyle.xml file for [math] origin has evolved its own way,
>>>>> partly when the mantissa library has been merged. I am pretty sure it is
>>>>> not compatible with other ones.
>>>> 
>>>> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?
>>> 
>>> For instance, [configuration] has a different coding style than [lang].
>>> Personally, I do not prefer one format over the other. I am +1 for a
>>> commons wide checkstyle policy. However, doing the reformatting is
>>> probably a pain.
>> 
>> We can pick a format that IDEs can perform automatically.
> 
> The style we use for [math] has an eclipse configuration counterpart at
> <http://people.apache.org/~luc/Apache-commons.xml> which does almost
> everything automatically. There is only one gltich I was not able to
> fix: the indent size of the "throws" statement in method signatures
> which cannot be set to any value on which checkstyle and eclipse could
> agree. So when we do automatic formatting with eclipse, these lines are
> flagged by checkstyle as having wrong indentation. I did not check since
> one or two years, though, so there may be a setting for this now.

I use IntelliJ so obviously I'd want a style that it can handle.  FWIW, Jetbrains provides a free license for the full product for open source development or you can use the community edition.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Luc Maisonobe <Lu...@free.fr>.
Le 18/02/2012 17:27, Gary Gregory a écrit :
> On Feb 18, 2012, at 11:00, Oliver Heger <ol...@oliver-heger.de> wrote:
> 
>> Am 18.02.2012 15:25, schrieb Ralph Goers:
>>>
>>> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>>>
>>>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>>>
>>>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>>>
>>>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>>>> when I created the checkstyle configuration I started from the one used by
>>>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>>>> checkstyle configuration.
>>>>>>>
>>>>>>
>>>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>>>> it once and for all.
>>>>
>>>> Are we sure all components use the same style ?
>>>> The checkstyle.xml file for [math] origin has evolved its own way,
>>>> partly when the mantissa library has been merged. I am pretty sure it is
>>>> not compatible with other ones.
>>>
>>> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?
>>
>> For instance, [configuration] has a different coding style than [lang].
>> Personally, I do not prefer one format over the other. I am +1 for a
>> commons wide checkstyle policy. However, doing the reformatting is
>> probably a pain.
> 
> We can pick a format that IDEs can perform automatically.

The style we use for [math] has an eclipse configuration counterpart at
<http://people.apache.org/~luc/Apache-commons.xml> which does almost
everything automatically. There is only one gltich I was not able to
fix: the indent size of the "throws" statement in method signatures
which cannot be set to any value on which checkstyle and eclipse could
agree. So when we do automatic formatting with eclipse, these lines are
flagged by checkstyle as having wrong indentation. I did not check since
one or two years, though, so there may be a setting for this now.

Luc


> 
> Gary
> 
>>
>> +1 to a common(s) set of reports, too.
>>
>> Oliver
>>
>>>
>>> Ralph
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Feb 18, 2012, at 11:00, Oliver Heger <ol...@oliver-heger.de> wrote:

> Am 18.02.2012 15:25, schrieb Ralph Goers:
>>
>> On Feb 18, 2012, at 3:20 AM, Luc Maisonobe<Lu...@free.fr>  wrote:
>>
>>> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>>>
>>>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>>>>
>>>>>> That seems like way too much effort for very little benefit.  In fact,
>>>>>> when I created the checkstyle configuration I started from the one used by
>>>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>>>> the existing code base.  I'd prefer that all of commons use the same
>>>>>> checkstyle configuration.
>>>>>>
>>>>>
>>>>> +1, that would be great, we could put it in the parent POM and be done with
>>>>> it once and for all.
>>>
>>> Are we sure all components use the same style ?
>>> The checkstyle.xml file for [math] origin has evolved its own way,
>>> partly when the mantissa library has been merged. I am pretty sure it is
>>> not compatible with other ones.
>>
>> That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?
>
> For instance, [configuration] has a different coding style than [lang].
> Personally, I do not prefer one format over the other. I am +1 for a
> commons wide checkstyle policy. However, doing the reformatting is
> probably a pain.

We can pick a format that IDEs can perform automatically.

Gary

>
> +1 to a common(s) set of reports, too.
>
> Oliver
>
>>
>> Ralph
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <rg...@apache.org>.
On Feb 18, 2012, at 3:20 AM, Luc Maisonobe <Lu...@free.fr> wrote:

> Le 17/02/2012 23:30, Ralph Goers a écrit :
>> 
>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>>> 
>>>> That seems like way too much effort for very little benefit.  In fact,
>>>> when I created the checkstyle configuration I started from the one used by
>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>> the existing code base.  I'd prefer that all of commons use the same
>>>> checkstyle configuration.
>>>> 
>>> 
>>> +1, that would be great, we could put it in the parent POM and be done with
>>> it once and for all.
> 
> Are we sure all components use the same style ?
> The checkstyle.xml file for [math] origin has evolved its own way,
> partly when the mantissa library has been merged. I am pretty sure it is
> not compatible with other ones.

That was kind of the point for using a single checkstyle config. Why should the various projects use different rules?

Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Luc Maisonobe <Lu...@free.fr>.
Le 17/02/2012 23:30, Ralph Goers a écrit :
> 
> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
> 
>> On Fri, Feb 17, 2012 at 5:05 PM, Ralph Goers <ra...@dslextreme.com>wrote:
>>
>>>
>>> On Feb 17, 2012, at 1:17 PM, Gary Gregory wrote:
>>>
>>>> On Fri, Feb 17, 2012 at 4:12 PM, Ralph Goers <ralph.goers@dslextreme.com
>>>> wrote:
>>>>
>>>>> Really?  I've gotten so used to putting the '{' at the end of the line
>>>>> that I assumed VFS was that way.
>>>>>
>>>>
>>>> I'm happy to change the style to what we both seem to consider normal
>>> but I
>>>> am not sure what the rest of the community feels like...
>>>
>>> That seems like way too much effort for very little benefit.  In fact,
>>> when I created the checkstyle configuration I started from the one used by
>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>> "errors" I didn't care about and that seemed to have been the convention of
>>> the existing code base.  I'd prefer that all of commons use the same
>>> checkstyle configuration.
>>>
>>
>> +1, that would be great, we could put it in the parent POM and be done with
>> it once and for all.

Are we sure all components use the same style ?
The checkstyle.xml file for [math] origin has evolved its own way,
partly when the mantissa library has been merged. I am pretty sure it is
not compatible with other ones.

Luc

>>
>> Can you have a checkstyle.xml reused that way?
> 
> Not easily.  If you look at how the checkstyle.xml is used in VFS you will see it is a bit of a hack. The plugin has
> 
> <configLocation>${vfs.parent.dir}/checkstyle.xml</configLocation>
> 
> In the parent the variable is defined as "." and in each module it is defined as needed to get it to the root.  If it is in commons parent it would have to be somewhere on the disk that it could be located.
> 
> the other way to do it is the way it is documented at http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html and requires a separate project just for checkstyle. I've always hated this solution but for a project like commons it probably makes the most sense.
> 
> Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <rg...@apache.org>.

On Feb 18, 2012, at 6:12 AM, Gary Gregory <ga...@gmail.com> wrote:

>> 
>>>> 
>>>> Can you have a checkstyle.xml reused that way?
>>> 
>>> Not easily.  If you look at how the checkstyle.xml is used in VFS you will see it is a bit of a hack. The plugin has
>>> 
>>> <configLocation>${vfs.parent.dir}/checkstyle.xml</configLocation>
>>> 
>>> In the parent the variable is defined as "." and in each module it is defined as needed to get it to the root.  If it is in commons parent it would have to be somewhere on the disk that it could be located.
>>> 
>>> the other way to do it is the way it is documented at http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html and requires a separate project just for checkstyle. I've always hated this solution but for a project like commons it probably makes the most sense.
> 
> Well, that's part of the overall parent issue.
> 
> I work on several commons project and it's a pain and ugly -- to me --
> to deal with arbitrary differences in style, reports and so on. The
> differences make common feel less, well, common.
> 
> For example I'd like to see cobertura, checkstyle, pmd and findbugs in
> all reports, so it makes sense to use the parent POM for that. Then,
> if a component has a need to do something different, it can override
> the parent POM. But it would need a good reason for that. If a new
> component is started, it gets all this for free. Especially for the
> sandbox.

I agree, but I have no idea if anyone else does. You could just do it and see what happens.

Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Feb 18, 2012, at 6:19, Luc Maisonobe <Lu...@free.fr> wrote:

> Le 17/02/2012 23:30, Ralph Goers a écrit :
>>
>> On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:
>>
>>> On Fri, Feb 17, 2012 at 5:05 PM, Ralph Goers <ra...@dslextreme.com>wrote:
>>>
>>>>
>>>> On Feb 17, 2012, at 1:17 PM, Gary Gregory wrote:
>>>>
>>>>> On Fri, Feb 17, 2012 at 4:12 PM, Ralph Goers <ralph.goers@dslextreme.com
>>>>> wrote:
>>>>>
>>>>>> Really?  I've gotten so used to putting the '{' at the end of the line
>>>>>> that I assumed VFS was that way.
>>>>>>
>>>>>
>>>>> I'm happy to change the style to what we both seem to consider normal
>>>> but I
>>>>> am not sure what the rest of the community feels like...
>>>>
>>>> That seems like way too much effort for very little benefit.  In fact,
>>>> when I created the checkstyle configuration I started from the one used by
>>>> Commons Configuration and then tweaked it to shut up a bunch of the
>>>> "errors" I didn't care about and that seemed to have been the convention of
>>>> the existing code base.  I'd prefer that all of commons use the same
>>>> checkstyle configuration.
>>>>
>>>
>>> +1, that would be great, we could put it in the parent POM and be done with
>>> it once and for all.
>
> Are we sure all components use the same style ?
> The checkstyle.xml file for [math] origin has evolved its own way,
> partly when the mantissa library has been merged. I am pretty sure it is
> not compatible with other ones.
>
> Luc
>
>>>
>>> Can you have a checkstyle.xml reused that way?
>>
>> Not easily.  If you look at how the checkstyle.xml is used in VFS you will see it is a bit of a hack. The plugin has
>>
>> <configLocation>${vfs.parent.dir}/checkstyle.xml</configLocation>
>>
>> In the parent the variable is defined as "." and in each module it is defined as needed to get it to the root.  If it is in commons parent it would have to be somewhere on the disk that it could be located.
>>
>> the other way to do it is the way it is documented at http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html and requires a separate project just for checkstyle. I've always hated this solution but for a project like commons it probably makes the most sense.

Well, that's part of the overall parent issue.

I work on several commons project and it's a pain and ugly -- to me --
to deal with arbitrary differences in style, reports and so on. The
differences make common feel less, well, common.

For example I'd like to see cobertura, checkstyle, pmd and findbugs in
all reports, so it makes sense to use the parent POM for that. Then,
if a component has a need to do something different, it can override
the parent POM. But it would need a good reason for that. If a new
component is started, it gets all this for free. Especially for the
sandbox.

Gary


>>
>> Ralph
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
On Feb 17, 2012, at 2:18 PM, Gary Gregory wrote:

> On Fri, Feb 17, 2012 at 5:05 PM, Ralph Goers <ra...@dslextreme.com>wrote:
> 
>> 
>> On Feb 17, 2012, at 1:17 PM, Gary Gregory wrote:
>> 
>>> On Fri, Feb 17, 2012 at 4:12 PM, Ralph Goers <ralph.goers@dslextreme.com
>>> wrote:
>>> 
>>>> Really?  I've gotten so used to putting the '{' at the end of the line
>>>> that I assumed VFS was that way.
>>>> 
>>> 
>>> I'm happy to change the style to what we both seem to consider normal
>> but I
>>> am not sure what the rest of the community feels like...
>> 
>> That seems like way too much effort for very little benefit.  In fact,
>> when I created the checkstyle configuration I started from the one used by
>> Commons Configuration and then tweaked it to shut up a bunch of the
>> "errors" I didn't care about and that seemed to have been the convention of
>> the existing code base.  I'd prefer that all of commons use the same
>> checkstyle configuration.
>> 
> 
> +1, that would be great, we could put it in the parent POM and be done with
> it once and for all.
> 
> Can you have a checkstyle.xml reused that way?

Not easily.  If you look at how the checkstyle.xml is used in VFS you will see it is a bit of a hack. The plugin has

<configLocation>${vfs.parent.dir}/checkstyle.xml</configLocation>

In the parent the variable is defined as "." and in each module it is defined as needed to get it to the root.  If it is in commons parent it would have to be somewhere on the disk that it could be located.

the other way to do it is the way it is documented at http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html and requires a separate project just for checkstyle. I've always hated this solution but for a project like commons it probably makes the most sense.

Ralph

Re: [vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Feb 17, 2012 at 5:05 PM, Ralph Goers <ra...@dslextreme.com>wrote:

>
> On Feb 17, 2012, at 1:17 PM, Gary Gregory wrote:
>
> > On Fri, Feb 17, 2012 at 4:12 PM, Ralph Goers <ralph.goers@dslextreme.com
> >wrote:
> >
> >> Really?  I've gotten so used to putting the '{' at the end of the line
> >> that I assumed VFS was that way.
> >>
> >
> > I'm happy to change the style to what we both seem to consider normal
> but I
> > am not sure what the rest of the community feels like...
>
> That seems like way too much effort for very little benefit.  In fact,
> when I created the checkstyle configuration I started from the one used by
> Commons Configuration and then tweaked it to shut up a bunch of the
> "errors" I didn't care about and that seemed to have been the convention of
> the existing code base.  I'd prefer that all of commons use the same
> checkstyle configuration.
>

+1, that would be great, we could put it in the parent POM and be done with
it once and for all.

Can you have a checkstyle.xml reused that way?

Gary

>
> Ralph
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

[vfs] checkstyle - was Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
On Feb 17, 2012, at 1:17 PM, Gary Gregory wrote:

> On Fri, Feb 17, 2012 at 4:12 PM, Ralph Goers <ra...@dslextreme.com>wrote:
> 
>> Really?  I've gotten so used to putting the '{' at the end of the line
>> that I assumed VFS was that way.
>> 
> 
> I'm happy to change the style to what we both seem to consider normal but I
> am not sure what the rest of the community feels like...

That seems like way too much effort for very little benefit.  In fact, when I created the checkstyle configuration I started from the one used by Commons Configuration and then tweaked it to shut up a bunch of the "errors" I didn't care about and that seemed to have been the convention of the existing code base.  I'd prefer that all of commons use the same checkstyle configuration.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Feb 17, 2012 at 4:12 PM, Ralph Goers <ra...@dslextreme.com>wrote:

> Really?  I've gotten so used to putting the '{' at the end of the line
> that I assumed VFS was that way.
>

I'm happy to change the style to what we both seem to consider normal but I
am not sure what the rest of the community feels like...

Gary


>
> Ralph
>
> On Feb 17, 2012, at 1:05 PM, Gary Gregory wrote:
>
> > On Fri, Feb 17, 2012 at 11:33 AM, Ralph Goers <
> ralph.goers@dslextreme.com>wrote:
> >
> >> I'm confused as to why you are having to fix so many checkstyle issues.
> I
> >> had thought I had them down to just a couple of classes.  In fact,
> putting
> >> the curly brace on the next line should cause a checkstyle error. Are
> you
> >> using the checktyle configuration that is in the project which is used
> to
> >> build the checkstyle report for the web site?
> >>
> >
> > Yes, all I am doing it: "m3 site".
> >
> > I do not like the stype of { on a line by iteself but all of VFS is coded
> > that way.
> >
> > Gary
> >
> >
> >>
> >> Ralph
> >>
> >> On Feb 16, 2012, at 12:38 PM, ggregory@apache.org wrote:
> >>
> >>> Author: ggregory
> >>> Date: Thu Feb 16 20:38:04 2012
> >>> New Revision: 1245166
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=1245166&view=rev
> >>> Log:
> >>> Fix Checkstyle issues.
> >>>
> >>> Modified:
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> >>>
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -454,7 +454,8 @@ public abstract class AbstractFileName i
> >>>     * @see #getType()
> >>>     * @see FileType#FILE
> >>>     */
> >>> -    public boolean isFile() throws FileSystemException {
> >>> +    public boolean isFile() throws FileSystemException
> >>> +    {
> >>>        // Use equals instead of == to avoid any class loader worries.
> >>>        return FileType.FILE.equals(this.getType());
> >>>    }
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -518,7 +518,8 @@ public abstract class AbstractFileObject
> >>>     * @see #getType()
> >>>     * @see FileType#FILE
> >>>     */
> >>> -    public boolean isFile() throws FileSystemException {
> >>> +    public boolean isFile() throws FileSystemException
> >>> +    {
> >>>        // Use equals instead of == to avoid any class loader worries.
> >>>        return FileType.FILE.equals(this.getType());
> >>>    }
> >>> @@ -531,7 +532,8 @@ public abstract class AbstractFileObject
> >>>     * @see #getType()
> >>>     * @see FileType#FOLDER
> >>>     */
> >>> -    public boolean isFolder() throws FileSystemException {
> >>> +    public boolean isFolder() throws FileSystemException
> >>> +    {
> >>>        // Use equals instead of == to avoid any class loader worries.
> >>>        return FileType.FOLDER.equals(this.getType());
> >>>    }
> >>> @@ -623,7 +625,8 @@ public abstract class AbstractFileObject
> >>>        try
> >>>        {
> >>>            return listFiles(Selectors.SELECT_ALL).iterator();
> >>> -        } catch (FileSystemException e)
> >>> +        }
> >>> +        catch (FileSystemException e)
> >>>        {
> >>>            throw new IllegalStateException(e);
> >>>        }
> >>> @@ -929,7 +932,7 @@ public abstract class AbstractFileObject
> >>>    }
> >>>
> >>>    /**
> >>> -     * Deletes this file, and all children matching the {@code
> selector}
> >>> +     * Deletes this file, and all children matching the {@code
> >> selector}.
> >>>     *
> >>>     * @param selector The FileSelector.
> >>>     * @return the number of deleted files.
> >>> @@ -1079,11 +1082,12 @@ public abstract class AbstractFileObject
> >>>    }
> >>>
> >>>    /**
> >>> -     * Compares two FileObjects (ignores case)
> >>> +     * Compares two FileObjects (ignores case).
> >>>     */
> >>>    public int compareTo(FileObject fo)
> >>>    {
> >>> -        if (fo == null) {
> >>> +        if (fo == null)
> >>> +        {
> >>>            return 1;
> >>>        }
> >>>        return this.toString().compareToIgnoreCase(fo.toString());
> >>> @@ -1091,6 +1095,7 @@ public abstract class AbstractFileObject
> >>>
> >>>    /**
> >>>     * Copies another file to this file.
> >>> +     *
> >>>     * @param file The FileObject to copy.
> >>>     * @param selector The FileSelector.
> >>>     * @throws FileSystemException if an error occurs.
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -310,7 +310,7 @@ public final class DefaultFileContent im
> >>>        }
> >>>        catch (final Exception e)
> >>>        {
> >>> -            throw new
> >> FileSystemException("vfs.provider/set-attribute.error", e,attrName,
> >> fileObject);
> >>> +            throw new
> >> FileSystemException("vfs.provider/set-attribute.error", e, attrName,
> >> fileObject);
> >>>        }
> >>>
> >>>        if (attrs != null)
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
> >>> public class HttpFileNameParser extends URLFileNameParser
> >>> {
> >>>    private static final int DEFAULT_PORT = 80;
> >>> -
> >>> +
> >>>    private static final HttpFileNameParser INSTANCE = new
> >> HttpFileNameParser();
> >>>
> >>>    public HttpFileNameParser()
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
> >>> public class HttpsFileNameParser extends URLFileNameParser
> >>> {
> >>>    private static final int DEFAULT_PORT = 443;
> >>> -
> >>> +
> >>>    private static final HttpsFileNameParser INSTANCE = new
> >> HttpsFileNameParser();
> >>>
> >>>    public HttpsFileNameParser()
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -136,7 +136,7 @@ public class RamFileObject extends Abstr
> >>>    protected void doDelete() throws Exception
> >>>    {
> >>>
> >>> -        if (this.isContentOpen())
> >>> +        if (this.isContentOpen())
> >>>        {
> >>>            throw new FileSystemException(this.getName() + " cannot be
> >> deleted while the file is openg");
> >>>        }
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -296,7 +296,8 @@ public final class SftpClientFactory
> >>>
> >>>    private static class JSchLogger implements Logger
> >>>    {
> >>> -        public boolean isEnabled(int level) {
> >>> +        public boolean isEnabled(int level)
> >>> +        {
> >>>            switch (level)
> >>>            {
> >>>                case FATAL:
> >>> @@ -315,7 +316,8 @@ public final class SftpClientFactory
> >>>            }
> >>>        }
> >>>
> >>> -        public void log(int level, String msg) {
> >>> +        public void log(int level, String msg)
> >>> +        {
> >>>            switch (level)
> >>>            {
> >>>                case FATAL:
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -53,6 +53,8 @@ import com.jcraft.jsch.SftpException;
> >>> */
> >>> public class SftpFileObject extends AbstractFileObject
> >>> {
> >>> +    private static final long MOD_TIME_FACTOR = 1000L;
> >>> +
> >>>    private final SftpFileSystem fileSystem;
> >>>    private SftpATTRS attrs;
> >>>    private final String relPath;
> >>> @@ -75,7 +77,10 @@ public class SftpFileObject extends Abst
> >>>        attrs = null;
> >>>    }
> >>>
> >>> -    /** @since 2.0 */
> >>> +    /**
> >>> +     * @throws FileSystemException if error occurs.
> >>> +     * @since 2.0
> >>> +     */
> >>>    @Override
> >>>    public void refresh() throws FileSystemException
> >>>    {
> >>> @@ -223,7 +228,7 @@ public class SftpFileObject extends Abst
> >>>            throw new FileSystemException(
> >>>                    "vfs.provider.sftp/unknown-modtime.error");
> >>>        }
> >>> -        return attrs.getMTime() * 1000L;
> >>> +        return attrs.getMTime() * MOD_TIME_FACTOR;
> >>>    }
> >>>
> >>>    /**
> >>> @@ -241,7 +246,7 @@ public class SftpFileObject extends Abst
> >>>        final ChannelSftp channel = fileSystem.getChannel();
> >>>        try
> >>>        {
> >>> -            int newMTime = (int) (modtime / 1000L);
> >>> +            int newMTime = (int) (modtime / MOD_TIME_FACTOR);
> >>>
> >>>            attrs.setACMODTIME(attrs.getATime(), newMTime);
> >>>            channel.setStat(relPath, attrs);
> >>> @@ -301,7 +306,8 @@ public class SftpFileObject extends Abst
> >>>    protected FileObject[] doListChildrenResolved() throws Exception
> >>>    {
> >>>        // should not require a round-trip because type is already set.
> >>> -        if (this.isFile()) {
> >>> +        if (this.isFile())
> >>> +        {
> >>>            return null;
> >>>        }
> >>>        // List the contents of the folder
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -45,6 +45,8 @@ public class SftpFileSystem
> >>>    implements FileSystem
> >>> {
> >>>
> >>> +    private static final long LAST_MOD_TIME_ACCURACY = 1000L;
> >>> +
> >>>    private Session session;
> >>>    // private final JSch jSch;
> >>>    private ChannelSftp idleChannel;
> >>> @@ -196,13 +198,13 @@ public class SftpFileSystem
> >>>    }
> >>>
> >>>    /**
> >>> -     * last mod time is only a int and in seconds, thus can be off by
> >> 999.
> >>> +     * Last mod time is only a int and in seconds, thus can be off by
> >> 999.
> >>>     *
> >>>     * @return 1000
> >>>     */
> >>>    @Override
> >>>    public double getLastModTimeAccuracy()
> >>>    {
> >>> -        return 1000L;
> >>> +        return LAST_MOD_TIME_ACCURACY;
> >>>    }
> >>> }
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -96,7 +96,10 @@ public final class SftpFileSystemConfigB
> >>>            return true;
> >>>        }
> >>>
> >>> -        /** @since 2.0 */
> >>> +        /**
> >>> +         * @return  a hash code value for this object.
> >>> +         * @since 2.0
> >>> +         */
> >>>        @Override
> >>>        public int hashCode()
> >>>        {
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -48,6 +48,8 @@ import org.apache.commons.vfs2.provider.
> >>> */
> >>> public class TarFileSystem extends AbstractFileSystem implements
> >> FileSystem
> >>> {
> >>> +    private static final int DEFAULT_INDEX_SIZE = 100;
> >>> +
> >>>    private static final Log LOG =
> >> LogFactory.getLog(TarFileSystem.class);
> >>>
> >>>    private final File file;
> >>> @@ -82,7 +84,7 @@ public class TarFileSystem extends Abstr
> >>>        // Build the index
> >>>        try
> >>>        {
> >>> -            List<TarFileObject> strongRef = new
> >> ArrayList<TarFileObject>(100);
> >>> +            List<TarFileObject> strongRef = new
> >> ArrayList<TarFileObject>(DEFAULT_INDEX_SIZE);
> >>>            TarArchiveEntry entry;
> >>>            while ((entry = getTarFile().getNextTarEntry()) != null)
> >>>            {
> >>>
> >>> Modified:
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> >>> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >>>
> >>
> ==============================================================================
> >>> ---
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> >> (original)
> >>> +++
> >>
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> >> Thu Feb 16 20:38:04 2012
> >>> @@ -32,9 +32,8 @@ public final class Messages
> >>>    /**
> >>>     * Map from message code to MessageFormat object for the message.
> >>>     */
> >>> -    private static ConcurrentMap<String, MessageFormat> messages =
> >>> -        new ConcurrentHashMap<String, MessageFormat>();
> >>> -    private static final ResourceBundle resources = new
> >> CombinedResources("org.apache.commons.vfs2.Resources");
> >>> +    private static ConcurrentMap<String, MessageFormat> MessageMap =
> >> new ConcurrentHashMap<String, MessageFormat>();
> >>> +    private static final ResourceBundle RESOURCES = new
> >> CombinedResources("org.apache.commons.vfs2.Resources");
> >>>
> >>>    private Messages()
> >>>    {
> >>> @@ -53,7 +52,7 @@ public final class Messages
> >>>
> >>>    /**
> >>>     * Formats a message.
> >>> -     *
> >>> +     *
> >>>     * @param code
> >>>     *            The message code.
> >>>     * @param param
> >>> @@ -100,15 +99,15 @@ public final class Messages
> >>>        throws MissingResourceException
> >>>    {
> >>>        // Check if the message is cached
> >>> -        MessageFormat msg = messages.get(code);
> >>> +        MessageFormat msg = MessageMap.get(code);
> >>>        if (msg != null)
> >>>        {
> >>>            return msg;
> >>>        }
> >>>
> >>> -        final String msgText = resources.getString(code);
> >>> +        final String msgText = RESOURCES.getString(code);
> >>>        msg = new MessageFormat(msgText);
> >>> -        messages.putIfAbsent(code, msg);
> >>> -        return messages.get(code);
> >>> +        MessageMap.putIfAbsent(code, msg);
> >>> +        return MessageMap.get(code);
> >>>    }
> >>> }
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
Really?  I've gotten so used to putting the '{' at the end of the line that I assumed VFS was that way.  

Ralph

On Feb 17, 2012, at 1:05 PM, Gary Gregory wrote:

> On Fri, Feb 17, 2012 at 11:33 AM, Ralph Goers <ra...@dslextreme.com>wrote:
> 
>> I'm confused as to why you are having to fix so many checkstyle issues. I
>> had thought I had them down to just a couple of classes.  In fact, putting
>> the curly brace on the next line should cause a checkstyle error. Are you
>> using the checktyle configuration that is in the project which is used to
>> build the checkstyle report for the web site?
>> 
> 
> Yes, all I am doing it: "m3 site".
> 
> I do not like the stype of { on a line by iteself but all of VFS is coded
> that way.
> 
> Gary
> 
> 
>> 
>> Ralph
>> 
>> On Feb 16, 2012, at 12:38 PM, ggregory@apache.org wrote:
>> 
>>> Author: ggregory
>>> Date: Thu Feb 16 20:38:04 2012
>>> New Revision: 1245166
>>> 
>>> URL: http://svn.apache.org/viewvc?rev=1245166&view=rev
>>> Log:
>>> Fix Checkstyle issues.
>>> 
>>> Modified:
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>>> 
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -454,7 +454,8 @@ public abstract class AbstractFileName i
>>>     * @see #getType()
>>>     * @see FileType#FILE
>>>     */
>>> -    public boolean isFile() throws FileSystemException {
>>> +    public boolean isFile() throws FileSystemException
>>> +    {
>>>        // Use equals instead of == to avoid any class loader worries.
>>>        return FileType.FILE.equals(this.getType());
>>>    }
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -518,7 +518,8 @@ public abstract class AbstractFileObject
>>>     * @see #getType()
>>>     * @see FileType#FILE
>>>     */
>>> -    public boolean isFile() throws FileSystemException {
>>> +    public boolean isFile() throws FileSystemException
>>> +    {
>>>        // Use equals instead of == to avoid any class loader worries.
>>>        return FileType.FILE.equals(this.getType());
>>>    }
>>> @@ -531,7 +532,8 @@ public abstract class AbstractFileObject
>>>     * @see #getType()
>>>     * @see FileType#FOLDER
>>>     */
>>> -    public boolean isFolder() throws FileSystemException {
>>> +    public boolean isFolder() throws FileSystemException
>>> +    {
>>>        // Use equals instead of == to avoid any class loader worries.
>>>        return FileType.FOLDER.equals(this.getType());
>>>    }
>>> @@ -623,7 +625,8 @@ public abstract class AbstractFileObject
>>>        try
>>>        {
>>>            return listFiles(Selectors.SELECT_ALL).iterator();
>>> -        } catch (FileSystemException e)
>>> +        }
>>> +        catch (FileSystemException e)
>>>        {
>>>            throw new IllegalStateException(e);
>>>        }
>>> @@ -929,7 +932,7 @@ public abstract class AbstractFileObject
>>>    }
>>> 
>>>    /**
>>> -     * Deletes this file, and all children matching the {@code selector}
>>> +     * Deletes this file, and all children matching the {@code
>> selector}.
>>>     *
>>>     * @param selector The FileSelector.
>>>     * @return the number of deleted files.
>>> @@ -1079,11 +1082,12 @@ public abstract class AbstractFileObject
>>>    }
>>> 
>>>    /**
>>> -     * Compares two FileObjects (ignores case)
>>> +     * Compares two FileObjects (ignores case).
>>>     */
>>>    public int compareTo(FileObject fo)
>>>    {
>>> -        if (fo == null) {
>>> +        if (fo == null)
>>> +        {
>>>            return 1;
>>>        }
>>>        return this.toString().compareToIgnoreCase(fo.toString());
>>> @@ -1091,6 +1095,7 @@ public abstract class AbstractFileObject
>>> 
>>>    /**
>>>     * Copies another file to this file.
>>> +     *
>>>     * @param file The FileObject to copy.
>>>     * @param selector The FileSelector.
>>>     * @throws FileSystemException if an error occurs.
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -310,7 +310,7 @@ public final class DefaultFileContent im
>>>        }
>>>        catch (final Exception e)
>>>        {
>>> -            throw new
>> FileSystemException("vfs.provider/set-attribute.error", e,attrName,
>> fileObject);
>>> +            throw new
>> FileSystemException("vfs.provider/set-attribute.error", e, attrName,
>> fileObject);
>>>        }
>>> 
>>>        if (attrs != null)
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
>>> public class HttpFileNameParser extends URLFileNameParser
>>> {
>>>    private static final int DEFAULT_PORT = 80;
>>> -
>>> +
>>>    private static final HttpFileNameParser INSTANCE = new
>> HttpFileNameParser();
>>> 
>>>    public HttpFileNameParser()
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
>>> public class HttpsFileNameParser extends URLFileNameParser
>>> {
>>>    private static final int DEFAULT_PORT = 443;
>>> -
>>> +
>>>    private static final HttpsFileNameParser INSTANCE = new
>> HttpsFileNameParser();
>>> 
>>>    public HttpsFileNameParser()
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -136,7 +136,7 @@ public class RamFileObject extends Abstr
>>>    protected void doDelete() throws Exception
>>>    {
>>> 
>>> -        if (this.isContentOpen())
>>> +        if (this.isContentOpen())
>>>        {
>>>            throw new FileSystemException(this.getName() + " cannot be
>> deleted while the file is openg");
>>>        }
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -296,7 +296,8 @@ public final class SftpClientFactory
>>> 
>>>    private static class JSchLogger implements Logger
>>>    {
>>> -        public boolean isEnabled(int level) {
>>> +        public boolean isEnabled(int level)
>>> +        {
>>>            switch (level)
>>>            {
>>>                case FATAL:
>>> @@ -315,7 +316,8 @@ public final class SftpClientFactory
>>>            }
>>>        }
>>> 
>>> -        public void log(int level, String msg) {
>>> +        public void log(int level, String msg)
>>> +        {
>>>            switch (level)
>>>            {
>>>                case FATAL:
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -53,6 +53,8 @@ import com.jcraft.jsch.SftpException;
>>> */
>>> public class SftpFileObject extends AbstractFileObject
>>> {
>>> +    private static final long MOD_TIME_FACTOR = 1000L;
>>> +
>>>    private final SftpFileSystem fileSystem;
>>>    private SftpATTRS attrs;
>>>    private final String relPath;
>>> @@ -75,7 +77,10 @@ public class SftpFileObject extends Abst
>>>        attrs = null;
>>>    }
>>> 
>>> -    /** @since 2.0 */
>>> +    /**
>>> +     * @throws FileSystemException if error occurs.
>>> +     * @since 2.0
>>> +     */
>>>    @Override
>>>    public void refresh() throws FileSystemException
>>>    {
>>> @@ -223,7 +228,7 @@ public class SftpFileObject extends Abst
>>>            throw new FileSystemException(
>>>                    "vfs.provider.sftp/unknown-modtime.error");
>>>        }
>>> -        return attrs.getMTime() * 1000L;
>>> +        return attrs.getMTime() * MOD_TIME_FACTOR;
>>>    }
>>> 
>>>    /**
>>> @@ -241,7 +246,7 @@ public class SftpFileObject extends Abst
>>>        final ChannelSftp channel = fileSystem.getChannel();
>>>        try
>>>        {
>>> -            int newMTime = (int) (modtime / 1000L);
>>> +            int newMTime = (int) (modtime / MOD_TIME_FACTOR);
>>> 
>>>            attrs.setACMODTIME(attrs.getATime(), newMTime);
>>>            channel.setStat(relPath, attrs);
>>> @@ -301,7 +306,8 @@ public class SftpFileObject extends Abst
>>>    protected FileObject[] doListChildrenResolved() throws Exception
>>>    {
>>>        // should not require a round-trip because type is already set.
>>> -        if (this.isFile()) {
>>> +        if (this.isFile())
>>> +        {
>>>            return null;
>>>        }
>>>        // List the contents of the folder
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -45,6 +45,8 @@ public class SftpFileSystem
>>>    implements FileSystem
>>> {
>>> 
>>> +    private static final long LAST_MOD_TIME_ACCURACY = 1000L;
>>> +
>>>    private Session session;
>>>    // private final JSch jSch;
>>>    private ChannelSftp idleChannel;
>>> @@ -196,13 +198,13 @@ public class SftpFileSystem
>>>    }
>>> 
>>>    /**
>>> -     * last mod time is only a int and in seconds, thus can be off by
>> 999.
>>> +     * Last mod time is only a int and in seconds, thus can be off by
>> 999.
>>>     *
>>>     * @return 1000
>>>     */
>>>    @Override
>>>    public double getLastModTimeAccuracy()
>>>    {
>>> -        return 1000L;
>>> +        return LAST_MOD_TIME_ACCURACY;
>>>    }
>>> }
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -96,7 +96,10 @@ public final class SftpFileSystemConfigB
>>>            return true;
>>>        }
>>> 
>>> -        /** @since 2.0 */
>>> +        /**
>>> +         * @return  a hash code value for this object.
>>> +         * @since 2.0
>>> +         */
>>>        @Override
>>>        public int hashCode()
>>>        {
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -48,6 +48,8 @@ import org.apache.commons.vfs2.provider.
>>> */
>>> public class TarFileSystem extends AbstractFileSystem implements
>> FileSystem
>>> {
>>> +    private static final int DEFAULT_INDEX_SIZE = 100;
>>> +
>>>    private static final Log LOG =
>> LogFactory.getLog(TarFileSystem.class);
>>> 
>>>    private final File file;
>>> @@ -82,7 +84,7 @@ public class TarFileSystem extends Abstr
>>>        // Build the index
>>>        try
>>>        {
>>> -            List<TarFileObject> strongRef = new
>> ArrayList<TarFileObject>(100);
>>> +            List<TarFileObject> strongRef = new
>> ArrayList<TarFileObject>(DEFAULT_INDEX_SIZE);
>>>            TarArchiveEntry entry;
>>>            while ((entry = getTarFile().getNextTarEntry()) != null)
>>>            {
>>> 
>>> Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>>> URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>>> 
>> ==============================================================================
>>> ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>> (original)
>>> +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>> Thu Feb 16 20:38:04 2012
>>> @@ -32,9 +32,8 @@ public final class Messages
>>>    /**
>>>     * Map from message code to MessageFormat object for the message.
>>>     */
>>> -    private static ConcurrentMap<String, MessageFormat> messages =
>>> -        new ConcurrentHashMap<String, MessageFormat>();
>>> -    private static final ResourceBundle resources = new
>> CombinedResources("org.apache.commons.vfs2.Resources");
>>> +    private static ConcurrentMap<String, MessageFormat> MessageMap =
>> new ConcurrentHashMap<String, MessageFormat>();
>>> +    private static final ResourceBundle RESOURCES = new
>> CombinedResources("org.apache.commons.vfs2.Resources");
>>> 
>>>    private Messages()
>>>    {
>>> @@ -53,7 +52,7 @@ public final class Messages
>>> 
>>>    /**
>>>     * Formats a message.
>>> -     *
>>> +     *
>>>     * @param code
>>>     *            The message code.
>>>     * @param param
>>> @@ -100,15 +99,15 @@ public final class Messages
>>>        throws MissingResourceException
>>>    {
>>>        // Check if the message is cached
>>> -        MessageFormat msg = messages.get(code);
>>> +        MessageFormat msg = MessageMap.get(code);
>>>        if (msg != null)
>>>        {
>>>            return msg;
>>>        }
>>> 
>>> -        final String msgText = resources.getString(code);
>>> +        final String msgText = RESOURCES.getString(code);
>>>        msg = new MessageFormat(msgText);
>>> -        messages.putIfAbsent(code, msg);
>>> -        return messages.get(code);
>>> +        MessageMap.putIfAbsent(code, msg);
>>> +        return MessageMap.get(code);
>>>    }
>>> }
>>> 
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>> 
>> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
On Feb 17, 2012, at 2:16 PM, Gary Gregory wrote:

> On Fri, Feb 17, 2012 at 5:03 PM, Ralph Goers <ra...@dslextreme.com>wrote:
> 
>> 
>> What new features and did they really break the API? I'd really hate to go
>> to 3.0 after just getting 2.0 out.
>> 
> 
> "They" would really be me :)

By "they" I didn't mean who but what.

> 
> I looked at how we use VFS in our software at work and saw a lot of code
> that I felt should be in VFS, features like:
> 
> - Ask a FileObject simple questions like isFile() and isFolder() .
> - Do a bulk operation like FileObject.deleteAll().
> - Write FileContents to different kinds of objects like FileObject,
> FileContent and OutputStream.
> - and other stuff and trickles down from that.

So these were changes to the interface that will break any external providers but not impact callers?  I guess I could look at clirr but as I recall some of these were convenience methods. I'm wondering if they couldn't be done in such a way that they don't break compatibility (i.e. a new class with static helper methods, a wrapper object that adds the new methods, etc).

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Feb 17, 2012 at 5:03 PM, Ralph Goers <ra...@dslextreme.com>wrote:

>
> On Feb 17, 2012, at 1:09 PM, Gary Gregory wrote:
>
> > This is off topic on for this thread but I'll take all the help I can get
> > to move VFS to a new release :)
> >
> > I am happy with the fact that the build is now self sufficient WRT
> testing,
> > embedded servers are used to test HTTP and so on.
> >
> > There are a lot of Clirr "errors" due to new features which makes me
> wonder
> > if the next release should not be a 2.1 but a 3.0 with a package name
> > change.
> >
>
> What new features and did they really break the API? I'd really hate to go
> to 3.0 after just getting 2.0 out.
>

"They" would really be me :)

I looked at how we use VFS in our software at work and saw a lot of code
that I felt should be in VFS, features like:

- Ask a FileObject simple questions like isFile() and isFolder() .
- Do a bulk operation like FileObject.deleteAll().
- Write FileContents to different kinds of objects like FileObject,
FileContent and OutputStream.
- and other stuff and trickles down from that.

Gary

>
> We really should start planning for the Java 7 variant of VFS.  That will
> require its own branch.  I don't have a huge need for that at the moment
> (my employer has no plans to move to Java 7 yet), but it would be
> interesting to do.
>
> Ralph
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
On Feb 17, 2012, at 1:09 PM, Gary Gregory wrote:

> This is off topic on for this thread but I'll take all the help I can get
> to move VFS to a new release :)
> 
> I am happy with the fact that the build is now self sufficient WRT testing,
> embedded servers are used to test HTTP and so on.
> 
> There are a lot of Clirr "errors" due to new features which makes me wonder
> if the next release should not be a 2.1 but a 3.0 with a package name
> change.
> 

What new features and did they really break the API? I'd really hate to go to 3.0 after just getting 2.0 out.

We really should start planning for the Java 7 variant of VFS.  That will require its own branch.  I don't have a huge need for that at the moment (my employer has no plans to move to Java 7 yet), but it would be interesting to do.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
This is off topic on for this thread but I'll take all the help I can get
to move VFS to a new release :)

I am happy with the fact that the build is now self sufficient WRT testing,
embedded servers are used to test HTTP and so on.

There are a lot of Clirr "errors" due to new features which makes me wonder
if the next release should not be a 2.1 but a 3.0 with a package name
change.

Gary

On Fri, Feb 17, 2012 at 4:05 PM, Gary Gregory <ga...@gmail.com>wrote:

> On Fri, Feb 17, 2012 at 11:33 AM, Ralph Goers <ra...@dslextreme.com>wrote:
>
>> I'm confused as to why you are having to fix so many checkstyle issues. I
>> had thought I had them down to just a couple of classes.  In fact, putting
>> the curly brace on the next line should cause a checkstyle error. Are you
>> using the checktyle configuration that is in the project which is used to
>> build the checkstyle report for the web site?
>>
>
> Yes, all I am doing it: "m3 site".
>
> I do not like the stype of { on a line by iteself but all of VFS is coded
> that way.
>
> Gary
>
>
>>
>> Ralph
>>
>> On Feb 16, 2012, at 12:38 PM, ggregory@apache.org wrote:
>>
>> > Author: ggregory
>> > Date: Thu Feb 16 20:38:04 2012
>> > New Revision: 1245166
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1245166&view=rev
>> > Log:
>> > Fix Checkstyle issues.
>> >
>> > Modified:
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>> >
>>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -454,7 +454,8 @@ public abstract class AbstractFileName i
>> >      * @see #getType()
>> >      * @see FileType#FILE
>> >      */
>> > -    public boolean isFile() throws FileSystemException {
>> > +    public boolean isFile() throws FileSystemException
>> > +    {
>> >         // Use equals instead of == to avoid any class loader worries.
>> >         return FileType.FILE.equals(this.getType());
>> >     }
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -518,7 +518,8 @@ public abstract class AbstractFileObject
>> >      * @see #getType()
>> >      * @see FileType#FILE
>> >      */
>> > -    public boolean isFile() throws FileSystemException {
>> > +    public boolean isFile() throws FileSystemException
>> > +    {
>> >         // Use equals instead of == to avoid any class loader worries.
>> >         return FileType.FILE.equals(this.getType());
>> >     }
>> > @@ -531,7 +532,8 @@ public abstract class AbstractFileObject
>> >      * @see #getType()
>> >      * @see FileType#FOLDER
>> >      */
>> > -    public boolean isFolder() throws FileSystemException {
>> > +    public boolean isFolder() throws FileSystemException
>> > +    {
>> >         // Use equals instead of == to avoid any class loader worries.
>> >         return FileType.FOLDER.equals(this.getType());
>> >     }
>> > @@ -623,7 +625,8 @@ public abstract class AbstractFileObject
>> >         try
>> >         {
>> >             return listFiles(Selectors.SELECT_ALL).iterator();
>> > -        } catch (FileSystemException e)
>> > +        }
>> > +        catch (FileSystemException e)
>> >         {
>> >             throw new IllegalStateException(e);
>> >         }
>> > @@ -929,7 +932,7 @@ public abstract class AbstractFileObject
>> >     }
>> >
>> >     /**
>> > -     * Deletes this file, and all children matching the {@code
>> selector}
>> > +     * Deletes this file, and all children matching the {@code
>> selector}.
>> >      *
>> >      * @param selector The FileSelector.
>> >      * @return the number of deleted files.
>> > @@ -1079,11 +1082,12 @@ public abstract class AbstractFileObject
>> >     }
>> >
>> >     /**
>> > -     * Compares two FileObjects (ignores case)
>> > +     * Compares two FileObjects (ignores case).
>> >      */
>> >     public int compareTo(FileObject fo)
>> >     {
>> > -        if (fo == null) {
>> > +        if (fo == null)
>> > +        {
>> >             return 1;
>> >         }
>> >         return this.toString().compareToIgnoreCase(fo.toString());
>> > @@ -1091,6 +1095,7 @@ public abstract class AbstractFileObject
>> >
>> >     /**
>> >      * Copies another file to this file.
>> > +     *
>> >      * @param file The FileObject to copy.
>> >      * @param selector The FileSelector.
>> >      * @throws FileSystemException if an error occurs.
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -310,7 +310,7 @@ public final class DefaultFileContent im
>> >         }
>> >         catch (final Exception e)
>> >         {
>> > -            throw new
>> FileSystemException("vfs.provider/set-attribute.error", e,attrName,
>> fileObject);
>> > +            throw new
>> FileSystemException("vfs.provider/set-attribute.error", e, attrName,
>> fileObject);
>> >         }
>> >
>> >         if (attrs != null)
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
>> > public class HttpFileNameParser extends URLFileNameParser
>> > {
>> >     private static final int DEFAULT_PORT = 80;
>> > -
>> > +
>> >     private static final HttpFileNameParser INSTANCE = new
>> HttpFileNameParser();
>> >
>> >     public HttpFileNameParser()
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
>> > public class HttpsFileNameParser extends URLFileNameParser
>> > {
>> >     private static final int DEFAULT_PORT = 443;
>> > -
>> > +
>> >     private static final HttpsFileNameParser INSTANCE = new
>> HttpsFileNameParser();
>> >
>> >     public HttpsFileNameParser()
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -136,7 +136,7 @@ public class RamFileObject extends Abstr
>> >     protected void doDelete() throws Exception
>> >     {
>> >
>> > -        if (this.isContentOpen())
>> > +        if (this.isContentOpen())
>> >         {
>> >             throw new FileSystemException(this.getName() + " cannot be
>> deleted while the file is openg");
>> >         }
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -296,7 +296,8 @@ public final class SftpClientFactory
>> >
>> >     private static class JSchLogger implements Logger
>> >     {
>> > -        public boolean isEnabled(int level) {
>> > +        public boolean isEnabled(int level)
>> > +        {
>> >             switch (level)
>> >             {
>> >                 case FATAL:
>> > @@ -315,7 +316,8 @@ public final class SftpClientFactory
>> >             }
>> >         }
>> >
>> > -        public void log(int level, String msg) {
>> > +        public void log(int level, String msg)
>> > +        {
>> >             switch (level)
>> >             {
>> >                 case FATAL:
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -53,6 +53,8 @@ import com.jcraft.jsch.SftpException;
>> >  */
>> > public class SftpFileObject extends AbstractFileObject
>> > {
>> > +    private static final long MOD_TIME_FACTOR = 1000L;
>> > +
>> >     private final SftpFileSystem fileSystem;
>> >     private SftpATTRS attrs;
>> >     private final String relPath;
>> > @@ -75,7 +77,10 @@ public class SftpFileObject extends Abst
>> >         attrs = null;
>> >     }
>> >
>> > -    /** @since 2.0 */
>> > +    /**
>> > +     * @throws FileSystemException if error occurs.
>> > +     * @since 2.0
>> > +     */
>> >     @Override
>> >     public void refresh() throws FileSystemException
>> >     {
>> > @@ -223,7 +228,7 @@ public class SftpFileObject extends Abst
>> >             throw new FileSystemException(
>> >                     "vfs.provider.sftp/unknown-modtime.error");
>> >         }
>> > -        return attrs.getMTime() * 1000L;
>> > +        return attrs.getMTime() * MOD_TIME_FACTOR;
>> >     }
>> >
>> >     /**
>> > @@ -241,7 +246,7 @@ public class SftpFileObject extends Abst
>> >         final ChannelSftp channel = fileSystem.getChannel();
>> >         try
>> >         {
>> > -            int newMTime = (int) (modtime / 1000L);
>> > +            int newMTime = (int) (modtime / MOD_TIME_FACTOR);
>> >
>> >             attrs.setACMODTIME(attrs.getATime(), newMTime);
>> >             channel.setStat(relPath, attrs);
>> > @@ -301,7 +306,8 @@ public class SftpFileObject extends Abst
>> >     protected FileObject[] doListChildrenResolved() throws Exception
>> >     {
>> >         // should not require a round-trip because type is already set.
>> > -        if (this.isFile()) {
>> > +        if (this.isFile())
>> > +        {
>> >             return null;
>> >         }
>> >         // List the contents of the folder
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -45,6 +45,8 @@ public class SftpFileSystem
>> >     implements FileSystem
>> > {
>> >
>> > +    private static final long LAST_MOD_TIME_ACCURACY = 1000L;
>> > +
>> >     private Session session;
>> >     // private final JSch jSch;
>> >     private ChannelSftp idleChannel;
>> > @@ -196,13 +198,13 @@ public class SftpFileSystem
>> >     }
>> >
>> >     /**
>> > -     * last mod time is only a int and in seconds, thus can be off by
>> 999.
>> > +     * Last mod time is only a int and in seconds, thus can be off by
>> 999.
>> >      *
>> >      * @return 1000
>> >      */
>> >     @Override
>> >     public double getLastModTimeAccuracy()
>> >     {
>> > -        return 1000L;
>> > +        return LAST_MOD_TIME_ACCURACY;
>> >     }
>> > }
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -96,7 +96,10 @@ public final class SftpFileSystemConfigB
>> >             return true;
>> >         }
>> >
>> > -        /** @since 2.0 */
>> > +        /**
>> > +         * @return  a hash code value for this object.
>> > +         * @since 2.0
>> > +         */
>> >         @Override
>> >         public int hashCode()
>> >         {
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -48,6 +48,8 @@ import org.apache.commons.vfs2.provider.
>> >  */
>> > public class TarFileSystem extends AbstractFileSystem implements
>> FileSystem
>> > {
>> > +    private static final int DEFAULT_INDEX_SIZE = 100;
>> > +
>> >     private static final Log LOG =
>> LogFactory.getLog(TarFileSystem.class);
>> >
>> >     private final File file;
>> > @@ -82,7 +84,7 @@ public class TarFileSystem extends Abstr
>> >         // Build the index
>> >         try
>> >         {
>> > -            List<TarFileObject> strongRef = new
>> ArrayList<TarFileObject>(100);
>> > +            List<TarFileObject> strongRef = new
>> ArrayList<TarFileObject>(DEFAULT_INDEX_SIZE);
>> >             TarArchiveEntry entry;
>> >             while ((entry = getTarFile().getNextTarEntry()) != null)
>> >             {
>> >
>> > Modified:
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>> > URL:
>> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1245166&r1=1245165&r2=1245166&view=diff
>> >
>> ==============================================================================
>> > ---
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>> (original)
>> > +++
>> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
>> Thu Feb 16 20:38:04 2012
>> > @@ -32,9 +32,8 @@ public final class Messages
>> >     /**
>> >      * Map from message code to MessageFormat object for the message.
>> >      */
>> > -    private static ConcurrentMap<String, MessageFormat> messages =
>> > -        new ConcurrentHashMap<String, MessageFormat>();
>> > -    private static final ResourceBundle resources = new
>> CombinedResources("org.apache.commons.vfs2.Resources");
>> > +    private static ConcurrentMap<String, MessageFormat> MessageMap =
>> new ConcurrentHashMap<String, MessageFormat>();
>> > +    private static final ResourceBundle RESOURCES = new
>> CombinedResources("org.apache.commons.vfs2.Resources");
>> >
>> >     private Messages()
>> >     {
>> > @@ -53,7 +52,7 @@ public final class Messages
>> >
>> >     /**
>> >      * Formats a message.
>> > -     *
>> > +     *
>> >      * @param code
>> >      *            The message code.
>> >      * @param param
>> > @@ -100,15 +99,15 @@ public final class Messages
>> >         throws MissingResourceException
>> >     {
>> >         // Check if the message is cached
>> > -        MessageFormat msg = messages.get(code);
>> > +        MessageFormat msg = MessageMap.get(code);
>> >         if (msg != null)
>> >         {
>> >             return msg;
>> >         }
>> >
>> > -        final String msgText = resources.getString(code);
>> > +        final String msgText = RESOURCES.getString(code);
>> >         msg = new MessageFormat(msgText);
>> > -        messages.putIfAbsent(code, msg);
>> > -        return messages.get(code);
>> > +        MessageMap.putIfAbsent(code, msg);
>> > +        return MessageMap.get(code);
>> >     }
>> > }
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Feb 17, 2012 at 11:33 AM, Ralph Goers <ra...@dslextreme.com>wrote:

> I'm confused as to why you are having to fix so many checkstyle issues. I
> had thought I had them down to just a couple of classes.  In fact, putting
> the curly brace on the next line should cause a checkstyle error. Are you
> using the checktyle configuration that is in the project which is used to
> build the checkstyle report for the web site?
>

Yes, all I am doing it: "m3 site".

I do not like the stype of { on a line by iteself but all of VFS is coded
that way.

Gary


>
> Ralph
>
> On Feb 16, 2012, at 12:38 PM, ggregory@apache.org wrote:
>
> > Author: ggregory
> > Date: Thu Feb 16 20:38:04 2012
> > New Revision: 1245166
> >
> > URL: http://svn.apache.org/viewvc?rev=1245166&view=rev
> > Log:
> > Fix Checkstyle issues.
> >
> > Modified:
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> >
>  commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> Thu Feb 16 20:38:04 2012
> > @@ -454,7 +454,8 @@ public abstract class AbstractFileName i
> >      * @see #getType()
> >      * @see FileType#FILE
> >      */
> > -    public boolean isFile() throws FileSystemException {
> > +    public boolean isFile() throws FileSystemException
> > +    {
> >         // Use equals instead of == to avoid any class loader worries.
> >         return FileType.FILE.equals(this.getType());
> >     }
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> Thu Feb 16 20:38:04 2012
> > @@ -518,7 +518,8 @@ public abstract class AbstractFileObject
> >      * @see #getType()
> >      * @see FileType#FILE
> >      */
> > -    public boolean isFile() throws FileSystemException {
> > +    public boolean isFile() throws FileSystemException
> > +    {
> >         // Use equals instead of == to avoid any class loader worries.
> >         return FileType.FILE.equals(this.getType());
> >     }
> > @@ -531,7 +532,8 @@ public abstract class AbstractFileObject
> >      * @see #getType()
> >      * @see FileType#FOLDER
> >      */
> > -    public boolean isFolder() throws FileSystemException {
> > +    public boolean isFolder() throws FileSystemException
> > +    {
> >         // Use equals instead of == to avoid any class loader worries.
> >         return FileType.FOLDER.equals(this.getType());
> >     }
> > @@ -623,7 +625,8 @@ public abstract class AbstractFileObject
> >         try
> >         {
> >             return listFiles(Selectors.SELECT_ALL).iterator();
> > -        } catch (FileSystemException e)
> > +        }
> > +        catch (FileSystemException e)
> >         {
> >             throw new IllegalStateException(e);
> >         }
> > @@ -929,7 +932,7 @@ public abstract class AbstractFileObject
> >     }
> >
> >     /**
> > -     * Deletes this file, and all children matching the {@code selector}
> > +     * Deletes this file, and all children matching the {@code
> selector}.
> >      *
> >      * @param selector The FileSelector.
> >      * @return the number of deleted files.
> > @@ -1079,11 +1082,12 @@ public abstract class AbstractFileObject
> >     }
> >
> >     /**
> > -     * Compares two FileObjects (ignores case)
> > +     * Compares two FileObjects (ignores case).
> >      */
> >     public int compareTo(FileObject fo)
> >     {
> > -        if (fo == null) {
> > +        if (fo == null)
> > +        {
> >             return 1;
> >         }
> >         return this.toString().compareToIgnoreCase(fo.toString());
> > @@ -1091,6 +1095,7 @@ public abstract class AbstractFileObject
> >
> >     /**
> >      * Copies another file to this file.
> > +     *
> >      * @param file The FileObject to copy.
> >      * @param selector The FileSelector.
> >      * @throws FileSystemException if an error occurs.
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> Thu Feb 16 20:38:04 2012
> > @@ -310,7 +310,7 @@ public final class DefaultFileContent im
> >         }
> >         catch (final Exception e)
> >         {
> > -            throw new
> FileSystemException("vfs.provider/set-attribute.error", e,attrName,
> fileObject);
> > +            throw new
> FileSystemException("vfs.provider/set-attribute.error", e, attrName,
> fileObject);
> >         }
> >
> >         if (attrs != null)
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> Thu Feb 16 20:38:04 2012
> > @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
> > public class HttpFileNameParser extends URLFileNameParser
> > {
> >     private static final int DEFAULT_PORT = 80;
> > -
> > +
> >     private static final HttpFileNameParser INSTANCE = new
> HttpFileNameParser();
> >
> >     public HttpFileNameParser()
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> Thu Feb 16 20:38:04 2012
> > @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
> > public class HttpsFileNameParser extends URLFileNameParser
> > {
> >     private static final int DEFAULT_PORT = 443;
> > -
> > +
> >     private static final HttpsFileNameParser INSTANCE = new
> HttpsFileNameParser();
> >
> >     public HttpsFileNameParser()
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> Thu Feb 16 20:38:04 2012
> > @@ -136,7 +136,7 @@ public class RamFileObject extends Abstr
> >     protected void doDelete() throws Exception
> >     {
> >
> > -        if (this.isContentOpen())
> > +        if (this.isContentOpen())
> >         {
> >             throw new FileSystemException(this.getName() + " cannot be
> deleted while the file is openg");
> >         }
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> Thu Feb 16 20:38:04 2012
> > @@ -296,7 +296,8 @@ public final class SftpClientFactory
> >
> >     private static class JSchLogger implements Logger
> >     {
> > -        public boolean isEnabled(int level) {
> > +        public boolean isEnabled(int level)
> > +        {
> >             switch (level)
> >             {
> >                 case FATAL:
> > @@ -315,7 +316,8 @@ public final class SftpClientFactory
> >             }
> >         }
> >
> > -        public void log(int level, String msg) {
> > +        public void log(int level, String msg)
> > +        {
> >             switch (level)
> >             {
> >                 case FATAL:
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> Thu Feb 16 20:38:04 2012
> > @@ -53,6 +53,8 @@ import com.jcraft.jsch.SftpException;
> >  */
> > public class SftpFileObject extends AbstractFileObject
> > {
> > +    private static final long MOD_TIME_FACTOR = 1000L;
> > +
> >     private final SftpFileSystem fileSystem;
> >     private SftpATTRS attrs;
> >     private final String relPath;
> > @@ -75,7 +77,10 @@ public class SftpFileObject extends Abst
> >         attrs = null;
> >     }
> >
> > -    /** @since 2.0 */
> > +    /**
> > +     * @throws FileSystemException if error occurs.
> > +     * @since 2.0
> > +     */
> >     @Override
> >     public void refresh() throws FileSystemException
> >     {
> > @@ -223,7 +228,7 @@ public class SftpFileObject extends Abst
> >             throw new FileSystemException(
> >                     "vfs.provider.sftp/unknown-modtime.error");
> >         }
> > -        return attrs.getMTime() * 1000L;
> > +        return attrs.getMTime() * MOD_TIME_FACTOR;
> >     }
> >
> >     /**
> > @@ -241,7 +246,7 @@ public class SftpFileObject extends Abst
> >         final ChannelSftp channel = fileSystem.getChannel();
> >         try
> >         {
> > -            int newMTime = (int) (modtime / 1000L);
> > +            int newMTime = (int) (modtime / MOD_TIME_FACTOR);
> >
> >             attrs.setACMODTIME(attrs.getATime(), newMTime);
> >             channel.setStat(relPath, attrs);
> > @@ -301,7 +306,8 @@ public class SftpFileObject extends Abst
> >     protected FileObject[] doListChildrenResolved() throws Exception
> >     {
> >         // should not require a round-trip because type is already set.
> > -        if (this.isFile()) {
> > +        if (this.isFile())
> > +        {
> >             return null;
> >         }
> >         // List the contents of the folder
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> Thu Feb 16 20:38:04 2012
> > @@ -45,6 +45,8 @@ public class SftpFileSystem
> >     implements FileSystem
> > {
> >
> > +    private static final long LAST_MOD_TIME_ACCURACY = 1000L;
> > +
> >     private Session session;
> >     // private final JSch jSch;
> >     private ChannelSftp idleChannel;
> > @@ -196,13 +198,13 @@ public class SftpFileSystem
> >     }
> >
> >     /**
> > -     * last mod time is only a int and in seconds, thus can be off by
> 999.
> > +     * Last mod time is only a int and in seconds, thus can be off by
> 999.
> >      *
> >      * @return 1000
> >      */
> >     @Override
> >     public double getLastModTimeAccuracy()
> >     {
> > -        return 1000L;
> > +        return LAST_MOD_TIME_ACCURACY;
> >     }
> > }
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> Thu Feb 16 20:38:04 2012
> > @@ -96,7 +96,10 @@ public final class SftpFileSystemConfigB
> >             return true;
> >         }
> >
> > -        /** @since 2.0 */
> > +        /**
> > +         * @return  a hash code value for this object.
> > +         * @since 2.0
> > +         */
> >         @Override
> >         public int hashCode()
> >         {
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> Thu Feb 16 20:38:04 2012
> > @@ -48,6 +48,8 @@ import org.apache.commons.vfs2.provider.
> >  */
> > public class TarFileSystem extends AbstractFileSystem implements
> FileSystem
> > {
> > +    private static final int DEFAULT_INDEX_SIZE = 100;
> > +
> >     private static final Log LOG =
> LogFactory.getLog(TarFileSystem.class);
> >
> >     private final File file;
> > @@ -82,7 +84,7 @@ public class TarFileSystem extends Abstr
> >         // Build the index
> >         try
> >         {
> > -            List<TarFileObject> strongRef = new
> ArrayList<TarFileObject>(100);
> > +            List<TarFileObject> strongRef = new
> ArrayList<TarFileObject>(DEFAULT_INDEX_SIZE);
> >             TarArchiveEntry entry;
> >             while ((entry = getTarFile().getNextTarEntry()) != null)
> >             {
> >
> > Modified:
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> (original)
> > +++
> commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> Thu Feb 16 20:38:04 2012
> > @@ -32,9 +32,8 @@ public final class Messages
> >     /**
> >      * Map from message code to MessageFormat object for the message.
> >      */
> > -    private static ConcurrentMap<String, MessageFormat> messages =
> > -        new ConcurrentHashMap<String, MessageFormat>();
> > -    private static final ResourceBundle resources = new
> CombinedResources("org.apache.commons.vfs2.Resources");
> > +    private static ConcurrentMap<String, MessageFormat> MessageMap =
> new ConcurrentHashMap<String, MessageFormat>();
> > +    private static final ResourceBundle RESOURCES = new
> CombinedResources("org.apache.commons.vfs2.Resources");
> >
> >     private Messages()
> >     {
> > @@ -53,7 +52,7 @@ public final class Messages
> >
> >     /**
> >      * Formats a message.
> > -     *
> > +     *
> >      * @param code
> >      *            The message code.
> >      * @param param
> > @@ -100,15 +99,15 @@ public final class Messages
> >         throws MissingResourceException
> >     {
> >         // Check if the message is cached
> > -        MessageFormat msg = messages.get(code);
> > +        MessageFormat msg = MessageMap.get(code);
> >         if (msg != null)
> >         {
> >             return msg;
> >         }
> >
> > -        final String msgText = resources.getString(code);
> > +        final String msgText = RESOURCES.getString(code);
> >         msg = new MessageFormat(msgText);
> > -        messages.putIfAbsent(code, msg);
> > -        return messages.get(code);
> > +        MessageMap.putIfAbsent(code, msg);
> > +        return MessageMap.get(code);
> >     }
> > }
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: svn commit: r1245166 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: provider/ provider/http/ provider/https/ provider/ram/ provider/sftp/ provider/tar/ util/

Posted by Ralph Goers <ra...@dslextreme.com>.
I'm confused as to why you are having to fix so many checkstyle issues. I had thought I had them down to just a couple of classes.  In fact, putting the curly brace on the next line should cause a checkstyle error. Are you using the checktyle configuration that is in the project which is used to build the checkstyle report for the web site?

Ralph

On Feb 16, 2012, at 12:38 PM, ggregory@apache.org wrote:

> Author: ggregory
> Date: Thu Feb 16 20:38:04 2012
> New Revision: 1245166
> 
> URL: http://svn.apache.org/viewvc?rev=1245166&view=rev
> Log:
> Fix Checkstyle issues.
> 
> Modified:
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
>    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java Thu Feb 16 20:38:04 2012
> @@ -454,7 +454,8 @@ public abstract class AbstractFileName i
>      * @see #getType()
>      * @see FileType#FILE
>      */
> -    public boolean isFile() throws FileSystemException {
> +    public boolean isFile() throws FileSystemException
> +    {
>         // Use equals instead of == to avoid any class loader worries.
>         return FileType.FILE.equals(this.getType());
>     }
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java Thu Feb 16 20:38:04 2012
> @@ -518,7 +518,8 @@ public abstract class AbstractFileObject
>      * @see #getType()
>      * @see FileType#FILE
>      */
> -    public boolean isFile() throws FileSystemException {
> +    public boolean isFile() throws FileSystemException
> +    {
>         // Use equals instead of == to avoid any class loader worries.
>         return FileType.FILE.equals(this.getType());
>     }
> @@ -531,7 +532,8 @@ public abstract class AbstractFileObject
>      * @see #getType()
>      * @see FileType#FOLDER
>      */
> -    public boolean isFolder() throws FileSystemException {
> +    public boolean isFolder() throws FileSystemException
> +    {
>         // Use equals instead of == to avoid any class loader worries.
>         return FileType.FOLDER.equals(this.getType());
>     }
> @@ -623,7 +625,8 @@ public abstract class AbstractFileObject
>         try
>         {
>             return listFiles(Selectors.SELECT_ALL).iterator();
> -        } catch (FileSystemException e)
> +        }
> +        catch (FileSystemException e)
>         {
>             throw new IllegalStateException(e);
>         }
> @@ -929,7 +932,7 @@ public abstract class AbstractFileObject
>     }
> 
>     /**
> -     * Deletes this file, and all children matching the {@code selector}
> +     * Deletes this file, and all children matching the {@code selector}.
>      *
>      * @param selector The FileSelector.
>      * @return the number of deleted files.
> @@ -1079,11 +1082,12 @@ public abstract class AbstractFileObject
>     }
> 
>     /**
> -     * Compares two FileObjects (ignores case)
> +     * Compares two FileObjects (ignores case).
>      */
>     public int compareTo(FileObject fo)
>     {
> -        if (fo == null) {
> +        if (fo == null)
> +        {
>             return 1;
>         }
>         return this.toString().compareToIgnoreCase(fo.toString());
> @@ -1091,6 +1095,7 @@ public abstract class AbstractFileObject
> 
>     /**
>      * Copies another file to this file.
> +     *
>      * @param file The FileObject to copy.
>      * @param selector The FileSelector.
>      * @throws FileSystemException if an error occurs.
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java Thu Feb 16 20:38:04 2012
> @@ -310,7 +310,7 @@ public final class DefaultFileContent im
>         }
>         catch (final Exception e)
>         {
> -            throw new FileSystemException("vfs.provider/set-attribute.error", e,attrName, fileObject);
> +            throw new FileSystemException("vfs.provider/set-attribute.error", e, attrName, fileObject);
>         }
> 
>         if (attrs != null)
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java Thu Feb 16 20:38:04 2012
> @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
> public class HttpFileNameParser extends URLFileNameParser
> {
>     private static final int DEFAULT_PORT = 80;
> -    
> +
>     private static final HttpFileNameParser INSTANCE = new HttpFileNameParser();
> 
>     public HttpFileNameParser()
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java Thu Feb 16 20:38:04 2012
> @@ -26,7 +26,7 @@ import org.apache.commons.vfs2.provider.
> public class HttpsFileNameParser extends URLFileNameParser
> {
>     private static final int DEFAULT_PORT = 443;
> -    
> +
>     private static final HttpsFileNameParser INSTANCE = new HttpsFileNameParser();
> 
>     public HttpsFileNameParser()
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java Thu Feb 16 20:38:04 2012
> @@ -136,7 +136,7 @@ public class RamFileObject extends Abstr
>     protected void doDelete() throws Exception
>     {
> 
> -        if (this.isContentOpen()) 
> +        if (this.isContentOpen())
>         {
>             throw new FileSystemException(this.getName() + " cannot be deleted while the file is openg");
>         }
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java Thu Feb 16 20:38:04 2012
> @@ -296,7 +296,8 @@ public final class SftpClientFactory
> 
>     private static class JSchLogger implements Logger
>     {
> -        public boolean isEnabled(int level) {
> +        public boolean isEnabled(int level)
> +        {
>             switch (level)
>             {
>                 case FATAL:
> @@ -315,7 +316,8 @@ public final class SftpClientFactory
>             }
>         }
> 
> -        public void log(int level, String msg) {
> +        public void log(int level, String msg)
> +        {
>             switch (level)
>             {
>                 case FATAL:
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java Thu Feb 16 20:38:04 2012
> @@ -53,6 +53,8 @@ import com.jcraft.jsch.SftpException;
>  */
> public class SftpFileObject extends AbstractFileObject
> {
> +    private static final long MOD_TIME_FACTOR = 1000L;
> +
>     private final SftpFileSystem fileSystem;
>     private SftpATTRS attrs;
>     private final String relPath;
> @@ -75,7 +77,10 @@ public class SftpFileObject extends Abst
>         attrs = null;
>     }
> 
> -    /** @since 2.0 */
> +    /**
> +     * @throws FileSystemException if error occurs.
> +     * @since 2.0
> +     */
>     @Override
>     public void refresh() throws FileSystemException
>     {
> @@ -223,7 +228,7 @@ public class SftpFileObject extends Abst
>             throw new FileSystemException(
>                     "vfs.provider.sftp/unknown-modtime.error");
>         }
> -        return attrs.getMTime() * 1000L;
> +        return attrs.getMTime() * MOD_TIME_FACTOR;
>     }
> 
>     /**
> @@ -241,7 +246,7 @@ public class SftpFileObject extends Abst
>         final ChannelSftp channel = fileSystem.getChannel();
>         try
>         {
> -            int newMTime = (int) (modtime / 1000L);
> +            int newMTime = (int) (modtime / MOD_TIME_FACTOR);
> 
>             attrs.setACMODTIME(attrs.getATime(), newMTime);
>             channel.setStat(relPath, attrs);
> @@ -301,7 +306,8 @@ public class SftpFileObject extends Abst
>     protected FileObject[] doListChildrenResolved() throws Exception
>     {
>         // should not require a round-trip because type is already set.
> -        if (this.isFile()) {
> +        if (this.isFile())
> +        {
>             return null;
>         }
>         // List the contents of the folder
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java Thu Feb 16 20:38:04 2012
> @@ -45,6 +45,8 @@ public class SftpFileSystem
>     implements FileSystem
> {
> 
> +    private static final long LAST_MOD_TIME_ACCURACY = 1000L;
> +
>     private Session session;
>     // private final JSch jSch;
>     private ChannelSftp idleChannel;
> @@ -196,13 +198,13 @@ public class SftpFileSystem
>     }
> 
>     /**
> -     * last mod time is only a int and in seconds, thus can be off by 999.
> +     * Last mod time is only a int and in seconds, thus can be off by 999.
>      *
>      * @return 1000
>      */
>     @Override
>     public double getLastModTimeAccuracy()
>     {
> -        return 1000L;
> +        return LAST_MOD_TIME_ACCURACY;
>     }
> }
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java Thu Feb 16 20:38:04 2012
> @@ -96,7 +96,10 @@ public final class SftpFileSystemConfigB
>             return true;
>         }
> 
> -        /** @since 2.0 */
> +        /**
> +         * @return  a hash code value for this object.
> +         * @since 2.0
> +         */
>         @Override
>         public int hashCode()
>         {
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java Thu Feb 16 20:38:04 2012
> @@ -48,6 +48,8 @@ import org.apache.commons.vfs2.provider.
>  */
> public class TarFileSystem extends AbstractFileSystem implements FileSystem
> {
> +    private static final int DEFAULT_INDEX_SIZE = 100;
> +
>     private static final Log LOG = LogFactory.getLog(TarFileSystem.class);
> 
>     private final File file;
> @@ -82,7 +84,7 @@ public class TarFileSystem extends Abstr
>         // Build the index
>         try
>         {
> -            List<TarFileObject> strongRef = new ArrayList<TarFileObject>(100);
> +            List<TarFileObject> strongRef = new ArrayList<TarFileObject>(DEFAULT_INDEX_SIZE);
>             TarArchiveEntry entry;
>             while ((entry = getTarFile().getNextTarEntry()) != null)
>             {
> 
> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
> URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1245166&r1=1245165&r2=1245166&view=diff
> ==============================================================================
> --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java (original)
> +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java Thu Feb 16 20:38:04 2012
> @@ -32,9 +32,8 @@ public final class Messages
>     /**
>      * Map from message code to MessageFormat object for the message.
>      */
> -    private static ConcurrentMap<String, MessageFormat> messages =
> -        new ConcurrentHashMap<String, MessageFormat>();
> -    private static final ResourceBundle resources = new CombinedResources("org.apache.commons.vfs2.Resources");
> +    private static ConcurrentMap<String, MessageFormat> MessageMap = new ConcurrentHashMap<String, MessageFormat>();
> +    private static final ResourceBundle RESOURCES = new CombinedResources("org.apache.commons.vfs2.Resources");
> 
>     private Messages()
>     {
> @@ -53,7 +52,7 @@ public final class Messages
> 
>     /**
>      * Formats a message.
> -     * 
> +     *
>      * @param code
>      *            The message code.
>      * @param param
> @@ -100,15 +99,15 @@ public final class Messages
>         throws MissingResourceException
>     {
>         // Check if the message is cached
> -        MessageFormat msg = messages.get(code);
> +        MessageFormat msg = MessageMap.get(code);
>         if (msg != null)
>         {
>             return msg;
>         }
> 
> -        final String msgText = resources.getString(code);
> +        final String msgText = RESOURCES.getString(code);
>         msg = new MessageFormat(msgText);
> -        messages.putIfAbsent(code, msg);
> -        return messages.get(code);
> +        MessageMap.putIfAbsent(code, msg);
> +        return MessageMap.get(code);
>     }
> }
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org