mirror of https://github.com/apache/poi.git
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:
parent
ff53b56c07
commit
657657521c
|
@ -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();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue