<BUG>if (!rootMessage.isDiscussion()) {MBCategory category = mbCategoryPersistence.findByPrimaryKey(</BUG><CONTEXT>message.getCompanyId(), MBMessage.class.getName(),ResourceConstants.SCOPE_INDIVIDUAL, message.getMessageId());}mbMessagePersistence.remove(message);}<extra_id_0>thread.getCategoryId());category.setThreadCount(category.getThreadCount() - 1);category.setMessageCount(</CONTEXT>
if (rootMessage.getCategoryId() > 0) {MBCategory category = mbCategoryPersistence.findByPrimaryKey(