diff --git a/container/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java b/container/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
index 21726520..c4f161b6 100644
--- a/container/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
+++ b/container/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
@@ -188,7 +188,7 @@ public String createGroup(String groupname, String description) {
MBeanUtils.createMBean(group);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Exception creating group " + group + " MBean");
+ ("Exception creating group [" + groupname + "] MBean");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -211,7 +211,7 @@ public String createRole(String rolename, String description) {
MBeanUtils.createMBean(role);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Exception creating role " + role + " MBean");
+ ("Exception creating role [" + rolename + "] MBean");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -236,7 +236,7 @@ public String createUser(String username, String password,
MBeanUtils.createMBean(user);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Exception creating user " + user + " MBean");
+ ("Exception creating user [" + username + "] MBean");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -264,7 +264,7 @@ public String findGroup(String groupname) {
return (oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Cannot create object name for group " + group);
+ ("Cannot create object name for group [" + groupname + "]");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -291,7 +291,7 @@ public String findRole(String rolename) {
return (oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Cannot create object name for role " + role);
+ ("Cannot create object name for role [" + rolename + "]");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -318,7 +318,7 @@ public String findUser(String username) {
return (oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Cannot create object name for user " + user);
+ ("Cannot create object name for user [" + username + "]");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -343,7 +343,7 @@ public void removeGroup(String groupname) {
database.removeGroup(group);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Exception destroying group " + group + " MBean");
+ ("Exception destroying group [" + groupname + "] MBean");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -368,7 +368,7 @@ public void removeRole(String rolename) {
database.removeRole(role);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Exception destroying role " + role + " MBean");
+ ("Exception destroying role [" + rolename + "] MBean");
jdkCompat.chainException(iae, e);
throw iae;
}
@@ -393,7 +393,7 @@ public void removeUser(String username) {
database.removeUser(user);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
- ("Exception destroying user " + user + " MBean");
+ ("Exception destroying user [" + username + "] MBean");
jdkCompat.chainException(iae, e);
throw iae;
}
diff --git a/container/catalina/src/share/org/apache/catalina/users/MemoryUser.java b/container/catalina/src/share/org/apache/catalina/users/MemoryUser.java
index f3f8470a..e41af480 100644
--- a/container/catalina/src/share/org/apache/catalina/users/MemoryUser.java
+++ b/container/catalina/src/share/org/apache/catalina/users/MemoryUser.java
@@ -246,7 +246,7 @@ public void removeRoles() {
* username
or name for the username
* property.