RFR [8014066] Mistake in documentation of ArrayList#removeRange (original) (raw)

Ivan Gerasimov ivan.gerasimov at oracle.com
Sun Mar 16 22:37:41 UTC 2014


Here is yet another iteration of the fix: http://cr.openjdk.java.net/~igerasim/8014066/3/webrev/

  1. The condition 'fromIndex >= size()' is removed from the spec. I prefer removing it rather than replacing it with 'fromIndex > size()' for two reasons:
  1. 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?

  2. Moved the test to MOAT.java The test looks a bit foreign over there, but reuses some of the infrastructure.

Sincerely yours, Ivan



More information about the core-libs-dev mailing list