[classlib][text] ChoiceFormat pattern parser compatibility
People what do you think about HARMONY-1110? Problem is we have to reproduce behavior of ChoiceFormat pattern parser without specification. There is only one example in Java doc which doesn't allow understand when RI assumes that pattern is incorrect. Thanks -- Denis M. Kishenko Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib][text] ChoiceFormat pattern parser compatibility
On 9/5/06, Denis Kishenko [EMAIL PROTECTED] wrote: People what do you think about HARMONY-1110? Problem is we have to reproduce behavior of ChoiceFormat pattern parser without specification. There is only one example in Java doc which doesn't allow understand when RI assumes that pattern is incorrect. According the sample in sepc, the rule is very straightforward except there's no explicit description about expcetional cases. IMHO, 2#ok #ab and 2#ok ab are illegal patterns, we shall follow RI. I'm a bit confused about 2|, it's illegal too. But maybe we could also follow RI if it's not too hard to follow RI. ;-) Best regards, Richard Thanks -- Denis M. Kishenko Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib][text] ChoiceFormat pattern parser compatibility
One more example of strange RI behaviour - import java.text.*; public class Test { static void test(String pattern) { System.err.print([ + pattern + ] ); try { System.err.println(new ChoiceFormat(pattern).toPattern()); } catch (Exception e) { System.err.println(e); } } public static void main(String[] args) { test(|||); test(2#a|||); test(1); } } - Output RI [|||] 0.0#|0.0#|0.0# [2#a|||] 2.0#a|2.0#|2.0# [1] 1.0|1.0|1.0|1.0 Harmony [|||] [2#a|||] [1] 2006/9/5, Richard Liang [EMAIL PROTECTED]: On 9/5/06, Denis Kishenko [EMAIL PROTECTED] wrote: People what do you think about HARMONY-1110? Problem is we have to reproduce behavior of ChoiceFormat pattern parser without specification. There is only one example in Java doc which doesn't allow understand when RI assumes that pattern is incorrect. According the sample in sepc, the rule is very straightforward except there's no explicit description about expcetional cases. IMHO, 2#ok #ab and 2#ok ab are illegal patterns, we shall follow RI. I'm a bit confused about 2|, it's illegal too. But maybe we could also follow RI if it's not too hard to follow RI. ;-) Best regards, Richard Thanks -- Denis M. Kishenko Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Denis M. Kishenko Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib][text] ChoiceFormat pattern parser compatibility
Wow, How many examples do you have? ;-) As ChoiceFormat is a format engine, it's impossible to list all the exceptional cases. IMHO, maybe we could 1) *guess* the rules behind RI's strange behavior by adding more test cases. 2) try our best to implement the rules of RI. 3) And then, leave this issue as bug-driven, that is, if there are user applications fail due to the difference between RI and Harmony, we fix our code. Does it make sense? Thanks a lot. Best regards, Richard On 9/5/06, Denis Kishenko [EMAIL PROTECTED] wrote: One more example of strange RI behaviour - import java.text.*; public class Test { static void test(String pattern) { System.err.print([ + pattern + ] ); try { System.err.println(new ChoiceFormat(pattern).toPattern()); } catch (Exception e) { System.err.println(e); } } public static void main(String[] args) { test(|||); test(2#a|||); test(1); } } - Output RI [|||] 0.0#|0.0#|0.0# [2#a|||] 2.0#a|2.0#|2.0# [1] 1.0|1.0|1.0|1.0 Harmony [|||] [2#a|||] [1] 2006/9/5, Richard Liang [EMAIL PROTECTED]: On 9/5/06, Denis Kishenko [EMAIL PROTECTED] wrote: People what do you think about HARMONY-1110? Problem is we have to reproduce behavior of ChoiceFormat pattern parser without specification. There is only one example in Java doc which doesn't allow understand when RI assumes that pattern is incorrect. According the sample in sepc, the rule is very straightforward except there's no explicit description about expcetional cases. IMHO, 2#ok #ab and 2#ok ab are illegal patterns, we shall follow RI. I'm a bit confused about 2|, it's illegal too. But maybe we could also follow RI if it's not too hard to follow RI. ;-) Best regards, Richard Thanks -- Denis M. Kishenko Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Denis M. Kishenko Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]