Index: lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonJoinServlet.java =================================================================== diff -u -red0cc400ab00e2c188be1f4227532770fec5a6e7 -r539537fbb7a5566f4d480340cc6ec9d3a20473d6 --- lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonJoinServlet.java (.../LessonJoinServlet.java) (revision ed0cc400ab00e2c188be1f4227532770fec5a6e7) +++ lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonJoinServlet.java (.../LessonJoinServlet.java) (revision 539537fbb7a5566f4d480340cc6ec9d3a20473d6) @@ -75,6 +75,7 @@ */ public class LessonJoinServlet extends HttpServlet { + private static final long serialVersionUID = -8013072844129192750L; private static Logger log = Logger.getLogger(LessonJoinServlet.class); private static ILessonService lessonService = null; private static IUserManagementService userService = null; @@ -99,7 +100,7 @@ "integrationService"); } - public void doGet(HttpServletRequest request, HttpServletResponse response) + public synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); @@ -301,22 +302,24 @@ } private String incrementLessonName(String name) { + String newName = name; if (!StringUtils.isBlank(name)) { int i = name.lastIndexOf(' '); if (i >= 0) { String counterStr = name.substring(i).trim(); try { int counterInt = Integer.parseInt(counterStr); counterInt++; - return (name.substring(0, i) + " " + counterInt); + newName = (name.substring(0, i) + " " + counterInt); } catch (NumberFormatException e) { - return name + " 2"; + newName = name + " 2"; } } else { - return name + " 2"; + newName = name + " 2"; } } - return name; + log.debug("Created new lesson name '" + newName + "' from original '" + name + "'"); + return newName; } private List getListFromSet(Set users) {