Server.isHudsonBuild173orGreater() bug

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major
    • Component/s: trayapp
    • None
    • Environment:
      Platform: All, OS: All

      Code always tacks on a space onto the result, therefore if there is no X-Hudson
      field, then the returned version will be the String "null "

      String version = conn.getHeaderField("X-Hudson") + " ";
      Matcher matcher = null;
      if (version != null)
      matcher = pattern.matcher(version);

      The corrected code could be something like this:

      String version = conn.getHeaderField("X-Hudson");
      Matcher matcher = null;
      if (version != null)
      matcher = pattern.matcher(version + " ");

            Assignee:
            davyboyhayes
            Reporter:
            jchristi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: