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

White spaces are incorrectly removed when passing data via .temp2 files

      In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:

      while(length > 0 && Character.isWhitespace(data[startIndex])) {
          startIndex += 1;
          length -= 1;
      }
      

      This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
      This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the white spaces in the middle can be incorrectly removed.
      For example, the following data from git log:

      commit b914376ca8a58c146636a84de9fa6d5acb8e020f
      tree 43712b02868755704390e4f51ab480a966980874
      parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

      …..
      

      Will be parsed to GitChangeLogParser as:

      commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
      

      And it can not be parsed correctly.

      I attached a snapshot from Jenkins, when it happens, the "changes" looks like the snapshot.

      BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.

          [JENKINS-33748] White spaces are incorrectly removed when passing data via .temp2 files

          Dong Zhang created issue -
          Dong Zhang made changes -
          Description Original: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the while spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to git change log parser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens
          New: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the while spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to git change log parser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          Dong Zhang made changes -
          Description Original: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the while spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to git change log parser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          New: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the white spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to git change log parser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Component/s Original: git-plugin [ 15543 ]
          Dong Zhang made changes -
          Description Original: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the white spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to git change log parser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          New: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the white spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to GitChangeLogParser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          Dong Zhang made changes -
          Description Original: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the white spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to GitChangeLogParser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          New: In latest version (75422af ) of class MultiSCMChangeLogParser, line #73-76:
          {code}
          while(length > 0 && Character.isWhitespace(data[startIndex])) {
              startIndex += 1;
              length -= 1;
          }
          {code}
          This removes all white spaces (including newline, etc.) regardless if the data is the start of the whole section.
          This randomly cause problem, depends on SAX: When it pass everything in one data[], then it's fine. But sometimes, a section can be devided into several small pieces, and the white spaces in the middle can be incorrectly removed.
          For example, the following data from git log:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020f
          tree 43712b02868755704390e4f51ab480a966980874
          parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d

          …..
          {code}
          Will be parsed to GitChangeLogParser as:
          {code}
          commit b914376ca8a58c146636a84de9fa6d5acb8e020ftree 43712b02868755704390e4f51ab480a966980874parent e94e7abe6bd1df3c02e862107c3ae676f450ed2d
…..
          {code}
          And it can not be parsed correctly.

          I attached a snapshot from Jenkins, when it happens, the "changes" looks like the snapshot.

          BTW, the snapshot is from v0.3 in our production system, but as far as I see, the latest version also have the same problem.
          Dong Zhang made changes -
          Assignee New: Kevin Bell [ kbell ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169723 ] New: JNJira + In-Review [ 183623 ]

            kbell Kevin Bell
            dong_zhang Dong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: