Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-907

ClassUtil fails with ArrayIndexOutOfBoundsException if WildcardType.getUpperBound() returns empty array

VotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment Visibility
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.8
    • Fix Version/s: 1.6.0
    • Component/s: Core
    • Labels:
      None

      Description

      If WildcardType.getUpperBounds() returns an empty array, OWB throws the following exception:

      java.lang.ArrayIndexOutOfBoundsException: 0
      at org.apache.webbeans.util.ClassUtil.checkRequiredTypeIsWildCard(ClassUtil.java:875)
      at org.apache.webbeans.util.ClassUtil.isAssignableForParametrizedCheckArguments(ClassUtil.java:798)
      at org.apache.webbeans.util.ClassUtil.isAssignableForParametrized(ClassUtil.java:768)
      at org.apache.webbeans.util.ClassUtil.isAssignable(ClassUtil.java:552)
      at org.apache.webbeans.container.InjectionResolver.implResolveByType(InjectionResolver.java:501)
      at org.apache.webbeans.container.InjectionResolver.implResolveByType(InjectionResolver.java:411)
      at org.apache.webbeans.container.BeanManagerImpl.getBeans(BeanManagerImpl.java:678)
      at org.apache.webbeans.container.InjectableBeanManager.getBeans(InjectableBeanManager.java:105)

      From my understanding of the WildcardType javadocs an empty array is a valid result of invoking this method and actually means that Object is the upper bound.

      http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/WildcardType.html#getUpperBounds()

        Attachments

          Activity

            People

            • Assignee:
              struberg Mark Struberg
              Reporter:
              chkal Christian Kaltepoth

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment