mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
[266540] - removed double escaping
This commit is contained in:
parent
5e47877afa
commit
666c642f44
1 changed files with 6 additions and 10 deletions
|
@ -241,18 +241,16 @@ public class MapStorageElement implements ICStorageElement {
|
|||
}
|
||||
|
||||
public static String encodeMap(Map<String, String> values) {
|
||||
List<String> list = new ArrayList<String>();
|
||||
Iterator entries = values.entrySet().iterator();
|
||||
Iterator<Entry<String, String>> entries = values.entrySet().iterator();
|
||||
StringBuffer str = new StringBuffer();
|
||||
while (entries.hasNext()) {
|
||||
Entry entry = (Entry)entries.next();
|
||||
str.append(escapeChars((String)entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
|
||||
Entry<String, String> entry = entries.next();
|
||||
str.append(escapeChars(entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
|
||||
str.append("="); //$NON-NLS-1$
|
||||
str.append(escapeChars((String)entry.getValue(), "|\\", '\\')); //$NON-NLS-1$
|
||||
list.add(str.toString());
|
||||
str.delete(0, str.length());
|
||||
str.append(escapeChars(entry.getValue(), "|\\", '\\')); //$NON-NLS-1$
|
||||
str.append("|"); //$NON-NLS-1$
|
||||
}
|
||||
return encodeList(list);
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
public static String encodeList(List<String> values) {
|
||||
|
@ -261,8 +259,6 @@ public class MapStorageElement implements ICStorageElement {
|
|||
while (entries.hasNext()) {
|
||||
String entry = entries.next();
|
||||
str.append(escapeChars(entry, "|\\", '\\')); //$NON-NLS-1$
|
||||
// str.append("="); //$NON-NLS-1$
|
||||
// str.append(escapeChars((String)entry.getValue(), "|\\", '\\')); //$NON-NLS-1$
|
||||
str.append("|"); //$NON-NLS-1$
|
||||
}
|
||||
return str.toString();
|
||||
|
|
Loading…
Add table
Reference in a new issue