Skip to content

Commit

Permalink
remove non-used fields/methods and degrade indent type to CharSequence
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Feb 1, 2017
1 parent b6b0183 commit d5b45b1
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions ext/java/nokogiri/internals/SaveContextVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class SaveContextVisitor {
private final StringBuilder buffer;
private final Stack<String> indentation;
private String encoding;
private final String indentString;
private final CharSequence indentString;
private boolean format;
private final boolean noDecl;
private final boolean noEmpty;
Expand All @@ -87,7 +87,8 @@ public class SaveContextVisitor {
private final List<Node> c14nNodeList;
private final Deque<Attr[]> c14nNamespaceStack;
private final Deque<Attr[]> c14nAttrStack;
private List<String> c14nExclusiveInclusivePrefixes = null;
//private List<String> c14nExclusiveInclusivePrefixes = null;

/*
* U can't touch this.
* http://www.youtube.com/watch?v=WJ2ZFVx6A4Q
Expand All @@ -110,7 +111,7 @@ public class SaveContextVisitor {
public static final int SUBSETS = 8;
public static final int EXCLUSIVE = 16;

public SaveContextVisitor(int options, String indent, String encoding, boolean htmlDoc, boolean fragment, int canonicalOpts) {
public SaveContextVisitor(int options, CharSequence indent, String encoding, boolean htmlDoc, boolean fragment, int canonicalOpts) {
buffer = new StringBuilder();
this.encoding = encoding;
indentation = new Stack<String>(); indentation.push("");
Expand Down Expand Up @@ -156,14 +157,6 @@ public void setEncoding(String encoding) {
this.encoding = encoding;
}

public List<Node> getC14nNodeList() {
return c14nNodeList;
}

public void setC14nExclusiveInclusivePrefixes(List<String> prefixes) {
c14nExclusiveInclusivePrefixes = prefixes;
}

public boolean enter(Node node) {
if (node instanceof Document) {
return enter((Document)node);
Expand Down Expand Up @@ -438,7 +431,7 @@ public boolean enter(Element element) {
if (isEmpty(name)) {
buffer.append(" />"); // see http://www.w3.org/TR/xhtml1/#C_2
} else {
buffer.append(">");
buffer.append('>');
}
} else {
buffer.append("/>");
Expand Down

0 comments on commit d5b45b1

Please sign in to comment.