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

javac fails to compile code with encoding errors.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P2 P2
    • 5.0
    • solaris_10, 5.0
    • tools
    • b54
    • generic
    • generic, solaris_8, solaris_10

      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.

            gafter Neal Gafter (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: