Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75476

Deprecate hudson.model.RunMap#getById(String) in favor of an int parameter version

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      As discussed in https://github.com/jenkinsci/jenkins/pull/10456#discussion_r2010184507

      due to hudson.model.RunMap#getById(String) supporting String parameter it requires to catch NumberFormatException in there - and returning a null if it happens.

      Ideally this validation should have been already done by the caller, and ensure a number is sent instead of string.

      It is kept this way for historically id was a date-time format string.

      See https://github.com/jenkinsci/jenkins/commit/843d2387234080efc2fa86acdd52b3053cbd08dd#diff-95652fadfce64ddb3df4fd56881234fd266aaefed40628c190adc4298e597aadR194-R202

            Unassigned Unassigned
            gbhat Guruprasad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: