- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 60 for ClassCastException (0.07 sec)
-
guava-tests/test/com/google/common/collect/FauxveridesTest.java
assertThrows(ClassCastException.class, () -> ImmutableSortedMap.copyOf(original)); } public void testImmutableSortedSetCopyOfIterable() { // false positive: `new Object()` is not equal to `new Object()` @SuppressWarnings("DistinctVarargsChecker") Set<Object> original = ImmutableSet.of(new Object(), new Object()); assertThrows(ClassCastException.class, () -> ImmutableSortedSet.copyOf(original));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 9.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/ReflectionFreeAssertThrows.java
.put(AssertionFailedError.class, e -> e instanceof AssertionFailedError) .put(CancellationException.class, e -> e instanceof CancellationException) .put(ClassCastException.class, e -> e instanceof ClassCastException) .put( ConcurrentModificationException.class, e -> e instanceof ConcurrentModificationException)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 6.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java
} return comparator; } @Override public boolean containsKey(Object key) { try { return delegate.containsKey(checkValid(key)); } catch (NullPointerException | ClassCastException e) { return false; } } @Override public boolean containsValue(Object value) { return delegate.containsValue(value); } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 7.5K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/AndroidPlatform.kt
socket: Socket, address: InetSocketAddress, connectTimeout: Int, ) { try { socket.connect(address, connectTimeout) } catch (e: ClassCastException) { // On android 8.0, socket.connect throws a ClassCastException due to a bug // see https://issuetracker.google.com/issues/63649622 if (Build.VERSION.SDK_INT == 26) { throw IOException("Exception in connect", e) } else {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu May 29 16:52:38 UTC 2025 - 6.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceTester.java
@CollectionSize.Require(absent = ZERO) public void testReplace_supportedPresent() { try { assertEquals(v0(), getMap().replace(k0(), v3())); expectReplacement(entry(k0(), v3())); } catch (ClassCastException tolerated) { // for ClassToInstanceMap expectUnchanged(); } } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testReplace_supportedPresentNoChange() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Oct 31 14:51:04 UTC 2024 - 4K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java
} return comparator; } @Override public boolean containsKey(Object key) { try { return delegate.containsKey(checkValid(key)); } catch (NullPointerException | ClassCastException e) { return false; } } @Override public boolean containsValue(Object value) { return delegate.containsValue(value); } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 7.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/ReflectionFreeAssertThrows.java
.put(AssertionFailedError.class, e -> e instanceof AssertionFailedError) .put(CancellationException.class, e -> e instanceof CancellationException) .put(ClassCastException.class, e -> e instanceof ClassCastException) .put( ConcurrentModificationException.class, e -> e instanceof ConcurrentModificationException)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 6.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ReflectionFreeAssertThrows.java
.put(AssertionFailedError.class, e -> e instanceof AssertionFailedError) .put(CancellationException.class, e -> e instanceof CancellationException) .put(ClassCastException.class, e -> e instanceof ClassCastException) .put( ConcurrentModificationException.class, e -> e instanceof ConcurrentModificationException)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 6.2K bytes - Viewed (0) -
src/test/java/jcifs/SmbTreeTest.java
*/ @Test void testUnwrap_throwsException() { when(smbTree.unwrap(any())).thenThrow(new ClassCastException("Cannot unwrap to specified type")); assertThrows(ClassCastException.class, () -> smbTree.unwrap(CustomSmbTree.class), "Should throw ClassCastException when type is incompatible"); } /** * Test for close() method under normal conditions.
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceTester.java
@CollectionSize.Require(absent = ZERO) public void testReplace_supportedPresent() { try { assertEquals(v0(), getMap().replace(k0(), v3())); expectReplacement(entry(k0(), v3())); } catch (ClassCastException tolerated) { // for ClassToInstanceMap expectUnchanged(); } } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testReplace_supportedPresentNoChange() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 4K bytes - Viewed (0)