if (sm != null) {
for (Iterator iter = result.iterator(); iter.hasNext(); ) {
Principal p = (Principal) iter.next();
try {
sm.checkPermission(
new AuthenticationPermission(
Collections.singleton(p), null, "listen"));
} catch (SecurityException e) {
logger.log(Levels.HANDLED,
"compute principals for server endpoint " +
"caught exception",