Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5048557

javac fails to compile code with encoding errors.

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: solaris_10, 5.0
    • Fix Version/s: 5.0
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b54
    • CPU:
      generic
    • OS:
      generic, solaris_8, solaris_10

      Description

      Under 4767128 we changed javac to give warnings (-source 1.4 or lower) or hard
      errors (-source 1.5) when the source file contains a sequence of bytes that is
      illegal according to the specified (or, if none was specified, the default)
      encoding. Since the default was -source 1.4 at the time, this had the effect
      of causing warning messages to be given for encoding problems, which only
      became errors when the user specified -source 1.5.

      Under 5028634 we changed the default -source setting from 1.4 to 1.5. That
      introduced a number of subtle and uncommon incompatibilities. However, when
      we considered and ultimately decided to make that change we forgot to consider
      encoding errors. In the little time since this version has been available
      (build 49 was promoted 19 days ago) I've received five bug reports or
      complaints from users about this problem. See, for example, 5045861. Also,
      ~100 failing regression after the change was made were identified as caused by
      this issue.

      I propose that we relax javac's treatment of encoding errors in 1.5 - making
      it a warning instead of an error - and plan to make it a hard error in some
      future release (1.6?). I'm afraid that merely documenting the issue will
      not relieve our users' frustration.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gafter Neal Gafter
              Reporter:
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: