RFR [8014066] Mistake in documentation of ArrayList#removeRange (original) (raw)
Ulf Zibis Ulf.Zibis at CoSoCo.de
Sun Mar 16 22:52:32 UTC 2014
- Previous message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Next message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 16.03.2014 23:37, schrieb Ivan Gerasimov:
Here is yet another iteration of the fix: http://cr.openjdk.java.net/~igerasim/8014066/3/webrev/
2) Kept the check for 'fromIndex > toIndex' in removeRange(). While I understand that this should not add anything significant to the current code, as currently removeRange() is always called with valid arguments. However, if it is stated in the spec that in case of 'fromIndex > toIndex' an exception is thrown, I believe it should be thrown, otherwise why it's stated?
Isn't this a perfect situation to use an assert statement? Needless to say, then the spec must be adapted.
-Ulf
- Previous message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Next message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]