You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Dilger (JIRA)" <ji...@apache.org> on 2013/06/20 14:12:20 UTC

[jira] [Created] (WICKET-5244) ConcatBundleResource creates invalid JavaScript for Lazy Developers

Martin Dilger created WICKET-5244:
-------------------------------------

             Summary: ConcatBundleResource creates invalid JavaScript for Lazy Developers
                 Key: WICKET-5244
                 URL: https://issues.apache.org/jira/browse/WICKET-5244
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.8.0
            Reporter: Martin Dilger
            Priority: Minor


ResourceBundles are a great Feature.
But consider a Javascript-Library is lazily developed and has neither semicolon nor carriagereturn at the end.
What ConcatResourceBundle does is, it combines all libraries as they are, which can result in an invalid JavaScript.

Consider you have 2 files, with content:
- console.log(1)
- console.log(2)

This would result in a Script console.log(1)console.log(2) which is invalid. 

I would suggest to fix that by always appending a Semicolon between Resources. This could create some noise in the resulting Javascript, but should be fixed anyway. I´ll provide a Patch in a few minutes with a Testcase, that shows the Behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira