Fix broken AdAdaptor NPE on init when per-server password is not specified
diff --git a/src/com/google/enterprise/adaptor/ad/AdAdaptor.java b/src/com/google/enterprise/adaptor/ad/AdAdaptor.java index 0a0c899..70ba0e0 100644 --- a/src/com/google/enterprise/adaptor/ad/AdAdaptor.java +++ b/src/com/google/enterprise/adaptor/ad/AdAdaptor.java
@@ -122,10 +122,11 @@ if (principal.isEmpty()) { throw new IllegalStateException("user not specified for host " + host); } - String passwd = context.getSensitiveValueDecoder().decodeValue( - singleServerConfig.get("password")); + String passwd = singleServerConfig.get("password"); if (null == passwd) { passwd = defaultPassword; + } else { + passwd = context.getSensitiveValueDecoder().decodeValue(passwd); } if (passwd.isEmpty()) { throw new IllegalStateException("password not specified for host "