javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2106

systest-per-webapp: ReplaceVariableResolverAndAddELResolverProgrammaticallyTestCase Fails On AIX

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      ReplaceVariableResolverAndAddELResolverProgrammaticallyTestCase is cleverly written to verify that ELResolvers are called in the right sequence. It does this by overriding the toString method (from the call to getValue:

      context.getApplication().getELResolver().getValue(context.getELContext(), null,
      new Object() {

      @Override
      public String toString()

      { Bean.captureStackTrace(context); return "traceResolution"; }

      });

      Bean.captureStackTrace captures the stack trace for the current thread - so if the thread is inside ImplicitObjectELResolver that will show up in the stacktrace. This section of code loops through the stack trace elements looking for the element that contains the string (for example) "ImplicitObjectELResolver". The code is written to loop through 4 times:

      for (int i = 0; i < 4; i++) {
      StackTraceElement cur = stackTrace[i];
      stackTraceElement = cur.toString();
      if (!(stackTraceElement.contains("Thread") ||
      stackTraceElement.contains("com.sun.faces.systest.Bean")))

      { message.append("<p>").append(stackTraceElement).append("</p>"); break; }

      }

      On a non AIX machine this is fine as the stack trace elements are:

      [0] =

      {java.lang.StackTraceElement@7188}

      "java.lang.Thread.getStackTrace(Thread.java:1503)"
      [1] =

      {java.lang.StackTraceElement@7189}

      "com.sun.faces.systest.Bean.captureStackTrace(Bean.java:139)"
      [2] =

      {java.lang.StackTraceElement@7190}

      "com.sun.faces.systest.Bean$1.toString(Bean.java:108)"
      [3] =

      {java.lang.StackTraceElement@7191}

      "com.sun.faces.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:101)"
      [4] =

      {java.lang.StackTraceElement@7192}

      "com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)"
      [5] =

      {java.lang.StackTraceElement@7193}

      "com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)"
      [6] =

      {java.lang.StackTraceElement@7194}

      "com.sun.faces.systest.Bean.verifyELResolverChainIsCorrectlyConfigured(Bean.java:103)

      However on an AIX machine, the stack trace elements are:

      [0] =

      {java.lang.StackTraceElement@1084}

      "java.lang.Thread.getStackTraceImpl(Native Method)"
      [1] =

      {java.lang.StackTraceElement@1152}

      "java.lang.Thread.getStackTrace(Thread.java:1042)"
      [2] =

      {java.lang.StackTraceElement@1434}

      "com.sun.faces.systest.Bean.captureStackTrace(Bean.java:139)"
      [3] =

      {java.lang.StackTraceElement@1508}

      "com.sun.faces.systest.Bean$1.toString(Bean.java:108)"
      [4] =

      {java.lang.StackTraceElement@2600}

      "com.sun.faces.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:101)"
      [5] =

      {java.lang.StackTraceElement@1662}

      "com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)"
      [6] =

      {java.lang.StackTraceElement@1750}

      "com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)"
      [7] =

      {java.lang.StackTraceElement@1874}

      "com.sun.faces.systest.Bean.verifyELResolverChainIsCorrectlyConfigured(Bean.java:103)"

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: