void checkAcceptPermission(SecurityManager sm,AccessControlContext acc){
  if (sm != cacheSecurityManager) {
    okContext=null;
    authCache=new WeakHashMap<AccessControlContext,Reference<AccessControlContext>>();
    cacheSecurityManager=sm;
  }
  if (acc.equals(okContext) || authCache.containsKey(acc)) {
    return;
  }
  InetAddress addr=socket.getInetAddress();
  String host=(addr != null) ? addr.getHostAddress() : "*";
  sm.checkAccept(host,socket.getPort());
  authCache.put(acc,new SoftReference<AccessControlContext>(acc));
  okContext=acc;
}

void checkAcceptPermission ( SecurityManager sm , AccessControlContext acc ) { if ( sm != cacheSecurityManager ) { okContext = null ; authCache = new WeakHashMap < AccessControlContext , Reference < AccessControlContext > > ( ) ; cacheSecurityManager = sm ; } if ( acc . equals ( okContext ) || authCache . containsKey ( acc ) ) { return ; } InetAddress addr = socket . getInetAddress ( ) ; String host = ( addr != null ) ? addr . getHostAddress ( ) : "*" ; sm . checkAccept ( host , socket . getPort ( ) ) ; authCache . put ( acc , new SoftReference < AccessControlContext > ( acc ) ) ; okContext = acc ; }
verify that the given accesscontrolcontext has permission to accept this connection .
