Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: invalid error log message in ContextBuilder#getVariableDeclaration #2677

Merged
merged 1 commit into from
Oct 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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