0 Replies Latest reply on Apr 15, 2010 4:47 AM by Tim Fox

    Don't swallow exceptions in code

    Tim Fox Master

      JMSServerManagerImpl:

       

      private void unbindJNDI(Map<String, List<String>> param)
         {
            for (List<String> elementList : param.values())
            {
               for (String key : elementList)
               {
                  try
                  {
                     context.unbind(key);
                  }
                  catch (Exception e)
                  {
                     log.warn("Impossible to unbind key " + key + " from JNDI");
                  }
               }
            }
         }

       

      This is actually failing in Stomp test because a NPE is thrown because the context is null, but this is swallowed