Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2150

URLStreamHandlerProxy.setURL may not set query component correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • framework-2.0.4, framework-2.0.5
    • framework-3.0.0
    • Framework
    • None

    Description

      On Mon, Mar 1, 2010 at 12:56 PM, Sahoo <Sahoo@sun.com> wrote:
      > > Hi,
      > >
      > > org.apache.felix.framework.URLStreamHandlerProxy has following methods:
      > >
      > > public void setURL(
      > > URL url, String protocol, String host, int port, String authority,
      > > String userInfo, String path, String query, String ref)
      > >

      { > > super.setURL(url, protocol, host, port, authority, userInfo, path, > > query, ref); > > }

      > >
      > > public void setURL(
      > > URL url, String protocol, String host, int port, String file, String
      > > ref)
      > >

      { > > super.setURL(url, protocol, host, port, null, null, file, null, ref); > > }

      > >
      > >
      > > There appears to be a bug in the latter method. It passes "file" as
      > > "path." Should file not be brone into path and query components which would
      > > have automatically happened if
      > > super.setURL(url, protocol, host, port, file, ref) been called? Any
      > > comments? I have not done any testing, just concluding based on code
      > > inspection.

      I agree, looks like a bug. It is not as bad as the path can be the
      file as well but if you would call getQuery() on the resulting url it
      will return null i think (even if you had a query). Could you create a
      jira for this?

      Thanks and regards,

      Karl

      Attachments

        Activity

          People

            karlpauls Karl Pauls
            sahoo Sanjeeb Kumar Sahoo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: