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 <elh...@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 )
         {

Reply via email to