On Sun, 27 Apr 2025 14:21:32 GMT, Tatsunori Uchino wrote:
>> I believe that after:
>> https://github.com/openjdk/jdk/pull/24738
>> the `stdin.encoding` property is set when the process is connected to a
>> console, which is probably the main case where the encoding can be detected
>> automatica
On Sun, 27 Apr 2025 10:51:33 GMT, Jan Lahoda wrote:
>> src/java.base/share/classes/java/lang/IO.java line 192:
>>
>>> 190: String enc = System.getProperty("stdin.encoding", "");
>>> 191: Charset cs = Charset.forName(enc, StandardCharsets.UTF_8);
>>> 192: br =
On Sun, 27 Apr 2025 09:12:47 GMT, Tatsunori Uchino wrote:
>> Jan Lahoda has updated the pull request incrementally with seven additional
>> commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into
>> finalize-concise-source-files
>> -
On Tue, 22 Apr 2025 12:39:05 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>>
On Tue, 22 Apr 2025 18:56:40 GMT, Stuart Marks wrote:
>> src/java.base/share/classes/java/lang/IO.java line 41:
>>
>>> 39: * The {@link #readln()} and {@link #readln(String)} methods decode
>>> bytes read from
>>> 40: * {@code System.in} into characters. The charset used for decoding is
>>>
On Tue, 22 Apr 2025 10:14:44 GMT, Jan Lahoda wrote:
>> src/java.base/share/classes/jdk/internal/misc/MethodFinder.java line 89:
>>
>>> 87: if (mainMethod == null) {
>>> 88: //if not public method, try to lookup a non-public one
>>> 89: mainMethod = JLA.findMethod(
On Tue, 22 Apr 2025 08:14:23 GMT, Alan Bateman wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Add clause about handling of malformed/unmappable bytes.
>
> src/java.base/share/classes/java/lang/IO.java line 41:
>
>>
On Tue, 22 Apr 2025 12:39:05 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>>
On Mon, 7 Apr 2025 17:58:45 GMT, Naoto Sato wrote:
>> Jan Lahoda has updated the pull request incrementally with seven additional
>> commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into
>> finalize-concise-source-files
>> - Reverti
On Tue, 22 Apr 2025 08:35:20 GMT, Alan Bateman wrote:
>> Jan Lahoda has updated the pull request incrementally with seven additional
>> commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into
>> finalize-concise-source-files
>> - Reve
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `java. ... .IO` is no longer automatically imported in an
On Tue, 22 Apr 2025 08:34:36 GMT, Alan Bateman wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Add clause about handling of malformed/unmappable bytes.
>
> src/java.base/share/classes/jdk/internal/misc/MethodFinder.j
On Thu, 10 Apr 2025 01:03:01 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>>
On Thu, 10 Apr 2025 01:03:01 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>>
On Thu, 10 Apr 2025 01:03:01 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>>
On Mon, 7 Apr 2025 18:49:33 GMT, Chen Liang wrote:
>> I used "internal objects" because I wanted to avoid naming concrete classes,
>> which might or might not be used. Previous drafts mentioned BufferedReader,
>> InputStreamReader, and CharsetDecoder.
>>
>> I could replace "internal objects" w
On Sat, 5 Apr 2025 02:31:21 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/lang/IO.java line 122:
>>
>>> 120: public static void print(Object obj) {
>>> 121: System.out.print(obj);
>>> 122: System.out.flush();
>>
>> Is it worth using a local variable to avoid cal
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `java. ... .IO` is no longer automatically imported in an
On Mon, 7 Apr 2025 09:12:27 GMT, Alan Bateman wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use local variable for System.out in print().
>
> src/java.base/share/classes/java/lang/IO.java line 45:
>
>> 43: * UTF-
On Mon, 7 Apr 2025 18:08:29 GMT, Stuart Marks wrote:
>> src/java.base/share/classes/java/lang/IO.java line 45:
>>
>>> 43: * UTF-8 is used instead. These internal objects are created upon the
>>> first call to
>>> 44: * either of the {@code readln} methods and are stored for subsequent
>>> re
On Wed, 9 Apr 2025 17:02:52 GMT, Stuart Marks wrote:
>> The readln methods handle malformed-input and unmappable-character errors by
>> dropping, and using a replacement value. So erroneous input doesn't throw
>> IOError with a CharacterCodingException as the cause.
>>
>> System.in.close() wou
On Wed, 9 Apr 2025 10:36:53 GMT, Alan Bateman wrote:
>> The IOError was carried over from Console.readLine(), which throws IOError
>> on error. Of course we're decoupled from Console now, but that was the
>> original reason.
>>
>> My guess is that Console methods throw IOError because (a) they
On Wed, 9 Apr 2025 10:46:40 GMT, Alan Bateman wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Rewrite bits about charset decoding, removing mention of "internal
>> objects."
>
> src/java.base/share/classes/java/lang
On Mon, 7 Apr 2025 21:07:36 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>> -
On Mon, 7 Apr 2025 18:28:21 GMT, Stuart Marks wrote:
>> Someone is bound to ask why the readln method throw but the println methods
>> don't.
>
> The IOError was carried over from Console.readLine(), which throws IOError on
> error. Of course we're decoupled from Console now, but that was the o
On Mon, 7 Apr 2025 21:07:36 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>> -
On Mon, 7 Apr 2025 07:01:56 GMT, Jan Lahoda wrote:
>> src/java.base/share/classes/java/lang/IO.java line 183:
>>
>>> 181: * @return the internal BufferedReader instance
>>> 182: */
>>> 183: static synchronized BufferedReader reader() {
>>
>> Is the lock only inteneded for initiali
On Mon, 7 Apr 2025 19:44:40 GMT, Stuart Marks wrote:
>> Can we rephrase the 1st sentence to read:
>> "The `readln()` and `readln(String)` methods in this class decode bytes read
>> from `System.in` into characters."
>>
>> And remove the last "these internal objects" sentence.
>>
>> And for the
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `java. ... .IO` is no longer automatically imported in an
On Mon, 7 Apr 2025 18:13:29 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>> -
On Mon, 7 Apr 2025 09:18:37 GMT, Alan Bateman wrote:
>> This implementation is not to be emulated by beginners. If an Exception.is
>> thrown here, a user might be tempted to add handlers in their code, while
>> this is an issue with the setup.
>
> Someone is bound to ask why the readln method t
On Mon, 7 Apr 2025 18:10:20 GMT, Jan Lahoda wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>> -
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `java. ... .IO` is no longer automatically imported in an
On Sat, 5 Apr 2025 00:55:55 GMT, Luca Kellermann wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use local variable for System.out in print().
>
> src/java.base/share/classes/java/lang/IO.java line 122:
>
>> 120:
On Sat, 5 Apr 2025 02:30:33 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/lang/IO.java line 147:
>>
>>> 145: } catch (IOException ioe) {
>>> 146: throw new IOError(ioe);
>>> 147: }
>>
>> Was `UncheckedIOException` considered? It might be better for begin
On Fri, 4 Apr 2025 07:20:23 GMT, Jan Lahoda wrote:
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `jav
On Fri, 4 Apr 2025 07:20:23 GMT, Jan Lahoda wrote:
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `jav
On Sat, 5 Apr 2025 00:55:55 GMT, Luca Kellermann wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
This is a PR that implements JEP: Compact Source Files and Instance Main
Methods. Changes include:
- `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
to implement the methods (thanks to @stuart-marks)
- `java. ... .IO` is no longer automatically imported in any compilat
On Sat, 5 Apr 2025 00:20:29 GMT, Chen Liang wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main
>> Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses
>> `System.console()` to implement the methods (thanks to @stuart-marks)
>> -
On Fri, 4 Apr 2025 07:20:23 GMT, Jan Lahoda wrote:
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `jav
On Fri, 4 Apr 2025 07:20:23 GMT, Jan Lahoda wrote:
> This is a PR that implements JEP: Compact Source Files and Instance Main
> Methods. Changes include:
> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()`
> to implement the methods (thanks to @stuart-marks)
> - `jav
42 matches
Mail list logo