Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2015

log css parse errors at their source and skip to avoid IllegalArgumentException in FileSystemStyleCache

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1
    • Skinning
    • None

    Description

      There was a typo in a css file and we got an IllegalArgumentException
      that Selector was null. It would have been more helpful if we got an error
      earlier in the code at parse time so we know what css file had the parse
      error.

      The typo was like there was an extra ',' at the end of the selector list. This created a selector with the name "".

      .abc, .cde, .efg,
      Do not add the empty selector to the list of selectors. Skip it. This will avoid the IllegalArgumentException in FileSystemStyleCache.

      java.lang.IllegalArgumentException: selectorString must be non null and non
      empty.
      at
      org.apache.myfaces.trinidad.style.Selector.createSelector(Selector.java:48)
      at
      org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache$StylesImp
      l.<init>(FileSystemStyleCache.java:1348)
      at

      Attachments

        Activity

          People

            jeanne.waldman@oracle.com Jeanne Waldman
            jeanne.waldman@oracle.com Jeanne Waldman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: