You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Regis Xu (JIRA)" <ji...@apache.org> on 2009/03/05 07:47:56 UTC
[jira] Closed: (HARMONY-6106) [classlib][security]
PolicyUtils.expandURL may return invalid URL on linux
[ https://issues.apache.org/jira/browse/HARMONY-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Regis Xu closed HARMONY-6106.
-----------------------------
I have created a another issue HARMONY-6113 for incorrect value of policy.url
> [classlib][security] PolicyUtils.expandURL may return invalid URL on linux
> --------------------------------------------------------------------------
>
> Key: HARMONY-6106
> URL: https://issues.apache.org/jira/browse/HARMONY-6106
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Regis Xu
> Assignee: Sean Qiu
> Attachments: HARMONY-6106.diff
>
>
> the test:
> Properties props = new Properties();
> props.put("my.home", "/home/bahamut");
> String location = PolicyUtils.expandURL("file:/${my.home}/test", props);
> URL url = new URL(location);
> System.out.println(url.getHost());
> System.out.println(url.getPath());
> System.out.println(url.toString());
> output is:
> home
> /bahamut/test
> file://home/bahamut/test
> the expanded URL is "file://home/bahamut/test", but what we want is "file:/home/bahamut/test",
> the one extra "/" make host of URL to be "home" which should be "", and then url.openConnection(),
> the wrong URL will use ftp protocol to open the file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.