Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for DOS_ERROR_CODES (0.05 sec)

  1. src/test/java/jcifs/smb1/smb1/DosErrorTest.java

            return Arrays.stream(DosError.DOS_ERROR_CODES).filter(pair -> pair[0] == dosErrorCode).map(pair -> pair[1]).findFirst();
        }
    
        @Test
        @DisplayName("DOS_ERROR_CODES is non‑null and non‑empty")
        void testCodesArrayExistence() {
            assertNotNull(DosError.DOS_ERROR_CODES, "DOS_ERROR_CODES should be non‑null");
            assertTrue(DosError.DOS_ERROR_CODES.length > 0, "DOS_ERROR_CODES should contain at least one mapping");
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb1/smb1/SmbException.java

            }
            int min = 0;
            int max = DOS_ERROR_CODES.length - 1;
    
            while (max >= min) {
                final int mid = (min + max) / 2;
    
                if (errcode > DOS_ERROR_CODES[mid][0]) {
                    min = mid + 1;
                } else if (errcode < DOS_ERROR_CODES[mid][0]) {
                    max = mid - 1;
                } else {
                    return DOS_ERROR_CODES[mid][1];
                }
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/DosErrorTest.java

        }
    
        @Test
        @DisplayName("Structure: DOS_ERROR_CODES is non-null with [code,status] pairs")
        void dosErrorCodesStructureIsValid() {
            // Arrange & Act
            int[][] table = DosError.DOS_ERROR_CODES;
    
            // Assert
            assertNotNull(table, "DOS_ERROR_CODES must not be null");
            assertTrue(table.length > 0, "DOS_ERROR_CODES must not be empty");
            for (int i = 0; i < table.length; i++) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbExceptionTest.java

        /**
         * Parameterised test covering many error codes.
         * - Error code 0 returns 0 (NT_STATUS_SUCCESS)
         * - Negative values with 0xC0000000 bits set are returned as-is
         * - Positive values not in DOS_ERROR_CODES map to NT_STATUS_UNSUCCESSFUL
         */
        @ParameterizedTest
        @ValueSource(ints = { 0, 1, 123, -7 })
        void testGetNtStatusVariousCodes(int errcode) {
            SmbException ex = new SmbException(errcode, false);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/DosError.java

     */
    public interface DosError {
    
        /**
         * Mapping table from DOS error codes to NT status codes.
         * Each entry contains a pair of [DOS error code, NT status code].
         */
        int[][] DOS_ERROR_CODES = { { 0x00000000, 0x00000000 }, { 0x00010001, 0xc0000002 }, { 0x00010002, 0xc0000002 },
                { 0x00020001, 0xc000000f }, { 0x00020002, 0xc000006a }, { 0x00030001, 0xc000003a }, { 0x00030002, 0xc00000cb },
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/smb1/DosError.java

     */
    public interface DosError {
    
        /**
         * Mapping table from DOS error codes to NT status codes.
         * Each entry contains a pair of [DOS error code, NT status code].
         */
        int[][] DOS_ERROR_CODES =
                { { 0x00000000, 0x00000000 }, { 0x00010001, 0xc0000002 }, { 0x00010002, 0xc0000002 }, { 0x00020001, 0xc000000f },
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbExceptionTest.java

        }
    
        @Test
        @DisplayName("Should handle DOS error codes")
        void testDOSErrorCodes() {
            // Given
            int dosError = 0x00020002; // File not found from DOS_ERROR_CODES
    
            // When
            SmbException exception = new SmbException(dosError, false);
    
            // Then
            assertNotNull(exception);
            assertNotNull(exception.getMessage());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbException.java

                errorCodeMessagesTmp.put(NT_STATUS_CODES[i], NT_STATUS_MESSAGES[i]);
            }
    
            final Map<Integer, Integer> dosErrorCodeStatusesTmp = new HashMap<>();
            for (final int[] element : DOS_ERROR_CODES) {
                dosErrorCodeStatusesTmp.put(element[0], element[1]);
                final int mappedNtCode = element[1];
                final String mappedNtMessage = errorCodeMessagesTmp.get(mappedNtCode);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.7K bytes
    - Viewed (0)
Back to top