diff --git a/src/main/java/oss/fosslight/controller/ProjectController.java b/src/main/java/oss/fosslight/controller/ProjectController.java index cc1843b58..8d3f736c6 100644 --- a/src/main/java/oss/fosslight/controller/ProjectController.java +++ b/src/main/java/oss/fosslight/controller/ProjectController.java @@ -1910,7 +1910,14 @@ private Map updateCopyConfirmStatus(HttpServletRequest req, Proj ossComponents = (List) fromJson(mainDataString, collectionType2); List> ossComponentsLicense = CommonFunction.setOssComponentLicense(ossComponents); - + for(ProjectIdentification idx : ossComponents){ + String ossVersion = idx.getOssVersion(); + if (ossVersion.matches("[vV]\\.(\\d+).*") || ossVersion.matches("[vV](\\d+).*")) { + ossVersion = ossVersion.replaceAll("[vV]\\.", "").replaceAll("[vV]", ""); + idx.setOssVersion(ossVersion); + } + } + Type collectionType4 = new TypeToken>() { }.getType(); List binAddList = new ArrayList(); @@ -2176,7 +2183,15 @@ private Map updateCopyConfirmStatus(HttpServletRequest req, Proj ossComponents = (List) fromJson(mainDataString, collectionType2); List> ossComponentsLicense = CommonFunction.setOssComponentLicense(ossComponents); - + + for(ProjectIdentification idx : ossComponents){ + String ossVersion = idx.getOssVersion(); + if (ossVersion.matches("[vV]\\.(\\d+).*") || ossVersion.matches("[vV](\\d+).*")) { + ossVersion = ossVersion.replaceAll("[vV]\\.", "").replaceAll("[vV]", ""); + idx.setOssVersion(ossVersion); + } + } + Type collectionType4 = new TypeToken>() {}.getType(); List srcAddList = new ArrayList(); srcAddList = (List) fromJson(srcAddListDataString, collectionType4);