1 |
/* Policy.java --- Policy Manager Class |
/* Policy.java --- Policy Manager Class |
2 |
Copyright (C) 1999, 2003, Free Software Foundation, Inc. |
Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
95 |
*/ |
*/ |
96 |
public abstract class Policy |
public abstract class Policy |
97 |
{ |
{ |
98 |
static private Policy currentPolicy = null; |
private static Policy currentPolicy; |
99 |
|
|
100 |
/** Map of ProtectionDomains to PermissionCollections for this instance. */ |
/** Map of ProtectionDomains to PermissionCollections for this instance. */ |
101 |
private Map pd2pc = null; |
private Map pd2pc = null; |
191 |
{ |
{ |
192 |
currentPolicy = (Policy) Class.forName(pp).newInstance(); |
currentPolicy = (Policy) Class.forName(pp).newInstance(); |
193 |
} |
} |
194 |
catch (Exception ignored) {} |
catch (Exception e) |
195 |
|
{ |
196 |
|
// Ignored. |
197 |
|
} |
198 |
|
|
199 |
if (currentPolicy == null) |
if (currentPolicy == null) |
200 |
currentPolicy = new gnu.java.security.provider.DefaultPolicy(); |
currentPolicy = new gnu.java.security.provider.DefaultPolicy(); |