mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 452757 - Handle null attribute values
Change-Id: I99be71f80f14ae0befafd003010e3130404ed578 Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
c6c146049c
commit
5a627b8184
1 changed files with 9 additions and 4 deletions
|
@ -132,7 +132,7 @@ public class JSchConnectionAttributes {
|
|||
loadSecureAttributes();
|
||||
return fSecureAttributes;
|
||||
}
|
||||
|
||||
|
||||
void setSecureAttributes(Map<String, String> secureAttributes) {
|
||||
fSecureAttributes.clear();
|
||||
fSecureAttributes.putAll(secureAttributes);
|
||||
|
@ -165,9 +165,10 @@ public class JSchConnectionAttributes {
|
|||
}
|
||||
|
||||
private void loadSecureAttributes() {
|
||||
if (fSecureAttributesLoaded)
|
||||
if (fSecureAttributesLoaded) {
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
ISecurePreferences secNode = getSecurePreferences();
|
||||
try {
|
||||
fSecureAttributes.clear();
|
||||
|
@ -199,7 +200,11 @@ public class JSchConnectionAttributes {
|
|||
Preferences node = getPreferences();
|
||||
synchronized (fAttributes) {
|
||||
for (Entry<String, String> entry : fAttributes.entrySet()) {
|
||||
node.put(entry.getKey(), entry.getValue());
|
||||
if (entry.getValue() != null) {
|
||||
node.put(entry.getKey(), entry.getValue());
|
||||
} else {
|
||||
node.remove(entry.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fSecureAttributesLoaded) {
|
||||
|
|
Loading…
Add table
Reference in a new issue