Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-15914

Bizzare exception logic in BaseMessageService

    Details

      Description

      The following method (BaseMessageService$BaseMessageChannelEdit.removeMessage) is somewhat bizzare:

      1) should not throw an exception just to catch it
      2) should not throw Exception (should be a NPE or somthing else)
      3) .... need I say more

      /**

      • @inheritDoc
        */
        public void removeMessage(String messageId) throws PermissionException
        {
        // ignore the cache - get the message with a lock from the info store
        MessageEdit message = m_storage.editMessage(this, messageId);
        if (message == null)
        Unknown macro: { try { throw new Exception(); } catch (Exception e) { M_log.warn("removeMessage(String): null edit ", e); } return; }

      removeMessage(message);

      } // removeMessage

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  dhorwitz David Horwitz
                  Reporter:
                  dhorwitz David Horwitz
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration