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

FileDialog getFile returns corrupted string after previous setFile

    XMLWordPrintable

Details

    • b110
    • windows_7

    Backports

      Description

        FULL PRODUCT VERSION :
        java version " 1.7.0_25 "
        Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
        Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        When using FileDialog#setFile() with a long file name and then selecting a shorter file name in the dialog box subsequent #getFile() call returns a corrupted String consisting of the selected file plus parts of the string submitted to setFile.


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        see: http://stackoverflow.com/questions/14972664/java-getfile-returns-incorrect-filename-after-using-setfile

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Filename selected in FileDialog dialog
        ACTUAL -
        Corrupted string consisting of selected file name of the string submitted to setFile

        REPRODUCIBILITY :
        This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

                azvegint Alexander Zvegintsev
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: