Skip to content

Commit

Permalink
Change string#replace by string#replaceFirst
Browse files Browse the repository at this point in the history
- The former does not accept a regex.
  • Loading branch information
HoussemNasri committed Jul 11, 2024
1 parent 827d78c commit 21cd978
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Optional<CVEAuditManagerOVAL.OVALProduct> toOVALProduct() {
serverOsFamily == OsFamily.SUSE_LINUX_ENTERPRISE_SERVER ||
serverOsFamily == OsFamily.SUSE_LINUX_ENTERPRISE_DESKTOP) {
// Removing the minor version part: 15.6 --> 15
serverOsRelease = serverOsRelease.replace("\\..*", "");
serverOsRelease = serverOsRelease.replaceFirst("\\..*$", "");
}

CVEAuditManagerOVAL.OVALProduct ovalProduct = null;
Expand Down

0 comments on commit 21cd978

Please sign in to comment.