Search Options

Results per page
Sort
Preferred Languages
Advance

Results 341 - 350 of 426 for NullPointerException (0.07 sec)

  1. android/guava/src/com/google/common/primitives/Shorts.java

       *
       * @param collection a collection of {@code Number} instances
       * @return an array containing the same values as {@code collection}, in the same order, converted
       *     to primitives
       * @throws NullPointerException if {@code collection} or any of its elements is null
       * @since 1.0 (parameter was {@code Collection<Short>} before 12.0)
       */
      public static short[] toArray(Collection<? extends Number> collection) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Oct 22 18:14:49 UTC 2025
    - 25.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/IntsTest.java

            }
          }
        }
      }
    
      public void testToArray_withNull() {
        List<@Nullable Integer> list = Arrays.asList((int) 0, (int) 1, null);
        assertThrows(NullPointerException.class, () -> Ints.toArray(list));
      }
    
      public void testToArray_withConversion() {
        int[] array = {0, 1, 2};
    
        List<Byte> bytes = Arrays.asList((byte) 0, (byte) 1, (byte) 2);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 29.3K bytes
    - Viewed (0)
  3. guava/src/com/google/common/io/CharSource.java

       * possible.
       *
       * @param sources the sources to concatenate
       * @return a {@code CharSource} containing the concatenated data
       * @throws NullPointerException if any of {@code sources} is {@code null}
       * @since 15.0
       */
      public static CharSource concat(Iterator<? extends CharSource> sources) {
        return concat(ImmutableList.copyOf(sources));
      }
    
      /**
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 08 18:35:13 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/primitives/Shorts.java

       *
       * @param collection a collection of {@code Number} instances
       * @return an array containing the same values as {@code collection}, in the same order, converted
       *     to primitives
       * @throws NullPointerException if {@code collection} or any of its elements is null
       * @since 1.0 (parameter was {@code Collection<Short>} before 12.0)
       */
      public static short[] toArray(Collection<? extends Number> collection) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Oct 22 18:14:49 UTC 2025
    - 25.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/SetViewTest.java

      }
    
      /**
       * A {@link Set} that throws {@link NullPointerException} and {@link ClassCastException} from
       * {@link #contains}.
       */
      private static final class SetContainsThrows extends AbstractSet<Void> {
        @Override
        public boolean contains(@Nullable Object o) {
          throw o == null ? new NullPointerException() : new ClassCastException();
        }
    
        @Override
        public int size() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 29.9K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Iterables.java

       * Objects.equals(o, element)} would return {@code true}. Otherwise returns {@code false}, even in
       * cases where {@link Collection#contains} might throw {@link NullPointerException} or {@link
       * ClassCastException}.
       */
      public static boolean contains(Iterable<?> iterable, @Nullable Object element) {
        if (iterable instanceof Collection) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/NodeStatusRequestTest.java

            // Arrange
            nodeStatusRequest = new NodeStatusRequest(mockConfig, null);
            byte[] dst = new byte[100];
    
            // Act & Assert
            assertThrows(NullPointerException.class, () -> {
                nodeStatusRequest.writeBodyWireFormat(dst, 0);
            });
        }
    
        @Test
        void multipleWriteBodyWireFormat_shouldProduceSameResult() {
            // Arrange
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.9K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java

            assertEquals("Not supported", ex.getMessage());
        }
    
        @Test
        @DisplayName("Null delegate causes NPE")
        void nullDelegate() {
            assertThrows(NullPointerException.class, () -> {
                new FileEntryAdapterIterator(parent, null, null) {
                    @Override
                    protected SmbResource adapt(FileEntry e) {
                        return resource;
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/FileEntryTest.java

        void nullReference_throwsNPE() {
            // Arrange
            FileEntry e = null;
            // Act & Assert: demonstrate invalid usage results in NPE
            assertThrows(NullPointerException.class, () -> e.getName());
        }
    
        @Nested
        @DisplayName("Mockito stubbing for edge cases")
        class MockitoEdgeCases {
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/math/PairedStatsTest.java

          assertThat(PairedStats.fromByteArray(pairedStatsByteArray)).isEqualTo(pairedStats);
        }
      }
    
      public void testFromByteArray_withNullInputThrowsNullPointerException() {
        assertThrows(NullPointerException.class, () -> PairedStats.fromByteArray(null));
      }
    
      public void testFromByteArray_withEmptyArrayInputThrowsIllegalArgumentException() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 14K bytes
    - Viewed (0)
Back to top