resourceLocalService.deleteResource(
message.getCompanyId(), MBMessage.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, message.getMessageId());
}
mbMessagePersistence.remove(message);
<BUG>}
category.setThreadCount(category.getThreadCount() - 1);
category.setMessageCount(category.getMessageCount() - messages.size());
mbCategoryPersistence.update(category, false);
mbThreadPersistence.remove(thread);</BUG>
}

resourceLocalService.deleteResource(
message.getCompanyId(), MBMessage.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, message.getMessageId());
}
mbMessagePersistence.remove(message);
}
if (!rootMessage.isDiscussion()) {
category.setThreadCount(category.getThreadCount() - 1);
category.setMessageCount(
category.getMessageCount() - messages.size());
mbCategoryPersistence.update(category, false);
}
mbThreadPersistence.remove(thread);
}
