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

Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-alpha-2
    • Fix Version/s: 1.1.0, 1.1.9
    • Component/s: Core
    • Labels:
      None

      Description

      As part of calling DefinitionUtl.defineScope, WebBeansAnnotatedTypeUtil's defineProducerMethod creates an error message using the AnnotatedMethodImpl's toString method.

      This toString method in turn calls it super in AbstractAnnotatedCallable, which in turn calls toString on all of its AnnotatedParameterImpls. Unfortunately then AnnotatedParameterImpl calls toString on its declaringCallable, which can create an infinite loop if that turns out to be the original AbstractAnnotatedCallable again.

      This doesn't happen all of the time, so its probably an application issue, but it would be better if we identified it as such rather than blowing up with a stack overflow exception. I'll paste a snippet of the stacktrace below:

      at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
      at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
      at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)
      at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
      at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
      at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)

        Attachments

          Activity

            People

            • Assignee:
              bergmark Joseph E Bergmark
              Reporter:
              bergmark Joseph E Bergmark
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: