Fixed a bug where the LispFilterInputStream could not recognize an escaped double quote

This commit is contained in:
Mike Cifelli 2016-12-08 15:33:03 -05:00
parent 702c11a7b9
commit dd8f4172e4
1 changed files with 4 additions and 4 deletions

View File

@ -9,14 +9,14 @@ import java.io.IOException;
*/
public class LispFilterInputStream extends FilterInputStream {
private boolean inQuotedString;
private boolean isInQuotedString;
private int previousCharacter;
private int nextCharacter;
public LispFilterInputStream(InputStream underlyingInputStream) {
super(underlyingInputStream);
inQuotedString = false;
isInQuotedString = false;
previousCharacter = 0;
nextCharacter = 0;
}
@ -40,7 +40,7 @@ public class LispFilterInputStream extends FilterInputStream {
private void indicateEncounterWithStringBoundary() {
if (haveEncounteredStringBoundary())
inQuotedString = !inQuotedString;
isInQuotedString = !isInQuotedString;
}
private boolean haveEncounteredStringBoundary() {
@ -48,7 +48,7 @@ public class LispFilterInputStream extends FilterInputStream {
}
private boolean haveEnteredComment() {
return (nextCharacter == ';') && (!inQuotedString);
return (nextCharacter == ';') && (!isInQuotedString);
}
private void consumeAllBytesInComment() throws IOException {