nickwallen commented on a change in pull request #1457: METRON-2176 Upgrade
REST for HBase 2.0.2
URL: https://github.com/apache/metron/pull/1457#discussion_r300125125
##########
File path:
metron-interface/metron-rest/src/main/java/org/apache/metron/rest/service/impl/AlertsUIServiceImpl.java
##########
@@ -136,12 +136,15 @@ public void
saveAlertsUIUserSettings(AlertsUIUserSettings alertsUIUserSettings)
}
@Override
- public boolean deleteAlertsUIUserSettings(String user) {
- boolean success = true;
+ public boolean deleteAlertsUIUserSettings(String user) throws RestException {
+ boolean success = false;
try {
- userSettingsClient.delete(user, ALERT_USER_SETTING_TYPE);
+ if(userSettingsClient.findOne(user,
ALERT_USER_SETTING_TYPE).isPresent()) {
Review comment:
This was needed to maintain the behavior of returning false if you attempt
to delete settings that don't exist. When issuing the delete you don't get any
indication of whether something was deleted or not.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services