Lines Matching refs:context
47 // - 'context' can not be null
50 ProtectionDomain[] context;
86 this.context = acc.context;
94 * @param context
96 * checks in the context of this {@code AccessControlContext}
98 * if {@code context} is {@code null}
101 public AccessControlContext(ProtectionDomain[] context) {
102 if (context == null) {
103 throw new NullPointerException("context can not be null");
105 if (context.length != 0) {
108 for (int i = 0; i < context.length; i++) {
109 if (context[i] != null && !a.contains(context[i])) {
110 a.add(context[i]);
114 this.context = new ProtectionDomain[a.size()];
115 a.toArray(this.context);
118 if (this.context == null) {
119 // Prevent numerous checks for 'context==null'
120 this.context = new ProtectionDomain[0];
135 * @param inherited - inherited context, which may be null
166 * performs access checks based on the context of the current thread. This
171 * this context has been granted the specified permission.
194 for (int i = 0; i < context.length; i++) {
195 if (!context[i].implies(perm)) {
227 if (!(PolicyUtils.matchSubset(context, that.context) && PolicyUtils
228 .matchSubset(that.context, context))) {
278 for (int i = 0; i < context.length; i++) {
279 hash ^= context[i].hashCode();