Bug 19634

Summary: org.apache.poi.hssf.record.UnicodeString doesn't compile under JDK 1.3
Product: POI Reporter: Donald Bell <donald>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: Fix for the 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 :)