Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for NPE (0.01 sec)

  1. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        public void oneArg(String s) {
          // Fail: missing NPE for s
        }
      }
    
      public void testFailOneArgDoesntThrowNpe() {
        shouldFail(new FailOneArgDoesntThrowNpe());
      }
    
      private static class FailOneArgThrowsWrongType extends PassObject {
        @Override
        public void oneArg(String s) {
          doThrow(s); // Fail: throwing non-NPE exception for null s
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 47.7K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        // https://android-review.googlesource.com/#/c/271775/
        try {
          this.socket = rawSocket.asBufferedSocket()
        } catch (npe: NullPointerException) {
          if (npe.message == NPE_THROW_WITH_NULL) {
            throw IOException(npe)
          }
        }
      }
    
      /**
       * Does all the work to build an HTTPS connection over a proxy tunnel. The catch here is that a
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java

          // GWT's HashMap.keySet().removeAll(null) doesn't throws NPE.
        }
      }
    
      @Override
      public void testEntrySetRemoveAllNullFromEmpty() {
        try {
          super.testEntrySetRemoveAllNullFromEmpty();
        } catch (RuntimeException tolerated) {
          // GWT's HashMap.entrySet().removeAll(null) doesn't throws NPE.
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

      }
    
      @Override
      public boolean contains(@Nullable Object object) {
        try {
          // This set never contains null.  We need to explicitly check here
          // because some comparator might throw NPE (e.g. the natural ordering).
          return object != null && sortedDelegate.contains(object);
        } catch (ClassCastException e) {
          return false;
        }
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

          future.get();
          fail("Expected ExecutionException");
        } catch (ExecutionException e) {
          assertThat(e).hasCauseThat().isSameInstanceAs(expectedCause);
        }
      }
    
      /** invokeAny(null) throws NPE */
      public void testInvokeAnyImpl_nullTasks() throws Exception {
        ListeningExecutorService e = newDirectExecutorService();
        try {
          invokeAnyImpl(e, null, false, 0, NANOSECONDS);
          fail();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/score/LtrQueryRescorerTest.java

            assertEquals(testWindowSize, queryRescorerBuilder.windowSize().intValue());
        }
    
        public void test_evaluate_withNullParams() {
            // Test with null parameters - should throw NPE due to OpenSearch StoredLtrQueryBuilder requirements
            final String testModelName = "test_model";
            final int testWindowSize = 75;
    
            ComponentUtil.setFessConfig(new FessConfig.SimpleImpl() {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/fess/dict/protwords/ProtwordsItemTest.java

                fail("Expected NullPointerException");
            } catch (NullPointerException e) {
                // Expected
            }
    
            // equals with null input may return false instead of throwing NPE
            assertFalse(item3.equals(item1));
        }
    
        public void test_toString() {
            // Test toString method
            ProtwordsItem item = new ProtwordsItem(123, "testword");
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/testing/NullPointerTester.java

         * package-private, I feel OK with just not testing them for NPE.
         *
         * Note that testing casValue is particularly dangerous because it uses Unsafe under some
         * versions of Java, and apparently Unsafe can cause SIGSEGV instead of NPE—almost as if it's
         * not safe.
         */
        concat(
                stream(AbstractFuture.class.getDeclaredMethods()),
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/ldap/LdapUserTest.java

            testEnv.put("test.key", "test.value");
            ldapUser = new LdapUser(testEnv, "testuser");
    
            ComponentUtil.register(new SystemHelper(), "systemHelper");
    
            // Register a mock LdapManager to avoid NPE
            ComponentUtil.register(new LdapManager() {
                // Override methods that are called in tests
            }, "ldapManager");
        }
    
        @Override
        public void tearDown() throws Exception {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

      public void testConstructor() {
        AtomicDoubleArray aa = new AtomicDoubleArray(SIZE);
        for (int i = 0; i < SIZE; i++) {
          assertBitEquals(0.0, aa.get(i));
        }
      }
    
      /** constructor with null array throws NPE */
      public void testConstructor2NPE() {
        double[] a = null;
        assertThrows(NullPointerException.class, () -> new AtomicDoubleArray(a));
      }
    
      /** constructor with array is of same size and has all elements */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 14.6K bytes
    - Viewed (0)
Back to top