Skip to content

Commit a5df73c

Browse files
committed
Check for correct configuration before making use of the visitor
1 parent 9a2b805 commit a5df73c

File tree

1 file changed

+4
-4
lines changed
  • Middleware/smardes-middleware/modules/smardes-rule-engine/src/main/java/com/camline/projects/smardes/rule

1 file changed

+4
-4
lines changed

Middleware/smardes-middleware/modules/smardes-rule-engine/src/main/java/com/camline/projects/smardes/rule/ConfigurationChecker.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/*******************************************************************************
22
* Copyright (C) 2018-2019 camLine GmbH
3-
*
3+
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal
66
* in the Software without restriction, including without limitation the rights
77
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
88
* copies of the Software, and to permit persons to whom the Software is
99
* furnished to do so, subject to the following conditions:
10-
*
10+
*
1111
* The above copyright notice and this permission notice shall be included in
1212
* all copies or substantial portions of the Software.
13-
*
13+
*
1414
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1515
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -82,9 +82,9 @@ class ConfigurationChecker extends BaseVisitor<Boolean, RuntimeException> {
8282

8383
@Override
8484
public Boolean visit(Rules rules) {
85-
rules.accept(ruleNameVisitor);
8685
boolean ok = doVisit(rules.getGlobalVariables(), rules.getPatchMessageBodyPrototypes());
8786
if (ok) {
87+
rules.accept(ruleNameVisitor);
8888
ok = doVisit(rules.getRuleGroup());
8989
}
9090
return Boolean.valueOf(ok);

0 commit comments

Comments
 (0)