Goooler commented on code in PR #247:
URL: 
https://github.com/apache/maven-shade-plugin/pull/247#discussion_r4432432311


##########
src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java:
##########
@@ -46,8 +46,11 @@ public boolean canTransformResource(String r) {
     @Override
     public void processResource(String resource, InputStream is, 
List<Relocator> relocators, long time)
             throws IOException {
+        if (data.size() > 0) {
+            // Append the EOL before the new content to ensure the EOL is not 
at the end of the file.
+            data.write('\n');
+        }
         IOUtil.copy(is, data);

Review Comment:
   
https://github.com/apache/maven-shade-plugin/compare/b8d76804879538591aec2f2109a59946f7975019..5fa4de65811e35e4d597476a4817e04f760edbb5



-- 
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