Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6329748

Invalid/old variable name - newModel in setModel method in JTable class

XMLWordPrintable

    • b36
    • x86
    • linux

        A DESCRIPTION OF THE PROBLEM :
        Class: JTable
        Method: setModel
        2 occurrences of invalid (old) variable name - newModel. Must be changed to dataModel.

        Class: JTable
        Method: setColumnModel
        1 occurrences of invalid (old) variable name - newModel. Must be changed to columnModel.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
            /**
             * Sets the data model for this table to <code>dataModel</code> and registers
             * with it for listener notifications from the new data model.
             *
             * @param dataModel the new data source for this table
             * @exception IllegalArgumentException if <code>dataModel</code> is <code>null</code>
             * @see #getModel
             * @beaninfo
             * bound: true
             * description: The model that is the source of the data for this view.
             */
            
        ACTUAL -
            /**
             * Sets the data model for this table to <code>newModel</code> and registers
             * with it for listener notifications from the new data model.
             *
             * @param dataModel the new data source for this table
             * @exception IllegalArgumentException if <code>newModel</code> is <code>null</code>
             * @see #getModel
             * @beaninfo
             * bound: true
             * description: The model that is the source of the data for this view.
             */
            

        URL OF FAULTY DOCUMENTATION :
        http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTable.html

              serb Sergey Bylokhov
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: