You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2019/10/07 00:42:00 UTC

[jira] [Assigned] (KARAF-6447) Added more information to the thrown exception for malformed url.

     [ https://issues.apache.org/jira/browse/KARAF-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Yue Fang reassigned KARAF-6447:
---------------------------------------

    Assignee: Freeman Yue Fang

> 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)