Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 77 for ClassCastException (0.31 sec)

  1. guava-tests/test/com/google/common/collect/FauxveridesTest.java

            ImmutableMap.of(new Object(), new Object(), new Object(), new Object());
    
        assertThrows(ClassCastException.class, () -> ImmutableSortedMap.copyOf(original));
      }
    
      public void testImmutableSortedSetCopyOfIterable() {
        Set<Object> original = ImmutableSet.of(new Object(), new Object());
    
        assertThrows(ClassCastException.class, () -> ImmutableSortedSet.copyOf(original));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 31 16:03:42 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/FauxveridesTest.java

            ImmutableMap.of(new Object(), new Object(), new Object(), new Object());
    
        assertThrows(ClassCastException.class, () -> ImmutableSortedMap.copyOf(original));
      }
    
      public void testImmutableSortedSetCopyOfIterable() {
        Set<Object> original = ImmutableSet.of(new Object(), new Object());
    
        assertThrows(ClassCastException.class, () -> ImmutableSortedSet.copyOf(original));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 31 16:03:42 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/MapEntrySetTester.java

        } catch (ClassCastException acceptable) {
          // allowed by the spec
        }
      }
    
      public void testContainsEntryWithIncomparableValue() {
        try {
          assertFalse(getMap().entrySet().contains(Helpers.mapEntry(k0(), IncomparableType.INSTANCE)));
        } catch (ClassCastException acceptable) {
          // allowed by the spec
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  4. okhttp/src/main/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 {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java

            } else if (cmp > 0) {
              return false;
            }
          }
        } catch (NullPointerException | ClassCastException e) {
          return false;
        }
      }
    
      private int unsafeBinarySearch(Object key) throws ClassCastException {
        return Collections.binarySearch(elements, key, unsafeComparator());
      }
    
      @Override
      boolean isPartialView() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ForwardingSortedMapImplementsMapTest.java

        try {
          super.testContainsKey();
        } catch (ClassCastException tolerated) {
        }
      }
    
      @J2ktIncompatible // https://youtrack.jetbrains.com/issue/KT-58242/ undefined behavior (crash)
      @Override
      public void testEntrySetContainsEntryIncompatibleKey() {
        try {
          super.testEntrySetContainsEntryIncompatibleKey();
        } catch (ClassCastException tolerated) {
        }
      }
    
      @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Ordering.java

       * Object[])} comparator when comparing a value outside the set of values it can compare.
       * Extending {@link ClassCastException} may seem odd, but it is required.
       */
      @VisibleForTesting
      static class IncomparableValueException extends ClassCastException {
        final Object value;
    
        IncomparableValueException(Object value) {
          super("Cannot compare value: " + value);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Comparators.java

       * Comparators}</a>.
       *
       * @param a first value to compare, returned if less than or equal to b.
       * @param b second value to compare.
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
       * @since 30.0
       */
      public static <T extends Comparable<? super T>> T min(T a, T b) {
        return (a.compareTo(b) <= 0) ? a : b;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Collections2.java

       * throws a {@code ClassCastException} or {@code NullPointerException}.
       */
      static boolean safeContains(Collection<?> collection, @CheckForNull Object object) {
        checkNotNull(collection);
        try {
          return collection.contains(object);
        } catch (ClassCastException | NullPointerException e) {
          return false;
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Range.java

       * than {@code upper}.
       *
       * @throws IllegalArgumentException if {@code lower} is greater than <i>or equal to</i> {@code
       *     upper}
       * @throws ClassCastException if {@code lower} and {@code upper} are not mutually comparable
       * @since 14.0
       */
      public static <C extends Comparable<?>> Range<C> open(C lower, C upper) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 27.8K bytes
    - Viewed (0)
Back to top