JDK-6613904 : javax.swing.GroupLayout.createParallelGroup(..) doesn't throw IllegalArgumentException for null arg
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u2,7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-10-06
  • Updated: 2012-03-22
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b120Fixed
Description
None of the following lines will cause IllegalArgumentException

        GroupLayout groupLayout = new GroupLayout(new JPanel());
        groupLayout.createParallelGroup(null);
        groupLayout.createParallelGroup(null, true);
        groupLayout.createParallelGroup(null, false);
 
While spec says for both methods:

Throws:
    IllegalArgumentException - if alignment is null

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/jdk/rev/d385b33c0db0
04-12-2010

EVALUATION We should throw IAE when needed.
22-10-2010