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

/api/xml?xpath=...&wrapper=... works unexpectedly if result node list size <=1

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      If the result has >=2 elements, you get <wrapper>...results...</wrapper> as you
      expect. But if it has 1 element, you get that element with no wrapper. And if it
      has no elements, you get an (HTML!) error page. While this may be pleasant for
      interactive experimentation, it makes writing a WS client harder.

          [JENKINS-3267] /api/xml?xpath=...&wrapper=... works unexpectedly if result node list size <=1

          Jesse Glick added a comment -

          Working on it with a test.

          Jesse Glick added a comment - Working on it with a test.

          Code changed in hudson
          User: : jglick
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Api.java
          trunk/hudson/main/test/src/test/java/hudson/model/ApiTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=16157
          Log:
          [FIXED JENKINS-3267] api/xml?xpath=...&wrapper=... behaved inconsistently for results of size 0 or 1.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/hudson/main/core/src/main/java/hudson/model/Api.java trunk/hudson/main/test/src/test/java/hudson/model/ApiTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=16157 Log: [FIXED JENKINS-3267] api/xml?xpath=...&wrapper=... behaved inconsistently for results of size 0 or 1.

          Code changed in hudson
          User: : jglick
          Path:
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=16158
          Log:
          JENKINS-3267 Noting fix.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=16158 Log: JENKINS-3267 Noting fix.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: