###@###.### 2004-08-18 J2SE Version (please include all output from java -version flag): java version "1.5.0-beta3" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b60) Java HotSpot(TM) Client VM (build 1.5.0-beta3-b60, mixed mode, sharing) Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one) Yes Operating System Configuration Information (be specific): Win XP Hardware Configuration Information (be specific): P4 Bug Description: Stack overflow when parsing RTF document Steps to Reproduce (be specific): When reading attached RTF document, StackOverflowError is thrown. Use this sample code to reproduce the error. import java.io.*; import javax.swing.text.rtf.RTFEditorKit; import javax.swing.text.*; public class RTFConverter { public static void main(String[] args) { try { DefaultStyledDocument doc = new DefaultStyledDocument(); new RTFEditorKit().read(new FileInputStream("wpt-402010.rtf"), doc, 0); String docText = doc.getText(0, doc.getLength()); System.out.println(docText); } catch (Throwable t) { //System.err.println(t); t.printStackTrace(); } } } ###@###.### 10/6/04 23:09 GMT
|