Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15857

Improve org.jboss.as.ejb3.deployment.processors.annotation.ScheduleAnnotationInformationFactory

    XMLWordPrintable

Details

    Description

      https://github.com/wildfly/wildfly/blob/main/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/annotation/ScheduleAnnotationInformationFactory.java

      Some areas to improve the processing of @Schedule annotation attributes:

      • This class currently keeps and assigns default values to those optional attributes that are not present. This should not be necessary, since javax.ejb.ScheduleExpression class already does that (https://github.com/jakartaee/enterprise-beans/blob/master/api/src/main/java/jakarta/ejb/ScheduleExpression.java#L533-L540).
      • This class contains an enum ScheduleValues whose instances all override some method, which results in 10 nested classes after compilation (ScheduleAnnotationInformationFactory$ScheduleValues, ScheduleAnnotationInformationFactory$ScheduleValues$1, ScheduleAnnotationInformationFactory$ScheduleValues$10).
      • This class iterates through 10 enum instances, trying to find the matching annotation attribute value in the target annotation. The target may have just a few of these attributes. We should be able to iterate through the attributes in the target annotation, and map them to enum instances.

      Attachments

        Activity

          People

            cfang@redhat.com Cheng Fang
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: