On 22/08/2012 11:52 AM, David Holmes wrote:
StringBuilder.java
/**
+ * @throws IllegalArgumentException if n < 0 {@inheritDoc}
This is wrong as you've already written the inherited doc "if n < 0".
+ * @since 1.8
+ */
+ public StringBuilder append(int n, CharSequence cs) {
+ super.append(n, cs);
+ return this;
+ }
But why are you overriding this in the first place ??? There seems to be
no change in functionality or specification.
I missed the covariant change to the return type from
AbstractStringBuilder to StringBuilder.
I also suggested in email that the above could simply be:
return super.append(n, cs);
but that would also need a cast to StringBuilder. So what Jim has is fine.
David
-----
David
-----
Thanks,
Jim