pjo's changes
diff --git a/src/com/google/enterprise/adaptor/examples/helloworldconnector/HelloWorldAuthenticator.java b/src/com/google/enterprise/adaptor/examples/helloworldconnector/HelloWorldAuthenticator.java
index b71127c..ad19c78 100644
--- a/src/com/google/enterprise/adaptor/examples/helloworldconnector/HelloWorldAuthenticator.java
+++ b/src/com/google/enterprise/adaptor/examples/helloworldconnector/HelloWorldAuthenticator.java
@@ -99,7 +99,7 @@
*/
@Override
public void handle(HttpExchange ex) throws IOException {
- log.entering("AuthNResponseHandler", "handle");
+ log.entering("HelloWorldAuthenticator", "handle");
callback = getCallback(ex);
if (callback == null) {
diff --git a/src/com/google/enterprise/adaptor/examples/helloworldconnector/SimpleAuthnIdentity.java b/src/com/google/enterprise/adaptor/examples/helloworldconnector/SimpleAuthnIdentity.java
index 932e59b..14a6f3c 100644
--- a/src/com/google/enterprise/adaptor/examples/helloworldconnector/SimpleAuthnIdentity.java
+++ b/src/com/google/enterprise/adaptor/examples/helloworldconnector/SimpleAuthnIdentity.java
@@ -33,7 +33,7 @@
public SimpleAuthnIdentity(String uid) throws NullPointerException {
if (uid == null) {
- throw(new NullPointerException("Null user not allowed"));
+ throw new NullPointerException("Null user not allowed");
}
this.user = new UserPrincipal(uid);
}
@@ -44,10 +44,10 @@
this(uid);
this.groups = new TreeSet<GroupPrincipal>();
if (gid != null && !"".equals(gid)) {
- this.groups.add(new GroupPrincipal(gid));
+ this.groups.addAll(Collections.singleton(new GroupPrincipal(gid)));
}
this.groups =
- (Set<GroupPrincipal>) Collections.unmodifiableCollection(this.groups);
+ Collections.unmodifiableSet(this.groups);
}
// Constructor with user & groups
@@ -57,11 +57,11 @@
this.groups = new TreeSet<GroupPrincipal>();
for (String n : gids) {
if (n != null && !"".equals(n)) {
- this.groups.add(new GroupPrincipal(n));
+ this.groups.addAll(Collections.singleton(new GroupPrincipal(n)));
}
}
this.groups =
- (Set<GroupPrincipal>) Collections.unmodifiableCollection(this.groups);
+ Collections.unmodifiableSet(this.groups);
}
@Override