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);
}
PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);
<BUG>if (alert != null) {
validateResourceAuthorization(req, alert.getOwner(), owner);
return TriggerDto.transformToDto(alert.getTriggers());</BUG>
}
throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);

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);
}
PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if(alert != null){
return AlertDto.transformToDto(alert);
}
throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
