</devs>
<release version="3.0.2-FINAL" date="2007-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">43108 - [PATCH] - Where permissions deny fetching System Properties, use sensible defaults</action>
<action dev="POI-DEVELOPERS" type="fix">43093 - [PATCH] - Fix formula evaluator support for Area3D references to other sheets</action>
<action dev="POI-DEVELOPERS" type="fix">Improvements to HSSFDateUtils.isADateFormat, and have HSSFDateUtil.isCellDateFormatted use this</action>
<action dev="POI-DEVELOPERS" type="fix">42999 - [PATCH] - Fix for HSSFPatriarch positioning problems</action>
<changes>
<release version="3.0.2-FINAL" date="2007-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">43108 - [PATCH] - Where permissions deny fetching System Properties, use sensible defaults</action>
<action dev="POI-DEVELOPERS" type="fix">43093 - [PATCH] - Fix formula evaluator support for Area3D references to other sheets</action>
<action dev="POI-DEVELOPERS" type="fix">Improvements to HSSFDateUtils.isADateFormat, and have HSSFDateUtil.isCellDateFormatted use this</action>
<action dev="POI-DEVELOPERS" type="fix">42999 - [PATCH] - Fix for HSSFPatriarch positioning problems</action>
public abstract class AbstractEscherHolderRecord
extends Record
{
- private static final boolean DESERIALISE = System.getProperty("poi.deserialize.escher") != null;
+ private static boolean DESERIALISE;
+ static {
+ try {
+ DESERIALISE = (System.getProperty("poi.deserialize.escher") != null);
+ } catch (SecurityException e) {
+ DESERIALISE = false;
+ }
+ }
private List escherRecords;
private byte[] rawData;
try
{
fontMetricsProps = new Properties();
- if (System.getProperty("font.metrics.filename") != null)
- {
- String filename = System.getProperty("font.metrics.filename");
- File file = new File(filename);
+
+ // Check to see if the font metric file was specified
+ // as a system property
+ String propFileName = null;
+ try {
+ propFileName = System.getProperty("font.metrics.filename");
+ } catch(SecurityException e) {}
+
+ if (propFileName != null) {
+ File file = new File(propFileName);
if (!file.exists())
throw new FileNotFoundException("font_metrics.properties not found at path " + file.getAbsolutePath());
metricsIn = new FileInputStream(file);
}
- else
- {
+ else {
+ // Use the built-in font metrics file off the classpath
metricsIn = FontDetails.class.getResourceAsStream("/font_metrics.properties");
if (metricsIn == null)
throw new FileNotFoundException("font_metrics.properties not found in classpath");
*/
public boolean check(final int level)
{
- int currentLevel = Integer.parseInt(System.getProperty("poi.log.level", WARN + ""));
+ int currentLevel;
+ try {
+ currentLevel = Integer.parseInt(System.getProperty("poi.log.level", WARN + ""));
+ } catch (SecurityException e) {
+ currentLevel = POILogger.DEBUG;
+ }
+
if (level >= currentLevel)
return true;
else