maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1055687 - in /maven/shared/trunk/maven-filtering/src: main/java/org/apache/maven/shared/filtering/ test/units-files/includeEmptyDirs/empty-directory-child/ test/units-files/includeEmptyDirs/empty-directory/
Date Wed, 05 Jan 2011 23:36:06 GMT
Author: dennisl
Date: Wed Jan  5 23:36:05 2011
New Revision: 1055687

URL: http://svn.apache.org/viewvc?rev=1055687&view=rev
Log:
Fix errors reported by Checkstyle.

Modified:
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/AbstractMavenFilteringRequest.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/InterpolatorFilterReaderLineEnding.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilterRequest.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java
    maven/shared/trunk/maven-filtering/src/test/units-files/includeEmptyDirs/empty-directory/
  (props changed)
    maven/shared/trunk/maven-filtering/src/test/units-files/includeEmptyDirs/empty-directory-child/
  (props changed)

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/AbstractMavenFilteringRequest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/AbstractMavenFilteringRequest.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/AbstractMavenFilteringRequest.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/AbstractMavenFilteringRequest.java
Wed Jan  5 23:36:05 2011
@@ -268,7 +268,7 @@ public class AbstractMavenFilteringReque
      * 'BEGIN*END' for asymmetrical delimiters, or 'TOKEN' for symmetrical delimiters. See
      * {@link AbstractMavenFilteringRequest#delimiters} for more information and default
values.
      * 
-     * @param delimiters If <code>null</code>, reset delimiters to '${*}' only.
Otherwise, use the provided parameter value.
+     * @param delimiters If <code>null</code>, reset delimiters to '${*}' only.
Otherwise, use the provided value.
      * @since 1.0-beta-3
      */
     public void setDelimiters( LinkedHashSet delimiters )

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
Wed Jan  5 23:36:05 2011
@@ -99,7 +99,8 @@ public class DefaultMavenFileFilter
 
     
     
-    public void copyFile( File from, File to, boolean filtering, List filterWrappers, String
encoding, boolean overwrite )
+    public void copyFile( File from, File to, boolean filtering, List filterWrappers, String
encoding,
+                          boolean overwrite )
         throws MavenFilteringException
     {
         try
@@ -233,7 +234,8 @@ public class DefaultMavenFileFilter
             filterProperties.putAll( request.getAdditionalProperties() );
         }
         
-        List defaultFilterWrappers = request == null ? new ArrayList( 1 ) : new ArrayList(
request.getDelimiters().size() + 1 );
+        List defaultFilterWrappers
+            = request == null ? new ArrayList( 1 ) : new ArrayList( request.getDelimiters().size()
+ 1 );
 
         if ( getLogger().isDebugEnabled() )
         {
@@ -246,8 +248,9 @@ public class DefaultMavenFileFilter
         {
             FileUtils.FilterWrapper wrapper = new Wrapper( request.getDelimiters(), request.getMavenProject(),
                                                            request.getMavenSession(), propertiesValueSource,
-                                                           request.getProjectStartExpressions(),
request.getEscapeString(),
-                                                           request.isEscapeWindowsPaths(),
request.isSupportMultiLineFiltering() );
+                                                           request.getProjectStartExpressions(),
+                                                           request.getEscapeString(), request.isEscapeWindowsPaths(),
+                                                           request.isSupportMultiLineFiltering()
);
             
             defaultFilterWrappers.add( wrapper );
         }
@@ -255,7 +258,8 @@ public class DefaultMavenFileFilter
         return defaultFilterWrappers;
     }    
 
-    private void loadProperties( Properties filterProperties, List /* String */propertiesFilePaths,
Properties baseProps )
+    private void loadProperties( Properties filterProperties, List /* String */propertiesFilePaths,
+                                 Properties baseProps )
         throws MavenFilteringException
     {
         if ( propertiesFilePaths != null )
@@ -301,8 +305,9 @@ public class DefaultMavenFileFilter
         
         private boolean supportMultiLineFiltering;
 
-        Wrapper( LinkedHashSet delimiters, MavenProject project, MavenSession mavenSession,
ValueSource propertiesValueSource,
-                 List projectStartExpressions, String escapeString, boolean escapeWindowsPaths,
boolean supportMultiLineFiltering )
+        Wrapper( LinkedHashSet delimiters, MavenProject project, MavenSession mavenSession,
+                 ValueSource propertiesValueSource, List projectStartExpressions, String
escapeString,
+                 boolean escapeWindowsPaths, boolean supportMultiLineFiltering )
         {
             super();
             this.delimiters = delimiters;
@@ -345,7 +350,8 @@ public class DefaultMavenFileFilter
                 if ( settings != null )
                 {
                     interpolator.addValueSource( new PrefixedObjectValueSource( "settings",
settings ) );
-                    interpolator.addValueSource( new SingleResponseValueSource( "localRepository",
settings.getLocalRepository() ) );
+                    interpolator.addValueSource( new SingleResponseValueSource( "localRepository",
+                                                                                settings.getLocalRepository()
) );
                 }
             }
             

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
Wed Jan  5 23:36:05 2011
@@ -30,7 +30,7 @@ public final class FilteringUtils
 {
     private static final String WINDOWS_PATH_PATTERN = "^[a-zA-Z]:\\\\(.*)";
 
-    private static final Pattern PATTERN = Pattern.compile( WINDOWS_PATH_PATTERN) ;
+    private static final Pattern PATTERN = Pattern.compile( WINDOWS_PATH_PATTERN ) ;
 
     /**
      * 
@@ -42,7 +42,7 @@ public final class FilteringUtils
     
     // TODO: Correct to handle relative windows paths. (http://jira.codehaus.org/browse/MSHARED-121)
     // How do we distinguish a relative windows path from some other value that happens to
contain backslashes??
-    public static final String escapeWindowsPath( String val )
+    public static String escapeWindowsPath( String val )
     {
         if ( !StringUtils.isEmpty( val ) && PATTERN.matcher( val ).matches() )
         {

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/InterpolatorFilterReaderLineEnding.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/InterpolatorFilterReaderLineEnding.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/InterpolatorFilterReaderLineEnding.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/InterpolatorFilterReaderLineEnding.java
Wed Jan  5 23:36:05 2011
@@ -86,7 +86,8 @@ public class InterpolatorFilterReaderLin
      * @param endToken end token to use
      * @param supportMultiLineFiltering If multi line filtering is allowed
      */
-    public InterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator, String
beginToken, String endToken, boolean supportMultiLineFiltering )
+    public InterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator, String
beginToken, String endToken,
+                                               boolean supportMultiLineFiltering )
     {
         this( in, interpolator, beginToken, endToken, new SimpleRecursionInterceptor(), supportMultiLineFiltering
);
     }    
@@ -99,7 +100,9 @@ public class InterpolatorFilterReaderLin
      * @param ri The {@link RecursionInterceptor} to use to prevent recursive expressions.
      * @param supportMultiLineFiltering If multi line filtering is allowed
      */
-    private InterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator, String
beginToken, String endToken, RecursionInterceptor ri, boolean supportMultiLineFiltering )
+    private InterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator, String
beginToken,
+                                                String endToken, RecursionInterceptor ri,
+                                                boolean supportMultiLineFiltering )
     {
         super( in );
 
@@ -204,7 +207,7 @@ public class InterpolatorFilterReaderLin
             ch = in.read();
         }
         
-        if (ch == '\n' && !supportMultiLineFiltering )
+        if ( ch == '\n' && !supportMultiLineFiltering )
         {
             previousIndex = -1;
             return ch;
@@ -228,13 +231,13 @@ public class InterpolatorFilterReaderLin
                 {
                     ch = in.read();
                 }
-                if ( ch != -1 && (ch != '\n' && !supportMultiLineFiltering
) )
+                if ( ch != -1 && ( ch != '\n' && !supportMultiLineFiltering
) )
                 {
                     key.append( (char) ch );
                     if ( ( beginTokenMatchPos < this.beginToken.length() )
                         && ( ch != this.beginToken.charAt( beginTokenMatchPos++ )
)
-                        && ( useEscape && this.orginalBeginToken.length()
> ( beginTokenMatchPos - 1 ) && ch != this.orginalBeginToken
-                            .charAt( beginTokenMatchPos - 1 ) ) )
+                        && ( useEscape && this.orginalBeginToken.length()
> ( beginTokenMatchPos - 1 )
+                        && ch != this.orginalBeginToken.charAt( beginTokenMatchPos
- 1 ) ) )
                     {
                         ch = -1; // not really EOF but to trigger code below
                         break;
@@ -246,7 +249,8 @@ public class InterpolatorFilterReaderLin
                 }
                 // MSHARED-81 olamy : we must take care of token with length 1, escaping
and same char : \@foo@
                 // here ch == endToken == beginToken -> not going to next char : bad :-)
-                if ( useEscape && this.orginalBeginToken == this.endToken &&
key.toString().startsWith( this.beginToken ) )
+                if ( useEscape
+                    && this.orginalBeginToken == this.endToken && key.toString().startsWith(
this.beginToken ) )
                 {
                     ch = in.read();
                     key.append( (char) ch );
@@ -292,7 +296,7 @@ public class InterpolatorFilterReaderLin
             // There is nothing left to read so we have the situation where the begin/end
token
             // are in fact the same and as there is nothing left to read we have got ourselves
             // end of a token boundary so let it pass through.
-            if ( ch == -1 || ( ch =='\n' && !supportMultiLineFiltering ) )
+            if ( ch == -1 || ( ch == '\n' && !supportMultiLineFiltering ) )
             {
                 replaceData = key.toString();
                 replaceIndex = 1;

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
Wed Jan  5 23:36:05 2011
@@ -76,7 +76,8 @@ public interface MavenFileFilter
      * @throws MavenFilteringException
      * @since 1.0-beta-2
      */
-    void copyFile( File from, final File to, boolean filtering, List filterWrappers, String
encoding, boolean overwrite )
+    void copyFile( File from, final File to, boolean filtering, List filterWrappers, String
encoding,
+                   boolean overwrite )
         throws MavenFilteringException;    
     
     /**

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilterRequest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilterRequest.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilterRequest.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilterRequest.java
Wed Jan  5 23:36:05 2011
@@ -1,12 +1,5 @@
 package org.apache.maven.shared.filtering;
 
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.project.MavenProject;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -26,6 +19,13 @@ import org.apache.maven.project.MavenPro
  * under the License.
  */
 
+import java.io.File;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.project.MavenProject;
+
 /**
  * @author <a href="mailto:olamy@apache">olamy</a>
  * @since 1.0-beta-3

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java
Wed Jan  5 23:36:05 2011
@@ -204,7 +204,8 @@ public class MavenResourcesExecution
                 propertiesInterpolator.addValueSource( valueSource );
                 return new InterpolatorFilterReaderLineEnding( reader, propertiesInterpolator,
                                                                InterpolatorFilterReaderLineEnding.DEFAULT_BEGIN_TOKEN,
-                                                               InterpolatorFilterReaderLineEnding.DEFAULT_END_TOKEN,
false );
+                                                               InterpolatorFilterReaderLineEnding.DEFAULT_END_TOKEN,
+                                                               false );
             }
         } );
     }
@@ -226,7 +227,8 @@ public class MavenResourcesExecution
             {
                 Interpolator propertiesInterpolator = new RegexBasedInterpolator( startRegExp,
endRegExp );
                 propertiesInterpolator.addValueSource( valueSource );
-                return new InterpolatorFilterReaderLineEnding( reader, propertiesInterpolator,
startToken, endToken, false );
+                return new InterpolatorFilterReaderLineEnding( reader, propertiesInterpolator,
startToken, endToken,
+                                                               false );
             }
         } );
     }  
@@ -249,10 +251,10 @@ public class MavenResourcesExecution
                 StringSearchInterpolator propertiesInterpolator = new StringSearchInterpolator(
startExp, endExp );
                 propertiesInterpolator.addValueSource( valueSource );
                 propertiesInterpolator.setEscapeString( escapeString );
-                InterpolatorFilterReaderLineEnding interpolatorFilterReader = new InterpolatorFilterReaderLineEnding(
-                                                                                        
         reader,
-                                                                                        
         propertiesInterpolator,
-                                                                                        
         startExp, endExp, false );
+                InterpolatorFilterReaderLineEnding interpolatorFilterReader
+                    = new InterpolatorFilterReaderLineEnding( reader,
+                                                              propertiesInterpolator,
+                                                              startExp, endExp, false );
                 interpolatorFilterReader.setInterpolateWithPrefixPattern( false );
                 return interpolatorFilterReader;
             }
@@ -277,10 +279,10 @@ public class MavenResourcesExecution
                 StringSearchInterpolator propertiesInterpolator = new StringSearchInterpolator(
startExp, endExp );
                 propertiesInterpolator.addValueSource( valueSource );
                 propertiesInterpolator.setEscapeString( escapeString );
-                InterpolatorFilterReaderLineEnding interpolatorFilterReader = new InterpolatorFilterReaderLineEnding(
-                                                                                        
         reader,
-                                                                                        
         propertiesInterpolator,
-                                                                                        
         startExp, endExp, supportMultiLineFiltering );
+                InterpolatorFilterReaderLineEnding interpolatorFilterReader
+                    = new InterpolatorFilterReaderLineEnding( reader,
+                                                              propertiesInterpolator,
+                                                              startExp, endExp, supportMultiLineFiltering
);
                 interpolatorFilterReader.setInterpolateWithPrefixPattern( false );
                 return interpolatorFilterReader;
             }

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java?rev=1055687&r1=1055686&r2=1055687&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java
Wed Jan  5 23:36:05 2011
@@ -1,5 +1,24 @@
 package org.apache.maven.shared.filtering;
 
+/*
+ * 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.io.FilterReader;
 import java.io.IOException;
 import java.io.Reader;
@@ -75,7 +94,8 @@ public class MultiDelimiterInterpolatorF
      * @param interpolator interpolator instance to use
      * @param supportMultiLineFiltering If multi line filtering is allowed
      */
-    public MultiDelimiterInterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator,
boolean supportMultiLineFiltering )
+    public MultiDelimiterInterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator,
+                                                             boolean supportMultiLineFiltering
)
     {
         this( in, interpolator, new SimpleRecursionInterceptor(), supportMultiLineFiltering
);
     }
@@ -86,7 +106,9 @@ public class MultiDelimiterInterpolatorF
      * @param ri The {@link RecursionInterceptor} to use to prevent recursive expressions.
      * @param supportMultiLineFiltering If multi line filtering is allowed
      */
-    public MultiDelimiterInterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator,
RecursionInterceptor ri, boolean supportMultiLineFiltering )
+    public MultiDelimiterInterpolatorFilterReaderLineEnding( Reader in, Interpolator interpolator,
+                                                             RecursionInterceptor ri,
+                                                             boolean supportMultiLineFiltering
)
     {
         super( in );
 
@@ -207,7 +229,7 @@ public class MultiDelimiterInterpolatorF
         {
             ch = in.read();
         }
-        if (ch == '\n' && !supportMultiLineFiltering)
+        if ( ch == '\n' && !supportMultiLineFiltering )
         {
             previousIndex = -1;
             return ch;
@@ -225,7 +247,7 @@ public class MultiDelimiterInterpolatorF
 
             if ( inEscape )
             {
-                for( int i = 0; i < escapeString.length() - 1; i++ )
+                for ( int i = 0; i < escapeString.length() - 1; i++ )
                 {
                     ch = in.read();
                     if ( ch == -1 || ( ch == '\n' && !supportMultiLineFiltering )
)
@@ -296,7 +318,7 @@ public class MultiDelimiterInterpolatorF
             while ( ch != this.endToken.charAt( 0 ) );
 
             // now test endToken
-            if ( ch != -1 && ( ch != '\n' && !supportMultiLineFiltering)
&& this.endToken.length() > 1 )
+            if ( ch != -1 && ( ch != '\n' && !supportMultiLineFiltering )
&& this.endToken.length() > 1 )
             {
                 int endTokenMatchPos = 1;
 
@@ -315,7 +337,8 @@ public class MultiDelimiterInterpolatorF
                     {
                         key.append( (char) ch );
 
-                        if ( ch != this.endToken.charAt( endTokenMatchPos++ ) || ( ch !=
'\n' && !supportMultiLineFiltering ) )
+                        if ( ch != this.endToken.charAt( endTokenMatchPos++ )
+                            || ( ch != '\n' && !supportMultiLineFiltering ) )
                         {
                             ch = -1; // not really EOF but to trigger code below
                             break;
@@ -333,7 +356,7 @@ public class MultiDelimiterInterpolatorF
             // There is nothing left to read so we have the situation where the begin/end
token
             // are in fact the same and as there is nothing left to read we have got ourselves
             // end of a token boundary so let it pass through.
-            if ( ch == -1 || (ch =='\n' && !supportMultiLineFiltering ) )
+            if ( ch == -1 || ( ch == '\n' && !supportMultiLineFiltering ) )
             {
                 replaceData = key.toString();
                 replaceIndex = 1;

Propchange: maven/shared/trunk/maven-filtering/src/test/units-files/includeEmptyDirs/empty-directory/
            ('svn:mergeinfo' removed)

Propchange: maven/shared/trunk/maven-filtering/src/test/units-files/includeEmptyDirs/empty-directory-child/
            ('svn:mergeinfo' removed)



Mime
View raw message