mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52: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) {
|
public static String encodeMap(Map<String, String> values) {
|
||||||
List<String> list = new ArrayList<String>();
|
Iterator<Entry<String, String>> entries = values.entrySet().iterator();
|
||||||
Iterator entries = values.entrySet().iterator();
|
|
||||||
StringBuffer str = new StringBuffer();
|
StringBuffer str = new StringBuffer();
|
||||||
while (entries.hasNext()) {
|
while (entries.hasNext()) {
|
||||||
Entry entry = (Entry)entries.next();
|
Entry<String, String> entry = entries.next();
|
||||||
str.append(escapeChars((String)entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
|
str.append(escapeChars(entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
|
||||||
str.append("="); //$NON-NLS-1$
|
str.append("="); //$NON-NLS-1$
|
||||||
str.append(escapeChars((String)entry.getValue(), "|\\", '\\')); //$NON-NLS-1$
|
str.append(escapeChars(entry.getValue(), "|\\", '\\')); //$NON-NLS-1$
|
||||||
list.add(str.toString());
|
str.append("|"); //$NON-NLS-1$
|
||||||
str.delete(0, str.length());
|
|
||||||
}
|
}
|
||||||
return encodeList(list);
|
return str.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String encodeList(List<String> values) {
|
public static String encodeList(List<String> values) {
|
||||||
|
@ -261,8 +259,6 @@ public class MapStorageElement implements ICStorageElement {
|
||||||
while (entries.hasNext()) {
|
while (entries.hasNext()) {
|
||||||
String entry = entries.next();
|
String entry = entries.next();
|
||||||
str.append(escapeChars(entry, "|\\", '\\')); //$NON-NLS-1$
|
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$
|
str.append("|"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
return str.toString();
|
return str.toString();
|
||||||
|
|
Loading…
Add table
Reference in a new issue