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

GTK L&F: JFileChooser can jump beyond root directory in combobox and selection textarea.

    XMLWordPrintable

Details

    • b19
    • x86
    • linux

    Description

      FULL PRODUCT VERSION :
      java version "1.6.0_10"
      Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
      Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Linux maunaloa 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      This is an issue in the GTK version of the JFileChooser. It is possible to press '..' an unlimited number of times, even if located at the root. So one can get the drop-down directory menu to say '/../../../../..' etc.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Open a JFileCHooser when using the com.sun.java.swing.plaf.gtk.GTKLookAndFeel. The just keep clicking '../' in the folders list.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I expected it to not let me walk pas the root of the filesystem.
      ACTUAL -
      See above.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      JFileChooser fc = new JFileChooser();
      fc.showOpenDialog(null);
      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              abhiscxk Abhishek Kumar
              ryeung Roger Yeung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: