On Wed, 23 Feb 2022 11:20:55 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
> If invalid ie 0 or > getColumnCount() index is passed to > DefaultTableColumnModel.getColumn() then it returns AIOBE in current > implementation which should be documented in the spec. Fixed the spec to > mention the exception. This change probably requires a CSR. src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java line 294: > 292: * at <code>columnIndex</code> > 293: * @exception ArrayIndexOutOfBoundsException if > <code>columnIndex</code> > 294: * is not in valid range (< 0 or >= getColumnCount()) Suggestion: * @exception ArrayIndexOutOfBoundsException if <code>columnIndex</code> * is not in the valid range (< 0 or >= getColumnCount()) I find it confusing: the expression in parenthesis seems to clarify the meaning of *the valid range* but doesn't. I think it's better to make it clearer: Suggestion: * @exception ArrayIndexOutOfBoundsException if <code>columnIndex</code> * is out of range (<code>columnIndex < 0 || columnIndex >= getColumnCount()</code>) ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7587