Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4053

Can't resolve EL Function which serialized to ViewState

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.2.SP1, 2.1.1.GA
    • Fix Version/s: 2.1.2.CR2
    • Component/s: EL
    • Labels:
      None

      Description

      It seems that EL Function which serialized to ViewState can't be resolved when the object is deserialize. Because the jboss-el directly use "Class#forName(String)". The code is as follows,

      org.jboss.el.lang.FunctionMapperImpl.java
              public Method getMethod() {
                  if (this.m == null) {
                      try {
                          Class t = Class.forName(this.owner);
                          Class[] p = ReflectionUtil.toTypeArray(this.types);
                          this.m = t.getMethod(this.name, p);
                      } catch (Exception e) {
      

      I think the above code cause ClassLoader Scope Problem. "Thread.currentThread().getContextClassLoader()" should be used.

      I found the jboss-el already had utility method for "Class.forName". It's "ReflectionUtil#forName(String)" method. Please use this method.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                norman.richards Norman Richards
                Reporter:
                wadahiro Hiroyuki Wada
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: