|
|
Subject:
infinite loop in java jdk
Category: Computers > Programming Asked by: beavis-ga List Price: $2.00 |
Posted:
16 Nov 2003 03:16 PST
Expires: 16 Dec 2003 03:16 PST Question ID: 276368 |
Sun's ISO-2022-JP decoder has a bad bug that causes it to go into an infinite loop. I need a simple fix (I don't want to build my own version of the JDK or anything). This code demonstrates the problem: import javax.mail.internet.*; class JP { public static void main(String args[]) throws Exception { String s = "=?ISO-2022-JP?B?GyRAGyRCJT8lJiVzJWEhPCVrGyhC?="; System.out.println(MimeUtility.decodeText(s)); } } % java -version java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) Here is a stack trace (from kill -QUIT). The code seems to be stuck in decodeLoop(). "main" prio=1 tid=0x08052990 nid=0x25c5 runnable [bfffd000..bfffd6fc] at sun.nio.cs.ext.ISO2022_JP$Decoder.decodeArrayLoop(ISO2022_JP.java:147) at sun.nio.cs.ext.ISO2022_JP$Decoder.decodeLoop(ISO2022_JP.java:344) at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:536) at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:186) at java.lang.StringCoding.decode(StringCoding.java:224) at java.lang.String.<init>(String.java:320) at javax.mail.internet.MimeUtility.decodeWord(MimeUtility.java:693) at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:448) at JP.main(JP.java:7) |
|
There is no answer at this time. |
|
Subject:
Re: infinite loop in java jdk
From: rmenon-ga on 01 Dec 2003 00:56 PST |
Hi, I tried this with JDK 1.3.1 . It seems to work quite alright . regards Remesh http://www.i-unknown.net |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |