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

The checkstyle plugin assumes java files have UTF-8 encoding

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • checkstyle-plugin
    • None
    • Platform: All, OS: All

      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.

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

              Created:
              Updated:
              Resolved: