@Test public void createLocale_Empty() throws Exception { assertNull( EnvUtil.createLocale( "" ) ); }
public static Locale createLocale( String localeCode ) { Locale resultLocale = null; if ( !Utils.isEmpty( localeCode ) ) { StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { resultLocale = new Locale( parser.nextToken(), parser.nextToken() ); } else { resultLocale = new Locale( localeCode ); } } return resultLocale; }
EnvUtil { public static Locale createLocale( String localeCode ) { Locale resultLocale = null; if ( !Utils.isEmpty( localeCode ) ) { StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { resultLocale = new Locale( parser.nextToken(), parser.nextToken() ); } else { resultLocale = new Locale( localeCode ); } } return resultLocale; } }
EnvUtil { public static Locale createLocale( String localeCode ) { Locale resultLocale = null; if ( !Utils.isEmpty( localeCode ) ) { StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { resultLocale = new Locale( parser.nextToken(), parser.nextToken() ); } else { resultLocale = new Locale( localeCode ); } } return resultLocale; }  }
EnvUtil { public static Locale createLocale( String localeCode ) { Locale resultLocale = null; if ( !Utils.isEmpty( localeCode ) ) { StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { resultLocale = new Locale( parser.nextToken(), parser.nextToken() ); } else { resultLocale = new Locale( localeCode ); } } return resultLocale; }  static Properties readProperties( final String fileName ); static void environmentInit(); static void applyKettleProperties( Map<?, ?> kettleProperties ); static void applyKettleProperties( Map<?, ?> kettleProperties, boolean override ); static void addInternalVariables( Properties prop ); static final String[] getEnvironmentVariablesForRuntimeExec(); static final String getSystemPropertyStripQuotes( String key, String def ); static final String getSystemProperty( String key, String def ); static final String getSystemProperty( String key ); static Locale createLocale( String localeCode ); static TimeZone createTimeZone( String timeZoneId ); static String[] getTimeZones(); static String[] getLocaleList(); }
EnvUtil { public static Locale createLocale( String localeCode ) { Locale resultLocale = null; if ( !Utils.isEmpty( localeCode ) ) { StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { resultLocale = new Locale( parser.nextToken(), parser.nextToken() ); } else { resultLocale = new Locale( localeCode ); } } return resultLocale; }  static Properties readProperties( final String fileName ); static void environmentInit(); static void applyKettleProperties( Map<?, ?> kettleProperties ); static void applyKettleProperties( Map<?, ?> kettleProperties, boolean override ); static void addInternalVariables( Properties prop ); static final String[] getEnvironmentVariablesForRuntimeExec(); static final String getSystemPropertyStripQuotes( String key, String def ); static final String getSystemProperty( String key, String def ); static final String getSystemProperty( String key ); static Locale createLocale( String localeCode ); static TimeZone createTimeZone( String timeZoneId ); static String[] getTimeZones(); static String[] getLocaleList();  }