code: public static void setFileNameMap(FileNameMap map) {
          SecurityManager sm = System.getSecurityManager();
          if (sm != null) sm.checkSetFactory();
          fileNameMap = map;
      }
docs: Sets the FileNameMap.
  <p>
  If there is a security manager, this method first calls
  the security manager's <code>checkSetFactory</code> method
  to ensure the operation is allowed.
  This could result in a SecurityException.
  
  @param map the FileNameMap to be set
  @exception  SecurityException  if a security manager exists and its
  <code>checkSetFactory</code> method doesn't allow the operation.
  @see        SecurityManager#checkSetFactory
  @see #getFileNameMap()
  @since 1.2