162 ownerId -> ownerId >= 0 ? new User(ownerId) : null |
162 ownerId -> ownerId >= 0 ? new User(ownerId) : null |
163 ).ifPresent(project::setOwner); |
163 ).ifPresent(project::setOwner); |
164 |
164 |
165 dao.getProjectDao().saveOrUpdate(project); |
165 dao.getProjectDao().saveOrUpdate(project); |
166 |
166 |
167 setRedirectLocation(req, "./projects/versions?pid="+project.getId()); |
167 setRedirectLocation(req, "./projects/"); |
168 setContentPage(req, Constants.JSP_COMMIT_SUCCESSFUL); |
168 setContentPage(req, Constants.JSP_COMMIT_SUCCESSFUL); |
169 LOG.debug("Successfully updated project {}", project.getName()); |
169 LOG.debug("Successfully updated project {}", project.getName()); |
170 |
170 |
171 return ResponseType.HTML; |
171 return ResponseType.HTML; |
172 } catch (NoSuchElementException | IllegalArgumentException | SQLException ex) { |
172 } catch (NoSuchElementException | IllegalArgumentException | SQLException ex) { |