private static boolean isUnknown(ProtectionDomain domain){
  if (domain == null || domain.getCodeSource() == null) {
    return true;
  }
  return false;
}

private static boolean isUnknown ( ProtectionDomain domain ) { if ( domain == null || domain . getCodeSource ( ) == null ) { return true ; } return false ; }
checks whether the given domain is unknown . in that case , restrict everything !
