Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-5392

ApprovalProfileBase.getSteps checks for null instead of empty

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.6.0
    • Fix Version/s: EJBCA 6.6.0
    • Component/s: None
    • Labels:
      None
    • Issue discovered during:
      Jenkins

      Description

      ApprovalProfileBase.getSteps() has the following code:
      if(steps == null) {
      but in the class the field steps is always created as an empty map, i.e. never null:
      private transient Map<Integer, ApprovalStep> steps = new HashMap<>();
      we should in other words check for null or empty.

      This is the cause of JUnit failures like this:
      https://hudson.primekey.se/view/EJBCA%20trunk/job/EJBCA_COMMUNITY_MARIADB_UBUNTU1204_JBOSS711GA_PUPPET/lastCompletedBuild/testReport/org.ejbca.core.ejb.approval/ApprovalProfileSessionTest/testChangeApprovalProfile/

      This seems to only happen in JBoss 7, which means that there is some difference in code path when it's loaded from the database... anyhow it's a but and is trivially fixed.

        Attachments

          Activity

            People

            Assignee:
            aveen Aveen Ismail (Inactive)
            Reporter:
            tomas Tomas Gustavsson
            Verified by:
            Tomas Gustavsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: