• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Super User Checking

 
Naveen R R
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone help me with this? The error it gives: The operator named == is not defined for the argument type(s) java.lang.String, char
public void validateSecurity(String loginId, String progId, String funcId, OfficeUserBean user) throws NoAccessException, db.NoConnectionException, db.DBException {
try {
if (user.getSuperUser() == 'X') {
return;
}
else {
-----
-----
Thank You,
Naveen
 
Andrew Shafer
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The error tells you what is wrong. You are trying to compare a String with a char with ==, which is not defined.
Off the top of my head:

That should work.
.equals() is a method of java.lang.String
 
Naveen R R
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Andrew. It works now.
Naveen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic