Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 436 for throwing (0.07 sec)

  1. android/guava/src/com/google/common/collect/SneakyThrows.java

       *     throw.
       */
      @CanIgnoreReturnValue
      static Error sneakyThrow(Throwable t) {
        throw new SneakyThrows<Error>().throwIt(t);
      }
    
      @SuppressWarnings("unchecked") // not really safe, but that's the point
      private Error throwIt(Throwable t) throws T {
        throw (T) t;
      }
    
      private SneakyThrows() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Dec 30 18:44:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/SneakyThrows.java

       *     throw.
       */
      @CanIgnoreReturnValue
      static Error sneakyThrow(Throwable t) {
        throw new SneakyThrows<Error>().throwIt(t);
      }
    
      @SuppressWarnings("unchecked") // not really safe, but that's the point
      private Error throwIt(Throwable t) throws T {
        throw (T) t;
      }
    
      private SneakyThrows() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Dec 30 18:44:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/TransWaitNamedPipeResponseTest.java

         * Verify that all methods can be called with null buffers without
         * throwing exceptions. This test ensures robustness of the implementation.
         */
        @Test
        void methodsHandleNullBuffersGracefully() {
            // Arrange
            TransWaitNamedPipeResponse resp = new TransWaitNamedPipeResponse();
            // Act & Assert - no exceptions should be thrown
            assertDoesNotThrow(() -> resp.writeSetupWireFormat(null, 0));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescTest.java

            int securityInfo = OWNER_SECURITY_INFORMATION;
    
            querySecurityDesc = new NtTransQuerySecurityDesc(mockConfig, fid, securityInfo);
    
            // Constructor should initialize the object without throwing exceptions
            assertNotNull(querySecurityDesc);
    
            // Test toString contains the expected values to verify field initialization
            String str = querySecurityDesc.toString();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.9K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        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
        }
      }
    
      public void testFailOneArgThrowsWrongType() {
        shouldFail(new FailOneArgThrowsWrongType());
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 47.7K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/internal/MockWebServerSocket.kt

            ?: listOf()
    
      fun shutdownInput() {
        javaNetSocket.shutdownInput()
      }
    
      fun shutdownOutput() {
        javaNetSocket.shutdownOutput()
      }
    
      /** Sleeps [nanos], throwing if the socket is closed before that period has elapsed. */
      fun sleepWhileOpen(nanos: Long) {
        var ms = nanos / 1_000_000L
        val ns = nanos - (ms * 1_000_000L)
    
        while (ms > 100) {
          Thread.sleep(100)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationResponseTest.java

        }
    
        @Test
        @DisplayName("Test all write methods with null buffer")
        void testWriteMethodsWithNullBuffer() {
            // Even with null buffer, methods should return 0 without throwing exception
            int result = response.writeSetupWireFormat(null, 0);
            assertEquals(0, result);
    
            result = response.writeParametersWireFormat(null, 0);
            assertEquals(0, result);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/fess/exception/UserRoleLoginExceptionTest.java

            UserRoleLoginException exception = new UserRoleLoginException(RootAction.class);
            assertNull(exception.getCause());
        }
    
        public void test_throwAndCatch() {
            // Test throwing and catching the exception
            try {
                throw new UserRoleLoginException(RootAction.class);
            } catch (UserRoleLoginException e) {
                assertEquals(RootAction.class, e.getActionClass());
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java

     * second invocation, so implementors have made various choices, including:
     *
     * <ul>
     *   <li>returning the same iterator again
     *   <li>throwing an exception of some kind
     *   <li>or the usual, <i>robust</i> behavior, which all known {@link Collection} implementations
     *       have, of returning a new, independent iterator
     * </ul>
     *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/spnego/SpnegoExceptionTest.java

            // Then
            assertNotNull(ex);
            assertEquals(message, ex.getMessage());
            assertEquals(cause, ex.getCause());
        }
    
        @Test
        @DisplayName("Should handle null message and/or cause without throwing")
        void testNullInputs() {
            assertDoesNotThrow(() -> {
                SpnegoException ex1 = new SpnegoException((String) null);
                assertNotNull(ex1);
                assertNull(ex1.getMessage());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
Back to top