From bba6e5bb44b46ca2e1561210996a8974dcab28e7 Mon Sep 17 00:00:00 2001 From: Satyam Chaurasia Date: Mon, 29 Jan 2024 17:14:53 +0530 Subject: [PATCH] Removed code for Location tab remember --- pom.xml | 2 +- .../com/checkmarx/sdk/service/CxService.java | 67 +++++++++++-------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 4754e80f..01fe7514 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.checkmarx-ltd cx-spring-boot-sdk - 0.5.71 + 0.5.73 cx-spring-boot-sdk Checkmarx Java Spring Boot SDK diff --git a/src/main/java/com/checkmarx/sdk/service/CxService.java b/src/main/java/com/checkmarx/sdk/service/CxService.java index ff0e6d40..9529cbde 100644 --- a/src/main/java/com/checkmarx/sdk/service/CxService.java +++ b/src/main/java/com/checkmarx/sdk/service/CxService.java @@ -2369,37 +2369,48 @@ public Integer createScan(CxScanParams params, String comment) throws CheckmarxE //preserving settings - Gitremotemain gitremotemainObj = getGitRepoDetails(projectId); - Customremotemain customremotemainObj = getCustomRepoDetails(projectId); - Perforceremotemain perforceremotemainObj = getPerforceRepoDetails(projectId); - Sharedremotemain sharedremotemainObj = getSharedRepoDetails(projectId); - Svnremotemain svnremotemainObj = getSvnRepoDetails(projectId); - Tfsremotemain tfsremotemainObj = getTfsRepoDetails(projectId); - ExcludeSettingsmain excludeSettingsmainObj = getExcludeSettingsDetails(projectId); +// Gitremotemain gitremotemainObj = getGitRepoDetails(projectId); +// Customremotemain customremotemainObj = getCustomRepoDetails(projectId); +// Perforceremotemain perforceremotemainObj = getPerforceRepoDetails(projectId); +// Sharedremotemain sharedremotemainObj = getSharedRepoDetails(projectId); +// Svnremotemain svnremotemainObj = getSvnRepoDetails(projectId); +// Tfsremotemain tfsremotemainObj = getTfsRepoDetails(projectId); +// ExcludeSettingsmain excludeSettingsmainObj = getExcludeSettingsDetails(projectId); + prepareSources(params, projectId); //Setting Remembered Git Settings - if (gitremotemainObj != null) { - setGitRepoDetails(gitremotemainObj, projectId); - } - if (customremotemainObj != null) { - setCustomRepoDetails(customremotemainObj, projectId); - } - if (perforceremotemainObj != null) { - setPerforceRepoDetails(perforceremotemainObj, projectId); - } - if (sharedremotemainObj != null) { - setSharedRepoDetails(sharedremotemainObj, projectId); - } - if (svnremotemainObj != null) { - setSvnRepoDetails(svnremotemainObj, projectId); - } - if (tfsremotemainObj != null) { - setTfsRepoDetails(tfsremotemainObj, projectId); - } +// try { +// if(params.isFileSource() || (params.isGitSource() +// && cxProperties.getEnabledZipScan())){ +// if (gitremotemainObj != null) { +// setGitRepoDetails(gitremotemainObj, projectId); +// } +// if (customremotemainObj != null) { +// setCustomRepoDetails(customremotemainObj, projectId); +// } +// if (perforceremotemainObj != null) { +// setPerforceRepoDetails(perforceremotemainObj, projectId); +// } +// if (sharedremotemainObj != null) { +// setSharedRepoDetails(sharedremotemainObj, projectId); +// } +// if (svnremotemainObj != null) { +// setSvnRepoDetails(svnremotemainObj, projectId); +// } +// if (tfsremotemainObj != null) { +// setTfsRepoDetails(tfsremotemainObj, projectId); +// } +// +// if (excludeSettingsmainObj != null) { +// setExcludeSettingsDetails(excludeSettingsmainObj, projectId); +// } +// } +// }catch (Exception e) { +// log.error("Error Occurred While Setting Settings."); +// log.error(ExceptionUtils.getStackTrace(e)); +// } + - if (excludeSettingsmainObj != null) { - setExcludeSettingsDetails(excludeSettingsmainObj, projectId); - } if(params.isIncremental() && projectExistedBeforeScan) {