Skip to content

Commit 37a18d0

Browse files
committed
Fix logs in SE engine
1 parent 5987d83 commit 37a18d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

java-squid/src/main/java/org/sonar/java/se/ExplodedGraphWalker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private void execute(MethodTree tree) {
132132
while (!workList.isEmpty()) {
133133
steps++;
134134
if (steps > MAX_STEPS) {
135-
throw new MaximumStepsReachedException("reached limit of " + MAX_STEPS + " steps for method " + tree.simpleName().name() + "in class " + tree.symbol().owner().name());
135+
throw new MaximumStepsReachedException("reached limit of " + MAX_STEPS + " steps for method " + tree.simpleName().name() + " in class " + tree.symbol().owner().name());
136136
}
137137
// LIFO:
138138
node = workList.removeFirst();
@@ -520,7 +520,7 @@ public void enqueue(ExplodedGraph.ProgramPoint programPoint, ProgramState progra
520520
}
521521
if (isExplodedGraphTooBig(programState)) {
522522
throw new ExplodedGraphTooBigException("Program state constraints are too big : stopping Symbolic Execution for method "
523-
+ methodTree.simpleName().name() + "in class " + methodTree.symbol().owner().name());
523+
+ methodTree.simpleName().name() + " in class " + methodTree.symbol().owner().name());
524524
}
525525
ExplodedGraph.Node cachedNode = explodedGraph.getNode(programPoint, programState.visitedPoint(programPoint, nbOfExecution + 1));
526526
if (!cachedNode.isNew) {

java-squid/src/main/java/org/sonar/java/se/SymbolicExecutionVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void visitNode(Tree tree) {
4040
try {
4141
tree.accept(new ExplodedGraphWalker(context));
4242
} catch (ExplodedGraphWalker.MaximumStepsReachedException | ExplodedGraphWalker.ExplodedGraphTooBigException exception) {
43-
LOG.error("Could not complete symbolic execution: ", exception.getMessage());
43+
LOG.error("Could not complete symbolic execution: {}", exception.getMessage());
4444
LOG.debug("Could not complete symbolic execution: ", exception);
4545
}
4646

0 commit comments

Comments
 (0)