Author: markt Date: Sat Nov 18 19:41:49 2006 New Revision: 476694 URL: http://svn.apache.org/viewvc?view=rev&rev=476694 Log: Fix bug 40720. Adding a group to a user caused an exception. Clean up code at same time.
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/SaveUserAction.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/SaveUserAction.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/SaveUserAction.java?view=diff&rev=476694&r1=476693&r2=476694 ============================================================================== --- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/SaveUserAction.java (original) +++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/SaveUserAction.java Sat Nov 18 19:41:49 2006 @@ -21,29 +21,18 @@ import java.io.IOException; import java.net.URLDecoder; -import java.util.ArrayList; -import java.util.Iterator; import java.util.Locale; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; + import org.apache.struts.action.Action; -import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import javax.management.Attribute; import javax.management.MBeanServer; -import javax.management.MBeanServerFactory; -import javax.management.QueryExp; -import javax.management.Query; -import javax.management.ObjectInstance; import javax.management.ObjectName; -import javax.management.JMException; -import javax.management.MBeanAttributeInfo; -import javax.management.MBeanOperationInfo; -import javax.management.MBeanInfo; import org.apache.struts.util.MessageResources; import org.apache.webapp.admin.ApplicationServlet; import org.apache.webapp.admin.TomcatTreeBuilder; @@ -98,7 +87,6 @@ mserver = ((ApplicationServlet) getServlet()).getServer(); } MessageResources resources = getResources(request); - HttpSession session = request.getSession(); Locale locale = getLocale(request); // Has this transaction been cancelled? @@ -208,8 +196,8 @@ addsig[0] = "java.lang.String"; Object addpar[] = new Object[1]; for (int i = 0; i < groups.length; i++) { - addpar[0] = - (new ObjectName(groups[i])).getKeyProperty("groupname"); + addpar[0] = ObjectName.unquote( + (new ObjectName(groups[i])).getKeyProperty("groupname")); mserver.invoke(oname, "addGroup", addpar, addsig); } Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=476694&r1=476693&r2=476694 ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat Nov 18 19:41:49 2006 @@ -172,6 +172,10 @@ documentation. (markt) </fix> <fix> + <bug>40720</bug>: Fix exception in admin webapp when adding a group to + a user. (markt) + </fix> + <fix> <bug>40874</bug>: Correct log4j configuration in documentation webapp. Patch provided by Franck Borel. (markt) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]