ICEfaces
  1. ICEfaces
  2. ICE-5525

Regression: UISeries.keepSaved performance

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.2-EE-GA_P01, 1.8.3
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      ICE-4667 involves a code change to UISeries.maximumSeverityAtLeastError(-), which is derived from a Mojarra 1.2 optimisation, where instead of scanning through all the FacesMessages, to determine if a component failed validation, instead we just check the FacesContext.maximumSeverity property.

      The problem is, both Mojarra's, and our, code is wrong. Looking at the javadoc for Comparable, we see that:

      http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html
      For the mathematically inclined, the relation that defines the natural ordering on a given class C is:
      {(x, y) such that x.compareTo((Object)y) <= 0}.

      This means that, when x <= y, x.compareTo(y) <= 0. But if we look at UISeries.maximumSeverityAtLeastError(-), where it's trying to see if FacesMessage.SEVERITY_ERROR <= FacesContext.maximumSeverity, we're using >= 0 instead of <= 0.

      FacesMessage.Severity maximumSeverity = facesContext.getMaximumSeverity();
      return ( (maximumSeverity != null) && (FacesMessage.SEVERITY_ERROR.compareTo(maximumSeverity) >= 0) );


      I've created a bug report with Mojarra, for their equivalent issue in UIData:
      https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1589

        Issue Links

          Activity

          Mark Collette created issue -
          Mark Collette made changes -
          Field Original Value New Value
          Link This issue depends on ICE-4667 [ ICE-4667 ]
          Mark Collette made changes -
          ICEsoft Forum Reference http://www.icefaces.org/JForum/posts/list/16345.page
          Salesforce Case []
          Mark Collette made changes -
          Salesforce Case []
          Fix Version/s 1.8.2-EE-GA_P01 [ 10220 ]
          Fix Version/s 1.8.3 [ 10211 ]
          Assignee Mark Collette [ mark.collette ]
          Mark Collette made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mark Collette [ mark.collette ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: