From 2bab3e74235dc64e7e003c1a755777900d8825d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D0=BF=D1=80=D0=B0=D0=BB=D0=BE=D0=B2=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80?= Date: Sun, 29 Aug 2021 11:21:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20che?= =?UTF-8?q?ckstyle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bsl/check/EventDataExchangeLoadCheck.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/EventDataExchangeLoadCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/EventDataExchangeLoadCheck.java index eba90c69..2b5205f3 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/EventDataExchangeLoadCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/EventDataExchangeLoadCheck.java @@ -181,13 +181,17 @@ public class EventDataExchangeLoadCheck Conditional conditional = statementMethod.getIfPart(); Expression predicate = conditional.getPredicate(); if (predicate instanceof DynamicFeatureAccess) + { return checkDynamicFeatureAccess((DynamicFeatureAccess)predicate, checkCalls); + } else if (predicate instanceof Invocation) { FeatureAccess expression = ((Invocation)predicate).getMethodAccess(); if (expression instanceof DynamicFeatureAccess && checkDynamicFeatureAccess((DynamicFeatureAccess)expression, checkCalls)) + { return true; + } } else if (predicate instanceof BinaryExpression) { @@ -197,10 +201,14 @@ public class EventDataExchangeLoadCheck { Expression expression = temp.getKey(); if (expression instanceof Invocation) + { expression = ((Invocation)expression).getMethodAccess(); + } if (expression instanceof DynamicFeatureAccess && checkDynamicFeatureAccess((DynamicFeatureAccess)expression, checkCalls)) + { return true; + } } } @@ -261,7 +269,9 @@ public class EventDataExchangeLoadCheck BinaryExpression currentExpression = null; if (binaryLeft instanceof BinaryExpression) + { currentExpression = (BinaryExpression)binaryLeft; + } else { mapOperatorOperand.put(binaryLeft, tempOperation); @@ -275,9 +285,13 @@ public class EventDataExchangeLoadCheck tempOperation = currentExpression.getOperation(); mapOperatorOperand.put(temp, tempOperation); if (binaryLeft instanceof BinaryExpression) + { currentExpression = (BinaryExpression)binaryLeft; + } else + { currentExpression = null; + } } mapOperatorOperand.put(binaryLeft, tempOperation);