Uh oh!
There was an error while loading. Please reload this page.
If else branching - #449
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| class StepResponseEvaluation { | ||
| private String getJsonValue(String path, String message) { | ||
| ObjectMapper objectMapper = new ObjectMapper(); |
There was a problem hiding this comment.
You should @Autowire the object mapper and not instatatiate it every time when the method is called.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
borditamas
left a comment
There was a problem hiding this comment.
See inline comments.
Also, unit tests will need to be updated/written later to cover this new feature and you need to become an Eclipse Contributor (wiki) for the offical release.
borditamas
left a comment
There was a problem hiding this comment.
There are still some suggestion, but looks good overall.
| //------------------------------------------------------------------------------------------------- | ||
| private ExecutorSelector executorSelector; | ||
There was a problem hiding this comment.
Add here:
@Autowired
private StepResponseEvaluation evaluator;
| boolean executable = true; | ||
| AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); |
There was a problem hiding this comment.
Delete these stuffs:
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.scan("eu.arrowhead.core.choreographer.servic");
StepResponseEvaluation evaluator = new StepResponseEvaluation(); //context.getBean(StepResponseEvaluation.class); // new StepResponseEvaluation();
'''
| class StepResponseEvaluation { | ||
| private final Logger logger = LogManager.getLogger(StepResponseEvaluation.class); | ||
There was a problem hiding this comment.
Add:
@Autowired
private ObjectMapper mapper;
| public Boolean stepOutputValue(String message, String path, String threshold) { | ||
| // if sth used is null throw exception | ||
| if (path == null || message == null || threshold == null) { | ||
| throw new NullPointerException("The arguments cannot be null"); |
There was a problem hiding this comment.
Do not throw programatically throw NullPointerException. It should be thrown only in runtime when it is not intentional.
No description provided.