- Sort Score
- Result 10 results
- Languages All
Results 981 - 990 of 2,976 for throw (0.04 sec)
-
src/test/java/jcifs/smb/BufferCacheImplTest.java
class InvalidConstruction { @Test @DisplayName("Negative maxBuffers throws immediately in constructor") void negativeMaxBuffersThrows() { assertThrows(NegativeArraySizeException.class, () -> new BufferCacheImpl(-1, 10)); } @Test @DisplayName("Negative maxSize throws when allocating a new buffer") void negativeMaxSizeThrowsOnAllocation() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt
* responses coming back in. Typically interceptors add, remove, or transform headers on the request * or response. * * Implementations of this interface throw [IOException] to signal connectivity failures. This * includes both natural exceptions such as unreachable servers, as well as synthetic exceptions * when responses are of an unexpected type or cannot be decoded. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 3.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostString.java
.build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } public static void main(String... args) throws Exception { new PostString().run(); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt
e.printStackTrace() } override fun onResponse( call: Call, response: Response, ) { response.use { if (!response.isSuccessful) throw IOException("Unexpected code $response") for ((name, value) in response.headers) { println("$name: $value") } println(response.body.string()) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.6K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/SmbComNegotiateResponse.java
len += 2; if (len > 256) { throw new RuntimeException("zero termination not found"); } } server.oemDomainName = new String(buffer, bufferIndex, len, UNI_ENCODING);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 6K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbBasicFileInfoTest.java
} // --- Invalid/null usage: calling a method on null should throw NPE --- @Test void nullReference_throwsNullPointerException() { // Arrange SmbBasicFileInfo info = null; // Act & Assert: attempting to call any method on null should throw NPE Assertions.assertThrows(NullPointerException.class, () -> {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
val routes = mutableListOf<Route>() fun onlyResponse() = responses.single() fun onlyRoute() = routes.single() @Throws(IOException::class) override fun authenticate( route: Route?, response: Response, ): Request? { if (route == null) throw NullPointerException("route == null") responses += response routes += route if (!schemeMatches(response) || credential == null) return null
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.7K bytes - Viewed (0) -
compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/conflict/DefaultConflictResolverFactory.java
*/ @Override public ConflictResolver getConflictResolver(String type) throws ConflictResolverNotFoundException { try { return (ConflictResolver) container.lookup(ConflictResolver.ROLE, type); } catch (ComponentLookupException exception) { throw new ConflictResolverNotFoundException("Cannot find conflict resolver of type: " + type); } }
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Jun 06 14:28:57 UTC 2025 - 2.8K bytes - Viewed (0) -
src/main/java/jcifs/dcerpc/msrpc/srvsvc.java
public void encode(NdrBuffer _dst) throws NdrException { _dst.align(4); _dst.enc_ndr_referent(this.netname, 1); if (this.netname != null) { _dst = _dst.deferred; _dst.enc_ndr_string(this.netname); } } @Override public void decode(NdrBuffer _src) throws NdrException { _src.align(4);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 27K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt
try { val response = chain.proceed(originalRequest) if (isCanceled()) { response.closeQuietly() throw IOException("Canceled") } return response } catch (e: IOException) { calledNoMoreExchanges = true throw noMoreExchanges(e) as Throwable } finally { if (!calledNoMoreExchanges) { noMoreExchanges(null) } } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 17.8K bytes - Viewed (0)