JCK feedback on "Strings in Switch" proposal

Dmitry Miltsov Dmitry.Miltsov at Sun.COM
Tue May 19 05:42:11 PDT 2009


Hello,

The JCK engineers have reviewed the "Strings in switch" proposal
and found one issue to clarify.

"14.11 The switch Statement" states:
------------------------------------------------------------------
...
Otherwise, execution continues by comparing the value of the
Expression with each case constant. Then there is a choice:
* If one of the case constants is equal to the value of the
expression, then we say that the case matches ...
------------------------------------------------------------------

It would be good to clarify what "equal" means in case of the
String values. It would be useful to mention that in this case
the result of comparison will be "expression.equals(constant)",
not "expression == constant" as for other types.

We have no special comments on testability of this feature.
The JCK team will develop conformance tests for it.

Thanks,
Dmitry Miltsov, JCK engineer




More information about the coin-dev mailing list