Fixed a bug where the LispFilterInputStream could not recognize an escaped double quote
This commit is contained in:
		
							parent
							
								
									702c11a7b9
								
							
						
					
					
						commit
						dd8f4172e4
					
				| @ -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 { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user