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

Database upgrade version comparison does not handle varying number if fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.14.0
    • Component/s: None
    • Labels:
      None
    • Stakeholder:
      Customer
    • Issue discovered during:
      Customer
    • Sprint:
      EJBCA Sprint 14

      Description

      5.0 is lesser than 5.0.0 according to UpgradeSessionBean.isLesserThan. This prevents upgrading under some circumstances. I haven't figured out how to reproduce to get a database version that is like that, but it's happened in the wild.

      Make version comparison assume that 5.0 == 5.0.0, i.e. add additional zeroes when needed.

      In fact the whole isLesserThan is suitable to be a static method in StringTools, I will move it there but not change the structure of UpgradeSessionBean, to keep changes to a minimum.

      Adding JUnit test of isLesserThan as well.

       

        Attachments

          Activity

            People

            • Assignee:
              tomas Tomas Gustavsson
              Reporter:
              tomas Tomas Gustavsson
              Verified by:
              Bastian Fredriksson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: