Bug 19634 - org.apache.poi.hssf.record.UnicodeString doesn't compile under JDK 1.3
Summary: org.apache.poi.hssf.record.UnicodeString doesn't compile under JDK 1.3
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: Other other
: P3 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-05 03:01 UTC by Donald Bell
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Fix for the bug. (1.05 KB, patch)
2003-05-05 03:11 UTC, Donald Bell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Donald Bell 2003-05-05 03:01:08 UTC
The org.apache.poi.hssf.record.UnicodeString class doesn't compile under JDK 
1.3 because it is calling new RuntimeException(Exception) this constructor was 
introduced in JDK 1.4

The offending code is in the method fillFields(byte[] , short) and the snippet 
below shows the problem.


            try {
                field_3_string = new String(data, 3, getCharCount(), 
                                        StringUtil.getPreferredEncoding());
            } catch (UnsupportedEncodingException e) {
                throw new RuntimeException(e);
            }
Comment 1 Donald Bell 2003-05-05 03:11:46 UTC
Created attachment 6196 [details]
Fix for the bug.
Comment 2 Avik Sengupta 2003-05-05 06:21:06 UTC
applied. Thanks for catching this, we aim for 1.3 compliance, and hope for 1.2 :)