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

Combine ORDINALS and ORDINAL_TO_WEEK_NUMBER_MAPPING fields in ejb3 DayOfMonth class

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 27.0.0.Alpha1, 27.0.0.Final
    • None
    • EJB
    • None

    Description

      org.jboss.as.ejb3.timerservice.schedule.attribute.DayOfMonth class contains these 2 fields with duplicate data. They can be merged into a single map.

      
          private static final Set<String> ORDINALS = new HashSet<String>();
      
          private static final Map<String, Integer> ORDINAL_TO_WEEK_NUMBER_MAPPING = new HashMap<String, Integer>();
      
          static {
              ORDINALS.add("1st");
              ORDINALS.add("2nd");
              ORDINALS.add("3rd");
              ORDINALS.add("4th");
              ORDINALS.add("5th");
              ORDINALS.add("last");
      
              ORDINAL_TO_WEEK_NUMBER_MAPPING.put("1st", 1);
              ORDINAL_TO_WEEK_NUMBER_MAPPING.put("2nd", 2);
              ORDINAL_TO_WEEK_NUMBER_MAPPING.put("3rd", 3);
              ORDINAL_TO_WEEK_NUMBER_MAPPING.put("4th", 4);
              ORDINAL_TO_WEEK_NUMBER_MAPPING.put("5th", 5);
      
          }
       

      Attachments

        Issue Links

          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: