From 4e4a3cf657fc5bf34e47e5ef6ebe9e73038dc605 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Fri, 16 Jul 2021 03:46:32 +0000 Subject: [PATCH] 8269763: The JEditorPane is blank after JDK-8265167 Reviewed-by: azvegint, prr --- .../share/classes/javax/swing/text/rtf/RTFParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java b/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java index 9b38c5cff57..259b63ed8ee 100644 --- a/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java +++ b/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java @@ -310,7 +310,8 @@ abstract class RTFParser extends AbstractFilter if (binaryBytesLeft > 0) { binaryBuf.write(ch); binaryBytesLeft--; - } else { + } + if (binaryBytesLeft == 0) { state = S_text; specialsTable = savedSpecials; savedSpecials = null;