equal
deleted
inserted
replaced
231 ProtectionDomain pd = currentDomains[i]; |
231 ProtectionDomain pd = currentDomains[i]; |
232 |
232 |
233 subjectPd = cachedPDs.getValue(pd); |
233 subjectPd = cachedPDs.getValue(pd); |
234 |
234 |
235 if (subjectPd == null) { |
235 if (subjectPd == null) { |
236 subjectPd = new ProtectionDomain(pd.getCodeSource(), |
236 if (pd.staticPermissionsOnly()) { |
|
237 // keep static ProtectionDomain objects static |
|
238 subjectPd = pd; |
|
239 } else { |
|
240 subjectPd = new ProtectionDomain(pd.getCodeSource(), |
237 pd.getPermissions(), |
241 pd.getPermissions(), |
238 pd.getClassLoader(), |
242 pd.getClassLoader(), |
239 principals); |
243 principals); |
|
244 } |
240 cachedPDs.putValue(pd, subjectPd); |
245 cachedPDs.putValue(pd, subjectPd); |
241 } else { |
246 } else { |
242 allNew = false; |
247 allNew = false; |
243 } |
248 } |
244 newDomains[i] = subjectPd; |
249 newDomains[i] = subjectPd; |