/** * Wraps a primary and a fallback authority factories. * * <p>This constructor is protected because subclasses must declare which of the {@link * DatumAuthorityFactory}, {@link CSAuthorityFactory}, {@link CRSAuthorityFactory} and {@link * CoordinateOperationAuthorityFactory} interfaces they choose to implement. * * @param primary The primary factory. * @param fallback The factory to use as a fallback if the primary factory failed. * @see #create */ protected FallbackAuthorityFactory( final AuthorityFactory primary, final AuthorityFactory fallback) { super(primary, fallback); ensureNonNull("fallback", fallback); this.fallback = (fallback instanceof AbstractAuthorityFactory) ? (AbstractAuthorityFactory) fallback : new AuthorityFactoryAdapter(fallback); }