don't through a nullpointer exc when storing a null password but rather remove the existing password.

cusax-fix
Emil Ivov 19 years ago
parent a260dfba52
commit 165fda9dad

@ -266,8 +266,13 @@ protected void storePassword(BundleContext bundleContext,
+ " in package" + getFactoryImplPackageName());
//obscure the password
String mangledPassword
= new String(Base64.encode(password.getBytes()));
String mangledPassword = null;
//if password is null then the caller simply wants the current password
//removed from the cache. make sure they don't get a null pointer
//instead.
if(password != null)
mangledPassword = new String(Base64.encode(password.getBytes()));
//get a reference to the config service and store it.
ServiceReference confReference

Loading…
Cancel
Save