AccessController Algorithm - Stage 2
Check each ProtectionDomain to see whether it contains the Permission being checked
- If no ProtectionDomains from step1,
- Return (only fully trusted code is running)
- For each unique ProtectionDomain P obtained in
stage 1,
- Call P's implies() method with the Permission
- Does P imply the Permission being checked?
- If no,
- Throw an exception
- Else,
- Continue