Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,812 for rethrow (0.05 sec)

  1. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

        class ConstructorTests {
    
            @Test
            @DisplayName("Should throw DcerpcException for invalid URL format")
            void testConstructor_InvalidUrl() {
                String invalidUrl = "invalid:server";
                assertThrows(DcerpcException.class, () -> new DcerpcPipeHandle(invalidUrl, mockContext, false),
                        "Should throw DcerpcException for invalid protocol");
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/zip/ZipFileUtil.java

            return FileUtil.getCanonicalPath(zipFile);
        }
    
        /**
         * Closes the Zip file.
         * <p>
         * If {@link ZipFile#close()} throws an exception, an error message is logged. The exception is not rethrown.
         * </p>
         *
         * @param zipFile
         *            Zip file. Must not be {@literal null}.
         */
        public static void close(final ZipFile zipFile) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

            // Assert: interaction happened and did not throw
            verify(handle, times(1)).ensureDFSResolved();
            verifyNoMoreInteractions(handle);
        }
    
        @Test
        @DisplayName("ensureDFSResolved(): throws CIFSException when underlying call fails")
        void ensureDFSResolved_throws() throws Exception {
            // Arrange: configure the mock to throw
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbTreeTest.java

            SmbTree tree = new SmbTree(session, "testShare", "testService");
    
            // Mock transport.connect() to throw RuntimeException wrapping InterruptedException
            doThrow(new RuntimeException(new InterruptedException("Interrupted"))).when(transport).connect();
    
            // Should throw exception due to interrupted wait
            assertThrows(RuntimeException.class, () -> tree.treeConnect(null, null));
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/dcerpc/msrpc/LsaPolicyHandleTest.java

            LsaPolicyHandle handle = new LsaPolicyHandle(mockDcerpcHandle, "server", 123);
    
            // Now, mock the behavior for MsrpcLsarClose to throw IOException
            doThrow(new IOException("Close network error")).when(mockDcerpcHandle).sendrecv(any(MsrpcLsarClose.class));
    
            // Act & Assert
            IOException thrown = assertThrows(IOException.class, () -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/SmbTreeTest.java

         * Verifies that unwrap can throw exceptions when appropriate.
         */
        @Test
        void testUnwrap_throwsException() {
            when(smbTree.unwrap(any())).thenThrow(new ClassCastException("Cannot unwrap to specified type"));
    
            assertThrows(ClassCastException.class, () -> smbTree.unwrap(CustomSmbTree.class),
                    "Should throw ClassCastException when type is incompatible");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbSessionInternalTest.java

        @ParameterizedTest
        @DisplayName("getSmbTree invalid inputs (null/empty) throw IllegalArgumentException")
        @CsvSource({ ",service", // null share
                " ,service", // empty share
                "share,", // null service
                "share, " // empty service
        })
        void getSmbTree_invalid(String share, String service) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/escape/CharEscaper.java

          }
    
          int rlen = r.length;
          int charsSkipped = index - lastEscape;
    
          // This is the size needed to add the replacement, not the full size
          // needed by the string. We only regrow when we absolutely must, and
          // when we do grow, grow enough to avoid excessive growing. Grow.
          int sizeNeeded = destIndex + charsSkipped + rlen;
          if (destSize < sizeNeeded) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 15:45:16 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  9. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

    import static org.junit.jupiter.api.Assertions.assertTrue;
    import static org.mockito.ArgumentMatchers.any;
    import static org.mockito.Mockito.doNothing;
    import static org.mockito.Mockito.doThrow;
    import static org.mockito.Mockito.lenient;
    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.spy;
    import static org.mockito.Mockito.verify;
    import static org.mockito.Mockito.when;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/SmbResourceTest.java

                doThrow(new NullPointerException("dest argument is null")).when(mockResource).renameTo(null);
    
                // When/Then
                assertThrows(NullPointerException.class, () -> mockResource.renameTo(null),
                        "Should throw NullPointerException for null destination");
            }
        }
    
        @Nested
        @DisplayName("Stream Operations Tests")
        class StreamOperationsTests {
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
Back to top