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

    Don't swallow exceptions in code

    timfox

      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