Skip to content

Commit

Permalink
refactor: removes old unseless code
Browse files Browse the repository at this point in the history
Close PR #983
  • Loading branch information
monperrus authored and tdurieux committed Nov 17, 2016
1 parent 599f7a2 commit 9272284
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 664 deletions.
Expand Up @@ -16,14 +16,13 @@
*/
package spoon.support.comparator;

import spoon.reflect.declaration.CtElement;

import java.io.Serializable;
import java.util.Comparator;

import spoon.reflect.declaration.CtElement;
import spoon.support.visitor.DeepRepresentationVisitor;

/**
* Compares based on a toString representation. Used for backward compatibility.
* Compares based on a toString representation.
*/
public class DeepRepresentationComparator implements Comparator<CtElement>, Serializable {

Expand All @@ -45,9 +44,7 @@ public int compare(CtElement o1, CtElement o2) {
}

private String getDeepRepresentation(CtElement elem) {
DeepRepresentationVisitor prThis = new DeepRepresentationVisitor();
prThis.scan(elem);
return prThis.getRepresentation();
return elem.toString();
}

}

0 comments on commit 9272284

Please sign in to comment.