Coverage report

  %line %branch
org.demosys.web.user.action.UpdateUserAction
0% 
0% 

 1  
 /*
 2  
  * Demosys.
 3  
  *
 4  
  * Terms of license - http://opensource.org/licenses/apachepl.php
 5  
  */
 6  
 package org.demosys.web.user.action;
 7  
 import javax.servlet.http.HttpServletRequest;
 8  
 import javax.servlet.http.HttpServletResponse;
 9  
 import org.apache.struts.action.*;
 10  
 import org.demosys.web.ServiceLocator;
 11  
 import org.demosys.web.user.InvalidUserException;
 12  
 import org.demosys.web.user.UnknownUserException;
 13  
 /**
 14  
  * Update User.
 15  
  */
 16  0
 public class UpdateUserAction extends Action {
 17  
     public ActionForward execute(ActionMapping mapping, ActionForm objForm,
 18  
         HttpServletRequest request, HttpServletResponse res) {
 19  
         try {
 20  0
             ServiceLocator.getServiceLocator().getUserService().updateUser(((UserForm)objForm)
 21  
                     .toUserView());
 22  0
             return mapping.findForward("success");
 23  
         }
 24  
         catch (UnknownUserException e) {
 25  0
             ActionErrors errors = new ActionErrors();
 26  0
             errors.add("id", new ActionError("user.edit.unknown.user"));
 27  0
             saveErrors(request, errors);
 28  0
             return mapping.findForward("failure");
 29  
         }
 30  
         catch (InvalidUserException e) {
 31  0
             saveErrors(request, e.getErrors());
 32  0
             return mapping.findForward("failure");
 33  
         }
 34  
     }
 35  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.