Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6447

Added more information to the thrown exception for malformed url.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0, 4.2.8
    • Component/s: karaf
    • Labels:
      None

      Description

      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:

      karaf/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java

       

      Changes ( at around line 102):

       

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

       

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Yue Fang
              Reporter:
              mibesis Miroslav Beranič
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: