michael-o commented on PR #110:
URL: 
https://github.com/apache/maven-shade-plugin/pull/110#issuecomment-1471656438

   > Um, sorry @michael-o, what was the rationale behind first asking me for 
improvements, me consequently doing them and you then not merging them but 
deciding for the code without the cove review improvements instead? I mean 
these:
   > 
   > ```diff
   > Subject: [PATCH] [MSHADE-400] Code review findings
   > ---
   > --- 
a/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java       
(revision 1cee035ebcce0376fc1c4e726b18f7a15edb8d76)
   > +++ 
b/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java       
(revision 131d4ae37eeb25895bdbf54a2b9acb5df2b918c4)
   > @@ -35,6 +35,7 @@
   >  import java.io.IOException;
   >  import java.io.InputStream;
   >  import java.io.InputStreamReader;
   > +import java.nio.file.Files;
   >  import java.util.Collections;
   >  import java.util.Enumeration;
   >  import java.util.HashSet;
   > @@ -228,14 +229,15 @@
   >              }
   >  
   >              try ( final BufferedReader configFileReader = new 
BufferedReader(
   > -                    new InputStreamReader( new FileInputStream( 
serviceProviderConfigFile ), UTF_8 ) ) )
   > +                    new InputStreamReader( Files.newInputStream( 
serviceProviderConfigFile.toPath() ), UTF_8 ) ) )
   >              {
   >                  // check whether the found classes use services in turn
   >                  repeatScan |= scanServiceProviderConfigFile( cp, 
configFileReader );
   >              }
   >              catch ( final IOException e )
   >              {
   > -                log.warn( e.getMessage() );
   > +                log.warn( "Failed to scan service provider config file " 
+ serviceProviderConfigFile );
   > +                log.debug( e );
   >              }
   >          }
   >          return repeatScan;
   > @@ -269,7 +271,8 @@
   >                  }
   >                  catch ( final IOException e )
   >                  {
   > -                    log.warn( e.getMessage() );
   > +                    log.warn( "Failed to scan service provider config 
file " + jarEntry + " in jar " + jar.getName() );
   > +                    log.debug( e );
   >                  }
   >              }
   >          }
   > --- a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java     
(revision 1cee035ebcce0376fc1c4e726b18f7a15edb8d76)
   > +++ b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java     
(revision 131d4ae37eeb25895bdbf54a2b9acb5df2b918c4)
   > @@ -996,8 +996,7 @@
   >              {
   >                  entryPoints = new HashSet<>();
   >              }
   > -            getLog().info( "Minimizing jar " + project.getArtifact()
   > -                    + ( entryPoints.isEmpty() ? "" : ", entry points = " 
+ entryPoints ) );
   > +            getLog().info( "Minimizing jar " + project.getArtifact() );
   >  
   >              try
   >              {
   > ```
   
   It was faster to do it myself at the end than explaning how I expect it to 
be. For improvement of consistency followup PRs can be created any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to