mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 471136 - Ensure preference node path is valid
Change-Id: I6e7634bcf46713ee472f7a86f40051b4db5d5a49 Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
bc64e0a017
commit
8ec64b17bf
1 changed files with 14 additions and 2 deletions
|
@ -10,6 +10,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.remote.internal.core;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -127,11 +129,21 @@ public class RemoteConnection implements IRemoteConnection {
|
|||
}
|
||||
|
||||
Preferences getPreferences() {
|
||||
return connectionType.getPreferenceNode().node(name);
|
||||
try {
|
||||
return connectionType.getPreferenceNode().node(URLEncoder.encode(name, "UTF-8")); //$NON-NLS-1$
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should not happen!
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
ISecurePreferences getSecurePreferences() {
|
||||
return connectionType.getSecurePreferencesNode().node(name);
|
||||
try {
|
||||
return connectionType.getSecurePreferencesNode().node(URLEncoder.encode(name, "UTF-8")); //$NON-NLS-1$
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should not happen!
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue