Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-42

[vfs] Display safe and user friendly VFS URLs

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Bugzilla Id:
      39399

      Description

      In JCommander we need to display VFS URLs at many places in the GUI. We have two
      requirements: hide any password and display user friendly paths where possible.
      By user friendly paths we mean not displaying the file:// schema for local files
      and showing the path with the platform specific path separator.

      So for instance the ftp://user:pass@host.org/ is displayed as
      ftp://user@host.org. Also, under Windows, the file://c:/ URL is displayed as c:\

      We have a partially working implementation for this feature request which
      approaches things in reverse by using regular expression match and replace. This
      however is not the preferred way.

      I think that such a feature should be part of VFS itself. I would like to
      propose two API changes:
      1. add the getFriendlyName() to the FileName interface - this method should work
      as specified above, except that the string should be internally built rather
      than regular expression based
      2. change the toString() implementation of FileObject and FileName implementers
      in a way that by default no password to be displayed so that no passwords show
      up accidentally in log files

      Please let me know what do you think about this feature request. The JCommander
      team would be glad to provide a patch with the implementation if we can agree on
      how to change the interfaces.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              renyedi@yahoo.com Robert Enyedi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: