ICEfaces
  1. ICEfaces
  2. ICE-9350

Insert a blank line between coalesced JS resources to prevent errors

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      resource coalescing
    • Assignee Priority:
      P2

      Description

      After fixing ICE-9331, it became apparent that similar problems could occur when coalescing custom application resources. The error was produced because a source file, that didn't end with a blank line and whose last statement didn't end with a semi-colon, was being concatenated immediately before another resource file, without inserting any characters in between, so the final result contained a syntax error, which was preventing the browser from interpreting the rest of the coalesced resource, causing undefined/"not found" type of errors.

      While we could make sure to end all of our code with semi-colons (many function declarations are not doing this, perhaps because they already end with a closing curly bracket), many custom application source files, created by app developers, might ignore this rule, which could cause errors like the ones described in ICE-9331. So, it would be advisable to insert a blank line between each coalesced (concatenated) resource to prevent this kind of errors.

        Activity

        Hide
        Mircea Toma added a comment -

        Inserting blank line in between coalesced resources.

        Show
        Mircea Toma added a comment - Inserting blank line in between coalesced resources.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: