You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Miroslav Beranič (Jira)" <ji...@apache.org> on 2019/10/05 20:22:00 UTC

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

Miroslav Beranič created KARAF-6447:
---------------------------------------

             Summary: 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č


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)