Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1410

CLONE -PropertyResolverImpl.getType(Object base, int index) return null if base instanceof Object[]

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.5
    • General
    • None
    • jdk 1.5, jboss4.0.2

    Description

      this code return null
      if (base instanceof Object[] && ((Object[])base)[index] != null)

      { Object[] array = (Object[]) base; return array[index].getClass().getComponentType(); }

      else {
      .....

      this change fix this error

      Index: /current/impl/src/java/org/apache/myfaces/el/PropertyResolverImpl.java
      ===================================================================
      — /current/impl/src/java/org/apache/myfaces/el/PropertyResolverImpl.java (revision 312842)
      +++ /current/impl/src/java/org/apache/myfaces/el/PropertyResolverImpl.java (working copy)
      @@ -308,7 +308,7 @@
      {
      if (base instanceof Object[] && ((Object[])base)[index] != null)

      { Object[] array = (Object[]) base; - return array[index].getClass().getComponentType(); + return array[index].getClass(); }

      else

      { return base.getClass().getComponentType(); }

      Attachments

        1. diff_core
          0.7 kB
          Pavel Stetsuk

        Issue Links

          Activity

            People

              mmarinschek Martin Marinschek
              _spa Pavel Stetsuk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: