Properties checkExternalProperties() throws ArgumentException {
  if (noPropertiesFileArgument != null && noPropertiesFileArgument.isPresent()) {
    return null;
  }
  if (filePropertiesPathArgument == null) {
    return null;
  }
  String propertiesFilePath;
  if (filePropertiesPathArgument.isPresent()) {
    propertiesFilePath=filePropertiesPathArgument.getValue();
  }
 else {
    final String userDir=System.getProperty("user.home");
    propertiesFilePath=findPropertiesFile(userDir + File.separator + DEFAULT_OPENDJ_CONFIG_DIR);
  }
  if (propertiesFilePath == null) {
    return null;
  }
  try {
    final Properties argumentProperties=new Properties();
    final String scriptName=getScriptName();
    final Properties p=new Properties();
    try (final FileInputStream fis=new FileInputStream(propertiesFilePath)){
      p.load(fis);
    }
     for (final Enumeration<?> e=p.propertyNames(); e.hasMoreElements(); ) {
      final String currentPropertyName=(String)e.nextElement();
      String propertyName=currentPropertyName;
      if (scriptName != null) {
        if (currentPropertyName.startsWith(scriptName)) {
          propertyName=currentPropertyName.substring(scriptName.length() + 1);
        }
 else         if (p.containsKey(scriptName + "." + currentPropertyName)) {
          continue;
        }
      }
      argumentProperties.setProperty(propertyName.toLowerCase(),p.getProperty(currentPropertyName));
    }
    return argumentProperties;
  }
 catch (  final Exception e) {
    final LocalizableMessage message=ERR_ARGPARSER_CANNOT_READ_PROPERTIES_FILE.get(propertiesFilePath,getExceptionMessage(e));
    throw new ArgumentException(message,e);
  }
}

Properties checkExternalProperties ( ) throws ArgumentException { if ( noPropertiesFileArgument != null && noPropertiesFileArgument . isPresent ( ) ) { return null ; } if ( filePropertiesPathArgument == null ) { return null ; } String propertiesFilePath ; if ( filePropertiesPathArgument . isPresent ( ) ) { propertiesFilePath = filePropertiesPathArgument . getValue ( ) ; } else { final String userDir = System . getProperty ( "user.home" ) ; propertiesFilePath = findPropertiesFile ( userDir + File . separator + DEFAULT_OPENDJ_CONFIG_DIR ) ; } if ( propertiesFilePath == null ) { return null ; } try { final Properties argumentProperties = new Properties ( ) ; final String scriptName = getScriptName ( ) ; final Properties p = new Properties ( ) ; try ( final FileInputStream fis = new FileInputStream ( propertiesFilePath ) ) { p . load ( fis ) ; } for ( final Enumeration < ? > e = p . propertyNames ( ) ; e . hasMoreElements ( ) ; ) { final String currentPropertyName = ( String ) e . nextElement ( ) ; String propertyName = currentPropertyName ; if ( scriptName != null ) { if ( currentPropertyName . startsWith ( scriptName ) ) { propertyName = currentPropertyName . substring ( scriptName . length ( ) + 1 ) ; } else if ( p . containsKey ( scriptName + "." + currentPropertyName ) ) { continue ; } } argumentProperties . setProperty ( propertyName . toLowerCase ( ) , p . getProperty ( currentPropertyName ) ) ; } return argumentProperties ; } catch ( final Exception e ) { final LocalizableMessage message = ERR_ARGPARSER_CANNOT_READ_PROPERTIES_FILE . get ( propertiesFilePath , getExceptionMessage ( e ) ) ; throw new ArgumentException ( message , e ) ; } }
check if we have a properties file .
