mirror of https://github.com/apache/poi.git
PR 19634: Compiling error in jdk1.3
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353082 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11eb7c710c
commit
84b7577215
|
@ -158,7 +158,15 @@ public class UnicodeString
|
|||
field_3_string = new String(data, 3, getCharCount(),
|
||||
StringUtil.getPreferredEncoding());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
// Extract the message out of our encoding
|
||||
// error and then bubble a runtime exception.
|
||||
String errorMessage = e.getMessage();
|
||||
|
||||
// Make sure the message isn't null
|
||||
if (errorMessage == null) {
|
||||
errorMessage = e.toString();
|
||||
}
|
||||
throw new RuntimeException(errorMessage);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue