Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3295

LRACDIExtension returns null as class name when @LRA annotated class does not contain Compensate or AfterLRA

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 5.10.5.Final
    • None
    • LRA
    • None

    Description

      When the @LRA annotated class does not containe neither @Compensate nor @AfterLRA the exception message contains null instead of the name of the guilty class.

      Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
      Exception 0 :
      java.lang.IllegalStateException: null: The class contains an LRA method and no Compensate or AfterLRA method was found.
              at io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension.isLRAParticipant(LRACDIExtension.java:129)
              at io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension.getAsParticipant(LRACDIExtension.java:104)
              at io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension.observe(LRACDIExtension.java:75)
      

      The reason seems to be that the method ClassInfo.simpleName() returns null if it's not an inner class or nested class.

      The javadoc says following on it

      Returns the source declared name of this class if it is an inner class, or a local class. Otherwise
      this method will return null.
      

      Attachments

        Issue Links

          Activity

            People

              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: