You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sd...@apache.org on 2023/02/20 21:07:18 UTC

[netbeans] branch master updated: Audits should not automatically change persistent project settings.

This is an automated email from the ASF dual-hosted git repository.

sdedic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d228b7827 Audits should not automatically change persistent project settings.
     new f538159e88 Merge pull request #5521 from sdedic/oci/temporary-knowledgebase
1d228b7827 is described below

commit 1d228b78270a746a1d1080e62d0bd214f2484276
Author: Svata Dedic <sv...@oracle.com>
AuthorDate: Fri Feb 17 11:59:34 2023 +0100

    Audits should not automatically change persistent project settings.
---
 .../org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java
index be2401c0d2..4a66d0e725 100644
--- a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java
+++ b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java
@@ -129,7 +129,8 @@ public final class ProjectVulnerability {
     })
     public CompletableFuture<String> runProjectAudit(KnowledgeBaseItem item, AuditOptions options) {
         if (item != null) {
-            setProjectKnowledgeBase(item);
+            // make transient setting, so that change handler may work against the same knowledgebase.
+            setProjectKnowledgeBase0(item);
         }
         CompletableFuture<String> result = new CompletableFuture<>();
         AUDIT_PROCESSOR.post(() -> {
@@ -215,7 +216,7 @@ public final class ProjectVulnerability {
         return item;
     }
     
-    public KnowledgeBaseItem setProjectKnowledgeBase0(KnowledgeBaseItem item) {
+    private KnowledgeBaseItem setProjectKnowledgeBase0(KnowledgeBaseItem item) {
         synchronized (this) {
             lastProfile = OCIManager.getDefault().getActiveProfile();
             return knowledgeBaseItem = item;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists