shell/src/main/java/org/apache/felix/shell/impl/UpdateCommandImpl.java [138:174]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private String absoluteLocation(String location)
    {
        try
        {
            new URL(location);
        }
        catch (MalformedURLException ex)
        {
            // Try to create a valid URL using the base URL
            // contained in the "cd" command service.
            String baseURL = "";

            try
            {
                // Get a reference to the "cd" command service.
                ServiceReference ref = m_context.getServiceReference(
                    org.apache.felix.shell.CdCommand.class.getName());

                if (ref != null)
                {
                    CdCommand cd = (CdCommand) m_context.getService(ref);
                    baseURL = cd.getBaseURL();
                    baseURL = (baseURL == null) ? "" : baseURL;
                    m_context.ungetService(ref);
                }

                String theURL = baseURL + location;
                new URL(theURL);
                location = theURL;
            }
            catch (Exception ex2)
            {
                // Just fall through and return the original location.
            }
        }
        return location;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



shell/src/main/java/org/apache/felix/shell/impl/InstallCommandImpl.java [129:165]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private String absoluteLocation(String location)
    {
        try
        {
            new URL(location);
        }
        catch (MalformedURLException ex)
        {
            // Try to create a valid URL using the base URL
            // contained in the "cd" command service.
            String baseURL = "";

            try
            {
                // Get a reference to the "cd" command service.
                ServiceReference ref = m_context.getServiceReference(
                    org.apache.felix.shell.CdCommand.class.getName());

                if (ref != null)
                {
                    CdCommand cd = (CdCommand) m_context.getService(ref);
                    baseURL = cd.getBaseURL();
                    baseURL = (baseURL == null) ? "" : baseURL;
                    m_context.ungetService(ref);
                }

                String theURL = baseURL + location;
                new URL(theURL);
                location = theURL;
            }
            catch (Exception ex2)
            {
                // Just fall through and return the original location.
            }
        }
        return location;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



