Skip to content

Commit

Permalink
[fix] Avoid reusing original source for expressions/statements #114
Browse files Browse the repository at this point in the history
  • Loading branch information
slarse committed May 7, 2020
1 parent b436844 commit 6b8444e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ public SporkPrettyPrinter scan(CtElement e) {
if (e == null) {
return this;
} else if (e.getMetadata(SpoonTreeBuilder.SINGLE_REVISION_KEY) != null &&
(e instanceof CtMethod
|| e instanceof CtField
|| e instanceof CtStatement
|| e instanceof CtExpression
)
(e instanceof CtMethod || e instanceof CtField)
&& SourceExtractor.hasSourcePos(e)) {
CtElement origNode = (CtElement) e.getMetadata(SpoonTreeBuilder.ORIGINAL_NODE_KEY);
String originalSource = SourceExtractor.getOriginalSource(origNode);
Expand Down

0 comments on commit 6b8444e

Please sign in to comment.