You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/05/12 16:28:55 UTC

[maven-assembly-plugin] branch len created (now 37a691e)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch len
in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git.


      at 37a691e  fix line length

This branch includes the following new commits:

     new 37a691e  fix line length

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-assembly-plugin] 01/01: fix line length

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch len
in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git

commit 37a691e345419b2f212aa57b62122390d9f45899
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Tue May 12 12:28:30 2020 -0400

    fix line length
---
 .../plugins/assembly/io/DefaultAssemblyReader.java | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java b/src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java
index a638d3c..63a2270 100644
--- a/src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java
+++ b/src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java
@@ -68,9 +68,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-/**
- *
- */
 @org.codehaus.plexus.component.annotations.Component( role = AssemblyReader.class )
 public class DefaultAssemblyReader
     extends AbstractLogEnabled
@@ -79,12 +76,11 @@ public class DefaultAssemblyReader
 
     public static FixedStringSearchInterpolator createProjectInterpolator( MavenProject project )
     {
-        // CHECKSTYLE_OFF: LineLength
-        return FixedStringSearchInterpolator.create( new PrefixedPropertiesValueSource( InterpolationConstants.PROJECT_PROPERTIES_PREFIXES,
-                                                                                        project.getProperties(), true ),
-                                                     new PrefixedObjectValueSource( InterpolationConstants.PROJECT_PREFIXES,
-                                                                                    project, true ) );
-        // CHECKSTYLE_ON: LineLength
+        PrefixedPropertiesValueSource source1 = new PrefixedPropertiesValueSource(
+                InterpolationConstants.PROJECT_PROPERTIES_PREFIXES, project.getProperties(), true );
+        PrefixedObjectValueSource source2 = new PrefixedObjectValueSource(
+                InterpolationConstants.PROJECT_PREFIXES, project, true );
+        return FixedStringSearchInterpolator.create( source1, source2 );
     }
 
     @Override
@@ -127,9 +123,8 @@ public class DefaultAssemblyReader
 
         if ( ( descriptorSourceDirectory != null ) && descriptorSourceDirectory.isDirectory() )
         {
-            // CHECKSTYLE_OFF: LineLength
-            locator.setStrategies( Collections.<LocatorStrategy>singletonList( new RelativeFileLocatorStrategy( descriptorSourceDirectory ) ) );
-            // CHECKSTYLE_ON: LineLength
+            RelativeFileLocatorStrategy strategy = new RelativeFileLocatorStrategy( descriptorSourceDirectory );
+            locator.setStrategies( Collections.<LocatorStrategy>singletonList( strategy ) );
 
             final DirectoryScanner scanner = new DirectoryScanner();
             scanner.setBasedir( descriptorSourceDirectory );
@@ -327,9 +322,6 @@ public class DefaultAssemblyReader
             debugPrintAssembly( "After assembly is interpolated:", assembly );
 
             AssemblyInterpolator.checkErrors( AssemblyId.createAssemblyId( assembly ), is, getLogger() );
-
-            reader.close();
-            reader = null;
         }
         catch ( final IOException | XmlPullParserException e )
         {