Skip to content

Commit

Permalink
fix: invalid error log message in ContextBuilder#getVariableDeclarati…
Browse files Browse the repository at this point in the history
…on (#2677)
  • Loading branch information
pvojtechovsky authored and monperrus committed Oct 22, 2018
1 parent 740ed6a commit 988b15e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/spoon/support/compiler/jdt/ContextBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ <T> CtVariable<T> getVariableDeclaration(final String name) {
final CtVariable<T> variable = this.<T, CtVariable<T>>getVariableDeclaration(name, null);
if (variable == null) {
// note: this happens when using the new try(vardelc) structure
this.jdtTreeBuilder.getLogger().error(
format("Could not find declaration for variable %s at %s",
// note: this can happen when identifier is not a variable name but e.g. a Type name.
this.jdtTreeBuilder.getLogger().debug(
format("Could not find declaration for variable %s at %s.",
name, stack.peek().element.getPosition()));
}
return variable;
Expand Down

0 comments on commit 988b15e

Please sign in to comment.