- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 19 for getRootCause (0.21 seconds)
-
src/test/java/jcifs/dcerpc/DcerpcExceptionTest.java
} /** * Test getRootCause() method (deprecated). */ @Test void testGetRootCause() { Throwable cause = new IllegalArgumentException("Invalid argument."); DcerpcException exception = new DcerpcException("Error with cause.", cause); assertEquals(cause, exception.getRootCause(), "getRootCause() should return the original cause."); } /**Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/ThrowablesTest.java
SomeCheckedException exception = new SomeCheckedException(); assertThat(getRootCause(exception)).isSameInstanceAs(exception); } public void testGetRootCause_singleWrapped() { SomeCheckedException cause = new SomeCheckedException(); SomeChainingException exception = new SomeChainingException(cause); assertThat(getRootCause(exception)).isSameInstanceAs(cause); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 15K bytes - Click Count (0) -
guava-tests/test/com/google/common/base/ThrowablesTest.java
SomeCheckedException exception = new SomeCheckedException(); assertThat(getRootCause(exception)).isSameInstanceAs(exception); } public void testGetRootCause_singleWrapped() { SomeCheckedException cause = new SomeCheckedException(); SomeChainingException exception = new SomeChainingException(cause); assertThat(getRootCause(exception)).isSameInstanceAs(cause); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 15K bytes - Click Count (0) -
src/main/java/jcifs/dcerpc/DcerpcException.java
public int getErrorCode() { return this.error; } /** * * @return the root cause * @deprecated use {@link #getCause()} */ @Deprecated public Throwable getRootCause() { return getCause(); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 2.9K bytes - Click Count (0) -
src/test/java/jcifs/util/transport/TransportExceptionTest.java
@Test @DisplayName("Test deprecated getRootCause method returns the same as getCause") @SuppressWarnings("deprecation") public void testGetRootCause() { // Test with no cause TransportException noCauseException = new TransportException("No cause"); assertNull(noCauseException.getRootCause()); assertEquals(noCauseException.getCause(), noCauseException.getRootCause()); // Test with causeCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7.4K bytes - Click Count (0) -
src/main/java/jcifs/smb1/util/transport/TransportException.java
this.rootCause = rootCause; } /** * Returns the root cause of this exception. * * @return the root cause or null if none was set */ public Throwable getRootCause() { return rootCause; } @Override public String toString() { if (rootCause != null) { final StringWriter sw = new StringWriter();Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 1.8K bytes - Click Count (0) -
src/main/java/jcifs/util/transport/TransportException.java
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 2.1K bytes - Click Count (0) -
src/test/java/jcifs/smb/SMBSignatureValidationExceptionTest.java
assertEquals(msg, ex.getMessage(), "Message should be stored as provided"); } assertSame(cause, ex.getCause(), "Cause should be stored and retrievable"); assertSame(cause, ex.getRootCause(), "Deprecated getRootCause should match getCause"); assertEquals(NtStatus.NT_STATUS_UNSUCCESSFUL, ex.getNtStatus(), "Status should default to unsuccessful for message+cause ctor"); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.3K bytes - Click Count (0) -
src/test/java/jcifs/smb1/util/transport/TransportExceptionTest.java
assertEquals(rootCause, exception.getRootCause()); } @Test @DisplayName("Should handle null root cause") void testConstructorWithNullRootCause() { TransportException exception = new TransportException((Throwable) null); assertNotNull(exception); assertNull(exception.getRootCause()); } @Test
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 11.5K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbExceptionTest.java
import org.mockito.junit.jupiter.MockitoExtension; /** * Unit tests for {@link SmbException}. * * The tests exercise the public API: constructors, {@link #getNtStatus()}, * {@link #getRootCause()}, and {@link #toString()}. */ @ExtendWith(MockitoExtension.class) class SmbExceptionTest { /** * Happy path – constructor with a valid NT status code (0). */ @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.5K bytes - Click Count (0)