Search Options

Results per page
Sort
Preferred Languages
Advance

Results 411 - 420 of 471 for NullPointerException (0.19 sec)

  1. guava-tests/test/com/google/common/primitives/LongsTest.java

              assertThat(arr[j]).isEqualTo(VALUES[j]);
            }
          }
        }
      }
    
      public void testToArray_withNull() {
        List<@Nullable Long> list = Arrays.asList(0L, 1L, null);
        assertThrows(NullPointerException.class, () -> Longs.toArray(list));
      }
    
      public void testToArray_withConversion() {
        long[] array = {0L, 1L, 2L};
    
        List<Byte> bytes = Arrays.asList((byte) 0, (byte) 1, (byte) 2);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 28.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        assertEquals(2, (int) result.next());
        assertThrows(NullPointerException.class, () -> result.hasNext());
        assertThrows(NullPointerException.class, () -> result.next());
        // There is no way to get "through" to the 3.  Buh-bye
      }
    
      public void testConcatVarArgsContainingNull() {
        assertThrows(
            NullPointerException.class,
            () ->
                Iterators.concat(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 54.4K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/fess/query/MatchAllQueryCommandTest.java

                private static final long serialVersionUID = 1L;
    
                @Override
                public String get(String key) {
                    // Override to return empty string instead of null to avoid NullPointerException
                    return "";
                }
    
                @Override
                public String getIndexFieldTitle() {
                    return "title";
                }
    
                @Override
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java

        return asImmutableList(array);
      }
    
      private static <E> List<E> nullCheckedList(Object... array) {
        for (int i = 0, len = array.length; i < len; i++) {
          if (array[i] == null) {
            throw new NullPointerException("at index " + i);
          }
        }
        @SuppressWarnings("unchecked")
        E[] castedArray = (E[]) array;
        return Arrays.asList(castedArray);
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

                TestDcerpcHandle handleWithNullBinding = new TestDcerpcHandle(mockContext);
    
                // When/Then: Should throw NPE for null binding (expected behavior)
                assertThrows(NullPointerException.class, () -> handleWithNullBinding.toString());
            }
    
            @Test
            @DisplayName("Should handle session key retrieval")
            void testSessionKeyRetrieval() throws CIFSException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbTreeConnectionTest.java

            // keep retries small for faster and deterministic tests
            when(config.getMaxRequestRetries()).thenReturn(2);
            when(config.isTraceResourceUsage()).thenReturn(false);
            // Mock credentials to avoid NullPointerException
            when(ctx.getCredentials()).thenReturn(credentials);
            when(credentials.getUserDomain()).thenReturn("DOMAIN");
            // Mock DFS resolver
            when(ctx.getDfs()).thenReturn(dfsResolver);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 13K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java

            // Then - should not throw during construction
            assertNotNull(reqWithNull);
    
            // But should throw when trying to use the null path
            assertThrows(NullPointerException.class, () -> {
                reqWithNull.size();
            });
        }
    
        @Test
        @DisplayName("Should write consistent structure at different offsets")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/fess/job/CrawlJobTest.java

            private static final long serialVersionUID = 1L;
    
            public TestFessConfig() {
                super();
                // Initialize the properties to avoid NullPointerException
                try {
                    java.lang.reflect.Field propField = org.lastaflute.core.direction.ObjectiveConfig.class.getDeclaredField("prop");
                    propField.setAccessible(true);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 25K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

        private final String justAfterNull;
    
        protected NullsBefore(String justAfterNull) {
          if (justAfterNull == null) {
            throw new NullPointerException();
          }
    
          this.justAfterNull = justAfterNull;
        }
    
        @Override
        public int compare(@Nullable String lhs, @Nullable String rhs) {
          if (lhs == rhs) {
            return 0;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 17.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/BytesTest.java

            }
          }
        }
      }
    
      public void testToArray_withNull() {
        List<@Nullable Byte> list = Arrays.asList((byte) 0, (byte) 1, null);
        assertThrows(NullPointerException.class, () -> Bytes.toArray(list));
      }
    
      public void testToArray_withConversion() {
        byte[] array = {(byte) 0, (byte) 1, (byte) 2};
    
        List<Byte> bytes = Arrays.asList((byte) 0, (byte) 1, (byte) 2);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 17.5K bytes
    - Viewed (0)
Back to top