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
b59b8abe8e
commit
17bb993bcd
@ -158,7 +158,15 @@ public class UnicodeString
|
|||||||
field_3_string = new String(data, 3, getCharCount(),
|
field_3_string = new String(data, 3, getCharCount(),
|
||||||
StringUtil.getPreferredEncoding());
|
StringUtil.getPreferredEncoding());
|
||||||
} catch (UnsupportedEncodingException e) {
|
} 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
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user