Source:
<code>public NotificationDto updateNotificationById(@Context HttpServletRequest req, @PathParam("alertId") BigInteger alertId, @PathParam("notificationId") BigInteger notificationId, NotificationDto notificationDto) { try { if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) { throw new WebApplicationException("Alert Id cannot be null and must be a positive non-zero number.", Status.BAD_REQUEST); } if (notificationId == null || notificationId.compareTo(BigInteger.ZERO) < 1) { throw new WebApplicationException("Notification Id cannot be null and must be a positive non-zero number.", Status.BAD_REQUEST); } if (notificationDto == null) { throw new WebApplicationException("Null object cannot be updated.", Status.BAD_REQUEST); } PrincipalUser owner = validateAndGetOwner(req, getRemoteUser(req).getUserName()); Alert oldAlert = alertService.findAlertByPrimaryKey(alertId); if (oldAlert == null) { throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND); } validateResourceAuthorization(req, oldAlert.getOwner(), owner); for (Notification notification : oldAlert.getNotifications()) { if (notificationId.equals(notification.getId())) { copyProperties(notification, notificationDto); oldAlert.setModifiedBy(getRemoteUser(req)); Alert alert = alertService.updateAlert(oldAlert); int index = alert.getNotifications().indexOf(notification); return NotificationDto.transformToDto(alert.getNotifications().get(index)); } } throw new WebApplicationException("The notification does not exist.", Response.Status.NOT_FOUND); <START> } catch (Exception e) { <END> throw e; } }</code><technical_language>this change skipped handle individual errors</technical_language>

Target:
public NotificationDto updateNotificationById(@Context HttpServletRequest req, @PathParam("alertId") BigInteger alertId, @PathParam("notificationId") BigInteger notificationId, NotificationDto notificationDto) { if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) { throw new WebApplicationException("Alert Id cannot be null and must be a positive non-zero number.", Status.BAD_REQUEST); } if (notificationId == null || notificationId.compareTo(BigInteger.ZERO) < 1) { throw new WebApplicationException("Notification Id cannot be null and must be a positive non-zero number.", Status.BAD_REQUEST); } if (notificationDto == null) { throw new WebApplicationException("Null object cannot be updated.", Status.BAD_REQUEST); } PrincipalUser owner = validateAndGetOwner(req, getRemoteUser(req).getUserName()); Alert oldAlert = alertService.findAlertByPrimaryKey(alertId); if (oldAlert == null) { throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND); } validateResourceAuthorization(req, oldAlert.getOwner(), owner); for (Notification notification : oldAlert.getNotifications()) { if (notificationId.equals(notification.getId())) { copyProperties(notification, notificationDto); oldAlert.setModifiedBy(getRemoteUser(req)); Alert alert = alertService.updateAlert(oldAlert); int index = alert.getNotifications().indexOf(notification); return NotificationDto.transformToDto(alert.getNotifications().get(index)); } } throw new WebApplicationException("The notification does not exist.", Response.Status.NOT_FOUND); }