Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 426 for NullPointerException (0.07 sec)

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

        Set<Entry<K, V>> entrySet = map.entrySet();
        if (supportsRemove) {
          assertThrows(NullPointerException.class, () -> entrySet.removeAll(null));
        } else {
          try {
            entrySet.removeAll(null);
            fail("Expected UnsupportedOperationException or NullPointerException.");
          } catch (UnsupportedOperationException | NullPointerException e) {
            // Expected.
          }
        }
        assertInvariants(map);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 43.9K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

        Set<Entry<K, V>> entrySet = map.entrySet();
        if (supportsRemove) {
          assertThrows(NullPointerException.class, () -> entrySet.removeAll(null));
        } else {
          try {
            entrySet.removeAll(null);
            fail("Expected UnsupportedOperationException or NullPointerException.");
          } catch (UnsupportedOperationException | NullPointerException e) {
            // Expected.
          }
        }
        assertInvariants(map);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 43.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableList.java

       *
       * @throws NullPointerException if the element is null
       */
      public static <E> ImmutableList<E> of(E e1) {
        return new SingletonImmutableList<>(e1);
      }
    
      /**
       * Returns an immutable list containing the given elements, in order.
       *
       * @throws NullPointerException if any element is null
       */
      public static <E> ImmutableList<E> of(E e1, E e2) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 30.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/pac/kerberos/KerberosRelevantAuthDataTest.java

                    "The exception should be either PACDecodingException or NullPointerException.");
    
            if (exception instanceof PACDecodingException) {
                assertEquals("Malformed kerberos ticket", exception.getMessage(), "PAC exception should indicate malformed ticket.");
            } else if (exception instanceof NullPointerException) {
                // Empty input causes null ASN1 object, which is expected behavior
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/dcerpc/ndr/NdrHyperTest.java

        /**
         * Ensure encode throws NPE when passed a null buffer.
         */
        @Test
        @DisplayName("Encode with null buffer throws NullPointerException")
        public void testEncodeNullBuffer() throws NdrException {
            NdrHyper hyper = new NdrHyper(5L);
            assertThrows(NullPointerException.class, () -> hyper.encode(null));
        }
    
        /**
         * Ensure decode throws NPE when passed a null buffer.
         */
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

        assertThrows(NullPointerException.class, () -> builder.add((String) null));
      }
    
      public void testBuilderAddAllHandlesNullsCorrectly() {
        {
          ImmutableSortedMultiset.Builder<String> builder = ImmutableSortedMultiset.naturalOrder();
          assertThrows(NullPointerException.class, () -> builder.addAll((Collection<String>) null));
        }
    
        {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 19.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

        ImmutableList.Builder<String> builder = ImmutableList.builder();
        assertThrows(NullPointerException.class, () -> builder.add((String) null));
    
        assertThrows(NullPointerException.class, () -> builder.add((String[]) null));
    
        assertThrows(NullPointerException.class, () -> builder.add("a", null, "b"));
      }
    
      public void testBuilderAddAllHandlesNullsCorrectly() {
        {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/smb1/AllocInfoTest.java

         * Null pointer scenario – calls on a null reference should raise
         * {@link NullPointerException}. This test is defensive; in real code it
         * would likely be handled elsewhere.
         */
        @Test
        @DisplayName("calling getters on null reference throws NPE")
        void testNullReference() {
            AllocInfo nullRef = null;
            assertThrows(NullPointerException.class, () -> nullRef.getCapacity());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/util/CryptoTest.java

        @DisplayName("Should handle null input gracefully")
        void testNullInputHandling() {
            // When/Then
            assertThrows(NullPointerException.class, () -> {
                MessageDigest md4 = Crypto.getMD4();
                md4.digest(null);
            });
    
            assertThrows(NullPointerException.class, () -> {
                MessageDigest md5 = Crypto.getMD5();
                md5.digest(null);
            });
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       * fail to insert an element only by throwing an exception.
       *
       * @throws NullPointerException if the specified element is null
       */
      @CanIgnoreReturnValue
      @Override
      public boolean offer(E e) {
        if (e == null) throw new NullPointerException();
        Monitor monitor = this.monitor;
        if (monitor.enterIf(notFull)) {
          try {
            insert(e);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 22.4K bytes
    - Viewed (0)
Back to top