• Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • MTR-1.2.0
    • None
    • None
    • None
    • AMM Sprint 239, AMM Sprint 240
    • No

      JEP: https://openjdk.org/jeps/400

      From the JEP text, the following APIs use the default charset which is changing from being platform dependent to defined as UTF-8:

      ```

      • In the java.io package, InputStreamReader, FileReader, OutputStreamWriter, FileWriter, and PrintStream define constructors to create readers, writers, and print streams that encode or decode using the default charset.
      • In the java.util package, Formatter and Scanner define constructors whose results use the default charset.
      • In the java.net package, URLEncoder and URLDecoder define deprecated methods that use the default charset.

      ```
      When
      A Java class references one of these apis:
      java.io.InputStreamReader.InputStreamReader(InputStream)
      java.io.FileReader.FilerReader(File)
      java.io.FileReader.FilerReader(FileDescripter)
      java.io.FileReader.FilerReader(String)
      java.io.OutputStreamWriter(OutputStream)
      java.io.FileWriter.FileWriter(File)
      java.io.FileWriter.FileWriter(File, boolean)
      java.io.FileWriter.FileWriter(FileDescripter)
      java.io.FileWriter.FileWriter(String)
      java.io.FileWriter.FileWriter(String, boolean)
      java.io.PrintStream.PrintStream(File)
      java.io.PrintStream.PrintStream(OutputStream)
      java.io.PrintStream.PrintStream(OutputStream, boolean)
      java.io.PrintStream.PrintStream(String)
      java.util.Formatter.Formatter()
      java.util.Formatter.Formatter(File)
      java.util.Formatter.Formatter(OutputStream) 
      java.util.Formatter.Formatter(PrintStream)
      java.util.Formatter.Formatter(Appendable)
      java.util.Formatter.Formatter(FileName)
      java.util.Scanner.Scanner(File)
      java.util.Scanner.Scanner(InputStream)
      java.util.Scanner.Scanner(Readable)
      java.util.Scanner.Scanner(String)
      java.util.Scanner.Scanner(ReadableByteChannel)
      java.util.Scanner.Scanner(Path)
      java.net.URLEncoder.encode(String)
      java.net.URLDecoder.decode(String)

      Perform
      add a hint advising that the default charset has changed from the Platform default to be UTF8.

        1. URLEncoderExample.java
          0.8 kB
        2. URLDecoderExample.java
          0.3 kB
        3. ScannerExample.java
          0.4 kB
        4. PrintStreamExample.java
          0.5 kB
        5. OutputStreamWriterExample.java
          0.6 kB
        6. InputStreamReaderExample.java
          0.5 kB
        7. FormatterExample.java
          0.3 kB
        8. FileWriterExample.java
          0.4 kB
        9. FileReaderExample.java
          0.5 kB

              pcattana Philip Cattanach
              danheidinga Dan Heidinga (Inactive)
              Sachin Singla Sachin Singla
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: