rmannibucau commented on a change in pull request #95:
URL: https://github.com/apache/maven-shade-plugin/pull/95#discussion_r637384689



##########
File path: src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
##########
@@ -694,6 +702,11 @@ private void addResource( Set<String> resources, 
JarOutputStream jos, String nam
 
         List<Relocator> relocators;
 
+        // Use thread-local, just in case 'map*' calls are ever done 
concurrently. Make sure that the using class
+        // initialises this value according to its needs, usually setting the 
value to false per file before starting
+        // relocation.
+        ThreadLocal<Boolean> wasRelocated = new ThreadLocal<>();

Review comment:
       It will likely not change cause multithreading is unlikely to be faster 
to write a zip until you load all inputs/output in mem which means risking an 
oom.
   Fact encapsulation is not respected and contract is noy consistent with the 
usage makes me think it is saner to just impl the feature for whta it is rather 
than doing a quick fix.
   Once again, no issue if _you_ do not change it while it is done ;).




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

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


Reply via email to