Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 77 for ClassCastException (3.48 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/MapRemoveTester.java

        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_wrongType() {
        try {
          assertNull(getMap().remove(WrongType.VALUE));
        } catch (ClassCastException tolerated) {
        }
        expectUnchanged();
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  2. maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java

                    mojoExecutionListener.beforeMojoExecution(mojoExecutionEvent);
                    mojo.execute();
                    mojoExecutionListener.afterMojoExecutionSuccess(mojoExecutionEvent);
                } catch (ClassCastException e) {
                    // to be processed in the outer catch block
                    throw e;
                } catch (RuntimeException e) {
                    throw new PluginExecutionException(mojoExecution, project, e);
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

        Collection<WrongType> wrong = MinimalCollection.of(WrongType.VALUE);
        try {
          assertFalse(
              "containsAll(wrongType) should return false or throw", collection.containsAll(wrong));
        } catch (ClassCastException tolerated) {
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ForwardingImmutableMap.java

                if (object instanceof Entry<?, ?> && ((Entry<?, ?>) object).getKey() == null) {
                  return false;
                }
                try {
                  return super.contains(object);
                } catch (ClassCastException e) {
                  return false;
                }
              }
    
              @Override
              @SuppressWarnings("nullness") // b/192354773 in our checker affects toArray declarations
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 24 16:03:45 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveAllTester.java

        try {
          assertFalse(
              "removeAll(containsWrongType) should return false or throw",
              collection.removeAll(MinimalCollection.of(WrongType.VALUE)));
        } catch (ClassCastException tolerated) {
        }
        expectUnchanged();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/TreeMultiset.java

       * {@code ClassCastException} for any elements {@code e1} and {@code e2} in the multiset. If the
       * user attempts to add an element to the multiset that violates this constraint (for example, the
       * user attempts to add a string element to a set whose elements are integers), the {@code
       * add(Object)} call will throw a {@code ClassCastException}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 34.2K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java

        return delegate.toArray();
      }
    
      @Override
      public <T> T[] toArray(T[] a) {
        return delegate.toArray(a);
      }
    
      @CanIgnoreReturnValue
      private <T> T checkValid(T t) {
        // a ClassCastException is what's supposed to happen!
        @SuppressWarnings("unchecked")
        E e = (E) t;
        int unused = comparator().compare(e, e);
        return t;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveTester.java

      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_wrongType() {
        try {
          assertFalse(collection.remove(WrongType.VALUE));
        } catch (ClassCastException tolerated) {
        }
        expectUnchanged();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  9. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

        Collection<WrongType> wrong = MinimalCollection.of(WrongType.VALUE);
        try {
          assertFalse(
              "containsAll(wrongType) should return false or throw", collection.containsAll(wrong));
        } catch (ClassCastException tolerated) {
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top