@Test public void createLocale_Null() throws Exception { assertNull( EnvUtil.createLocale( null ) ); }
public static Locale createLocale( String localeCode ) { if ( Utils.isEmpty( localeCode ) ) { return null; } StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { return new Locale( parser.nextToken(), parser.nextToken() ); } if ( parser.countTokens() == 3 ) { return new Locale( parser.nextToken(), parser.nextToken(), parser.nextToken() ); } return new Locale( localeCode ); }
EnvUtil { public static Locale createLocale( String localeCode ) { if ( Utils.isEmpty( localeCode ) ) { return null; } StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { return new Locale( parser.nextToken(), parser.nextToken() ); } if ( parser.countTokens() == 3 ) { return new Locale( parser.nextToken(), parser.nextToken(), parser.nextToken() ); } return new Locale( localeCode ); } }
EnvUtil { public static Locale createLocale( String localeCode ) { if ( Utils.isEmpty( localeCode ) ) { return null; } StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { return new Locale( parser.nextToken(), parser.nextToken() ); } if ( parser.countTokens() == 3 ) { return new Locale( parser.nextToken(), parser.nextToken(), parser.nextToken() ); } return new Locale( localeCode ); }  }
EnvUtil { public static Locale createLocale( String localeCode ) { if ( Utils.isEmpty( localeCode ) ) { return null; } StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { return new Locale( parser.nextToken(), parser.nextToken() ); } if ( parser.countTokens() == 3 ) { return new Locale( parser.nextToken(), parser.nextToken(), parser.nextToken() ); } return new Locale( localeCode ); }  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 ) { if ( Utils.isEmpty( localeCode ) ) { return null; } StringTokenizer parser = new StringTokenizer( localeCode, "_" ); if ( parser.countTokens() == 2 ) { return new Locale( parser.nextToken(), parser.nextToken() ); } if ( parser.countTokens() == 3 ) { return new Locale( parser.nextToken(), parser.nextToken(), parser.nextToken() ); } return new Locale( localeCode ); }  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();  }