Skip to content

Commit

Permalink
Remove v from OSS Version
Browse files Browse the repository at this point in the history
  • Loading branch information
che-so committed Oct 4, 2023
1 parent 30797ac commit 4d90652
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/main/java/oss/fosslight/controller/ProjectController.java
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,14 @@ private Map<String, Object> updateCopyConfirmStatus(HttpServletRequest req, Proj
ossComponents = (List<ProjectIdentification>) fromJson(mainDataString, collectionType2);

List<List<ProjectIdentification>> 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<List<Project>>() {
}.getType();
List<Project> binAddList = new ArrayList<Project>();
Expand Down Expand Up @@ -2176,7 +2183,15 @@ private Map<String, Object> updateCopyConfirmStatus(HttpServletRequest req, Proj
ossComponents = (List<ProjectIdentification>) fromJson(mainDataString, collectionType2);

List<List<ProjectIdentification>> 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<List<Project>>() {}.getType();
List<Project> srcAddList = new ArrayList<Project>();
srcAddList = (List<Project>) fromJson(srcAddListDataString, collectionType4);
Expand Down

0 comments on commit 4d90652

Please sign in to comment.