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

EOU: JFileChooser should not try to connect to all drives when instantiated.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • client-libs



      Name: yyT116575 Date: 10/23/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      The JFileChooser tries to connect to all the drives from 'C:' to 'Z:' when
      instantiated to look for the root directory of each drive. This is done so that
      the JComboBox of drives can be populated. If any of the drives was a network
      drive and for some reason disconnected the check for the root directory
      has to timeout before it returns the disconnected status. In that case the
      drive is not included in the JComboBox of JFileChooser. This may take a few
      seconds for each drive. Thus it takes a while for JFileChooser to come up.
      The user may think that the application has crashed.

      Some drives may indeed be found connected. Then the JFileChooser comes up.
      However between that time and when the user selects a drive it might have been
      disconnected. In that case user gets the error dialog anyways. Thus the failure
      mode in case of first having checked for network drive vs not is the same. The
      complete set of drives on MS windows platform is not unknowable (considering
      UNC names are not supported by the JFileCHooser anyways).

      This has other disadvantage. If a drive that is not in the JComboBox gets
      connected after the creation of JFileChooser the user may not be able to
      access it (if the application kept on reusing the JFileChooser instance
      and did not allow the mechanism to refresh it).

      So why not populate all the drive letters in the JComboBox in the first
      place. In absense of which at least a refresh JComboBox button should
      be provided on the JFileChooser.
      (Review ID: 110549)
      ======================================================================

            leifs Leif Samuelsson (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: