Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.13, 1.22.0, 1.32.0
-
None
Description
It looks like OAK-8139 has introduced a regression in the version check logic of DocumentDiscoveryLiteService.hasBacklog :
Before the change the logic was:
Version actual = Version.parseVersion((String) oakVersion); Version introduced = Version.parseVersion("1.3.5"); if (actual.compareTo(introduced)>=0) { warn = true; }
After the change the logis is:
warn = versionPredates("1.3.5", (String) oakVersion);
with versionPredates logic as follows:
static boolean versionPredates(String base, String compare) { Version one = Version.parseVersion(substSnapshotPrefix(compare)); Version two = Version.parseVersion(substSnapshotPrefix(base)); return two.compareTo(one) > 0; }
The behaviour of versionPredates can eg. be easily seen in the test:
assertTrue(DocumentDiscoveryLiteService.versionPredates("1.3.5", "1.0.0"));
So before the change the log.warn would be issued for versions newer or equal to 1.3.5, where as after the change the log.warn is issued for versions lower than 1.3.5.
This inverts only the log.warn filtering with no other side-effects.
/cc reschke
Attachments
Attachments
Issue Links
- is caused by
-
OAK-8139 DocumentDiscoveryLiteService hasBacklog silencing must support maven version format
- Closed