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

The checkstyle plugin assumes java files have UTF-8 encoding

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • checkstyle-plugin
    • None
    • Platform: All, OS: All

    Description

      The hudson.plugins.check​style.util.JavaPacka​geDetector.detectPac​kageName()
      hard-codes UTF-8 encoding when it creates the LineIterator object.

      This should be amended to at least use the platform default encoding
      (java.nio.charset.Charset.defaultCharset().name()). The ideal solution would be
      for the user to be able to specify the encoding on the Hudson Build
      configuration page.

      I came across this when I ran Hudson with version 1.5 of the IBM JDK on Linux
      (defect 1827). This throws an exception trying to decode UTF-8, even though the
      SUN JDKs work fine. I have verified that there are no invalid UTF-8 code
      sequences in any of our java files.

      Attachments

        Issue Links

          Activity

            srbrown1 srbrown1 created issue -
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            drulli Ulli Hafner made changes -
            Link This issue depends on JENKINS-1999 [ JENKINS-1999 ]
            abayer Andrew Bayer made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 131902 ] JNJira + In-Review [ 201017 ]

            People

              drulli Ulli Hafner
              srbrown1 srbrown1
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: