mirror of
https://github.com/apache/poi.git
synced 2025-02-08 11:04:53 +00:00
Bug 56880 - switch exception to logged warning that non-extended pascal strings are not supported. Full fix would add parsing for these strings.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1728547 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d1e2c186ec
commit
991c5d0a00
@ -16,11 +16,13 @@
|
|||||||
==================================================================== */
|
==================================================================== */
|
||||||
package org.apache.poi.hwpf.model;
|
package org.apache.poi.hwpf.model;
|
||||||
|
|
||||||
import org.apache.poi.util.LittleEndian;
|
|
||||||
import org.apache.poi.util.StringUtil;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.apache.poi.util.LittleEndian;
|
||||||
|
import org.apache.poi.util.POILogFactory;
|
||||||
|
import org.apache.poi.util.POILogger;
|
||||||
|
import org.apache.poi.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The STTB is a string table that is made up of a header that is followed by an
|
* The STTB is a string table that is made up of a header that is followed by an
|
||||||
* array of elements. The cData value specifies the number of elements that are
|
* array of elements. The cData value specifies the number of elements that are
|
||||||
@ -78,10 +80,17 @@ public class Sttb
|
|||||||
|
|
||||||
if ( ffff != (short) 0xffff )
|
if ( ffff != (short) 0xffff )
|
||||||
{
|
{
|
||||||
// Non-extended character Pascal strings
|
POILogFactory.getLogger(Sttb.class).log(
|
||||||
throw new UnsupportedOperationException(
|
POILogger.WARN,
|
||||||
"Non-extended character Pascal strings are not supported right now. "
|
"Non-extended character Pascal strings are not supported right now. "
|
||||||
+ "Please, contact POI developers for update." );
|
+ "Creating empty values in the RevisionMarkAuthorTable for now. " +
|
||||||
|
"Please, contact POI developers for update.");
|
||||||
|
//set data and extraData to empty values to avoid
|
||||||
|
//downstream NPE in case someone calls getEntries on RevisionMarkAuthorTable
|
||||||
|
_data = new String[0];
|
||||||
|
_extraData = new byte[0][];
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// strings are extended character strings
|
// strings are extended character strings
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user