rmannibucau commented on code in PR #854:
URL: 
https://github.com/apache/maven-shade-plugin/pull/854#discussion_r4069217995


##########
src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java:
##########
@@ -191,12 +191,11 @@ private boolean removeServicesFromDir(Clazzpath cp, 
Set<Clazz> neededClasses, St
                 continue;
             }
 
-            try (BufferedReader configFileReader =
-                    new BufferedReader(new InputStreamReader(new 
FileInputStream(serviceProviderConfigFile), UTF_8))) {
+            try (BufferedReader configFileReader = 
Files.newBufferedReader(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, e);

Review Comment:
   ```
   if (debug enabled)
   log.warn(message, e)
   else
   log.warn(message + "'" + e.getMessage() + "'")
   ```
   
   maybe (or anything formatting you like) to not loose the error message which 
is often the key to understand the error - less critical when you have the real 
stack/causes



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to