[ 
https://issues.apache.org/jira/browse/TAP5-2666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Weidig closed TAP5-2666.
----------------------------

> GoogleClosureMinimizer throws exception it's March and JVM Locale is DE
> -----------------------------------------------------------------------
>
>                 Key: TAP5-2666
>                 URL: https://issues.apache.org/jira/browse/TAP5-2666
>             Project: Tapestry 5
>          Issue Type: Bug
>            Reporter: Ben Weidig
>            Assignee: Ben Weidig
>            Priority: Minor
>
> We got some weird crashes in the GoogleClosureMinimizer...
> The doMinimize-method creates a com.google.javascript.jscomp.SourceFile from 
> an StreamableResource and uses "toString" as the filename.
> The "toString" is more of a descriptive nature and contains (among other 
> things) the "last modified" date formatted with "%tc", containing a 3-letter 
> month:
> {code}
> StreamableResource<text/javascript;charset=utf-8 'core' JavaScript stack, for 
> locale de, resources=classpath:META-INF/assets/tapestry5/require.js 
> COMPRESSABLE lastModified: Mon Feb 15 12:35:06 CET 2021 size: 282274>
> {code}
> Above example is with JVM default locale "en_US".
> If we set it to "de", for dates in March  the month will become "März".
> Thanks to the umlaut the SourceFile creation will crash, because it's not a 
> valid filename anymore according to its validation.
> The simplest fix would be changing the date output format to something more 
> neutral, like ISO 8601.
> Another possibility would be wrapping the doMinimize call in a try-catch and 
> return the uncompressed InputStream on exceptions.
> It's quite possible that this problem occurs due to our special setup. We 
> manipulate some requests and build new StreamableResources for the monaco 
> editor, because it load other js files by itself, and isn't able to build the 
> correct path. But I think the change of the toString-method isn't invasive, 
> and has no side effects.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to