karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-1066) make features xml parser more forgiving
Date Tue, 14 Aug 2012 06:18:38 GMT

    [ https://issues.apache.org/jira/browse/KARAF-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433933#comment-13433933

Freeman Fang commented on KARAF-1066:

Hi Heath,

Thanks for this patch
I think in the RepositoryImpl.java, simply using
uri = uri.trim();
is better than 
uri = uri.replaceAll("\\s", ""); 
from your patch.  As String.trim() can trim whitespace, \t\r\n from the string, but won't
remove any whitespace in the middle of the string, so it avoid the potential risk if URI have

Moreover, you patch is valuable when parse the features.xml during runtime, but this issue
is mainly about the features-maven-plugin:add-features-to-repo have issues, so your patch
doesn't really fix it, we should fix it in some where like AddToRepositoryMojo.java.

I'll take care of it and fix it soon.

Best Regards

> make features xml parser more forgiving
> ---------------------------------------
>                 Key: KARAF-1066
>                 URL: https://issues.apache.org/jira/browse/KARAF-1066
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>            Reporter: Andrei Pozolotin
>            Assignee: Freeman Fang
>         Attachments: karaf-3.0_1066.diff
> features-maven-plugin:2.2.4:add-features-to-repo
> 1) currently, an entry in features.xml like this works fine:
> <repository>mvn:org.apache.karaf.assemblies.features/standard/2.2.4/xml/features</repository>
> 2) but plugin blows up with exception, if format is like this
> <repository>
> mvn:org.apache.karaf.assemblies.features/standard/2.2.4/xml/features
> </repository>
> "Error populating repository: Illegal character in scheme name at index 0:"
> 3) I suggest to make features xml parser more forgiving

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message