[ 
https://issues.apache.org/jira/browse/FELIX-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742746#action_12742746
 ] 

Guillaume Nodet commented on FELIX-1481:
----------------------------------------

I propose the following patch:

--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/util/Util.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/util/Util.java
@@ -111,16 +111,10 @@ public class Util
 
         // If we do not have a start or stop delimiter, then just
         // return the existing value.
-        if ((startDelim < 0) && (stopDelim < 0))
+        if ((startDelim < 0) || (stopDelim < 0))
         {
             return val;
         }
-        // At this point, we found a stop delimiter without a start,
-        // so throw an exception.
-        else if (((startDelim < 0) || (startDelim > stopDelim)) && (stopDelim 
>= 0))
-        {
-            throw new IllegalArgumentException("stop delimiter with no start 
delimiter: " + val);
-        }
 
         // At this point, we have found a variable placeholder so
         // we must perform a variable substitution on it.


> When performing variable substitution, fileinstall throws an exception if 
> there is a start or stop delimiter without the other one
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1481
>                 URL: https://issues.apache.org/jira/browse/FELIX-1481
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: Guillaume Nodet
>             Fix For: fileinstall-1.4.0
>
>
> This is a real problem as there is no way to escape the delimiters currently.
> I think silently discard any malformed substitution would be much better, 
> else any value containing a '}' will cause the config to not be loaded at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to