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

thiagohp pushed a commit to branch gradle-improvements
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit 9a2d6a2477f717f905867869b9214a6ae1535136
Author: Thiago H. de Paula Figueiredo <[email protected]>
AuthorDate: Sun Aug 24 10:02:00 2025 -0300

    Revert "If JS minifying fails, serve the file unchanged"
    
    This reverts commit 515a71539e6ecdabbd45bf0f7844e73ae43299e9.
---
 .../internal/webresources/GoogleClosureMinimizer.java       | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git 
a/tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/GoogleClosureMinimizer.java
 
b/tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/GoogleClosureMinimizer.java
index 6b3d1b6ae..b134b2bad 100644
--- 
a/tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/GoogleClosureMinimizer.java
+++ 
b/tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/GoogleClosureMinimizer.java
@@ -30,7 +30,6 @@ import 
org.apache.tapestry5.services.assets.AssetChecksumGenerator;
 import org.apache.tapestry5.services.assets.StreamableResource;
 import org.apache.tapestry5.webresources.GoogleClosureMinimizerOptionsProvider;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.javascript.jscomp.Compiler;
 import com.google.javascript.jscomp.CompilerOptions;
@@ -43,8 +42,6 @@ import com.google.javascript.jscomp.SourceFile;
  */
 public class GoogleClosureMinimizer extends AbstractMinimizer
 {
-    
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(GoogleClosureMinimizer.class);
 
     private final List<SourceFile> EXTERNS = Collections.emptyList();
 
@@ -108,13 +105,9 @@ public class GoogleClosureMinimizer extends 
AbstractMinimizer
         {
             return IOUtils.toInputStream(compiler.toSource(), 
StandardCharsets.UTF_8);
         }
-        else
-        {
-            logger.warn(String.format("Minimization failed for %s. Errors: 
%s.",
+
+        throw new RuntimeException(String.format("Compilation failed for %s. 
Errors: %s.",
                        resource,
-                InternalUtils.join(CollectionFactory.newList(result.errors), 
";")) + 
-                    " Providing unchanged resource instead.");
-            return resource.openStream();
-        }
+                InternalUtils.join(CollectionFactory.newList(result.errors), 
";")));
     }
 }

Reply via email to