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

The FileSystemView.getFileSystemView() does not update correctly

XMLWordPrintable

      FULL PRODUCT VERSION :
      JDK 1.6.0_03

      ADDITIONAL OS VERSION INFORMATION :
      XP Verion 5.1.2600 SP2

      EXTRA RELEVANT SYSTEM CONFIGURATION :

      VM Summary
      Mittwoch, 3. Dezember 2008 12.42 Uhr CET
       
      Connection name: 
      pid: 3144 com.robot.traffipax.importer.remote.client.ImporterClient
      Virtual Machine: 
      Java HotSpot(TM) Client VM version 1.6.0_03-b05
      Vendor: 
      Sun Microsystems Inc.
      Name: 
      3144@RNB-SPR-KOR
      Uptime: 
      5 minutes
      Process CPU time: 
      3 minutes
      JIT compiler: 
      HotSpot Client Compiler
        Total compile time: 
      0,909 seconds
       
      Live threads: 
      27
      Peak: 
      29
      Daemon threads: 
      18
        Total threads started: 
      34
      Current classes loaded: 
      4.535
        Total classes loaded: 
      4.679
        Total classes unloaded: 
        144


       
      Current heap size: 
       6.228 kbytes
      Maximum heap size: 
      65.088 kbytes
        Committed memory: 
      9.824 kbytes
      Pending finalization: 
      0 objects
      Garbage collector: 
      Name = 'Copy', Collections = 51.970, Total time spent = 26,828 seconds
      Garbage collector: 
      Name = 'MarkSweepCompact', Collections = 1.029, Total time spent = 1 minute
       
      Operating System: 
      Windows XP 5.1
      Architecture: 
      x86
      Number of processors: 
      2
        Committed virtual memory: 
      53.524 kbytes
        Total physical memory: 
      2.095.452 kbytes
      Free physical memory: 
        223.380 kbytes
        Total swap space: 
      4.194.303 kbytes
      Free swap space: 
      4.194.303 kbytes
       
      VM arguments: 
      -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1749 -Dfile.encoding=Cp1252
      Class path: 
      D:\svn\Importer\bin;D:\svn\Importer\lib\commons-io-1.1.jar;D:\svn\Importer\lib\commons-logging.jar;D:\svn\Importer\lib\commons-net-1.4.1.jar;D:\svn\Importer\lib\dom4j-1.6.1.jar;D:\svn\Importer\lib\ftpserver-dev.jar;D:\svn\Importer\lib\jai_codec.jar;D:\svn\Importer\lib\jai_core.jar;D:\svn\Importer\lib\jakarta-oro-2.0.8.jar;D:\svn\Importer\lib\jaxen-1.1.1.jar;D:\svn\Importer\lib\jlfgr-1_0.jar;D:\svn\Importer\lib\jruby.jar;D:\svn\Importer\lib\js-14.jar;D:\svn\Importer\lib\js.jar;D:\svn\Importer\lib\junit.jar;D:\svn\Importer\lib\launch4j.jar;D:\svn\Importer\lib\log4j-1.2.12.jar;D:\svn\Importer\lib\mysql.jar;D:\svn\Importer\lib\napkinlaf-swingset2.jar;D:\svn\Importer\lib\napkinlaf.jar;D:\svn\Importer\lib\nsisant-1.2.jar;D:\svn\Importer\lib\orangevolt-ant-tasks-1.3.5.jar;D:\svn\Importer\lib\profile.jar;D:\svn\Importer\lib\roxes-win32forjava-1.1.1.jar;D:\svn\Importer\lib\toniclf.jar;D:\svn\Importer\lib\wizard.jar;D:\svn\Importer\lib\wrapper.jar;D:\svn\Importer\lib\wrappertest.jar;D:\svn\Importer\lib\xstream-1.1.3.jar;D:\svn\Importer\lib\commons-beanutils-1.8.0.jar;D:\svn\Importer\lib\commons-collections-3.2.1.jar;D:\svn\Importer\lib\commons-digester-1.8.jar;D:\svn\Importer\lib\iText-2.1.3.jar;D:\svn\Importer\lib\swingx-0.9.4.jar;D:\svn\Importer\lib\spring-aop.jar;D:\svn\Importer\lib\spring-core.jar;D:\svn\Importer\lib\spring-jdbc.jar;D:\svn\Importer\lib\spring-tx.jar;D:\svn\Importer\lib\spring.jar;D:\svn\Importer\lib\jasperreports-3.1.0.jar;D:\svn\Importer\lib\poi.jar;D:\svn\Importer\lib\jasper-jdt.jar;D:\svn\Importer\lib\jdt-compiler-3.1.1.jar;C:\Programme\eclipse\plugins\org.junit4_4.3.1\junit.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.platform.logging.events_4.3.200.v200805310100\tlcore.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.platform.logging.events_4.3.200.v200805310100\hlcbe101.jar;C:\Programme\eclipse\plugins\org.eclipse.emf.ecore_2.4.1.v200808251517.jar;C:\Programme\eclipse\plugins\org.eclipse.emf.ecore.xmi_2.4.1.v200808251517.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.trace.arm_4.3.100.v200805120832\cbeLogging.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.trace.arm_4.3.100.v200805120832\armAspects.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.trace.arm_4.3.100.v200805120832\armLibrary.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.trace.arm_4.3.100.v200805120832\armModel.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.trace.arm_4.3.100.v200805120832\armProbes.jar;C:\Programme\eclipse\plugins\org.eclipse.tptp.trace.arm_4.3.100.v200805120832\armLoader.jar;C:\Programme\eclipse\plugins\org.opengroup.arm_4.0.100.v200802290100\arm40_java_interfaces.jar;C:\Programme\eclipse\plugins\org.eclipse.hyades.execution_4.4.201.v200808111750\hexr.jar;C:\Programme\eclipse\plugins\org.eclipse.hyades.execution_4.4.201.v200808111750\hexl.jar;C:\Programme\eclipse\plugins\org.eclipse.hyades.execution_4.4.201.v200808111750\hexcore.jar;C:\Programme\eclipse\plugins\org.eclipse.emf.common_2.4.0.v200808251517.jar;C:\Programme\eclipse\plugins\org.eclipse.hyades.logging.core_4.3.200.v200804110100\hl14.jar;C:\Programme\eclipse\plugins\org.eclipse.hyades.logging.core_4.3.200.v200804110100\hlcore.jar
      Library path: 
      C:\Programme\Java\jre1.6.0_03\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Subversion\svn-win32-1.4.6\bin;C:\Programme\NSIS;C:\JavaService-2.0.10;C:\Programme\jboss-4.2.2.GA\bin;C:\Programme\ant\bin;C:\Programme\Microsoft SQL Server\80\Tools\Binn\;C:\Programme\Launch4j;C:\MinGW\bin;;C:\Programme\Java\jdk1.6.0_03\bin;C:\Programme\apache-maven-2.0.9\bin;c:\traffi\prog;c:\traffi\dll;C:\Programme\Gemeinsame Dateien\Bosch\VideoSDK;c:\traffi\prog;c:\traffi\dll;C:\Programme\TortoiseSVN\bin;C:\Programme\HxD;C:\Programme\MySQL\MySQL Server 5.0\bin;C:\Programme\QuickTime\QTSystem\;C:\Programme\OpenVPN\bin
      Boot class path: 
      C:\Programme\Java\jre1.6.0_03\lib\resources.jar;C:\Programme\Java\jre1.6.0_03\lib\rt.jar;C:\Programme\Java\jre1.6.0_03\lib\sunrsasign.jar;C:\Programme\Java\jre1.6.0_03\lib\jsse.jar;C:\Programme\Java\jre1.6.0_03\lib\jce.jar;C:\Programme\Java\jre1.6.0_03\lib\charsets.jar;C:\Programme\Java\jre1.6.0_03\classes

      A DESCRIPTION OF THE PROBLEM :
      We have a jni program that is conencted via a pipe to the java program. Each time a USB stick is inserted, the pipe recieves a message that a memory stick is inderted. Then we look for the drive name via this mechanism:

      FileSystemView view = FileSystemView.getFileSystemView();
      String path = line.charAt(1) + ":/";
      File dir = new File(path);
      String stickname = view.getSystemDisplayName(dir);

      If we rename the stick on the OS using windows explorer, the OS detects the change and displays the drive name correctly if plugging it in again. Only the FileSystemView.getFileSystemView() will always tell us the old stick name.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) put the sick in, leth FileSystemView.getFileSystemView() detect the name
      2) rename it using explorer
      3) pull it out
      4) put it back in

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      We should have the new drive name via FileSystemView.getFileSystemView().
      ACTUAL -
      We have the old drive name before renaming it.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      FileSystemView view = FileSystemView.getFileSystemView();
      String path = line.charAt(1) + ":/";
      File dir = new File(path);
      String stickname = view.getSystemDisplayName(dir);
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      none so far

            rupashka Pavel Porvatov (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: