Skip to content

Commit

Permalink
performance of DoNotFurtherTemplateThisElement
Browse files Browse the repository at this point in the history
  • Loading branch information
pvojtechovsky committed Jul 15, 2017
1 parent deea372 commit 857edef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/spoon/support/template/SubstitutionVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ class DoNotFurtherTemplateThisElement extends SpoonException {

Object skipped;

DoNotFurtherTemplateThisElement(Object e) {
super("skipping " + e.toString());
DoNotFurtherTemplateThisElement(CtElement e) {
//Do not use e.toString(), which computes expensive String representation of whole element,
//which is sometime impossible to compute correctly in the middle of the substitution process
super("Skipping " + e.getClass().getName());
skipped = e;
}

Expand Down

0 comments on commit 857edef

Please sign in to comment.