Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v6]

2024-02-26 Thread Justin Lu
> Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > > Not only does this lead to faulty formatting results,

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v5]

2024-02-23 Thread Naoto Sato
On Fri, 23 Feb 2024 17:29:18 GMT, Justin Lu wrote: >> Please review this PR which handles an edge case pattern bug with >> ChoiceFormat. >> >> >> var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to >> "0.0#foo|1.0#bar|1.0#" >> d.format(1) // unexpectedly returns "" >>

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v5]

2024-02-23 Thread Justin Lu
> Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > > Not only does this lead to faulty formatting results,

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v4]

2024-02-23 Thread Justin Lu
On Fri, 23 Feb 2024 00:21:57 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> revert enum change > > src/java.base/share/classes/java/text/ChoiceFormat.java line 342: > >> 340: } else { >>

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v4]

2024-02-22 Thread Naoto Sato
On Thu, 22 Feb 2024 22:50:03 GMT, Justin Lu wrote: >> Please review this PR which handles an edge case pattern bug with >> ChoiceFormat. >> >> >> var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to >> "0.0#foo|1.0#bar|1.0#" >> d.format(1) // unexpectedly returns "" >>

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v4]

2024-02-22 Thread Justin Lu
> Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > > Not only does this lead to faulty formatting results,

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v3]

2024-02-22 Thread Justin Lu
> Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > > Not only does this lead to faulty formatting results,

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v2]

2024-02-22 Thread Naoto Sato
On Thu, 22 Feb 2024 17:38:50 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/text/ChoiceFormat.java line 332: >> >>> 330: >>> 331: // Used to explicitly define the segment mode while applying a >>> pattern >>> 332: private enum Segment { >> >> Do we need a new enum? Would

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v2]

2024-02-22 Thread Naoto Sato
On Thu, 22 Feb 2024 17:55:18 GMT, Justin Lu wrote: >> Please review this PR which handles an edge case pattern bug with >> ChoiceFormat. >> >> >> var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to >> "0.0#foo|1.0#bar|1.0#" >> d.format(1) // unexpectedly returns "" >>

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern [v2]

2024-02-22 Thread Justin Lu
> Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > > Not only does this lead to faulty formatting results,

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern

2024-02-22 Thread Justin Lu
On Tue, 20 Feb 2024 23:14:26 GMT, Naoto Sato wrote: >> Please review this PR which handles an edge case pattern bug with >> ChoiceFormat. >> >> >> var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to >> "0.0#foo|1.0#bar|1.0#" >> d.format(1) // unexpectedly returns "" >>

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern

2024-02-22 Thread Andrey Turbanov
On Thu, 15 Feb 2024 19:44:42 GMT, Justin Lu wrote: > Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > >

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern

2024-02-20 Thread Naoto Sato
On Thu, 15 Feb 2024 19:44:42 GMT, Justin Lu wrote: > Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > >

RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern

2024-02-15 Thread Justin Lu
Please review this PR which handles an edge case pattern bug with ChoiceFormat. var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to "0.0#foo|1.0#bar|1.0#" d.format(1) // unexpectedly returns "" Not only does this lead to faulty formatting results, but breaks the