Uploaded image for project: 'DSpace (LEGACY)'
  1. DSpace (LEGACY)
  2. DS-2566

Conflicting limits in HandleManager can cause unnecessary IllegalArgumentException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      2
    • Documentation Status:
      Not Required

      Description

      HandleManager uses a database SEQUENCE to generate unique suffixes for Handles. The range of a PostgreSQL SEQUENCE is 1 : 2^63 - 1, and the range of an Oracle SEQUENCE is 1 : 10^28 -1. The code tries to read this into an Integer (by calling TableRow.getIntColumn), and that will throw IllegalArgumentException if the attribute's value is too large to fit in an Integer.

      Two billion Handles is quite a few, but we might as well use at least the range of a Long (by calling getLongColumn) since we will get at least that much range from either DBMS. getNumericColumn would handle even Oracle without overflow. I have not found any specified limit on the length of a Handle suffix.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mwood Mark H. Wood
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: