You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Ben Weidig (Jira)" <ji...@apache.org> on 2021/03/10 08:49:00 UTC

[jira] [Commented] (TAP5-2666) GoogleClosureMinimizer throws exception it's March and JVM Locale is DE

    [ https://issues.apache.org/jira/browse/TAP5-2666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17298644#comment-17298644 ] 

Ben Weidig commented on TAP5-2666:
----------------------------------

It seems the underlying filesystem plays a role if the exception is thrown.... my docker container for Eclipse is working fine with "ä", on our production environment it's not working.

Regardless of the reproducibility the StreamableResource#toString() should be Locale-independent.

> 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är".
> 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.3.4#803005)