/**
* creates the WriteAccess record containing the logged in user's name
*/
private static WriteAccessRecord createWriteAccess() {
WriteAccessRecord retval = new WriteAccessRecord();
String defaultUserName = "POI";
try {
String username = System.getProperty("user.name");
// Google App engine returns null for user.name, see Bug 53974
if(username == null) username = defaultUserName;
retval.setUsername(username);
} catch (AccessControlException e) {
// AccessControlException can occur in a restricted context
// (client applet/jws application or restricted security server)
retval.setUsername(defaultUserName);
}
return retval;
}