Commit e0331bf6 authored by Petri Hintukainen's avatar Petri Hintukainen

ServiceContextFactory.getServiceContexts() should not throw security exceptions

parent a99853e0
......@@ -62,10 +62,16 @@ public class ServiceContextFactoryImpl extends ServiceContextFactory {
}
public ServiceContext[] getServiceContexts() {
SecurityManager sec = System.getSecurityManager();
if (sec != null)
sec.checkPermission(new ServiceContextPermission("access", "own"));
return serviceContexts;
try {
SecurityManager sec = System.getSecurityManager();
if (sec != null)
sec.checkPermission(new ServiceContextPermission("access", "own"));
return serviceContexts;
} catch (Exception e) {
}
return new ServiceContext[0];
}
private ServiceContext[] serviceContexts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment