Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1435

Unrechable code o.j.j.c.annotations.Annotations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 1.5.3
    • 1.5.2
    • Common
    • None

      The condition

      values.size() == 0

      in o.j.j.c.annotations.Annotations#L259
      https://github.com/ironjacamar/ironjacamar/blob/1.5.2.Final/common/impl/src/main/java/org/jboss/jca/common/annotations/Annotations.java#L259 is not reachable because

      Collection<Annotation> values = annotationRepository.getAnnotation(javax.resource.spi.Connector.class);
      

      will contain null instead of a empty Collection https://github.com/ironjacamar/ironjacamar/blob/1.5.2.Final/common/impl/src/main/java/org/jboss/jca/common/annotations/Annotations.java#L245

      In line 246 is

      if (values != null)
      }
      

      which prevents any later check. In the else of L246 must be the error handling of L261-L266

              tadamski@redhat.com Tomasz Adamski
              xf01213 Boris Unckel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: