Bugzilla Bug 30836

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Glen Stampoultzis 2004-09-19 01:37:33 +00:00
parent 7a9dab45a1
commit 4e92118a61

View File

@ -17,13 +17,12 @@
package org.apache.poi.hssf.model;
import org.apache.poi.ddf.*;
import org.apache.poi.hssf.record.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.hssf.util.SheetReferences;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import org.apache.poi.ddf.*;
import java.util.ArrayList;
import java.util.Iterator;
@ -830,7 +829,16 @@ public class Workbook implements Model
protected Record createWriteAccess() {
WriteAccessRecord retval = new WriteAccessRecord();
retval.setUsername(System.getProperty("user.name"));
try
{
retval.setUsername(System.getProperty("user.name"));
}
catch (java.security.AccessControlException e)
{
// AccessControlException can occur in a restricted context
// (client applet/jws application or restricted security server)
retval.setUsername("POI");
}
return retval;
}