I have the following method:
private boolean hasDebugRole(Database thisDb, String user) {
if (trace)
System.out.println("entering method: hasDebugRole");
boolean result = false;
try {
Vector roles = thisDb.queryAccessRoles(user);
for (int i = 0; i < roles.size(); i++) {
if (roles.elementAt(i) == "[Debug]")
result = true;
}
} catch (NotesException e) {
System.out.println(e.id + " " + e.text);
e.printStackTrace();
}
if (trace)
System.out.println("Debugging" + result);
return result;
}
roles.element(1) is really “[Debug]” becuase I see it in the eclipse debugger, however, the if statement just ignores it.
What am I doing wrong?
mxl