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

Can't open sloccount table portlet

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • sloccount-plugin
    • None
    • windows 7, Jenkins 1.547, sloccount 1.11

    Description

      When every you attempt to open a SLOCCount report, you get this exception

      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(Unknown Source)
      at hudson.plugins.sloccount.model.SloccountReport.extractFolder(SloccountReport.java:73)
      at hudson.plugins.sloccount.model.SloccountReport.add(SloccountReport.java:51)
      at hudson.plugins.sloccount.model.SloccountParser.parseLine(SloccountParser.java:122)
      at hudson.plugins.sloccount.model.SloccountParser.parse(SloccountParser.java:89)
      at hudson.plugins.sloccount.model.SloccountParser.parse(SloccountParser.java:78)
      at hudson.plugins.sloccount.model.SloccountParser.parseFiles(SloccountParser.java:62)
      at hudson.plugins.sloccount.SloccountResult.lazyLoad(SloccountResult.java:102)
      at hudson.plugins.sloccount.SloccountResult.getReport(SloccountResult.java:43)
      ... 110 more

      Attachments

        Activity

          Code changed in jenkins
          User: Michal Turek
          Path:
          src/main/java/hudson/plugins/sloccount/SloccountResult.java
          src/main/java/hudson/plugins/sloccount/model/Folder.java
          src/main/java/hudson/plugins/sloccount/model/SloccountReport.java
          src/test/java/hudson/plugins/sloccount/model/SloccountReportTest.java
          http://jenkins-ci.org/commit/sloccount-plugin/63baeefe669e13127dbb453ff5b7896690d30ccf
          Log:
          JENKINS-21419 Can't open sloccount table portlet

          • Links to specific folders in folder details don't work.
          • All Windows backslashes are now replaced by Unix slashes at the very beginning. Only unix slashes are considered in the rest of the code, which significantly simplifies it and prevents possible errors.
          • SloccountReport.extractFolder() is now used in FolderFileFilter.include() to fix the same issue that was present in extractFolder().
          • Constant DIRECTORY_SEPARATOR constant is used instead of hardcoded "/".
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michal Turek Path: src/main/java/hudson/plugins/sloccount/SloccountResult.java src/main/java/hudson/plugins/sloccount/model/Folder.java src/main/java/hudson/plugins/sloccount/model/SloccountReport.java src/test/java/hudson/plugins/sloccount/model/SloccountReportTest.java http://jenkins-ci.org/commit/sloccount-plugin/63baeefe669e13127dbb453ff5b7896690d30ccf Log: JENKINS-21419 Can't open sloccount table portlet Links to specific folders in folder details don't work. All Windows backslashes are now replaced by Unix slashes at the very beginning. Only unix slashes are considered in the rest of the code, which significantly simplifies it and prevents possible errors. SloccountReport.extractFolder() is now used in FolderFileFilter.include() to fix the same issue that was present in extractFolder(). Constant DIRECTORY_SEPARATOR constant is used instead of hardcoded "/".
          mixalturek Michal Turek added a comment -

          The issue should be fixed now, version 1.12 released.

          mixalturek Michal Turek added a comment - The issue should be fixed now, version 1.12 released.

          will test today.

          FYI this is a windows install.

          A lot of the tools (build steps) are run in shell scripts, so mixing of path separators is quite likely.

          Thanks for the quicker than quick turn-around!

          moncreaff Greg Moncreaff added a comment - will test today. FYI this is a windows install. A lot of the tools (build steps) are run in shell scripts, so mixing of path separators is quite likely. Thanks for the quicker than quick turn-around!

          Fix looks good!

          moncreaff Greg Moncreaff added a comment - Fix looks good!
          mixalturek Michal Turek added a comment -

          Great

          mixalturek Michal Turek added a comment - Great

          People

            mixalturek Michal Turek
            moncreaff Greg Moncreaff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: