private static NameProvider getDefaultNameProvider() {
        NameProvider nameProvider = null;
        try {
            String providerClass = System.getProperty("org.joda.time.DateTimeZone.NameProvider");
            if (providerClass != null) {
                try {
                    // do not initialize the class until the type has been checked
                    Class<?> cls = Class.forName(providerClass, false, DateTimeZone.class.getClassLoader());
                    if (!NameProvider.class.isAssignableFrom(cls)) {
                        throw new IllegalArgumentException("System property referred to class that does not implement " + NameProvider.class);
                    }
                    nameProvider = cls.asSubclass(NameProvider.class).getConstructor().newInstance();
                } catch (Exception ex) {
                    throw new RuntimeException(ex);
                }
            }
        } catch (SecurityException ex) {
            // ignore
        }

        if (nameProvider == null) {
            nameProvider = new DefaultNameProvider();
        }

        return nameProvider;
    }
private static NameProvider getDefaultNameProvider ( ) { NameProvider nameProvider = null ; try { String providerClass = System . getProperty ( "org.joda.time.DateTimeZone.NameProvider" ) ; if ( providerClass != null ) { try { Class < ? > cls = Class . forName ( providerClass , false , DateTimeZone . class . getClassLoader ( ) ) ; if ( ! NameProvider . class . isAssignableFrom ( cls ) ) { throw new IllegalArgumentException ( "System property referred to class that does not implement " + NameProvider . class ) ; } nameProvider = cls . asSubclass ( NameProvider . class ) . getConstructor ( ) . newInstance ( ) ; } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } } } catch ( SecurityException ex ) { } if ( nameProvider == null ) { nameProvider = new DefaultNameProvider ( ) ; } return nameProvider ; }
Gets the default name provider.
<p>
Tries the system property <code>org.joda.time.DateTimeZone.NameProvider</code>.
Then uses <code>DefaultNameProvider</code>.

@return the default name provider