DanielThomas commented on code in PR #36:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/36#discussion_r1005164436


##########
src/main/java/org/apache/tomcat/jakartaee/ManifestConverter.java:
##########
@@ -48,20 +48,16 @@ public boolean accepts(String filename) {
     }
 
     @Override
-    public void convert(String path, InputStream src, OutputStream dest, 
EESpecProfile profile) throws IOException {
+    public boolean convert(String path, InputStream src, OutputStream dest, 
EESpecProfile profile) throws IOException {
         Manifest srcManifest = new Manifest(src);
         Manifest destManifest = new Manifest(srcManifest);
 
-        boolean result = false;
-
-        result = result | removeSignatures(destManifest);
+        boolean result = removeSignatures(destManifest);
         result = result | updateValues(destManifest, profile);
 
-        if (result) {
-            destManifest.write(dest);
-        } else {
-            srcManifest.write(dest);

Review Comment:
   Pushed a new commit which should hopefully address these concerns: 
https://github.com/apache/tomcat-jakartaee-migration/pull/36/commits/136c537e1e9d0274261d8749fe3a6747f6a9dc3c.
   
   To clarify, the intention of `hasConverted` is not to indicate that no 
changes were made, but that the source can be used and satisfy the selected 
profile. Manifests still get modified, zip version compatibility changes, file 
attributes are dropped, etc., that's unavoidable with the current 
implementation, which makes it impossible to tell if you need to use a 
destination file, which is why `hasConverted` needs to exist.



-- 
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: dev-unsubscr...@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to