[
https://issues.apache.org/jira/browse/KARAF-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16948937#comment-16948937
]
ASF subversion and git services commented on KARAF-6447:
--------------------------------------------------------
Commit 36e39d1cdb5502902fa4d10dbd4be0c628f924e1 in karaf's branch
refs/heads/karaf-4.2.x from Freeman Fang
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=36e39d1 ]
[KARAF-6447]add MalformedURLException as IOException cause
(cherry picked from commit 1d83b303796aeea408870d4eb55e79e30b5ba978)
> Added more information to the thrown exception for malformed url.
> -----------------------------------------------------------------
>
> Key: KARAF-6447
> URL: https://issues.apache.org/jira/browse/KARAF-6447
> Project: Karaf
> Issue Type: Improvement
> Components: karaf
> Affects Versions: 4.3.0
> Reporter: Miroslav Beranič
> Assignee: Freeman Yue Fang
> Priority: Minor
>
> Feature Config Installer throws an exception when it does not recognize the
> prefix, for example "mvn:".
>
> With this change, stacktrace has more information to poinpoint what is the
> problem.
>
> Will create PR at the GitHub.
>
> Changes made to the class
> org.apache.karaf.features.internal.service.FeatureConfigInstaller located at:
> {code:java}
> karaf/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java{code}
>
> Changes ( at around line 102):
>
> {code:java}
> if (config.isExternal()) {
> try {
> props.load(new URL(val));
> } catch (java.net.MalformedURLException e) {
> throw new IOException("Failed to load config info from URL [" + val + "] for
> feature [" + feature.getName() + "/" + feature.getVersion() + "].");
> }
> } else {
> props.load(new StringReader(val));
> }{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)