You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (Created) (JIRA)" <ji...@apache.org> on 2011/11/28 23:27:39 UTC

[jira] [Created] (PIVOT-825) Specifying a full path in a Save To or Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Specifying a full path in a Save To or Save As FileBrowserSheet gives IllegalArgumentException when you try to close
--------------------------------------------------------------------------------------------------------------------

                 Key: PIVOT-825
                 URL: https://issues.apache.org/jira/browse/PIVOT-825
             Project: Pivot
          Issue Type: Bug
          Components: wtk-terra
    Affects Versions: 2.0
         Environment: Windows XP SP3, JDK 1.6.0_16
            Reporter: Roger Whitcomb
            Assignee: Roger Whitcomb
            Priority: Minor
             Fix For: 2.0.1


This is the (partial) stack trace:
java.lang.IllegalArgumentException
        at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
        at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
        at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
        at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
        at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb updated PIVOT-825:
---------------------------------

    Summary: Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close  (was: Specifying a full path in a Save To or Save As FileBrowserSheet gives IllegalArgumentException when you try to close)

Change title because the bug only affects Save As dialogs.

The code in "previewSheetClose" is assuming the text in the file name box is a simple file name and doesn't contain a path.  It should check if there is a path there and set the root directory to the path before calling the "setSelectedFiles" (which gives an error if the path isn't the same as the root directory).
                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb resolved PIVOT-825.
----------------------------------

    Resolution: Fixed

Sending        wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSheetSkin.java
Transmitting file data .
Committed revision 1208038.
                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb updated PIVOT-825:
---------------------------------

    Attachment: path.patch

The "path.patch" implements what I think should be the functionality:
- Checks to see if the entered name has a path component
- If so, and it is an absolute path (or starts with / or \ (depending on platform), then set the root directory to it
- If the parent path is not absolute, then make a relative path and set the root directory to that
- If the input text has no path component, the make the selected file using the current root directory set in the dialog
- Finally call "setSelectedFiles" with the root set appropriately.
                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb reopened PIVOT-825:
----------------------------------


There is one more issue here:  the "previewSheetClose" method is called before the selected file is set so a good decision on whether to close or not (for instance if a "confirm overwrite" prompt is used in the listener) cannot be made because the wrong file is set as the selected one.  I have a patch for this that works in all my test cases.  I will post and then submit if there are no objections in a day or two.
                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: overwrite.patch, path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb updated PIVOT-825:
---------------------------------

    Attachment:     (was: path.patch)
    
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Sandro Martini (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159189#comment-13159189 ] 

Sandro Martini commented on PIVOT-825:
--------------------------------------

Hi Roger, patch tested the Save feature with some of our Test Applications (TextPaneDemo, FileBrowsing, and even FileBrowserWithCharsetTest but there is not possible to save), and all works.

Go with the commit, I'll update now release notes for 2.0.1 to include it.

                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb updated PIVOT-825:
---------------------------------

    Attachment: path.patch

Updated patch that also fixes problems with relative paths and an absolute path (starting with \) that File doesn't recognize as absolute on Windows.

                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb resolved PIVOT-825.
----------------------------------

    Resolution: Fixed

Sending        wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSheetSkin.java
Transmitting file data .
Committed revision 1210331.
                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: overwrite.patch, path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIVOT-825) Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close

Posted by "Roger Whitcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Whitcomb updated PIVOT-825:
---------------------------------

    Attachment: overwrite.patch

File "overwrite.patch" is the fix needed to properly call the "previewSheetClose" method after the selected file is set.
                
> Specifying a full path in a Save As FileBrowserSheet gives IllegalArgumentException when you try to close
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-825
>                 URL: https://issues.apache.org/jira/browse/PIVOT-825
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: filebrowser
>             Fix For: 2.0.1
>
>         Attachments: overwrite.patch, path.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> This is the (partial) stack trace:
> java.lang.IllegalArgumentException
>         at org.apache.pivot.wtk.FileBrowserSheet.setSelectedFiles(FileBrowserSheet.java:217)
>         at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:289)
>         at org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at org.apache.pivot.wtk.skin.terra.TerraSheetSkin$4.transitionCompleted(TerraSheetSkin.java:669)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira