- Sort Score
- Result 10 results
- Languages All
Results 1201 - 1210 of 1,808 for try (0.01 sec)
-
guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java
// Escapers operate on characters: no characters, no escaping. Assert.assertEquals("", escaper.escape("")); // Assert that escapers throw null pointer exceptions. try { escaper.escape((String) null); Assert.fail("exception not thrown when escaping a null string"); } catch (NullPointerException e) { // pass } } /**Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 3.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/profile/ProfileAction.java
form.clearSecurityInfo(); return asIndexHtml(); }; validatePasswordForm(form, toIndexPage); final String username = getUserBean().map(FessUserBean::getUserId).get(); try { userService.changePassword(username, form.newPassword); saveInfo(messages -> messages.addSuccessChangedPassword(GLOBAL)); } catch (final Exception e) {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 4.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt
} } fun cancelStream() = apply { actions += { stream -> stream.cancel() } } fun requestIOException() = apply { actions += { stream -> try { stream.source.exhausted() throw AssertionError("expected IOException") } catch (expected: IOException) { } } } @JvmOverloads fun sendResponse(Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 3.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapContainsValueTester.java
public void testContains_nullContained() { initMapWithNullValue(); assertTrue("containsValue(null) should return true", getMap().containsValue(null)); } public void testContains_wrongType() { try { // noinspection SuspiciousMethodCalls assertFalse( "containsValue(wrongType) should return false or throw", getMap().containsValue(WrongType.VALUE));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 3.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
Request request = new Request.Builder() .url("https://www.googleapis.com/urlshortener/v1/url?key=" + GOOGLE_API_KEY) .post(jsonRequestBody) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 3.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertTrue(latch.await(5, SECONDS)); assertTrue(future.isDone()); assertFalse(future.isCancelled()); try { future.get(); fail("Future should rethrow the exception."); } catch (ExecutionException e) { assertThat(e).hasCauseThat().hasMessageThat().isEqualTo(message); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 3.3K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ImmediateFuture.java
public void addListener(Runnable listener, Executor executor) { checkNotNull(listener, "Runnable was null."); checkNotNull(executor, "Executor was null."); try { executor.execute(listener); } catch (Exception e) { // sneaky checked exception // ListenableFuture's contract is that it will not throw unchecked exceptions, so log the bad
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3.4K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescResponse.java
protected int readDataWireFormat(final byte[] buffer, int bufferIndex, final int len) { final int start = bufferIndex; if (this.getErrorCode() != 0) { return 4; } try { this.securityDescriptor = new SecurityDescriptor(); bufferIndex += this.securityDescriptor.decode(buffer, bufferIndex, len); } catch (final IOException ioe) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 3.2K bytes - Viewed (0) -
compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ReleaseArtifactTransformation.java
throws ArtifactResolutionException, ArtifactNotFoundException { if (Artifact.RELEASE_VERSION.equals(artifact.getVersion())) { try { String version = resolveVersion(artifact, request); if (Artifact.RELEASE_VERSION.equals(version)) {Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 3.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/MultiChannelManagerBasicTest.java
method.setAccessible(true); // This should fail because localhost doesn't support SMB multi-channel // but the method should not throw NullPointerException try { method.invoke(multiChannelManager, localhost, loopback); // If it doesn't throw, that's unexpected for localhost fail("Expected CIFSException for localhost multi-channel attempt");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 4K bytes - Viewed (0)