This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-patch-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 28b3fca  Ability to replace both resources and jars (fixed) Initial 
use case is actually to restore mojarra and eclipselink with completely 
unmodified versions
28b3fca is described below

commit 28b3fca63ccf2bce276cb4a41bb0b4d4125865f4
Author: David Blevins <[email protected]>
AuthorDate: Fri Mar 26 03:37:14 2021 -0700

    Ability to replace both resources and jars (fixed)
    Initial use case is actually to restore mojarra and eclipselink with 
completely unmodified versions
---
 .../src/main/java/org/apache/tomee/patch/core/Transformation.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/tomee-patch-core/src/main/java/org/apache/tomee/patch/core/Transformation.java
 
b/tomee-patch-core/src/main/java/org/apache/tomee/patch/core/Transformation.java
index 6df5961..9cb12d2 100644
--- 
a/tomee-patch-core/src/main/java/org/apache/tomee/patch/core/Transformation.java
+++ 
b/tomee-patch-core/src/main/java/org/apache/tomee/patch/core/Transformation.java
@@ -83,12 +83,15 @@ public class Transformation {
                     throw new ReplacementNotFoundException("jar", jar, 
file.getAbsolutePath());
                 }
                 log.info(String.format("Replaced %s", name));
+                IO.copy(file, outputStream);
+
                 IO.copy(inputStream, new OutputStream() {
                     @Override
                     public void write(final int b) throws IOException {
                     }
                 });
-                IO.copy(file, outputStream);
+
+                return;
             }
         }
 

Reply via email to