From 67e2ff56cb435d05accacb82c36f9fd1182cf882 Mon Sep 17 00:00:00 2001 From: Sanoj Punchihewa Date: Mon, 22 Apr 2024 07:20:33 +0530 Subject: [PATCH] Fix intermittent validation issues in source view Git issue: https://github.com/wso2/micro-integrator/issues/3313 --- .../gmf/esb/diagram/validator/ProcessSourceView.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb.diagram/src/org/wso2/integrationstudio/gmf/esb/diagram/validator/ProcessSourceView.java b/components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb.diagram/src/org/wso2/integrationstudio/gmf/esb/diagram/validator/ProcessSourceView.java index 37b532bfc..d4c0516d0 100644 --- a/components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb.diagram/src/org/wso2/integrationstudio/gmf/esb/diagram/validator/ProcessSourceView.java +++ b/components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb.diagram/src/org/wso2/integrationstudio/gmf/esb/diagram/validator/ProcessSourceView.java @@ -839,7 +839,7 @@ private static SourceError synapseValidation() { } } else { - if (currentMediator != null && !isComment) { + if (currentMediator != null) { if (currentMediator.getTagType() == 4 && tempTag.getTagType() == 5 && currentMediator.getValue().equals(prev.getValue())) { sourceError = mediatorValidation(); @@ -894,7 +894,11 @@ private static SourceError synapseValidation() { } // no need to add encoding tag } - + // If the current tag is a single line comment, set isComment to false + // before processing the next tag + if (isComment && tempTag.getValue().trim().endsWith(END_COMMENT)) { + isComment = false; + } prev = tempTag; } return sourceError;