Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 58 for ArrayIndexOutOfBoundsException (0.17 sec)

  1. guava-tests/test/com/google/common/net/ReflectionFreeAssertThrows.java

              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
              .put(ArrayStoreException.class, e -> e instanceof ArrayStoreException)
              .put(AssertionFailedError.class, e -> e instanceof AssertionFailedError)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComLockingAndXTest.java

            assertTrue(repr.contains("newOplockLevel=2"));
        }
    
        /**
         * Test decoding of bytes buffer that is too short triggers an exception.
         * Note: The actual implementation throws ArrayIndexOutOfBoundsException
         * when the buffer is too short, not SMBProtocolDecodingException.
         */
        @Test
        void readBytesWireFormatTooShortException() {
            Configuration cfg = mock(Configuration.class);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    @file:Suppress("ktlint:standard:filename")
    
    package okhttp3.internal
    
    import okio.ArrayIndexOutOfBoundsException
    import okio.Buffer
    import okio.BufferedSink
    import okio.BufferedSource
    import okio.ByteString.Companion.decodeHex
    import okio.Closeable
    import okio.FileNotFoundException
    import okio.FileSystem
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/ReflectionFreeAssertThrows.java

              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
              .put(ArrayStoreException.class, e -> e instanceof ArrayStoreException)
              .put(AssertionFailedError.class, e -> e instanceof AssertionFailedError)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/session/Smb2LogoffResponseTest.java

            @DisplayName("Insufficient buffer causes ArrayIndexOutOfBoundsException")
            void shortBuffer_throwsAIOOBE() {
                // Arrange: length 1 means readInt2 will access index 1 and fail
                byte[] buffer = new byte[1];
                Smb2LogoffResponse resp = newResponse();
    
                // Act & Assert
                assertThrows(ArrayIndexOutOfBoundsException.class, () -> resp.readBytesWireFormat(buffer, 0));
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java

            byte[] dst = new byte[10]; // Too small for the full parameters
    
            // Should throw ArrayIndexOutOfBoundsException
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
                netServerEnum2.writeParametersWireFormat(dst, 0);
            });
        }
    
        @Test
        @DisplayName("Test writeParametersWireFormat with large buffer succeeds")
        void testWriteParametersWireFormatLargeBuffer() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/session/Smb2LogoffRequestTest.java

            // Arrange
            Smb2LogoffRequest req = newRequest();
            byte[] tiny = new byte[3]; // less than 4 bytes available
    
            // Act/Assert
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> req.writeBytesWireFormat(tiny, 0));
        }
    
        @Test
        @DisplayName("writeBytesWireFormat throws with negative index")
        void writeBytesWireFormat_throwsIfNegativeIndex() {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/fscc/FileSystemInformationTest.java

                FileFsSizeInformation info = new FileFsSizeInformation();
                byte[] buffer = new byte[10]; // Too small
    
                // Should throw ArrayIndexOutOfBoundsException for insufficient buffer
                assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
                    info.decode(buffer, 0, buffer.length);
                });
            }
    
            @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoRequestTest.java

            // Create buffer smaller than required size
            byte[] smallBuffer = new byte[request.size() - 1];
    
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
                request.encode(smallBuffer, 0);
            });
        }
    
        @Test
        @DisplayName("Test encode with offset exceeding buffer throws exception")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb1/trans/TransCallNamedPipeResponseTest.java

        }
    
        @Test
        void testReadDataWireFormatWithNegativeLength() {
            byte[] buffer = new byte[100];
            // Negative length should cause ArrayIndexOutOfBoundsException from System.arraycopy
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> response.readDataWireFormat(buffer, 0, -1));
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.8K bytes
    - Viewed (0)
Back to top