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

          Hide
          Mark Collette added a comment -

          Changed the >=0 to <= 0.

          TRUNK
          Subversion 21019
          icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java

          icefaces-ee-1.8.2_p01
          Subversion 21020
          icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java

          Show
          Mark Collette added a comment - Changed the >=0 to <= 0. TRUNK Subversion 21019 icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java icefaces-ee-1.8.2_p01 Subversion 21020 icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java

            People

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

              Dates

              • Created:
                Updated:
                Resolved: