Mikael Svahn created FELIX-4441:
-----------------------------------

             Summary: The default value is not escaped correctly.
                 Key: FELIX-4441
                 URL: https://issues.apache.org/jira/browse/FELIX-4441
             Project: Felix
          Issue Type: Bug
          Components: Maven SCR Plugin
    Affects Versions: scr generator 1.8.2
            Reporter: Mikael Svahn


The default value is not correctly escaped when the xml file is generated.
The problem is that the characters ' ' and ',' is escaped twice.

It is solved by the following patch

--- src/main/java/org/apache/felix/scrplugin/xml/MetaTypeIO.java        
2014-02-28 08:16:21.706349600 +0100
+++ src/main/java/org/apache/felix/scrplugin/xml/MetaTypeIO.java        
2014-02-28 08:16:28.307009600 +0100
@@ -284,9 +284,9 @@
         }
 
         String result = value.trim();
+        result = result.replace("\\", "\\\\");
         result = result.replace(" ", "\\ ");
         result = result.replace(",", "\\,");
-        result = result.replace("\\", "\\\\");
         return result;
     }





--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to