maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r687025 - in /maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list: AbstractCvsListCommand.java CvsListConsumer.java
Date Tue, 19 Aug 2008 11:41:09 GMT
Author: vsiveton
Date: Tue Aug 19 04:41:08 2008
New Revision: 687025

URL: http://svn.apache.org/viewvc?rev=687025&view=rev
Log:
SCM-380: CvsStatusConsumer cannot be used for CvsJavaListCommand and CvsExeListCommand

o added license header
o formated code


Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/AbstractCvsListCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/CvsListConsumer.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/AbstractCvsListCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/AbstractCvsListCommand.java?rev=687025&r1=687024&r2=687025&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/AbstractCvsListCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/AbstractCvsListCommand.java
Tue Aug 19 04:41:08 2008
@@ -36,6 +36,7 @@
 
 /**
  * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
+ * @version $Id$
  */
 public abstract class AbstractCvsListCommand
     extends AbstractListCommand

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/CvsListConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/CvsListConsumer.java?rev=687025&r1=687024&r2=687025&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/CvsListConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/list/CvsListConsumer.java
Tue Aug 19 04:41:08 2008
@@ -1,5 +1,24 @@
 package org.apache.maven.scm.provider.cvslib.command.list;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import java.util.LinkedList;
 import java.util.List;
 
@@ -11,7 +30,7 @@
 
 /**
  * Parses CVS/Entries format, for example, like
- * 
+ *
  * <pre>
  * /checkoutlist/1.9/Wed Jan 26 19:08:06 2005/-kkv/
  * /commitinfo/1.10/Tue Jan 11 01:25:34 2005/-kkv/
@@ -19,45 +38,56 @@
  * D/directory1////
  * D/directory2////
  * </pre>
- * 
+ *
  * @author <a href="mailto:szakusov@emdev.ru">Sergey Zakusov</a>: implemented
to fix "Unknown file status" problem
+ * @version $Id$
  */
-public class CvsListConsumer implements StreamConsumer {
-
+public class CvsListConsumer
+    implements StreamConsumer
+{
     private ScmLogger m_logger;
-    private List      m_entries;
+
+    private List m_entries;
 
     /**
      * @param logger is a logger
      */
-    public CvsListConsumer(ScmLogger logger) {
-
+    public CvsListConsumer( ScmLogger logger )
+    {
         m_logger = logger;
         m_entries = new LinkedList();
     }
 
-    /**
-     * @see org.codehaus.plexus.util.cli.StreamConsumer#consumeLine(java.lang.String)
-     */
-    public void consumeLine(String i_line) {
-
-        m_logger.debug(i_line);
+    /** {@inheritDoc} */
+    public void consumeLine( String i_line )
+    {
+        if ( m_logger.isDebugEnabled() )
+        {
+            m_logger.debug( i_line );
+        }
 
-        String[] params = i_line.split("/");
-        if (params.length < 2) {
-            if (StringUtils.isNotEmpty(i_line)) {
-                m_logger.warn("Unable to parse it as CVS/Entries format: " + i_line + ".");
+        String[] params = i_line.split( "/" );
+        if ( params.length < 2 )
+        {
+            if ( StringUtils.isNotEmpty( i_line ) )
+            {
+                if ( m_logger.isWarnEnabled() )
+                {
+                    m_logger.warn( "Unable to parse it as CVS/Entries format: " + i_line
+ "." );
+                }
             }
-        } else {
-            m_entries.add(new ScmFile(params[1], ScmFileStatus.UNKNOWN));
+        }
+        else
+        {
+            m_entries.add( new ScmFile( params[1], ScmFileStatus.UNKNOWN ) );
         }
     }
 
     /**
      * @return Parse result
      */
-    public List getEntries() {
-
+    public List getEntries()
+    {
         return m_entries;
     }
 }



Mime
View raw message