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

Job config throws number format exception for GitLab browser config

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      A job configured to use a git repository provided by gitlab will fail to save if the repository browser is configured to be gitlab and either no value is entered into the gitlab version field, or a value is entered which can't be converted to a java double.

      Since the current version of GitLab on the cloud is 7.11.4.ee, that means I needed to list the version as 7.11. If I listed it as empty or as 7.11.4 or as 7.11.4.ee, an exception is thrown when trying to save the page.

      The gitlab browser constructor needs to be more forgiving of user input

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment - - edited

          pull request 327 has been submitted with a proposed fix.

          Show
          markewaite Mark Waite added a comment - - edited pull request 327 has been submitted with a proposed fix.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/hudson/plugins/git/browser/GitLab.java
          src/test/java/hudson/plugins/git/browser/GitLabTest.java
          http://jenkins-ci.org/commit/git-plugin/2962ecca1d411d246735b7e9021bd201c7130118
          Log:
          [Fix JENKINS-28792] GitLab browser edit panel allow more values for version

          When saving a job defined to use the GitLab browser, if the version field
          is empty or contains a value which cannot be converted to a double,
          the save operation fails with a stack trace that the Double.valueOf()
          threw a NumberFormatException.

          Silently use a default value if the user provided value cannot be
          converted to a Java double.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/browser/GitLab.java src/test/java/hudson/plugins/git/browser/GitLabTest.java http://jenkins-ci.org/commit/git-plugin/2962ecca1d411d246735b7e9021bd201c7130118 Log: [Fix JENKINS-28792] GitLab browser edit panel allow more values for version When saving a job defined to use the GitLab browser, if the version field is empty or contains a value which cannot be converted to a double, the save operation fails with a stack trace that the Double.valueOf() threw a NumberFormatException. Silently use a default value if the user provided value cannot be converted to a Java double.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/hudson/plugins/git/browser/GitLab.java
          src/test/java/hudson/plugins/git/browser/GitLabTest.java
          http://jenkins-ci.org/commit/git-plugin/c55953b19def0060abe6c87dbacbb81d657a786b
          Log:
          Merge pull request #327 from MarkEWaite/master-JENKINS-28792-gitlab-browser-version-required

          [Fix JENKINS-28792] GitLab browser edit panel allow more values for v…

          Compare: https://github.com/jenkinsci/git-plugin/compare/0c1a59a897d2...c55953b19def

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/browser/GitLab.java src/test/java/hudson/plugins/git/browser/GitLabTest.java http://jenkins-ci.org/commit/git-plugin/c55953b19def0060abe6c87dbacbb81d657a786b Log: Merge pull request #327 from MarkEWaite/master- JENKINS-28792 -gitlab-browser-version-required [Fix JENKINS-28792] GitLab browser edit panel allow more values for v… Compare: https://github.com/jenkinsci/git-plugin/compare/0c1a59a897d2...c55953b19def
          Hide
          markewaite Mark Waite added a comment -

          Fix included in git plugin 2.4.0 released 18 July 2015

          Show
          markewaite Mark Waite added a comment - Fix included in git plugin 2.4.0 released 18 July 2015

            People

            • Assignee:
              markewaite Mark Waite
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: