Skip to content

[JENKINS-2698] scm/SubversionSCM/enterCredential gets NullPointerException if form left blank #514

Closed

Description

@jenkins-infra-bot

Very minor issue, but thought I'd report it..
Visit the enterCredential page and just click the OK button w/o filling out the
form.. I get a "server error" page, and webserver log shows
NullPointerException. 1.262


Originally reported by mindless, imported from: scm/SubversionSCM/enterCredential gets NullPointerException if form left blank
  • status: Closed
  • priority: Minor
  • component(s): subversion-plugin
  • resolution: Fixed
  • resolved: 2008-12-16T10:28:28+00:00
  • votes: 0
  • watchers: 0
  • imported: 20251212-090250
Raw content of original issue

Very minor issue, but thought I'd report it.. Visit the enterCredential page and just click the OK button w/o filling out the form.. I get a "server error" page, and webserver log shows NullPointerException. 1.262

  • environment: Platform: All, OS: All

Activity

  1. jenkins-infra-bot commented on Dec 12, 2008

    @jenkins-infra-bot
    Author
    mindless:
    • Original comment link
    • Raw content of original comment:

      Here is a patch to resolve this:

      Index: main/core/src/main/java/hudson/scm/SubversionSCM.java =================================================================== — main/core/src/main/java/hudson/scm/SubversionSCM.java (revision 13501) +++ main/core/src/main/java/hudson/scm/SubversionSCM.java (working copy) @@ -1128,7 +1128,7 @@ // SVNKit wants a key in a file final File keyFile; FileItem item=null;

      • if(kind.equals("password")) { + if(idx <= 1) { keyFile = null; }

        else { item = parser.getFileItem(kind.equals("publickey")?"privateKey":"certificate");

    Here is a patch to resolve this:

    Index: main/core/src/main/java/hudson/scm/SubversionSCM.java
    ===================================================================
    — main/core/src/main/java/hudson/scm/SubversionSCM.java (revision 13501)
    +++ main/core/src/main/java/hudson/scm/SubversionSCM.java (working copy)
    @@ -1128,7 +1128,7 @@
    // SVNKit wants a key in a file
    final File keyFile;
    FileItem item=null;

    • if(kind.equals("password")) {
      + if(idx <= 1) { keyFile = null; }

      else {
      item =
      parser.getFileItem(kind.equals("publickey")?"privateKey":"certificate");

  2. jenkins-infra-bot commented on Dec 16, 2008

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in hudson
    User: : kohsuke
    Path:
    trunk/hudson/main/core/src/main/java/hudson/scm/SubversionSCM.java
    trunk/www/changelog.html
    http://fisheye4.cenqua.com/changelog/hudson/?cs=13649
    Log:
    [FIXED JENKINS-2698] In 1.265.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions