mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +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
|
@ -165,8 +165,9 @@ public class JSchConnectionAttributes {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadSecureAttributes() {
|
private void loadSecureAttributes() {
|
||||||
if (fSecureAttributesLoaded)
|
if (fSecureAttributesLoaded) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ISecurePreferences secNode = getSecurePreferences();
|
ISecurePreferences secNode = getSecurePreferences();
|
||||||
try {
|
try {
|
||||||
|
@ -199,7 +200,11 @@ public class JSchConnectionAttributes {
|
||||||
Preferences node = getPreferences();
|
Preferences node = getPreferences();
|
||||||
synchronized (fAttributes) {
|
synchronized (fAttributes) {
|
||||||
for (Entry<String, String> entry : fAttributes.entrySet()) {
|
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) {
|
if (fSecureAttributesLoaded) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue