commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r936831 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
Date Thu, 22 Apr 2010 13:21:01 GMT
Author: sebb
Date: Thu Apr 22 13:21:00 2010
New Revision: 936831

URL: http://svn.apache.org/viewvc?rev=936831&view=rev
Log:
No need for _matcher to be instance field
_preparse_pattern_ made final
Javadoc

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java?rev=936831&r1=936830&r2=936831&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
Thu Apr 22 13:21:00 2010
@@ -48,14 +48,12 @@ import org.apache.commons.net.ftp.FTPCli
 public class VMSVersioningFTPEntryParser extends VMSFTPEntryParser
 {
 
-    private Matcher _preparse_matcher_;
-    private Pattern _preparse_pattern_;
+    private final Pattern _preparse_pattern_;
     private static final String PRE_PARSE_REGEX =
         "(.*);([0-9]+)\\s*.*";
 
     /**
-     * Constructor for a VMSFTPEntryParser object.  Sets the versioning member
-     * to the supplied value.
+     * Constructor for a VMSFTPEntryParser object.
      *
      * @exception IllegalArgumentException
      * Thrown if the regular expression is unparseable.  Should not be seen
@@ -124,7 +122,7 @@ public class VMSVersioningFTPEntryParser
         while (iter.hasNext()) {
             String entry = iter.next().trim();
             MatchResult result = null;
-            _preparse_matcher_ = _preparse_pattern_.matcher(entry);
+            Matcher _preparse_matcher_ = _preparse_pattern_.matcher(entry);
             if (_preparse_matcher_.matches()) {
                 result = _preparse_matcher_.toMatchResult();
                 String name = result.group(1);
@@ -148,7 +146,7 @@ public class VMSVersioningFTPEntryParser
         while (iter.hasPrevious()) {
             String entry = iter.previous().trim();
             MatchResult result = null;
-            _preparse_matcher_ = _preparse_pattern_.matcher(entry);
+            Matcher _preparse_matcher_ = _preparse_pattern_.matcher(entry);
             if (_preparse_matcher_.matches()) {
                 result = _preparse_matcher_.toMatchResult();
                 String name = result.group(1);



Mime
View raw message