Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2136

ROAR should not offer 'system notification' if unsupported by OS

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 2.9.0
    • Component/s: Roar
    • Labels:
      None

      Description

      The System Notification type that can be configured for ROAR is not supported by all operating systems.

      This, for example, happens on my Ubuntu 18.04 laptop:

      SEVERE: A GlobalMessageListener ('org.jivesoftware.spark.roar.RoarMessageListener@29f2b8a5') threw an exception while processing an incoming chat message (from 'open_chat@conference.igniterealtime.org/guus-jsxc') in a chat room ('org.jivesoftware.spark.ui.rooms.GroupChatRoom[,0,0,751x499,invalid,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.MatteBorder@26124eaf,flags=9,maximumSize=,minimumSize=,preferredSize=]').
      java.lang.UnsupportedOperationException: The system tray is not supported on the current platform.
      	at java.desktop/java.awt.SystemTray.getSystemTray(SystemTray.java:188)
      	at org.jivesoftware.spark.roar.displaytype.WindowsNotification.sendNotification(WindowsNotification.java:10)
      	at org.jivesoftware.spark.roar.displaytype.SystemNotification.messageReceived(SystemNotification.java:22)
      	at org.jivesoftware.spark.roar.RoarMessageListener.decideForRoomAndMessage(RoarMessageListener.java:73)
      	at org.jivesoftware.spark.roar.RoarMessageListener.messageReceived(RoarMessageListener.java:61)
      	at org.jivesoftware.spark.ChatManager.fireGlobalMessageReceievedListeners(ChatManager.java:451)
      	at org.jivesoftware.spark.ui.ChatRoom.insertMessage(ChatRoom.java:558)
      	at org.jivesoftware.spark.ui.rooms.GroupChatRoom.handleMessagePacket(GroupChatRoom.java:649)
      	at org.jivesoftware.spark.ui.rooms.GroupChatRoom.lambda$processStanza$2(GroupChatRoom.java:592)
      	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
      	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
      	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

      The option to use System Notification should only be offered when the platform can support it.

        Attachments

          Activity

            People

            Assignee:
            guus Guus der Kinderen
            Reporter:
            guus Guus der Kinderen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: