private ThreadSafeLazyLoadedIvoryTower() { // protect against instantiation via reflection if (instance == null) { instance = this; } else { throw new IllegalStateException("Already initialized."); } }
/** * private constructor to prevent client from instantiating. */ private ThreadSafeDoubleCheckLocking() { // to prevent instantiating by Reflection call if (instance != null) { throw new IllegalStateException("Already initialized."); } }
@Override public void onError(Throwable throwable) { throw new IllegalStateException("Should not occur"); } }
/** Utility class. */ private Exceptions() { throw new IllegalStateException("No instances!"); } /**
/** Helper class, no instances. */ private RxJavaPlugins() { throw new IllegalStateException("No instances!"); } }
/** * Utility class. */ private EndConsumerHelper() { throw new IllegalStateException("No instances!"); }
public Builder allEnabledCipherSuites() { if (!tls) throw new IllegalStateException("no cipher suites for cleartext connections"); this.cipherSuites = null; return this; }
@Override protected Handshake handshake() { if (delegate.call == null) { throw new IllegalStateException("Connection has not yet been established"); } return delegate.handshake; }
public void setServerSocketFactory(ServerSocketFactory serverSocketFactory) { if (executor != null) { throw new IllegalStateException( "setServerSocketFactory() must be called before start()"); } this.serverSocketFactory = serverSocketFactory; }
@Override public Headers trailers() throws IOException { if (state != STATE_CLOSED) { throw new IllegalStateException("too early; can't read the trailers yet"); } return trailers != null ? trailers : Util.EMPTY_HEADERS; }
public Builder allEnabledTlsVersions() { if (!tls) throw new IllegalStateException("no TLS versions for cleartext connections"); this.tlsVersions = null; return this; }
/** * @deprecated since OkHttp 3.13 all TLS-connections are expected to support TLS extensions. * In a future release setting this to true will be unnecessary and setting it to false will * have no effect. */ public Builder supportsTlsExtensions(boolean supportsTlsExtensions) { if (!tls) throw new IllegalStateException("no TLS extensions for cleartext connections"); this.supportsTlsExtensions = supportsTlsExtensions; return this; }
/** Utility class. */ private HalfSerializer() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private ObjectHelper() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private FlowableScalarXMap() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private Functions() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private Disposables() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private FlowableInternalHelper() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private BackpressureHelper() { throw new IllegalStateException("No instances!"); }
/** Utility class. */ private BlockingHelper() { throw new IllegalStateException("No instances!"); }