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

Bad variable name in demo code in JavaDoc for TreeItem

XMLWordPrintable

      The following code uses a parameter whose name is exactly the same as the type name. Although it is valid, and compiles, this is bad practice, and should be avoided.

                private ObservableList<TreeItem<File>> buildChildren(TreeItem<File> TreeItem) {

      It would be more in line with prevailing practice for the name to begin with a lower case letter.

            aghaisas Ajit Ghaisas
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: